Revamp the networking code in httpd.c to support IPv6. Side effects
[sgt/agedu] / configure.ac
... / ...
CommitLineData
1# autoconf input for agedu.
2
3AC_INIT([agedu], [6.66], [anakin@pobox.com])
4AC_CONFIG_SRCDIR([agedu.c])
5AC_CONFIG_HEADER([config.h])
6
7AM_INIT_AUTOMAKE(foreign)
8
9# Checks for programs.
10AC_PROG_CC
11AC_PROG_CC_C99
12AC_PROG_INSTALL
13AC_CHECK_PROG([HALIBUT],[halibut],[yes],[no])
14AM_CONDITIONAL([HAVE_HALIBUT],[test "x$HALIBUT" = "xyes"])
15
16# Checks for libraries.
17
18# Checks for header files.
19AC_HEADER_DIRENT
20AC_HEADER_STDC
21AC_HEADER_SYS_WAIT
22AC_CHECK_HEADERS([assert.h arpa/inet.h ctype.h errno.h fcntl.h features.h fnmatch.h limits.h netdb.h netinet/in.h pwd.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h sys/ioctl.h sys/mman.h sys/socket.h syslog.h termios.h time.h unistd.h])
23
24# Checks for typedefs, structures, and compiler characteristics.
25AC_C_CONST
26AC_TYPE_OFF_T
27AC_TYPE_SIZE_T
28AC_STRUCT_TM
29
30# Checks for library functions.
31AC_FUNC_CLOSEDIR_VOID
32AC_PROG_GCC_TRADITIONAL
33AC_FUNC_MMAP
34AC_FUNC_SELECT_ARGTYPES
35AC_FUNC_STRFTIME
36AC_FUNC_VPRINTF
37
38AC_SEARCH_LIBS(connect, socket nsl)
39AC_SEARCH_LIBS(inet_ntoa, socket nsl)
40AC_SEARCH_LIBS(inet_addr, socket nsl)
41AC_SEARCH_LIBS(gethostbyname, socket nsl resolv)
42AC_SEARCH_LIBS(getaddrinfo, socket nsl resolv)
43
44AC_CHECK_FUNCS([ftruncate fdopendir lstat64 stat64 memchr munmap select socket strcasecmp strchr strcspn strerror strrchr strspn strtoul strtoull connect inet_ntoa inet_addr gethostbyname getaddrinfo])
45
46AC_ARG_ENABLE([ipv6],
47 AS_HELP_STRING([--disable-ipv6],
48 [disable IPv6 in the built-in web server]),
49 [ipv6=$enableval],[ipv6=$ac_cv_func_getaddrinfo])
50AC_ARG_ENABLE([ipv4],
51 AS_HELP_STRING([--disable-ipv4],
52 [disable IPv4 in the built-in web server]),
53 [ipv4=$enableval],[ipv4=yes])
54if test "$ipv6" = "no"; then
55 AC_DEFINE([NO_IPV6], [1], [define if IPv6 is disabled at configure time])
56fi
57if test "$ipv4" = "no"; then
58 AC_DEFINE([NO_IPV4], [1], [define if IPv4 is disabled at configure time])
59fi
60
61AC_CONFIG_FILES([Makefile])
62AC_OUTPUT