-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.in
94 lines (79 loc) · 2.26 KB
/
configure.in
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
dnl Process this file with autoconf to produce a configure script.
AC_INIT(gofish.h)
AM_INIT_AUTOMAKE(gofish, 1.0)
AM_CONFIG_HEADER(config.h:config.h.in)
AC_CANONICAL_HOST
dnl Extra configure arguments
gopherroot=$localstatedir/gopher
AC_ARG_WITH(gopherroot,
[ --with-gopherroot=ROOT Use ROOT for Gopher documents],
[gopherroot=$withval])
AC_SUBST(gopherroot)
dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
dnl Checks for Sun libraries.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, gethostbyname)
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h syslog.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
dnl Checks for library functions.
dnl We cannot use this special function since it fails under FreeBSD
dnl AC_FUNC_MMAP
AC_CHECK_FUNCS(mmap)
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(gethostname select socket strdup strerror strstr strtol uname)
AC_CHECK_FUNCS(writev daemon)
dnl Interix does not have initgroups
AC_CHECK_FUNCS(initgroups)
dnl poll does not work on the arm
dnl if this goes, AC_CANONICAL_HOST and the files
dnl config.sub and config.guess can go
case $host in
armv4l-*) ;;
*) AC_CHECK_FUNCS(poll) ;;
esac
dnl Add -Wall option for gcc
if test "$GCC" = "yes"; then
CFLAGS="$CFLAGS -Wall"
fi
AC_MSG_CHECKING([mmap_cache])
AC_ARG_ENABLE(mmap-cache,
[ --enable-mmap-cache Enable mmap caching. EXPERIMENTAL],
[])
if test "$enable_mmap_cache" = "yes"; then
AC_DEFINE(MMAP_CACHE, 1, [Define this to enable mmap cache])
else
enable_mmap_cache=no
fi
AC_MSG_RESULT([$enable_mmap_cache])
AC_MSG_CHECKING([CGI])
AC_ARG_ENABLE(cgi,
[ --enable-cgi Enable CGI in http server. EXPERIMENTAL],
[])
if test "$enable_cgi" = "yes"; then
AC_DEFINE(CGI, 1, [Define this to enable CGI in the http server])
else
enable_cgi=no
fi
AC_MSG_RESULT([$enable_cgi])
dnl Check for gopher user override.
AC_MSG_CHECKING([gopheruser])
gopheruser="gopher"
AC_ARG_WITH(gopheruser,
[ --with-gopheruser=USER Use USER as non-privileged user],
[gopheruser=$withval])
AC_DEFINE_UNQUOTED(GOPHER_USER, "$gopheruser", [The non-privileged user])
AC_MSG_RESULT([$gopheruser])
AC_OUTPUT(Makefile)