Commit | Line | Data |
6fb35433 |
1 | dnl $Id: configure.in,v 1.23 2001/12/07 21:08:38 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 | |
6fb35433 |
39 | AC_CHECK_LIB([nsl], [gethostbyname]) |
40 | AC_CHECK_LIB([socket], [socket]) |
eb7bc90d |
41 | |
6fb35433 |
42 | dnl AC_CHECK_LIB([resolv], [main]) |
43 | dnl AC_CHECK_LIB([dnet_stub], [main]) |
44 | dnl AC_CHECK_LIB([ieee], [main]) |
45 | |
46 | AC_CHECK_LIB([pthread], [pthread_create], [threaded=threaded${EXEEXT}]) |
fae4909b |
47 | AC_SUBST([threaded]) |
eb7bc90d |
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 |
fae4909b |
65 | CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" |
f802ee92 |
66 | fi |
67 | |
fae4909b |
68 | AC_CONFIG_FILES([Makefile |
69 | cgi-fcgi/Makefile |
70 | include/Makefile |
71 | libfcgi/Makefile |
72 | examples/Makefile]) |
f802ee92 |
73 | |
8bd181b5 |
74 | AC_OUTPUT |