Commit | Line | Data |
fae4909b |
1 | dnl $Id: configure.in,v 1.22 2001/12/07 02:28:14 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 |
27b2c28d |
8 | AM_INIT_AUTOMAKE(fcgi, 2.2.3) |
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 | |
fae4909b |
19 | AC_LANG([C++]) |
20 | |
6a149ad6 |
21 | dnl autoconf defaults CXX to 'g++', so its unclear whether it exists/works |
22 | AC_MSG_CHECKING([whether $CXX works]) |
6a149ad6 |
23 | AC_TRY_COMPILE([#include <iostream.h>], [istream is(NULL);], |
fae4909b |
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)])], |
6a149ad6 |
33 | [AC_MSG_RESULT(no)]) |
6a149ad6 |
34 | AC_SUBST(LIBFCGIXX) |
35 | AC_SUBST(ECHO_CPP) |
36 | |
fae4909b |
37 | AC_LANG([C]) |
38 | |
39 | AC_CHECK_LIB([nsl], [main]) |
40 | AC_CHECK_LIB([resolv], [main]) |
41 | AC_CHECK_LIB([socket], [main]) |
42 | AC_CHECK_LIB([dnet_stub], [main]) |
43 | AC_CHECK_LIB([ieee], [main]) |
eb7bc90d |
44 | |
fae4909b |
45 | AC_CHECK_LIB([pthread], [main], [threaded=threaded${EXEEXT}]) |
46 | AC_SUBST([threaded]) |
eb7bc90d |
47 | |
7ef79c64 |
48 | FCGI_COMMON_CHECKS |
eb7bc90d |
49 | |
50 | AC_REPLACE_FUNCS([strerror]) |
51 | |
f802ee92 |
52 | AC_C_INLINE |
53 | |
0198fd3c |
54 | #-------------------------------------------------------------------- |
f802ee92 |
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). |
0198fd3c |
59 | #-------------------------------------------------------------------- |
f802ee92 |
60 | SYSTEM=unix |
eb7bc90d |
61 | AC_SUBST([SYSTEM]) |
f802ee92 |
62 | |
f802ee92 |
63 | if test "$GCC"; then |
fae4909b |
64 | CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" |
f802ee92 |
65 | fi |
66 | |
fae4909b |
67 | AC_CONFIG_FILES([Makefile |
68 | cgi-fcgi/Makefile |
69 | include/Makefile |
70 | libfcgi/Makefile |
71 | examples/Makefile]) |
f802ee92 |
72 | |
8bd181b5 |
73 | AC_OUTPUT |