Add a mini project to copy the fcgi_config.h file from fcgi_config_x86.h
[catagits/fcgi2.git] / configure.in
CommitLineData
d300bc46 1dnl $Id: configure.in,v 1.24 2001/12/21 03:12:50 robs Exp $
0198fd3c 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.
f802ee92 6
8bd181b5 7AC_INIT
27b2c28d 8AM_INIT_AUTOMAKE(fcgi, 2.2.3)
f802ee92 9
92079298 10AM_CONFIG_HEADER(fcgi_config.h)
8bd181b5 11
12AC_PROG_CC
13AC_PROG_CPP
14AC_PROG_INSTALL
ec728770 15AC_PROG_LIBTOOL
eb7bc90d 16
72cb9f19 17AC_PROG_CXX
18
fae4909b 19AC_LANG([C++])
20
6a149ad6 21dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
22AC_MSG_CHECKING([whether $CXX works])
6a149ad6 23AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);],
fae4909b 24 [LIBFCGIXX=libfcgi++.la
25 ECHO_CPP=echo-cpp${EXEEXT}
26 AC_MSG_RESULT(yes)
27 AC_MSG_CHECKING([whether cin has a streambuf assignment operator])
28 AC_TRY_COMPILE([#include <iostream.h>], [cin = static_cast<streambuf *>(0);],
29 [AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF], [1],
30 [Define if cin/cout/cerr has a streambuf assignment operator])
31 AC_MSG_RESULT(yes)],
32 [AC_MSG_RESULT(no)])],
6a149ad6 33 [AC_MSG_RESULT(no)])
6a149ad6 34AC_SUBST(LIBFCGIXX)
35AC_SUBST(ECHO_CPP)
36
fae4909b 37AC_LANG([C])
38
6fb35433 39AC_CHECK_LIB([nsl], [gethostbyname])
40AC_CHECK_LIB([socket], [socket])
eb7bc90d 41
6fb35433 42dnl AC_CHECK_LIB([resolv], [main])
43dnl AC_CHECK_LIB([dnet_stub], [main])
44dnl AC_CHECK_LIB([ieee], [main])
45
d300bc46 46ACX_PTHREAD([THREADED=threaded${EXEEXT}])
47AC_SUBST([THREADED])
eb7bc90d 48
7ef79c64 49FCGI_COMMON_CHECKS
eb7bc90d 50
51AC_REPLACE_FUNCS([strerror])
52
f802ee92 53AC_C_INLINE
54
0198fd3c 55#--------------------------------------------------------------------
f802ee92 56# This is a little hokie in that it avoids including config.guess
57# and config.sub in the distribution, but its been working so far.
58# Windows builds don't run configure so we should be safe fixing
59# this to 'unix' (at least for now).
0198fd3c 60#--------------------------------------------------------------------
f802ee92 61SYSTEM=unix
eb7bc90d 62AC_SUBST([SYSTEM])
f802ee92 63
d300bc46 64AC_PROG_CC_WARNINGS
f802ee92 65
fae4909b 66AC_CONFIG_FILES([Makefile
67 cgi-fcgi/Makefile
68 include/Makefile
69 libfcgi/Makefile
70 examples/Makefile])
f802ee92 71
8bd181b5 72AC_OUTPUT