1 dnl $Id: configure.in,v 1.17 2001/11/21 15:32:31 robs Exp $
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.
8 AM_INIT_AUTOMAKE(fcgi, 2.2.1)
10 AM_CONFIG_HEADER(fcgi_config.h)
19 dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works
20 AC_MSG_CHECKING([whether $CXX works])
22 AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);],
23 [CXX_WORKS=1] [AC_MSG_RESULT(yes)],
27 if test -n "$CXX_WORKS"; then
28 LIBFCGIXX='libfcgi++.la'
29 ECHO_CPP='echo-cpp$(EXEEXT)'
34 AC_CHECK_LIB([nsl], [main]) ac_cv_lib_nsl=ac_cv_lib_nsl_main
35 AC_CHECK_LIB([resolv], [main]) ac_cv_lib_resolv=ac_cv_lib_resolv_main
36 AC_CHECK_LIB([socket], [main]) ac_cv_lib_socket=ac_cv_lib_socket_main
37 AC_CHECK_LIB([dnet_stub], [main]) ac_cv_lib_dnet_stub=ac_cv_lib_dnet_stub_main
38 AC_CHECK_LIB([ieee], [main]) ac_cv_lib_ieee=ac_cv_lib_ieee_main
41 AC_CHECK_LIB([pthread], [main],
42 [AC_DEFINE([HAVE_LIBPTHREAD], [1],
43 [Define if you have the pthread library])
44 AC_SUBST([HAVE_LIBPTHREAD])
45 threaded='threaded$(EXEEXT)'])
46 ac_cv_lib_pthread=ac_cv_lib_pthread_main
50 AC_REPLACE_FUNCS([strerror])
54 #--------------------------------------------------------------------
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).
59 #--------------------------------------------------------------------
64 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
67 AC_CONFIG_FILES(Makefile