More functions unavailable on some systems.
[bpt/guile.git] / libguile / configure.in
CommitLineData
0f2d19dd
JB
1AC_INIT(eval.c)
2AC_CONFIG_HEADER(scmconfig.h)
3
4. $srcdir/../GUILE-VERSION
5
6test -z "$CFLAGS" && CFLAGS=-g
7test -z "$LDFLAGS" && LDFLAGS=-g
8
9AC_PROG_CC
10AC_PROG_CPP
11AC_PROG_RANLIB
12
13AC_AIX
14AC_ISC_POSIX
15AC_MINIX
16
17AC_C_CONST
18
19AC_HEADER_STDC
20AC_HEADER_DIRENT
21AC_HEADER_TIME
22AC_HEADER_SYS_WAIT
95b88819 23AC_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)
0f2d19dd
JB
24
25AC_TYPE_GETGROUPS
26AC_TYPE_SIGNAL
b09ca643 27AC_TYPE_MODE_T
0f2d19dd 28
1fd838af 29AC_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)
0f2d19dd
JB
30
31AC_REPLACE_FUNCS(inet_aton)
32
33AC_STRUCT_ST_RDEV
34AC_STRUCT_ST_BLKSIZE
35AC_STRUCT_ST_BLOCKS
36
37#--------------------------------------------------------------------
38#
39# Which way does the stack grow?
40#
41#--------------------------------------------------------------------
42
43AC_TRY_RUN(aux (l) unsigned long l;
44 { int x; exit (l >= ((unsigned long)&x)); }
45 main () { int q; aux((unsigned long)&q); },
46 AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))
47
48
49AC_TRY_RUN(main () { exit (sizeof(float) != sizeof(long)); },
50 AC_DEFINE(SCM_SINGLES),,AC_DEFINE(SCM_SINGLES)
51 AC_MSG_WARN(Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in))
52
2e18892a
GH
53AC_MSG_CHECKING(for struct linger)
54AC_CACHE_VAL(scm_cv_struct_linger,
55 AC_TRY_COMPILE([#include <sys/socket.h>],
56 [struct linger lgr; lgr.l_linger = 100],
57 scm_cv_struct_linger="yes",
58 scm_cv_struct_linger="no"))
59AC_MSG_RESULT($scm_cv_struct_linger)
60if test $scm_cv_struct_linger = yes; then
61 AC_DEFINE(HAVE_STRUCT_LINGER)
62fi
63
0f2d19dd
JB
64#--------------------------------------------------------------------
65#
66# How can you violate a stdio abstraction by setting a stream's fd?
67#
68#--------------------------------------------------------------------
69
70FD_SETTER=""
71
72if test "x$FD_SETTER" = x; then
73 AC_TRY_COMPILE(#include <stdio.h>
74, stdout->_file = 1,
75 FD_SETTER="((F)->_file = (D))")
76fi
77
78if test "x$FD_SETTER" = x; then
79 AC_TRY_COMPILE(#include <stdio.h>
80, stdout->_fileno,
81 FD_SETTER="((F)->_fileno = (D))")
82fi
83
84dnl
85dnl Add FD_SETTER tests for other systems here. Your test should
86dnl try a particular style of assigning to the descriptor
87dnl field(s) of a FILE* and define FD_SETTER accordingly.
88dnl
89dnl The value of FD_SETTER is used as a macro body, as in:
90dnl
91dnl #define SET_FILE_FD_FIELD(F,D) @FD_SETTER@
92dnl
93dnl F is a FILE* and D a descriptor (int).
94dnl
95
96test "x$FD_SETTER" != x && AC_DEFINE(HAVE_FD_SETTER)
97
98
99
100AC_SUBST(CFLAGS)
101AC_SUBST(LDFLAGS)
102AC_SUBST(LIBOBJS)
103AC_SUBST(FD_SETTER)
104AC_SUBST(TCL_SRC_DIR)
105AC_SUBST(TK_SRC_DIR)
106AC_SUBST(XINCLUDES)
107AC_SUBST(GUILE_MAJOR_VERSION)
108AC_SUBST(GUILE_MINOR_VERSION)
109AC_SUBST(GUILE_VERSION)
110AC_OUTPUT(Makefile fd.h)
111
112dnl Local Variables:
113dnl comment-start: "dnl "
114dnl comment-end: ""
115dnl comment-start-skip: "\\bdnl\\b\\s *"
116dnl End: