1 dnl $Id: configure.in,v 1.2 1999/08/02 15:51:08 skimo 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.
9 #--------------------------------------------------------------------
10 # Perform common OMI configuration. This will include:
11 # 1) Choosing compiler and associated build options.
12 # 2) Checking for various common build associated programs.
13 # 3) Determining the best build options for this platform.
14 # 4) Checking for certain common header files.
15 # 5) Checking for exports/global switch.
16 # 6) Importing OMI dependencies (header files, libraries, and binaries).
17 # 7) Checking for existence of various system libraries and routines.
18 #--------------------------------------------------------------------
21 AC_CONFIG_HEADER(fcgi_config.h)
22 AC_MSG_CHECKING(for sun_len in sys/un.h)
23 AC_EGREP_HEADER(sun_len,
26 AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN),
29 #--------------------------------------------------------------------
30 # What extra libraries do we need for this platform?
31 #--------------------------------------------------------------------
33 AC_CHECK_FUNCS(strerror strtol)
35 AC_REPLACE_FUNCS(strerror strtol)
37 #--------------------------------------------------------------------
38 # Include sys/select.h if it exists and if it supplies things
39 # that appear to be useful and aren't already in sys/types.h.
40 # This appears to be true only on the RS/6000 under AIX. Some
41 # systems like OSF/1 have a sys/select.h that's of no use, and
42 # other systems like SCO UNIX have a sys/select.h that's
43 # pernicious. If "fd_set" isn't defined anywhere then set a
45 #--------------------------------------------------------------------
47 AC_MSG_CHECKING(for fd_set in in sys/types.h)
48 AC_TRY_LINK([#include <sys/types.h>],
49 [fd_set readMask, writeMask;],
52 AC_MSG_CHECKING(for fd_mask in in sys/select.h)
53 AC_HEADER_EGREP(fd_mask,
56 AC_DEFINE(HAVE_SYS_SELECT_H),
58 AC_DEFINE(NO_FD_SET)))
60 AC_MSG_CHECKING(for fpos in stdio.h)
61 AC_EGREP_HEADER(fpos_t,
67 AC_HAVE_HEADERS(windows.h)
68 AC_HAVE_HEADERS(sys/socket.h, [have_sys_socket=yes])
69 AC_HAVE_HEADERS(winsock.h)
70 AC_HAVE_HEADERS(netdb.h)
71 AC_HAVE_HEADERS(netinet/in.h)
72 AC_HAVE_HEADERS(arpa/inet.h)
73 AC_HAVE_HEADERS(strings.h)
74 AC_HAVE_HEADERS(sys/time.h)
76 if test "x$have_sys_socket" = "xyes"; then
77 AC_MSG_CHECKING(for socklen_t in sys/socket.h)
78 AC_EGREP_HEADER(socklen_t,
81 AC_DEFINE(HAVE_SOCKLEN),
85 #--------------------------------------------------------------------
86 # Do we need cross-process locking on this platform?
87 #--------------------------------------------------------------------
88 AC_MSG_CHECKING("if this machine needs cross-process locking")
91 AC_DEFINE(USE_LOCKING)
95 AC_DEFINE(USE_LOCKING)
99 AC_DEFINE(USE_LOCKING)
107 #--------------------------------------------------------------------
108 # Does va_arg(arg, long double) crash the compiler?
109 # hpux 9.04 compiler does and so does Stratus FTX (uses HP's compiler)
110 #--------------------------------------------------------------------
111 AC_MSG_CHECKING(if va_arg(arg, long double) crashes the compiler)
112 AC_TRY_COMPILE([#include <stdarg.h>],
113 [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);],
115 AC_DEFINE(HAVE_VA_ARG_LONG_DOUBLE_BUG)
118 #--------------------------------------------------------------------
119 # What's the target system?
120 #--------------------------------------------------------------------
121 case "$PLATFORM_CLASS" in