bump version to 0.82 and prepare for release
[catagits/fcgi2.git] / configure.in
CommitLineData
98a958f5 1dnl $Id: configure.in,v 1.27 2003/06/22 02:15:10 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
98a958f5 8AM_INIT_AUTOMAKE(fcgi, 2.4.1)
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])
8b73dc39 23AC_TRY_COMPILE([#include <iostream>],
24 [std::cout << "ok";],
25 [AC_MSG_RESULT(yes)
26 LIBFCGIXX=libfcgi++.la
fae4909b 27 ECHO_CPP=echo-cpp${EXEEXT}
fae4909b 28 AC_MSG_CHECKING([whether cin has a streambuf assignment operator])
8b73dc39 29 AC_TRY_COMPILE([#include <iostream>],
30 [cin = static_cast<streambuf *>(0);],
31 [AC_MSG_RESULT(yes)
32 AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF], [1],
33 [Define if cin/cout/cerr has a streambuf assignment operator])],
34 [AC_MSG_RESULT(no)])
35 AC_MSG_CHECKING([whether char_type is defined in the context of streambuf])
36 AC_TRY_COMPILE([#include <iostream>],
37 [class fcgi_streambuf : public std::streambuf { char_type ct; }],
38 [AC_MSG_RESULT(yes)
39 AC_DEFINE([HAVE_STREAMBUF_CHAR_TYPE], [1],
40 [Define if char_type is defined in the context of streambuf])],
41 [AC_MSG_RESULT(no)])],
6a149ad6 42 [AC_MSG_RESULT(no)])
6a149ad6 43AC_SUBST(LIBFCGIXX)
44AC_SUBST(ECHO_CPP)
45
fae4909b 46AC_LANG([C])
47
6fb35433 48AC_CHECK_LIB([nsl], [gethostbyname])
49AC_CHECK_LIB([socket], [socket])
eb7bc90d 50
d300bc46 51ACX_PTHREAD([THREADED=threaded${EXEEXT}])
52AC_SUBST([THREADED])
eb7bc90d 53
7ef79c64 54FCGI_COMMON_CHECKS
eb7bc90d 55
56AC_REPLACE_FUNCS([strerror])
57
f802ee92 58AC_C_INLINE
59
0198fd3c 60#--------------------------------------------------------------------
f802ee92 61# This is a little hokie in that it avoids including config.guess
62# and config.sub in the distribution, but its been working so far.
63# Windows builds don't run configure so we should be safe fixing
64# this to 'unix' (at least for now).
0198fd3c 65#--------------------------------------------------------------------
f802ee92 66SYSTEM=unix
eb7bc90d 67AC_SUBST([SYSTEM])
f802ee92 68
d300bc46 69AC_PROG_CC_WARNINGS
f802ee92 70
fae4909b 71AC_CONFIG_FILES([Makefile
72 cgi-fcgi/Makefile
73 include/Makefile
74 libfcgi/Makefile
75 examples/Makefile])
f802ee92 76
8bd181b5 77AC_OUTPUT