2 AC_CONFIG_HEADER(scmconfig.h)
4 . $srcdir/../GUILE-VERSION
6 #--------------------------------------------------------------------
10 #--------------------------------------------------------------------
13 [ --disable-debug Don't include debugging support])
14 if test "$enableval" != n && test "$enableval" != no; then
15 AC_DEFINE(DEBUG_EXTENSIONS)
16 AC_DEFINE(READER_EXTENSIONS)
17 LIBOBJS="backtrace.o stacks.o debug.o srcprop.o $LIBOBJS"
20 #--------------------------------------------------------------------
22 test -z "$CFLAGS" && CFLAGS=-g
23 test -z "$LDFLAGS" && LDFLAGS=-g
33 builtin(sinclude, ../aclocal.m4)
35 CFLAGS="$CPPFLAGS $CFLAGS"
43 AC_CHECK_HEADERS(libc.h limits.h malloc.h memory.h string.h sys/ioctl.h sys/select.h sys/time.h sys/timeb.h sys/times.h sys/types.h sys/utime.h time.h unistd.h utime.h)
49 AC_CHECK_FUNCS(ctermid ftime getcwd geteuid lstat mkdir mknod nice putenv readlink rename rmdir select setegid seteuid setlocale setpgid setsid strftime strptime symlink sync tcgetpgrp tcsetpgrp times uname waitpid)
51 AC_REPLACE_FUNCS(inet_aton strerror)
58 #--------------------------------------------------------------------
60 # Which way does the stack grow?
62 #--------------------------------------------------------------------
64 AC_TRY_RUN(aux (l) unsigned long l;
65 { int x; exit (l >= ((unsigned long)&x)); }
66 main () { int q; aux((unsigned long)&q); },
67 AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
70 AC_TRY_RUN(main () { exit (sizeof(float) != sizeof(long)); },
71 AC_DEFINE(SCM_SINGLES),,AC_DEFINE(SCM_SINGLES)
72 AC_MSG_WARN(Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in))
74 AC_MSG_CHECKING(for struct linger)
75 AC_CACHE_VAL(scm_cv_struct_linger,
76 AC_TRY_COMPILE([#include <sys/socket.h>],
77 [struct linger lgr; lgr.l_linger = 100],
78 scm_cv_struct_linger="yes",
79 scm_cv_struct_linger="no"))
80 AC_MSG_RESULT($scm_cv_struct_linger)
81 if test $scm_cv_struct_linger = yes; then
82 AC_DEFINE(HAVE_STRUCT_LINGER)
85 #--------------------------------------------------------------------
87 # How can you violate a stdio abstraction by setting a stream's fd?
89 #--------------------------------------------------------------------
93 if test "x$FD_SETTER" = x; then
94 AC_TRY_COMPILE(#include <stdio.h>
96 FD_SETTER="((F)->_file = (D))")
99 if test "x$FD_SETTER" = x; then
100 AC_TRY_COMPILE(#include <stdio.h>
102 FD_SETTER="((F)->_fileno = (D))")
106 dnl Add FD_SETTER tests for other systems here. Your test should
107 dnl try a particular style of assigning to the descriptor
108 dnl field(s) of a FILE* and define FD_SETTER accordingly.
110 dnl The value of FD_SETTER is used as a macro body, as in:
112 dnl #define SET_FILE_FD_FIELD(F,D) @FD_SETTER@
114 dnl F is a FILE* and D a descriptor (int).
117 test "x$FD_SETTER" != x && AC_DEFINE(HAVE_FD_SETTER)
119 #--------------------------------------------------------------------
121 # Flags for thread support
123 #--------------------------------------------------------------------
126 dnl Set the appropriate flags!
128 if test "$cy_cv_threads_package" = FSU; then
129 AC_DEFINE(USE_FSU_PTHREADS, 1)
130 else if test "$cy_cv_threads_package" = COOP; then
131 AC_DEFINE(USE_COOP_THREADS, 1)
132 else if test "$cy_cv_threads_package" = MIT; then
133 AC_DEFINE(USE_MIT_PTHREADS, 1)
134 else if test "$cy_cv_threads_package" = PCthreads; then
135 AC_DEFINE(USE_PCTHREADS_PTHREADS, 1)
136 else if test "$cy_cv_threads_package" = unknown; then
137 AC_MSG_ERROR("cannot find threads installation")
144 if test "$cy_cv_threads_package" != ""; then
145 AC_DEFINE(USE_THREADS)
148 ## If we're using GCC, ask for aggressive warnings.
150 yes ) CFLAGS="$CFLAGS -Wall -Wpointer-arith" ;;
153 AC_DEFINE_UNQUOTED(GUILE_MAJOR_VERSION, "$GUILE_MAJOR_VERSION")
154 AC_DEFINE_UNQUOTED(GUILE_MINOR_VERSION, "$GUILE_MINOR_VERSION")
155 AC_DEFINE_UNQUOTED(GUILE_VERSION, "$GUILE_VERSION")
162 AC_SUBST(GUILE_MAJOR_VERSION)
163 AC_SUBST(GUILE_MINOR_VERSION)
164 AC_SUBST(GUILE_VERSION)
165 AC_OUTPUT(Makefile fd.h)
168 dnl comment-start: "dnl "
170 dnl comment-start-skip: "\\bdnl\\b\\s *"