clean ()
{
- if [ "x${configure}" != xdone ]; then
+ if [ "x${autoheader}" != xdone ]; then
+ rm -f config.h.in
+ fi
+ if [ "x${autoconf}" != xdone ]; then
rm -f configure
fi
}
exit 1
fi
+if [ ! -f config.h.in ]; then
+ autoheader=clean
+ echo "autoheader"
+ autoheader
+ autoheader=done
+fi
+
if [ ! -x configure \
-o configure.ac -nt configure \
-o microcode/aclocal.m4 -nt configure ]; then
- configure=clean
+ autoconf=clean
echo "autoconf --include=microcode"
autoconf --include=microcode
- configure=done
+ autoconf=done
fi
. etc/functions.sh
AC_INIT([MIT/GNU Scheme], [12.0.50], [bug-mit-scheme@gnu.org], [mit-scheme])
AC_CONFIG_SRCDIR([microcode/boot.c])
AC_CONFIG_AUX_DIR([microcode])
+AC_CONFIG_HEADERS([dummy-config.h])
AC_PROG_MAKE_SET
AC_COPYRIGHT(
If you have installed MIT/GNU Scheme in an unusual location, set the
environment variable MIT_SCHEME_EXE to the name or pathname of the
-MIT/GNU Scheme executable, which is usually \`mit-scheme' or
-\`/usr/local/bin/mit-scheme', and set the environment variable
+MIT/GNU Scheme executable, which is usually `mit-scheme' or
+`/usr/local/bin/mit-scheme', and set the environment variable
MITSCHEME_LIBRARY_PATH to the pathname of the MIT/GNU Scheme library
-directory, which is usually \`/usr/local/lib/mit-scheme-${mit_scheme_native_code}'.
+directory, which is usually `/usr/local/lib/mit-scheme-${mit_scheme_native_code}'.
])
fi
fi
#include <sys/types.h>
-#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
#ifdef HAVE_TERMIOS_H
dnl Checks for programs.
AC_CHECK_TOOL([AS], [as])
AC_PROG_CC
-AC_PROG_CC_STDC
if test "x${ac_cv_prog_cc_c99}" != xno; then
AC_DEFINE([HAVE_STDC_99], [1], [Does the compiler support C99?])
fi
AC_MSG_CHECKING([for compiler $flag])
SAVED_CFLAGS=${CFLAGS}
CFLAGS="${SAVED_CFLAGS} ${flag} -Werror"
- AC_TRY_COMPILE([],[],
- [AC_MSG_RESULT(yes)
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+ [AC_MSG_RESULT(yes)
CFLAGS="${SAVED_CFLAGS} ${flag}"],
- [AC_MSG_RESULT(no)
+ [AC_MSG_RESULT(no)
CFLAGS=${SAVED_CFLAGS}])
done
dnl Checks for header files.
AC_HEADER_DIRENT
-AC_HEADER_STDC
AC_HEADER_STDBOOL
AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-AC_CHECK_HEADERS([bsdtty.h fcntl.h fenv.h ieeefp.h limits.h malloc.h poll.h])
-AC_CHECK_HEADERS([sgtty.h stropts.h time.h])
+AC_CHECK_HEADERS_ONCE([sys/time.h])
+
+AC_CHECK_HEADERS([bsdtty.h fcntl.h fenv.h ieeefp.h malloc.h poll.h])
+AC_CHECK_HEADERS([sgtty.h stropts.h])
AC_CHECK_HEADERS([sys/file.h sys/ioctl.h sys/mount.h sys/param.h])
-AC_CHECK_HEADERS([sys/ptyio.h sys/socket.h sys/time.h sys/timex.h sys/un.h])
+AC_CHECK_HEADERS([sys/ptyio.h sys/socket.h sys/timex.h sys/un.h])
AC_CHECK_HEADERS([sys/vfs.h])
AC_CHECK_HEADERS([termio.h termios.h unistd.h util.h utime.h])
-AC_CHECK_HEADERS([dlfcn.h netdb.h signal.h])
-AC_CHECK_HEADERS([sys/mman.h float.h assert.h stdint.h])
+AC_CHECK_HEADERS([dlfcn.h netdb.h])
+AC_CHECK_HEADERS([sys/mman.h stdint.h])
define([SCM_INC_TIME],
[
- #ifdef TIME_WITH_SYS_TIME
+ #include <time.h>
+ #ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
- # include <time.h>
- #else
- # ifdef HAVE_SYS_TIME_H
- # include <sys/time.h>
- # else
- # include <time.h>
- # endif
#endif
])
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
-AC_TYPE_SIGNAL
AC_TYPE_SIZE_T
AC_TYPE_UID_T
[AC_DEFINE([nlink_t], [short],
[Define to 'short' if undefined.])])
-AC_CHECK_TYPE([clock_t],
- [],
- [AC_DEFINE([clock_t], [unsigned long],
- [Define to `unsigned long' if <time.h> doesn't define.])],
- [SCM_INC_TIME])
-
-AC_CHECK_TYPE([time_t],
- [],
- [AC_DEFINE([time_t], [long],
- [Define to `long' if <time.h> doesn't define.])],
- [SCM_INC_TIME])
-
AC_CHECK_TYPE([socklen_t],
[],
[AC_DEFINE([socklen_t], [int],
[SCM_INC_SYS_TIMEX])
dnl Checks for compiler characteristics.
-AC_C_BIGENDIAN
AC_C_CHAR_UNSIGNED
AC_C_CONST
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_SETPGRP
-AC_FUNC_SETVBUF_REVERSED
AC_FUNC_UTIME_NULL
-AC_FUNC_VFORK
+AC_FUNC_FORK
AC_FUNC_VPRINTF
-AC_FUNC_WAIT3
AC_CHECK_FUNCS([clock_gettime closefrom ctermid])
AC_CHECK_FUNCS([dup2])
AC_CHECK_FUNCS([expm1])
AC_CHECK_FUNCS([utime])
AC_CHECK_FUNCS([waitpid])
-if test ${ac_cv_type_signal} = void; then
- AC_DEFINE([VOID_SIGNAL_HANDLERS], [1],
- [Define if RETSIGTYPE is `void'.])
-fi
-
dnl Checks for system characteristics.
AC_PATH_X
AC_SYS_LARGEFILE
#ifndef SCM_CONFSHARED_H
#define SCM_CONFSHARED_H
\f
-#ifndef __STDC__
-# include "error: compiler must support ANSI C"
-#endif
-
/* Enable the stepper. */
#define COMPILE_STEPPER 1
#define FALSE 0
#define TRUE 1
-#include <stdio.h>
+/* According to autoconf 2.71 all these headers can be assumed to exist. */
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <float.h>
+#include <iso646.h>
+#include <limits.h>
#include <math.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <wchar.h>
+#include <wctype.h>
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stdarg.h>
-# include <stddef.h>
-# include <string.h>
-# include <ctype.h>
-# include <limits.h>
-# include <float.h>
-# include <assert.h>
-#else
-# ifdef HAVE_LIMITS_H
-# include <limits.h>
-# endif
-# ifdef HAVE_FLOAT_H
-# include <float.h>
-# else
-# include "float.h"
-# endif
-# ifdef HAVE_ASSERT_H
-# include <assert.h>
-# endif
-# ifdef HAVE_MALLOC_H
-# include <malloc.h>
-# endif
-# if !HAVE_STRCHR
-# define strchr index
-# define strrchr rindex
-# endif
- extern char * strchr ();
- extern char * strrchr ();
-# if !HAVE_MEMCPY
-# define memcpy(d, s, n) bcopy ((s), (d), (n))
-# define memmove(d, s, n) bcopy ((s), (d), (n))
-# endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
#endif
#ifdef HAVE_STDBOOL_H
# ifdef __cplusplus
typedef bool _Bool;
# else
- typedef unsigned char _Bool;
+ define _Bool signed char;
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
-# if ((defined (__GNUC__)) && (__GNUC__ < 3))
- /* Old versions of GCC have an incompatible <stdbool.h>.
- This declaration should prevent them from overriding our defs. */
-# define __STDBOOL_H__ 1
-# endif
-#endif
-
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
#endif
#if (CHAR_BIT != 8)
#include "osproc.h"
#include "osio.h"
-#ifdef __unix__
- extern char ** environ;
-#endif
-
extern Tchannel arg_channel (int);
static Tprocess
\f
#include "config.h"
-#include <errno.h>
#include <grp.h>
#include <pwd.h>
#include <signal.h>
# endif
#endif
-#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
#endif
#ifdef HAVE_SYS_TIMEX_H
#include "osscheme.h"
#include "syscall.h"
\f
-typedef RETSIGTYPE Tsignal_handler_result;
+typedef void Tsignal_handler_result;
#ifdef _POSIX_REALTIME_SIGNALS
# define HAVE_SIGACTION_SIGINFO_SIGNALS
#ifdef HAVE_SIGACTION_SIGINFO_SIGNALS
typedef void (*Tsignal_handler) (int, siginfo_t *, void *);
#else
- typedef RETSIGTYPE (*Tsignal_handler) (int);
+ typedef void (*Tsignal_handler) (int);
#endif
-#ifdef VOID_SIGNAL_HANDLERS
-# define SIGNAL_HANDLER_RETURN() return
-#else
-# define SIGNAL_HANDLER_RETURN() return (0)
-#endif
+#define SIGNAL_HANDLER_RETURN() return
/* Crufty, but it will work here. */
#ifndef ENOSYS