1 dnl $Id: configure.in,v 1.4 2001/08/30 22:13:01 robs Exp $
3 dnl This file is an input file used by the GNU "autoconf" program to
4 dnl generate the file "configure", which is run during the build
5 dnl to configure the system for the local environment.
7 # This file and the script it generates is used by both the devkit
8 # and the Perl FCGI module. Although each has slightly different
9 # requirements, this allows the build environment to maintained by one
10 # file set. The FCGI build is idendified by the presence of the
11 # file FCGI.XL. If its not found, its consider a devkit build.
15 if test -f "FCGI.XL"; then
19 if test "$FCGI_BUILD"; then
20 AC_CONFIG_HEADER(fcgi_config.h)
22 AC_CONFIG_HEADER(include/fcgi_config.h)
29 AC_CHECK_TOOL(AR, ar, ar)
31 AC_CHECK_LIB([nsl],[main],[],[],[])ac_cv_lib_nsl=ac_cv_lib_nsl_main
33 AC_CHECK_LIB([resolv],[main],[],[],[])ac_cv_lib_resolv=ac_cv_lib_resolv_main
35 AC_CHECK_LIB([socket],[main],[],[],[])ac_cv_lib_socket=ac_cv_lib_socket_main
37 AC_CHECK_LIB([dnet_stub],[main],[],[],[])ac_cv_lib_dnet_stub=ac_cv_lib_dnet_stub_main
39 AC_CHECK_LIB([ieee],[main],[],[],[])ac_cv_lib_ieee=ac_cv_lib_ieee_main
41 AC_CHECK_TYPE(ssize_t, int)
43 AC_MSG_CHECKING(for sun_len in sys/un.h)
44 AC_EGREP_HEADER(sun_len,
47 AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN),
50 AC_CHECK_FUNCS(strerror)
51 AC_REPLACE_FUNCS(strerror)
53 AC_MSG_CHECKING(for fpos in stdio.h)
54 AC_EGREP_HEADER(fpos_t,
60 AC_CHECK_HEADERS([sys/socket.h],[have_sys_socket=yes])
61 AC_CHECK_HEADERS([netdb.h])
62 AC_CHECK_HEADERS([netinet/in.h])
63 AC_CHECK_HEADERS([arpa/inet.h])
64 AC_CHECK_HEADERS([sys/time.h])
65 AC_CHECK_HEADERS([limits.h])
67 if test "x$have_sys_socket" = "xyes"; then
68 AC_MSG_CHECKING(for socklen_t in sys/socket.h)
69 AC_EGREP_HEADER(socklen_t,
72 AC_DEFINE(HAVE_SOCKLEN),
76 #--------------------------------------------------------------------
77 # Do we need cross-process locking on this platform?
78 #--------------------------------------------------------------------
79 AC_MSG_CHECKING("if this machine needs cross-process locking")
82 AC_DEFINE(USE_LOCKING)
86 AC_DEFINE(USE_LOCKING)
90 AC_DEFINE(USE_LOCKING)
98 #--------------------------------------------------------------------
99 # Does va_arg(arg, long double) crash the compiler?
100 # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler)
101 #--------------------------------------------------------------------
102 AC_MSG_CHECKING(if va_arg(arg, long double) crashes the compiler)
103 AC_TRY_COMPILE([#include <stdarg.h>],
104 [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);],
106 AC_DEFINE(HAVE_VA_ARG_LONG_DOUBLE_BUG)
112 #--------------------------------------------------------------------
113 # This is a little hokie in that it avoids including config.guess
114 # and config.sub in the distribution, but its been working so far.
115 # Windows builds don't run configure so we should be safe fixing
116 # this to 'unix' (at least for now).
117 #--------------------------------------------------------------------
126 CCDEFS="$CCDEFS -ansi -pedantic -Wall -Wmissing-prototypes"
133 if test -z "$FCGI_BUILD"; then
134 AC_CONFIG_FILES([Makefile