Commit | Line | Data |
98a958f5 |
1 | dnl $Id: configure.in,v 1.27 2003/06/22 02:15:10 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 |
98a958f5 |
8 | AM_INIT_AUTOMAKE(fcgi, 2.4.1) |
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]) |
8b73dc39 |
23 | AC_TRY_COMPILE([#include <iostream>], |
24 | [std::cout << "ok";], |
25 | [AC_MSG_RESULT(yes) |
26 | LIBFCGIXX=libfcgi++.la |
fae4909b |
27 | ECHO_CPP=echo-cpp${EXEEXT} |
fae4909b |
28 | AC_MSG_CHECKING([whether cin has a streambuf assignment operator]) |
8b73dc39 |
29 | AC_TRY_COMPILE([#include <iostream>], |
30 | [cin = static_cast<streambuf *>(0);], |
31 | [AC_MSG_RESULT(yes) |
32 | AC_DEFINE([HAVE_IOSTREAM_WITHASSIGN_STREAMBUF], [1], |
33 | [Define if cin/cout/cerr has a streambuf assignment operator])], |
34 | [AC_MSG_RESULT(no)]) |
35 | AC_MSG_CHECKING([whether char_type is defined in the context of streambuf]) |
36 | AC_TRY_COMPILE([#include <iostream>], |
37 | [class fcgi_streambuf : public std::streambuf { char_type ct; }], |
38 | [AC_MSG_RESULT(yes) |
39 | AC_DEFINE([HAVE_STREAMBUF_CHAR_TYPE], [1], |
40 | [Define if char_type is defined in the context of streambuf])], |
41 | [AC_MSG_RESULT(no)])], |
6a149ad6 |
42 | [AC_MSG_RESULT(no)]) |
6a149ad6 |
43 | AC_SUBST(LIBFCGIXX) |
44 | AC_SUBST(ECHO_CPP) |
45 | |
fae4909b |
46 | AC_LANG([C]) |
47 | |
6fb35433 |
48 | AC_CHECK_LIB([nsl], [gethostbyname]) |
49 | AC_CHECK_LIB([socket], [socket]) |
eb7bc90d |
50 | |
d300bc46 |
51 | ACX_PTHREAD([THREADED=threaded${EXEEXT}]) |
52 | AC_SUBST([THREADED]) |
eb7bc90d |
53 | |
7ef79c64 |
54 | FCGI_COMMON_CHECKS |
eb7bc90d |
55 | |
56 | AC_REPLACE_FUNCS([strerror]) |
57 | |
f802ee92 |
58 | AC_C_INLINE |
59 | |
0198fd3c |
60 | #-------------------------------------------------------------------- |
f802ee92 |
61 | # This is a little hokie in that it avoids including config.guess |
62 | # and config.sub in the distribution, but its been working so far. |
63 | # Windows builds don't run configure so we should be safe fixing |
64 | # this to 'unix' (at least for now). |
0198fd3c |
65 | #-------------------------------------------------------------------- |
f802ee92 |
66 | SYSTEM=unix |
eb7bc90d |
67 | AC_SUBST([SYSTEM]) |
f802ee92 |
68 | |
d300bc46 |
69 | AC_PROG_CC_WARNINGS |
f802ee92 |
70 | |
fae4909b |
71 | AC_CONFIG_FILES([Makefile |
72 | cgi-fcgi/Makefile |
73 | include/Makefile |
74 | libfcgi/Makefile |
75 | examples/Makefile]) |
f802ee92 |
76 | |
8bd181b5 |
77 | AC_OUTPUT |