Annotation of embedaddon/spawn-fcgi/configure.ac, revision 1.1
1.1 ! misho 1: # -*- Autoconf -*-
! 2: # Process this file with autoconf to produce a configure script.
! 3:
! 4: AC_PREREQ(2.61)
! 5: AC_INIT([spawn-fcgi],[1.6.3])
! 6: AC_CONFIG_SRCDIR([src/spawn-fcgi.c])
! 7: AC_CONFIG_HEADER([config.h])
! 8:
! 9: AM_INIT_AUTOMAKE([-Wall -Werror foreign])
! 10:
! 11: # Checks for programs.
! 12: AC_PROG_CC
! 13: AC_PROG_MAKE_SET
! 14:
! 15: # Checks for libraries.
! 16:
! 17: # Checks for header files.
! 18: AC_HEADER_STDC
! 19: AC_HEADER_SYS_WAIT
! 20: AC_CHECK_HEADERS([arpa/inet.h errno.h fcntl.h getopt.h grp.h netdb.h \
! 21: netinet/in.h netinet/tcp.h pwd.h stdio.h stdlib.h \
! 22: string.h sys/ioctl.h sys/socket.h sys/stat.h sys/time.h \
! 23: sys/types.h sys/un.h sys/wait.h unistd.h])
! 24:
! 25:
! 26: # Checks for typedefs, structures, and compiler characteristics.
! 27: AC_C_CONST
! 28: AC_TYPE_UID_T
! 29: AC_TYPE_PID_T
! 30: AC_HEADER_TIME
! 31: AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h>
! 32: #include <sys/socket.h>])
! 33:
! 34: ## solaris needs -lsocket -lnsl
! 35: AC_SEARCH_LIBS([socket],[socket])
! 36: AC_SEARCH_LIBS([inet_addr],[nsl socket])
! 37:
! 38: # Checks for library functions.
! 39: AC_FUNC_CHOWN
! 40: AC_FUNC_FORK
! 41: AC_FUNC_MALLOC
! 42: AC_FUNC_SELECT_ARGTYPES
! 43: AC_FUNC_STAT
! 44: AC_CHECK_FUNCS([dup2 memset putenv select socket strerror strtol issetugid inet_pton])
! 45:
! 46:
! 47: # Check for IPv6 support
! 48:
! 49: AC_ARG_ENABLE(ipv6,
! 50: AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
! 51: [case "${enableval}" in
! 52: yes) ipv6=true ;;
! 53: no) ipv6=false ;;
! 54: *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
! 55: esac],[ipv6=true])
! 56:
! 57: if test x$ipv6 = xtrue; then
! 58: AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
! 59: [AC_TRY_LINK([ #include <sys/types.h>
! 60: #include <sys/socket.h>
! 61: #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; ],
! 62: [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
! 63:
! 64: if test "$ac_cv_ipv6_support" = yes; then
! 65: AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
! 66: fi
! 67: fi
! 68:
! 69:
! 70: # check for extra compiler options (warning options)
! 71: if test "${GCC}" = "yes"; then
! 72: CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
! 73: fi
! 74:
! 75: AC_ARG_ENABLE(extra-warnings,
! 76: AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]),
! 77: [case "${enableval}" in
! 78: yes) extrawarnings=true ;;
! 79: no) extrawarnings=false ;;
! 80: *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;;
! 81: esac],[extrawarnings=false])
! 82:
! 83: if test x$extrawarnings = xtrue; then
! 84: CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"
! 85: fi
! 86:
! 87: AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
! 88: AC_OUTPUT
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>