summaryrefslogtreecommitdiff
path: root/libguile/configure.in
blob: ae71726d5904b462bf02d1427eab42e6753dd20b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
AC_INIT(eval.c)
AC_CONFIG_HEADER(scmconfig.h)

. $srcdir/../GUILE-VERSION

test -z "$CFLAGS" && CFLAGS=-g
test -z "$LDFLAGS" && LDFLAGS=-g

AC_PROG_CC
AC_PROG_CPP
AC_PROG_RANLIB

AC_AIX
AC_ISC_POSIX
AC_MINIX

AC_C_CONST

AC_HEADER_STDC
AC_HEADER_DIRENT
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h string.h malloc.h memory.h limits.h time.h sys/types.h sys/select.h sys/time.h sys/timeb.h sys/times.h)

AC_TYPE_GETGROUPS
AC_TYPE_SIGNAL

AC_CHECK_FUNCS(ftime times geteuid seteuid setegid select uname mkdir rmdir getcwd rename putenv setlocale strftime strptime mknod nice lstat readlink symlink sync)

AC_REPLACE_FUNCS(inet_aton)

AC_STRUCT_ST_RDEV
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS

#--------------------------------------------------------------------
#
# Which way does the stack grow?
#
#--------------------------------------------------------------------

AC_TRY_RUN(aux (l) unsigned long l;
	     { int x; exit (l >= ((unsigned long)&x)); }
	   main () { int q; aux((unsigned long)&q); }, 
	   AC_DEFINE(SCM_STACK_GROWS_UP),,AC_MSG_WARN(Guessing that stack grows down -- see scmconfig.h.in))


AC_TRY_RUN(main () { exit (sizeof(float) != sizeof(long)); },
	   AC_DEFINE(SCM_SINGLES),,AC_DEFINE(SCM_SINGLES)
	   AC_MSG_WARN(Guessing that sizeof(long) == sizeof(float) -- see scmconfig.h.in))




#--------------------------------------------------------------------
#
# How can you violate a stdio abstraction by setting a stream's fd?
#
#--------------------------------------------------------------------

FD_SETTER=""

if test "x$FD_SETTER" = x; then
  AC_TRY_COMPILE(#include <stdio.h>
,		stdout->_file = 1,
		FD_SETTER="((F)->_file = (D))")
fi

if test "x$FD_SETTER" = x; then
 AC_TRY_COMPILE(#include <stdio.h>
,		stdout->_fileno,
		FD_SETTER="((F)->_fileno = (D))")
fi

dnl
dnl  Add FD_SETTER tests for other systems here.  Your test should
dnl  try a particular style of assigning to the descriptor
dnl  field(s) of a FILE* and define FD_SETTER accordingly.
dnl
dnl  The value of FD_SETTER is used as a macro body, as in:
dnl  
dnl  #define SET_FILE_FD_FIELD(F,D)   @FD_SETTER@
dnl
dnl  F is a FILE* and D a descriptor (int).
dnl

test "x$FD_SETTER" != x && AC_DEFINE(HAVE_FD_SETTER)



AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(LIBOBJS)
AC_SUBST(FD_SETTER)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TK_SRC_DIR)
AC_SUBST(XINCLUDES)
AC_SUBST(GUILE_MAJOR_VERSION)
AC_SUBST(GUILE_MINOR_VERSION)
AC_SUBST(GUILE_VERSION)
AC_OUTPUT(Makefile fd.h)

dnl Local Variables:
dnl comment-start: "dnl "
dnl comment-end: ""
dnl comment-start-skip: "\\bdnl\\b\\s *"
dnl End: