Commit | Line | Data |
6ef7d9a9 |
1 | dnl $Id: configure.in,v 1.19 2001/11/27 12:58:09 robs Exp $ |
0198fd3c |
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. |
f802ee92 |
6 | |
8bd181b5 |
7 | AC_INIT |
6ef7d9a9 |
8 | AM_INIT_AUTOMAKE(fcgi, 2.2.2) |
f802ee92 |
9 | |
92079298 |
10 | AM_CONFIG_HEADER(fcgi_config.h) |
8bd181b5 |
11 | |
12 | AC_PROG_CC |
13 | AC_PROG_CPP |
14 | AC_PROG_INSTALL |
ec728770 |
15 | AC_PROG_LIBTOOL |
eb7bc90d |
16 | |
72cb9f19 |
17 | AC_PROG_CXX |
18 | |
6a149ad6 |
19 | dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works |
20 | AC_MSG_CHECKING([whether $CXX works]) |
21 | AC_LANG_CPLUSPLUS |
22 | AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);], |
f93c07dd |
23 | [CXX_WORKS=1] |
24 | [AC_MSG_RESULT(yes)], |
6a149ad6 |
25 | [AC_MSG_RESULT(no)]) |
26 | AC_LANG_C |
27 | |
f93c07dd |
28 | if test -n "${CXX_WORKS}"; then |
29 | LIBFCGIXX=libfcgi++.la |
30 | ECHO_CPP=echo-cpp${EXEEXT} |
6a149ad6 |
31 | fi |
32 | AC_SUBST(LIBFCGIXX) |
33 | AC_SUBST(ECHO_CPP) |
34 | |
eb7bc90d |
35 | AC_CHECK_LIB([nsl], [main]) ac_cv_lib_nsl=ac_cv_lib_nsl_main |
36 | AC_CHECK_LIB([resolv], [main]) ac_cv_lib_resolv=ac_cv_lib_resolv_main |
37 | AC_CHECK_LIB([socket], [main]) ac_cv_lib_socket=ac_cv_lib_socket_main |
38 | AC_CHECK_LIB([dnet_stub], [main]) ac_cv_lib_dnet_stub=ac_cv_lib_dnet_stub_main |
39 | AC_CHECK_LIB([ieee], [main]) ac_cv_lib_ieee=ac_cv_lib_ieee_main |
40 | |
737bf5cf |
41 | AC_SUBST(threaded) |
eb7bc90d |
42 | AC_CHECK_LIB([pthread], [main], |
43 | [AC_DEFINE([HAVE_LIBPTHREAD], [1], |
44 | [Define if you have the pthread library]) |
737bf5cf |
45 | AC_SUBST([HAVE_LIBPTHREAD]) |
eb781bfb |
46 | threaded='threaded$(EXEEXT)']) |
eb7bc90d |
47 | ac_cv_lib_pthread=ac_cv_lib_pthread_main |
48 | |
7ef79c64 |
49 | FCGI_COMMON_CHECKS |
eb7bc90d |
50 | |
51 | AC_REPLACE_FUNCS([strerror]) |
52 | |
f802ee92 |
53 | AC_C_INLINE |
54 | |
0198fd3c |
55 | #-------------------------------------------------------------------- |
f802ee92 |
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). |
0198fd3c |
60 | #-------------------------------------------------------------------- |
f802ee92 |
61 | SYSTEM=unix |
eb7bc90d |
62 | AC_SUBST([SYSTEM]) |
f802ee92 |
63 | |
f802ee92 |
64 | if test "$GCC"; then |
b39b32d4 |
65 | CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" |
f802ee92 |
66 | fi |
67 | |
aa8a7b8a |
68 | AC_CONFIG_FILES(Makefile |
69 | cgi-fcgi/Makefile |
70 | include/Makefile |
71 | libfcgi/Makefile |
72 | examples/Makefile) |
f802ee92 |
73 | |
8bd181b5 |
74 | AC_OUTPUT |