move PRINTF into correct package
[catagits/fcgi2.git] / configure.in
CommitLineData
0198fd3c 1dnl $Id: configure.in,v 1.1 1997/09/16 15:36:24 stanleyg Exp $
2dnl
3dnl This file is an input file used by the GNU "autoconf" program to
4dnl generate the file "configure", which is run during the build
5dnl to configure the system for the local environment.
6dnl
7
8AC_INIT(libfcgi/fcgiapp.c)
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#--------------------------------------------------------------------
19OMI_CONFIG
20
21AC_CONFIG_HEADER(include/fcgi_config.h)
22AC_MSG_CHECKING(for sun_len in sys/un.h)
23AC_EGREP_HEADER(sun_len,
24 sys/un.h,
25 AC_MSG_RESULT(yes)
26 AC_DEFINE(HAVE_SOCKADDR_UN_SUN_LEN),
27 AC_MSG_RESULT(no))
28
29#--------------------------------------------------------------------
30# What extra libraries do we need for this platform?
31#--------------------------------------------------------------------
32
33AC_CHECK_FUNCS(strerror strtol)
34
35AC_REPLACE_FUNCS(strerror strtol)
36
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
44# special flag.
45#--------------------------------------------------------------------
46
47AC_MSG_CHECKING(for fd_set in in sys/types.h)
48AC_TRY_LINK([#include <sys/types.h>],
49 [fd_set readMask, writeMask;],
50 AC_MSG_RESULT(yes),
51 AC_MSG_RESULT(no)
52 AC_MSG_CHECKING(for fd_mask in in sys/select.h)
53 AC_HEADER_EGREP(fd_mask,
54 sys/select.h,
55 AC_MSG_RESULT(yes)
56 AC_DEFINE(HAVE_SYS_SELECT_H),
57 AC_MSG_RESULT(no)
58 AC_DEFINE(NO_FD_SET)))
59
60AC_MSG_CHECKING(for fpos in stdio.h)
61AC_EGREP_HEADER(fpos_t,
62 stdio.h,
63 AC_MSG_RESULT(yes)
64 AC_DEFINE(HAVE_FPOS),
65 AC_MSG_RESULT(no))
66
67AC_HAVE_HEADERS(windows.h)
68AC_HAVE_HEADERS(sys/socket.h)
69AC_HAVE_HEADERS(winsock.h)
70AC_HAVE_HEADERS(netdb.h)
71AC_HAVE_HEADERS(netinet/in.h)
72AC_HAVE_HEADERS(arpa/inet.h)
73AC_HAVE_HEADERS(strings.h)
74AC_HAVE_HEADERS(sys/time.h)
75
76#--------------------------------------------------------------------
77# Do we need cross-process locking on this platform?
78#--------------------------------------------------------------------
79AC_MSG_CHECKING("if this machine needs cross-process locking")
80case "`uname -sr`" in
81 IRIX\ 5.*)
82 AC_DEFINE(USE_LOCKING)
83 AC_MSG_RESULT(yes)
84 ;;
85 SunOS\ 5.*)
86 AC_DEFINE(USE_LOCKING)
87 AC_MSG_RESULT(yes)
88 ;;
89 UNIX_System_V\ 4.0)
90 AC_DEFINE(USE_LOCKING)
91 AC_MSG_RESULT(yes)
92 ;;
93 *)
94 AC_MSG_RESULT(no)
95 ;;
96esac
97
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#--------------------------------------------------------------------
102AC_MSG_CHECKING(if va_arg(arg, long double) crashes the compiler)
103AC_TRY_COMPILE([#include <stdarg.h>],
104 [long double lDblArg; va_list arg; lDblArg = va_arg(arg, long double);],
105 AC_MSG_RESULT(no),
106 AC_DEFINE(HAVE_VA_ARG_LONG_DOUBLE_BUG)
107 AC_MSG_RESULT(yes))
108
109#--------------------------------------------------------------------
110# What's the target system?
111#--------------------------------------------------------------------
112case "$PLATFORM_CLASS" in
113 WINDOWS)
114 SYSTEM="win32"
115 ;;
116 UNIX)
117 SYSTEM="unix"
118 ;;
119esac
120
121AC_SUBST(SYSTEM)
122AC_OUTPUT(Makefile FastCGI.mak
123 libfcgi/Makefile libfcgi/libfcgi.mak
124 cgi-fcgi/Makefile cgi-fcgi/cgi-fcgi.mak
125 examples/Makefile )
126