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="debug.o srcprop.o $LIBOBJS"
20 #--------------------------------------------------------------------
22 test -z "$CFLAGS" && CFLAGS=-g
23 test -z "$LDFLAGS" && LDFLAGS=-g
39 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 time.h unistd.h)
45 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)
47 AC_REPLACE_FUNCS(inet_aton)
53 #--------------------------------------------------------------------
55 # Which way does the stack grow?
57 #--------------------------------------------------------------------
59 AC_TRY_RUN(aux (l) unsigned long l;
60 { int x; exit (l >= ((unsigned long)&x)); }
61 main () { int q; aux((unsigned long)&q); },
62 AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
65 AC_TRY_RUN(main () { exit (sizeof(float) != sizeof(long)); },
66 AC_DEFINE(SCM_SINGLES),,AC_DEFINE(SCM_SINGLES)
67 AC_MSG_WARN(Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in))
69 AC_MSG_CHECKING(for struct linger)
70 AC_CACHE_VAL(scm_cv_struct_linger,
71 AC_TRY_COMPILE([#include <sys/socket.h>],
72 [struct linger lgr; lgr.l_linger = 100],
73 scm_cv_struct_linger="yes",
74 scm_cv_struct_linger="no"))
75 AC_MSG_RESULT($scm_cv_struct_linger)
76 if test $scm_cv_struct_linger = yes; then
77 AC_DEFINE(HAVE_STRUCT_LINGER)
80 #--------------------------------------------------------------------
82 # How can you violate a stdio abstraction by setting a stream's fd?
84 #--------------------------------------------------------------------
88 if test "x$FD_SETTER" = x; then
89 AC_TRY_COMPILE(#include <stdio.h>
91 FD_SETTER="((F)->_file = (D))")
94 if test "x$FD_SETTER" = x; then
95 AC_TRY_COMPILE(#include <stdio.h>
97 FD_SETTER="((F)->_fileno = (D))")
101 dnl Add FD_SETTER tests for other systems here. Your test should
102 dnl try a particular style of assigning to the descriptor
103 dnl field(s) of a FILE* and define FD_SETTER accordingly.
105 dnl The value of FD_SETTER is used as a macro body, as in:
107 dnl #define SET_FILE_FD_FIELD(F,D) @FD_SETTER@
109 dnl F is a FILE* and D a descriptor (int).
112 test "x$FD_SETTER" != x && AC_DEFINE(HAVE_FD_SETTER)
120 AC_SUBST(TCL_SRC_DIR)
123 AC_SUBST(GUILE_MAJOR_VERSION)
124 AC_SUBST(GUILE_MINOR_VERSION)
125 AC_SUBST(GUILE_VERSION)
126 AC_OUTPUT(Makefile fd.h)
129 dnl comment-start: "dnl "
131 dnl comment-start-skip: "\\bdnl\\b\\s *"