ignore *.tar.gz
[catagits/fcgi2.git] / configure.in
1 dnl     $Id: configure.in,v 1.24 2001/12/21 03:12:50 robs Exp $
2 dnl
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.
6
7 AC_INIT
8 AM_INIT_AUTOMAKE(fcgi, 2.2.3)
9
10 AM_CONFIG_HEADER(fcgi_config.h)
11
12 AC_PROG_CC
13 AC_PROG_CPP 
14 AC_PROG_INSTALL 
15 AC_PROG_LIBTOOL
16
17 AC_PROG_CXX
18
19 AC_LANG([C++])
20
21 dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
22 AC_MSG_CHECKING([whether $CXX works])
23 AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);], 
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)])], 
33                [AC_MSG_RESULT(no)])
34 AC_SUBST(LIBFCGIXX)
35 AC_SUBST(ECHO_CPP)
36
37 AC_LANG([C])
38
39 AC_CHECK_LIB([nsl],       [gethostbyname])
40 AC_CHECK_LIB([socket],    [socket]) 
41
42 dnl AC_CHECK_LIB([resolv],    [main])
43 dnl AC_CHECK_LIB([dnet_stub], [main])
44 dnl AC_CHECK_LIB([ieee],      [main])
45
46 ACX_PTHREAD([THREADED=threaded${EXEEXT}])
47 AC_SUBST([THREADED])
48
49 FCGI_COMMON_CHECKS
50
51 AC_REPLACE_FUNCS([strerror])
52
53 AC_C_INLINE
54
55 #--------------------------------------------------------------------
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).
60 #--------------------------------------------------------------------
61 SYSTEM=unix
62 AC_SUBST([SYSTEM])
63
64 AC_PROG_CC_WARNINGS
65
66 AC_CONFIG_FILES([Makefile
67                  cgi-fcgi/Makefile
68                  include/Makefile
69                  libfcgi/Makefile
70                  examples/Makefile])
71
72 AC_OUTPUT