Add the C++ API to the lib.
[catagits/fcgi2.git] / configure.in
1 dnl     $Id: configure.in,v 1.16 2001/11/20 02:30:23 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.1)
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_CHECK_LIB([nsl],       [main]) ac_cv_lib_nsl=ac_cv_lib_nsl_main
20 AC_CHECK_LIB([resolv],    [main]) ac_cv_lib_resolv=ac_cv_lib_resolv_main
21 AC_CHECK_LIB([socket],    [main]) ac_cv_lib_socket=ac_cv_lib_socket_main
22 AC_CHECK_LIB([dnet_stub], [main]) ac_cv_lib_dnet_stub=ac_cv_lib_dnet_stub_main
23 AC_CHECK_LIB([ieee],      [main]) ac_cv_lib_ieee=ac_cv_lib_ieee_main
24
25 AC_SUBST(threaded)
26 AC_CHECK_LIB([pthread],   [main], 
27         [AC_DEFINE([HAVE_LIBPTHREAD], [1],
28                            [Define if you have the pthread library])
29          AC_SUBST([HAVE_LIBPTHREAD])
30          threaded='threaded$(EXEEXT)']) 
31 ac_cv_lib_pthread=ac_cv_lib_pthread_main
32
33 FCGI_COMMON_CHECKS
34
35 AC_REPLACE_FUNCS([strerror])
36
37 AC_C_INLINE
38
39 #--------------------------------------------------------------------
40 #  This is a little hokie in that it avoids including config.guess
41 #  and config.sub in the distribution, but its been working so far.
42 #  Windows builds don't run configure so we should be safe fixing
43 #  this to 'unix' (at least for now).
44 #--------------------------------------------------------------------
45 SYSTEM=unix
46 AC_SUBST([SYSTEM])
47
48 if test "$GCC"; then
49         CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
50 fi
51
52 AC_CONFIG_FILES(Makefile
53                 cgi-fcgi/Makefile
54                 include/Makefile
55                 libfcgi/Makefile
56                 examples/Makefile)
57
58 AC_OUTPUT