define HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
[catagits/fcgi2.git] / configure.in
CommitLineData
fae4909b 1dnl $Id: configure.in,v 1.22 2001/12/07 02:28:14 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
39AC_CHECK_LIB([nsl], [main])
40AC_CHECK_LIB([resolv], [main])
41AC_CHECK_LIB([socket], [main])
42AC_CHECK_LIB([dnet_stub], [main])
43AC_CHECK_LIB([ieee], [main])
eb7bc90d 44
fae4909b 45AC_CHECK_LIB([pthread], [main], [threaded=threaded${EXEEXT}])
46AC_SUBST([threaded])
eb7bc90d 47
7ef79c64 48FCGI_COMMON_CHECKS
eb7bc90d 49
50AC_REPLACE_FUNCS([strerror])
51
f802ee92 52AC_C_INLINE
53
0198fd3c 54#--------------------------------------------------------------------
f802ee92 55# This is a little hokie in that it avoids including config.guess
56# and config.sub in the distribution, but its been working so far.
57# Windows builds don't run configure so we should be safe fixing
58# this to 'unix' (at least for now).
0198fd3c 59#--------------------------------------------------------------------
f802ee92 60SYSTEM=unix
eb7bc90d 61AC_SUBST([SYSTEM])
f802ee92 62
f802ee92 63if test "$GCC"; then
fae4909b 64 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
f802ee92 65fi
66
fae4909b 67AC_CONFIG_FILES([Makefile
68 cgi-fcgi/Makefile
69 include/Makefile
70 libfcgi/Makefile
71 examples/Makefile])
f802ee92 72
8bd181b5 73AC_OUTPUT