File: configure.in

package info (click to toggle)
super 3.11.6-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 660 kB
  • ctags: 592
  • sloc: ansic: 7,338; sh: 183; makefile: 175
file content (167 lines) | stat: -rw-r--r-- 4,381 bytes parent folder | download
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
dnl Process this file with autoconf to produce a configure script.
AC_INIT(super.h)

AC_CONFIG_HEADER(config.h)
 
AC_PROG_CC

AC_PROG_INSTALL

AC_HAVE_HEADERS(errno.h stdlib.h limits.h string.h standards.h \
	netdb.h locale.h auth.h prot.h shadow.h fcntl.h sgtty.h unistd.h \
	memory.h malloc.h pwdadj.h sys/time.h stdarg.h syslog.h \
	arpa/inet.h net/route.h net/if.h netinet/in.h \
	sys/types.h sys/bsdtypes.h sys/label.h sys/audit.h \
	sys/wait.h sys/param.h sys/security.h \
	sys/socket.h sys/systeminfo.h sys/utsname.h )

AC_AIX
AC_MINIX

if test -f /bin/uname ; then
    uname=`/bin/uname`
    test "$uname" = HP-UX && AC_DEFINE(_HPUX_SOURCE)
    test "$uname" = Linux && AC_DEFINE(_BSD_SOURCE)
    test "$uname" = OSF1 && AC_DEFINE(_OSF_SOURCE)
    test "$uname" = OSF1 && AC_DEFINE(Digital_UNIX)
    test "$uname" = SunOS && test -f /bin/expr && rev=`/bin/uname -r` &&
	test `/bin/expr $rev : '\(.\).*'` = 5 && AC_DEFINE(SUNOS5)
else
    uname=unknown
fi

AC_CHECKING(for directories to include in the safe path)
SafePath=/bin:/usr/bin
test -d /usr/ucb && SafePath=${SafePath}:/usr/ucb
test -d /usr/bsd && SafePath=${SafePath}:/usr/bsd
AC_DEFINE_UNQUOTED(SAFE_PATH, "${SafePath}")

AC_CHECK_FUNCS(syslog)
AC_CHECK_FUNCS(strdup)

# syslog may be in one of the following.  They may also be needed for
# other reasons, so we just blindly check for them all.
AC_CHECK_LIB(bsd, main)
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(inet, main)

AC_CHECK_LIB(crypt, main)

AC_CHECK_FUNCS(initgroups)
for lib in os ; do
    test "$ac_cv_func_initgroups" = yes && break
    AC_CHECK_LIB($lib, initgroups)
done

# On IRIX, -lmalloc avoids a problem with default malloc
# that causes a core dump.
AC_CHECK_LIB(malloc, main)

# May be needed on IRIX
AC_CHECK_LIB(sun, getpwnam)

# Needed on SysV for shadow passwords.
AC_CHECK_LIB(sec, main)
 
# Needed on Linux for shadow passwords.
AC_CHECK_LIB(shadow, main)
 
# Needed on Solaris
AC_CHECK_LIB(nsl, main)
 
# Needed on SCO-ODT-3.0 for crypt.  
AC_CHECK_LIB(ufc, main)
 
# We want these before the checks, so the checks can modify their values.
test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1

# If the user hasn't specified CFLAGS, and we're using gcc, use -O.
test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O"
# If we're on AIX, not using gcc, add the ansi spec.
test "$uname" = AIX && test -z "$GCC" && CFLAGS="$CFLAGS -qlanglvl=ansi"

AC_C_CONST
AC_SYS_LONG_FILE_NAMES
AC_SYS_INTERPRETER
test "$ac_cv_sys_interpreter" != yes && AC_DEFINE(INTERPRETER_HACK)
AC_STDC_HEADERS

AC_TYPE_PID_T
AC_TYPE_UID_T
AC_TYPE_GETGROUPS
AC_TYPE_SIZE_T

AC_STRUCT_TM
AC_TIME_WITH_SYS_TIME

void_ok=no
AC_MSG_CHECKING(if func signal is compatible with declaring type void)
AC_TRY_COMPILE([
#include <stdio.h>
#include <signal.h>
],
changequote(<<,>>)dnl
<<void (*signal())();
signal(1, 0);>>,
changequote([,])dnl
	AC_DEFINE(HAVE_VOID_SIGNAL) void_ok=yes AC_MSG_RESULT(yes))
if test $void_ok = no ; then
AC_TRY_COMPILE([
#include <stdio.h>
#include <sys/signal.h>
],
changequote(<<,>>)dnl
<<void (*signal())();
signal(1, 0);>>,
changequote([,])dnl
	AC_DEFINE(HAVE_VOID_SIGNAL) void_ok=yes AC_MSG_RESULT(yes))
fi
if test $void_ok = no ; then echo "no" ; fi

AC_MSG_CHECKING(if sys_errlist is defined)
AC_TRY_COMPILE([
#include <errno.h>
#include <stdio.h>
],
changequote(<<,>>)dnl
<<extern char *sys_errlist[];
fputs(sys_errlist[0], stdout);>>,
changequote([,])dnl
	AC_DEFINE(HAVE_SYS_ERRLIST) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

AC_MSG_CHECKING(if errno must be explicitly declared extern)
AC_TRY_COMPILE([
#include <errno.h>
#include <stdio.h>
],
changequote(<<,>>)dnl
<<printf("%d", errno);>>,
changequote([,])dnl
	AC_DEFINE(DONT_DECL_ERRNO) AC_MSG_RESULT(no), AC_MSG_RESULT(yes))

AC_MSG_CHECKING(if compiler supports enum)
AC_TRY_COMPILE(, [enum { red, green, blue } color;],
		AC_DEFINE(HAVE_ENUM) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

AC_MSG_CHECKING(if close-on-exec can be done via ioctl())
AC_TRY_COMPILE([
#include <sgtty.h>
#include <stdio.h>
],
changequote(<<,>>)dnl
<<ioctl(0, FIOCLEX, NULL);>>,
changequote([,])dnl
	AC_DEFINE(HAVE_IOCTL_FIOCLEX) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))

AC_FUNC_VPRINTF

AC_CHECK_FUNCS(strerror strtol memcpy memset strerror \
	getgroups innetgr localtime sysconf getdtablesize \
	getdomainname sysinfo uname)


AC_SUBST(libdir)dnl
AC_SUBST(bindir)dnl
AC_SUBST(SafePath)dnl

AC_OUTPUT(Makefile)