Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 1331 lines (1135 sloc) 35.226 kB
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
1 dnl -*- mode: m4-mode -*-
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
2 dnl Process this file with autoconf to produce a configure script.
3
4 AC_COPYRIGHT([
1b9abda @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1310 5dc97367-9…
alobbs authored
5 Copyright (C) 2001-2008 Alvaro Lopez Ortega
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
6
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of version 2 of the GNU General Public
9 License as published by the Free Software Foundation.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19 USA
20 ])
21
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
22 dnl require autoconf 2.56
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
23 AC_PREREQ(2.56)
24
25 dnl Version
26 m4_define([cherokee_major_version], [0])
6587290 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1281 5dc97367-9…
alobbs authored
27 m4_define([cherokee_minor_version], [7])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
28 m4_define([cherokee_micro_version], [0])
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
29 m4_define([cherokee_version], m4_format('%s.%s.%s', cherokee_major_version, cherokee_minor_version, cherokee_micro_version))
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
30
31 dnl Init autoconf and automake
e8c75f5 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@438 5dc97367-97…
alobbs authored
32 AC_INIT([cherokee], [cherokee_version], [http://bugs.cherokee-project.com], [cherokee])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
33 AC_CONFIG_SRCDIR([cherokee/server.c])
34 AM_INIT_AUTOMAKE([no-define])
35
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
36 dnl Define version
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
37 AC_DEFINE(PACKAGE_MAJOR_VERSION, "cherokee_major_version", [Version string])
38 AC_DEFINE(PACKAGE_MINOR_VERSION, "cherokee_minor_version", [Version string])
39 AC_DEFINE(PACKAGE_MICRO_VERSION, "cherokee_micro_version", [Version string])
40
41 PACKAGE_MAJOR_VERSION="cherokee_major_version"
42 PACKAGE_MINOR_VERSION="cherokee_minor_version"
43 PACKAGE_MICRO_VERSION="cherokee_micro_version"
44 AC_SUBST(PACKAGE_MAJOR_VERSION)
45 AC_SUBST(PACKAGE_MINOR_VERSION)
46 AC_SUBST(PACKAGE_MICRO_VERSION)
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
47
b86167c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@873 5dc97367-97…
alobbs authored
48 dnl Define library soname
49 CHEROKEE_AGE=0
50 CHEROKEE_CURRENT=0
51 CHEROKEE_REVISION=1
52 AC_SUBST(CHEROKEE_AGE)
53 AC_SUBST(CHEROKEE_CURRENT)
54 AC_SUBST(CHEROKEE_REVISION)
500a566 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@478 5dc97367-97…
alobbs authored
55
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
56 dnl Check the SVN revision
57 AC_ARG_ENABLE(beta, AC_HELP_STRING([--enable-beta], [Enable beta development]),
58 is_beta="$enableval", is_beta="no")
59
702c2f7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1306 5dc97367-9…
alobbs authored
60 if test x"$is_beta" = "xyes"; then
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
61 if test -d ".svn"; then
86dcbbb @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@471 5dc97367-97…
alobbs authored
62 svn_rev="`svn info -R | grep Revision | sort | tail -1 | sed 's/Revision: //'`";
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
63 fi
64
86dcbbb @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@471 5dc97367-97…
alobbs authored
65 PACKAGE_PATCH_VERSION="b$svn_rev"
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
66
67 dnl Redefine versions
68 PACKAGE_VERSION="$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$PACKAGE_MICRO_VERSION$PACKAGE_PATCH_VERSION"
d66e3cd @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@472 5dc97367-97…
alobbs authored
69 AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "${PACKAGE_VERSION}", [Package version])
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
70
71 VERSION="$PACKAGE_MAJOR_VERSION.$PACKAGE_MINOR_VERSION.$PACKAGE_MICRO_VERSION$PACKAGE_PATCH_VERSION"
72 AC_DEFINE(VERSION, $VERSION, [Software version])
500a566 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@478 5dc97367-97…
alobbs authored
73 else
74
75 PACKAGE_PATCH_VERSION=""
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
76 fi
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
77
500a566 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@478 5dc97367-97…
alobbs authored
78 dnl Path version
79 AC_SUBST(PACKAGE_PATCH_VERSION)
80 AC_DEFINE_UNQUOTED(PACKAGE_PATCH_VERSION, "${PACKAGE_PATCH_VERSION}", [Version string])
81
4b33faa @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@522 5dc97367-97…
alobbs authored
82 dnl Initial CFLAGS
83 AC_MSG_CHECKING(initial CFLAGS)
84 AC_MSG_RESULT($CFLAGS)
500a566 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@478 5dc97367-97…
alobbs authored
85
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
86 dnl Check for CPU / vendor / OS
94d0935 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@470 5dc97367-97…
alobbs authored
87 AC_CANONICAL_HOST
88
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
89 os_string="UNIX"
90 so_suffix=so
3509796 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@282 5dc97367-97…
alobbs authored
91 mod_suffix=$so_suffix
92
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
93 AC_MSG_CHECKING([host platform characteristics])
94 case "$host" in
95 *-*-mingw*|*-*-cygwin*)
96 so_suffix=DLL
3509796 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@282 5dc97367-97…
alobbs authored
97 mod_suffix=$so_suffix
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
98 os_string="Win32"
99 libdl=
100 ;;
101 *-*-linux*)
102 libdl="-ldl"
103 ;;
104 *-*-solaris*)
105 AC_DEFINE(SOLARIS, 1, [It is Solaris])
106 setenv_is_threadsafe="yes"
107 libdl="-ldl"
108 ;;
14c9e3c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@666 5dc97367-97…
alobbs authored
109 *-*-hpux*)
110 libdl="-ldl"
111 ;;
112 *-*-*freebsd*|*-*-*openbsd*|*-*-*netbsd*|*-*-*dragonfly*)
113 libdl=
114 ;;
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
115 *-*-darwin*)
116 so_suffix=dylib
3509796 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@282 5dc97367-97…
alobbs authored
117 mod_suffix=so
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
118 libdl="-ldl"
119 ;;
120 *)
121 AC_MSG_WARN([*** Please add $host to configure.in checks!])
122 libdl="-ldl"
123 ;;
124 esac
125 AC_MSG_RESULT(ok)
126
ffb754b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1354 5dc97367-9…
alobbs authored
127 AC_MSG_CHECKING([L2 cache line size])
128 case "$host_cpu" in
129 i386|i486)
130 CPU_CACHE_LINE=32
131 ;;
132 i586|i686)
133 CPU_CACHE_LINE=64
134 ;;
135 i786)
136 CPU_CACHE_LINE=128
137 ;;
138 athlon)
139 CPU_CACHE_LINE=64
140 ;;
141 x86_64)
142 CPU_CACHE_LINE=64
143 ;;
144 sparc*)
145 CPU_CACHE_LINE=64
146 ;;
147 powerpc)
148 CPU_CACHE_LINE=128
149 ;;
150 *)
151 CPU_CACHE_LINE=128
152 ;;
153 esac
154 AC_DEFINE_UNQUOTED(CPU_CACHE_LINE, $CPU_CACHE_LINE, [L2 cache line size])
155 AC_MSG_RESULT($CPU_CACHE_LINE)
156
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
157 dnl
158 dnl OS string
159 dnl
160 AC_ARG_ENABLE(os_string, AC_HELP_STRING([--enable-os-string=STR], [Set a customized OS type string]), [os_string="$enableval"])
161 AC_DEFINE_UNQUOTED(OS_TYPE, "${os_string}", [OS type])
162
f2506d2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@913 5dc97367-97…
alobbs authored
163 AM_CONDITIONAL(PLATFORM_WIN32, test x"$os_string" = "xWin32")
164
165 dnl
166 dnl Tracing
167 dnl
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
168 AC_ARG_ENABLE(trace, AC_HELP_STRING([--enable-trace], [Enable trace facility]),
169 [enable_trace="$enableval"
170 AC_DEFINE(TRACE_ENABLED, 1, [Trace facility])
171 ], [enable_trace="no"])
172
f2506d2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@913 5dc97367-97…
alobbs authored
173
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
174 dnl
175 dnl Dynamic library loading library
176 dnl
177 LIBS="$LIBS $libdl"
178 AC_DEFINE_UNQUOTED(SO_SUFFIX, "${so_suffix}", [Dynamic loading libraries extension])
3509796 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@282 5dc97367-97…
alobbs authored
179 AC_DEFINE_UNQUOTED(MOD_SUFFIX, "${mod_suffix}", [Dynamic modules extension])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
180
181 dnl
182 dnl Libtool options
183 dnl
184 if test "$os_string" != "Win32"; then
185 # libtool option to control which symbols are exported
186 # right now, symbols starting with _ are not exported
187 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
188 else
189 LIBTOOL_EXPORT_OPTIONS=
190 fi
191
192 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
193
194
195
196 AM_INIT_AUTOMAKE(cherokee, $VERSION)
197 AM_MAINTAINER_MODE
198
199 AM_CONFIG_HEADER(config.h)
200 AC_SUBST(VERSION)
201
202 AC_PATH_PROG(cherokeepath, cherokee)
203
204 AC_PROG_CC
205 AC_PROG_INSTALL
206 AC_PROG_MAKE_SET
207
208 AC_LIBTOOL_DLOPEN
209 AC_LIBTOOL_WIN32_DLL
210 AM_PROG_LIBTOOL
211
212 AC_FUNC_CLOSEDIR_VOID
213 AC_FUNC_MALLOC
214 AC_FUNC_REALLOC
215 AC_FUNC_VPRINTF
216
217 AC_C_CONST
218 AC_C_BIGENDIAN
219 AC_C_INLINE
220 if test "$ac_cv_c_inline" != no; then
221 AC_DEFINE(HAVE_INLINE, 1, [Compile supports inline])
222 fi
223
224 dnl
225 dnl Check for headers
226 dnl
227 AC_HEADER_STDC
228 AC_HEADER_DIRENT
229 AC_HEADER_TIME
230 AC_HEADER_SYS_WAIT
231
232 AC_CHECK_HEADERS(endian.h machine/endian.h sys/endian.h sys/isa_defs.h sys/utsname.h sys/poll.h poll.h )
233 AC_CHECK_HEADERS(sys/socket.h sys/un.h netinet/in.h arpa/inet.h netinet/tcp.h sys/ioctl.h fcntl.h sys/time.h)
234 AC_CHECK_HEADERS(sys/resource.h resource.h unistd.h syslog.h stdint.h inttypes.h error.h pwd.h sys/uio.h)
235 AC_CHECK_HEADERS(pthread.h netdb.h stdarg.h sys/filio.h sys/varargs.h sys/select.h sys/mman.h grp.h winsock.h)
236 AC_CHECK_HEADERS(winsock.h winsock2.h)
237
238 AC_SYS_LARGEFILE
239
240 AC_SIZE_T
241 AC_TYPE_SIGNAL
242 AC_TYPE_UID_T
243 AC_TYPE_MODE_T
244 AC_TYPE_OFF_T
245 AC_TYPE_SIZE_T
246 AC_TYPE_PID_T
247 AC_STRUCT_ST_RDEV
9521853 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@528 5dc97367-97…
alobbs authored
248 AC_CHECK_TYPE(ino_t, unsigned)
249 AC_CHECK_TYPE(loff_t, off_t)
250 AC_CHECK_TYPE(offset_t, loff_t)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
251 AC_CHECK_TYPE(ssize_t, int)
252 AC_CHECK_TYPE(wchar_t, unsigned short)
253
9521853 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@528 5dc97367-97…
alobbs authored
254 AC_CHECK_SIZEOF(int)
255 AC_CHECK_SIZEOF(unsigned int)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
256 AC_CHECK_SIZEOF(unsigned long)
257 AC_CHECK_SIZEOF(unsigned long long)
258 AC_CHECK_SIZEOF(unsigned int)
259 AC_CHECK_SIZEOF(off_t)
9521853 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@528 5dc97367-97…
alobbs authored
260 AC_CHECK_SIZEOF(size_t)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
261
262 AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[
263 AC_TRY_RUN([#include <stdio.h>
264 main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); }],
265 samba_cv_have_longlong=yes,samba_cv_have_longlong=no,samba_cv_have_longlong=cross)])
266 if test x"$samba_cv_have_longlong" = x"yes"; then
267 AC_DEFINE(HAVE_LONGLONG,1,[Whether the host supports long long's])
268 fi
269
270 AC_FUNC_MEMCMP
271 AC_FUNC_MMAP
272
83fd835 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@333 5dc97367-97…
alobbs authored
273 AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r getrlimit getdtablesize readdir readdir_r flockfile funlockfile)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
274
c5205f7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@379 5dc97367-97…
alobbs authored
275 FW_CHECK_PWD
276 FW_CHECK_GRP
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
277
9527966 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@443 5dc97367-97…
alobbs authored
278 AC_CHECK_MEMBER(struct tm.tm_gmtoff,
279 AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm]),,[#include <time.h>])
280
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
281 AH_BOTTOM([
282 /* Give us an unsigned 32-bit data type. */
283 #if SIZEOF_UNSIGNED_LONG==4
284 #define UWORD32 unsigned long
285 #elif SIZEOF_UNSIGNED_INT==4
286 #define UWORD32 unsigned int
287 #else
288 #error I do not know what to use for a UWORD32.
289 #endif
290 ])
291
292
293 dnl Find socket()
294 dnl Likely combinations:
295 dnl -lsocket [ -lnsl_s | -lnsl ]
296 dnl -linet
297 AC_CHECK_LIB(ws2_32, main)
298 AC_CHECK_LIB(wsock32, main)
299
300 AC_CHECK_FUNC(socket, :, [
301 AC_CHECK_LIB(socket, main)
302 AC_CHECK_LIB(net, main)
303 AC_CHECK_LIB(nsl_s, main)
304 AC_CHECK_LIB(nsl, main)
305 AC_CHECK_LIB(inet, socket)
306 AC_CHECK_LIB(gen, main)
307 ])
308
309 AC_SEARCH_LIBS(accept, socket)
310 AC_SEARCH_LIBS(bind, socket)
311 AC_SEARCH_LIBS(listen, socket)
312 AC_SEARCH_LIBS(setsockopt, socket)
313
314 dnl
315 dnl Check for fd events inspect functions
316 dnl
317 AC_CHECK_FUNC(poll, have_poll=yes)
318 AC_CHECK_FUNC(kqueue, have_kqueue=yes)
319 AC_CHECK_FUNC(select, have_select=yes)
320
321 if test "x-$have_select" != "x-yes" -a "x-$ac_cv_header_winsock2_h" = "x-yes"; then
322 AC_MSG_CHECKING([for select in ws2_32])
323 AC_TRY_LINK([#include <winsock2.h>],
324 [select(0,0,0,0,0)],
325 [AC_MSG_RESULT(yes)
326 have_win32_select=yes],
327 [AC_MSG_RESULT(no)])
328 fi
329
330 dnl
331 dnl Epoll
332 dnl
333 AC_CHECK_HEADER(sys/epoll.h, have_epoll_include=yes, have_epoll_include=no)
334
853c10e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@453 5dc97367-97…
alobbs authored
335 AC_ARG_ENABLE(epoll, AC_HELP_STRING([--disable-epoll],[Disable epoll() support]),
336 wants_epoll="$enableval", wants_epoll="yes")
337
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
338 have_epoll=no
702c2f7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1306 5dc97367-9…
alobbs authored
339 if test "x$have_epoll_include" = "xyes" && test "x$wants_epoll" = "xyes"; then
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
340 AC_MSG_CHECKING(for epoll system call)
341
853c10e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@453 5dc97367-97…
alobbs authored
342 AC_RUN_IFELSE([
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
343 #include <stdint.h>
344 #include <sys/param.h>
345 #include <sys/types.h>
346 #include <sys/syscall.h>
347 #include <sys/epoll.h>
348 #include <unistd.h>
349
350 int epoll_create (int size) {
351 return (syscall(__NR_epoll_create, size));
352 }
353
354 int main (int argc, char **argv) {
355 int epfd;
356 epfd = epoll_create(256);
357 exit (epfd == -1 ? 1 : 0);
358 }
853c10e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@453 5dc97367-97…
alobbs authored
359 ],
360 have_epoll=yes,
361 have_epoll=no,
362 have_epoll=yes)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
363 AC_MSG_RESULT($have_epoll)
364 fi
365
366 dnl
367 dnl Solaris 10: Event ports
368 dnl
369 AC_CHECK_HEADER(port.h, have_port_include=yes, have_port_include=no)
370
371 have_port=no
372 if test "x$have_port_include" = "xyes"; then
373 AC_MSG_CHECKING(for event ports support)
374
853c10e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@453 5dc97367-97…
alobbs authored
375 AC_RUN_IFELSE([
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
376 #include <stdint.h>
377 #include <unistd.h>
378 #include <port.h>
379
380 int main (int argc, char **argv) {
381 int port;
382 port = port_create();
383 exit (port < 0 ? 1 : 0);
384 }
853c10e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@453 5dc97367-97…
alobbs authored
385 ],
386 have_port=yes,
387 have_port=no,
388 have_port=cross)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
389 AC_MSG_RESULT($have_port)
390 fi
391
392
393
394 if test "$have_epoll" = yes; then
395 AC_DEFINE(HAVE_EPOLL, 1, [Have epoll])
396 fi
397 AM_CONDITIONAL(COMPILE_EPOLL, test x"$have_epoll" = "xyes")
398
399 if test "$have_kqueue" = yes; then
400 AC_DEFINE(HAVE_KQUEUE, 1, [Have kqueue])
401 fi
402 AM_CONDITIONAL(COMPILE_KQUEUE, test x"$have_kqueue" = "xyes")
403
404 if test "$have_port" = yes; then
405 AC_DEFINE(HAVE_PORT, 1, [Have event ports])
406 fi
407 AM_CONDITIONAL(COMPILE_PORT, test x"$have_port" = "xyes")
408
409 if test "$have_poll" = yes; then
410 AC_DEFINE(HAVE_POLL, 1, [Have poll])
411 fi
412 AM_CONDITIONAL(COMPILE_POLL, test x"$have_poll" = "xyes")
413
414 if test "$have_win32_select" = yes; then
415 AC_DEFINE(HAVE_WIN32_SELECT, 1, [Have Win32 select])
416 fi
417 AM_CONDITIONAL(COMPILE_WIN32_SELECT, test x"$have_win32_select" = "xyes")
418
419 if test "$have_select" = yes; then
420 AC_DEFINE(HAVE_SELECT, 1, [Have select])
421 fi
422 AM_CONDITIONAL(COMPILE_SELECT, test x"$have_select" = "xyes" -a x"$have_win32_select" != "xyes")
423
424
425 dnl
426 dnl Check for inet_pton. We have our own, but on Solaris the version in
427 dnl libresolv is more lenient in ways that Solaris's internal DNS resolution
428 dnl code requires, so if we use our own *and* link with libresolv (which may
429 dnl be forced by Perl) DNS resolution fails.
430 dnl
431 AC_SEARCH_LIBS(inet_pton, [socket nsl resolv])
432 AC_CHECK_FUNCS(inet_pton inet_ntop inet_addr)
433
434 AC_SEARCH_LIBS(gethostbyname, [socket nsl resolv])
435 AC_CHECK_FUNCS(gethostbyname gethostbyname_r)
436
437 dnl
438 dnl Check for inet_addr
439 dnl
440 AC_SEARCH_LIBS(inet_addr, xnet)
441 AC_CHECK_FUNCS(inet_addr)
442
443 dnl
444 dnl TCP_CORK
445 dnl
446 HYDRA_TCP_CORK
447
448 dnl
449 dnl Check for GNU getopt_long()
450 dnl
451 #AC_SEARCH_LIBS(getopt_long, [iberty gnugetopt])
452 AC_CHECK_HEADERS(getopt.h)
453 AC_CHECK_FUNC(getopt_long, have_getopt_long="yes")
454 AM_CONDITIONAL(HAVE_GETOPT_LONG, test x"$have_getopt_long" = "xyes")
455
456
457 dnl
458 dnl Pthread
459 dnl
460 with_pthread="yes"
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
461 have_pthread="no"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
462 AC_ARG_ENABLE(pthread, AC_HELP_STRING([--disable-pthread],[Disable threading support]),
463 with_pthread="$enableval", with_pthread="yes")
464
465 AM_CONDITIONAL(USE_PTHREAD, test "x$with_pthread" = "xyes")
466 if test "x$with_pthread" = "xyes"
467 then
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
468 dnl
469 dnl Basic checkings (c&p'ed from squid)
470 dnl
471 AC_MSG_CHECKING([for special a pthread case])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
472
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
473 oldcflags="$CFLAGS"
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
474 CFLAGS="$CFLAGS -D_REENTRANT"
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
475 PTHREAD_CFLAGS="-D_REENTRANT"
476
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
477 case "$host" in
478 i386-unknown-freebsd*)
479 if test "$GCC" = "yes" ; then
480 if test -z "$PRESET_LDFLAGS"; then
1b9abda @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1310 5dc97367-9…
alobbs authored
481 PTHREAD_LIBS="-pthread"
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
482 have_pthread="yes"
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
483 fi
484 fi
485 AC_MSG_RESULT([-pthread])
486 ;;
487 *-solaris2.*)
488 if test "$GCC" = "yes" ; then
489 CFLAGS="$CFLAGS -pthreads"
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
490 PTHREAD_CFLAGS="-pthreads"
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
491 AC_MSG_RESULT([-pthreads])
492 else
493 CFLAGS="$CFLAGS -mt"
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
494 PTHREAD_CFLAGS="-mt"
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
495 AC_MSG_RESULT([-mt])
496 fi
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
497 have_pthread="yes"
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
498 ;;
499 *)
500 AC_MSG_RESULT([no])
501 ;;
502 esac
503
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
504 if test "$have_pthread" != "yes"; then
505 AC_CHECK_LIB(pthread, main, have_pthread=yes, have_pthread=no)
3391221 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@682 5dc97367-97…
alobbs authored
506 if test "$have_pthread" = "yes"; then
507 PTHREAD_LIBS="-lpthread"
508 fi
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
509 fi
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
510
511 dnl
512 dnl More detailed checks on the pthread support
513 dnl
514 AC_MSG_CHECKING([for pthread_rwlock_t support])
515
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
516 have_pthread_rwlock_t=yes
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
517 AC_TRY_COMPILE([#include <pthread.h>],
73b651d @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@683 5dc97367-97…
alobbs authored
518 [pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);],
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
519 compiled=yes, compiled=no)
520
521 if test "$compiled" = "yes"; then
522 AC_MSG_RESULT([ok])
523 else
524 dnl Didn't find rwlock_t.
525 dnl Try defining _XOPEN_SOURCE=500
526 dnl
527 oldcflags2="$CFLAGS"
528 CFLAGS="$CFLAGS -D_XOPEN_SOURCE=500"
529
530 AC_TRY_COMPILE([#include <pthread.h>],
73b651d @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@683 5dc97367-97…
alobbs authored
531 [pthread_rwlock_t rwlock; pthread_rwlock_init( &rwlock, NULL);],
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
532 compiled=yes, compiled=no)
533
534 if test "$compiled" = "yes"; then
535 AC_MSG_RESULT([-D_XOPEN_SOURCE=500])
536 PTHREAD_CFLAGS="-D_XOPEN_SOURCE=500"
537 else
538 have_pthread_rwlock_t=no
539 AC_MSG_RESULT([no])
540 fi
541
542 CFLAGS="$oldcflags2"
543 fi
544
545 if test "$have_pthread_rwlock_t" = "yes"; then
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
546 AC_DEFINE(HAVE_PTHREAD_RWLOCK_T, 1, [Define if your pthread library includes pthread_rwlock_t])
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
547 else
548 AC_MSG_ERROR([pthread_rwlock_t support missing])
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
549 fi
14c9e3c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@666 5dc97367-97…
alobbs authored
550
30cba34 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@670 5dc97367-97…
alobbs authored
551 AC_CHECK_FUNC(pthread_attr_setschedpolicy, have_pthread_attr_setschedpolicy=yes)
552 if test x"$have_pthread_attr_setschedpolicy" = "xyes"; then
553 AC_DEFINE(HAVE_PTHREAD_SETSCHEDPOLICY, 1, [Pthread support pthread_attr_setschedpolicy])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
554 fi
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
555
556 CFLAGS="$oldcflags"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
557 fi
558
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
559 if test "$have_pthread" = "yes"; then
560 AC_DEFINE(HAVE_PTHREAD, 1, [Have pthread support])
c2dc9b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@681 5dc97367-97…
alobbs authored
561 AC_SUBST(PTHREAD_CFLAGS)
562 AC_SUBST(PTHREAD_LIBS)
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
563 fi
564
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
565 dnl
566 dnl Is setenv() threadsafe?
567 dnl
568 if test "$setenv_is_threadsafe" = "yes"; then
569 AC_DEFINE(SETENV_IS_THREADSAFE, 1, [setenv function is thread safe])
570 fi
571
572 dnl
573 dnl Check for vsyslog
574 dnl
575 AC_CHECK_FUNCS(syslog vsyslog strsep strcasestr memmove strerror bcopy strlcat)
576
423d6fa @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@370 5dc97367-97…
alobbs authored
577 dnl
578 dnl Check for Glib (usually Linux)
579 dnl
580 AC_PREPROC_IFELSE([
581 #include <features.h>
582 #ifndef __GLIBC__
583 chokeme
584 #endif
585 ], [
586 AC_DEFINE([HAVE_GLIBC], [1], [Define to 1 if you have glibc.])
587 AC_DEFINE([_GNU_SOURCE], [1], [Define to 1 if you have glibc.])
588 ])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
589
590 dnl
591 dnl Does this platform require array notation to assign to a va_list?
592 dnl If cross-compiling, we assume va_list is "normal". If this breaks
593 dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
594 dnl also just to be sure.
595 dnl
596 AC_MSG_CHECKING(whether va_list assignments need array notation)
597 AC_CACHE_VAL(ac_cv_valistisarray,
598 [AC_TRY_RUN([#include <stdlib.h>
599 #include <stdarg.h>
600 void foo(int i, ...) {
601 va_list ap1, ap2;
602 va_start(ap1, i);
603 ap2 = ap1;
604 if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
605 va_end(ap1); va_end(ap2);
606 }
607 int main()
608 { foo(0, 123); return(0); }],
609 [ac_cv_valistisarray=false],
610 [ac_cv_valistisarray=true],
611 [ac_cv_valistisarray=false])])
612
613 if test "$ac_cv_valistisarray" = true ; then
614 AC_DEFINE(HAVE_VA_LIST_AS_ARRAY,,[va_list works copying an array])
615 AC_MSG_RESULT(yes)
616 else
617 AC_MSG_RESULT(no)
618 fi
619
620
621 dnl
622 dnl Check if the global variable `timezone' exists. If so, define
623 dnl HAVE_INT_TIMEZONE.
624 dnl
625 AC_STRUCT_TIMEZONE
626
627 AC_MSG_CHECKING(for global timezone)
628 AC_TRY_LINK([#include <time.h>],
629 [int res; res = timezone / 60;],
630 [AC_MSG_RESULT(yes)
631 AC_DEFINE(HAVE_INT_TIMEZONE,, [Set to 1 if you have the global variable timezone])],
632 AC_MSG_RESULT(no))
633
634
635 dnl
636 dnl Check for RTDL constants (from Haskell code)
637 dnl
638 dnl ** check for libdl & RTLD_NEXT
639 dnl ** sometimes RTLD_NEXT is hidden in #ifdefs we really don't wan to set
640 AC_MSG_CHECKING(for RTLD_NEXT from dlfcn.h)
641 AC_EGREP_CPP(yes,
642 [
643 #include <dlfcn.h>
644 #ifdef RTLD_NEXT
645 yes
646 #endif
647 ], [
648 AC_MSG_RESULT(yes)
649 AC_DEFINE(HAVE_RTLDNEXT,,[Have RTDL_NEXT])
650 HaveRtldNext=YES
651 ], [
652 AC_MSG_RESULT(no)
653 HaveRtldNext=NO
654 ])
655 AC_SUBST(HaveRtldNext)
656
657 dnl ** RTLD_LOCAL isn't available on cygwin or openbsd
658 AC_MSG_CHECKING(for RTLD_LOCAL from dlfcn.h)
659 AC_EGREP_CPP(yes,
660 [
661 #include <dlfcn.h>
662 #ifdef RTLD_LOCAL
663 yes
664 #endif
665 ], [
666 AC_MSG_RESULT(yes)
667 AC_DEFINE(HAVE_RTLDLOCAL,,[Have RTDL_LOCAL])
668 HaveRtldLocal=YES
669 ], [
670 AC_MSG_RESULT(no)
671 HaveRtldLocal=NO
672 ])
673 AC_SUBST(HaveRtldLocal)
674
675 dnl ** RTLD_GLOBAL isn't available on openbsd
676 AC_MSG_CHECKING(for RTLD_GLOBAL from dlfcn.h)
677 AC_EGREP_CPP(yes,
678 [
679 #include <dlfcn.h>
680 #ifdef RTLD_GLOBAL
681 yes
682 #endif
683 ], [
684 AC_MSG_RESULT(yes)
685 AC_DEFINE(HAVE_RTLDGLOBAL,,[Have RTDL_GLOBAL])
686 HaveRtldGlobal=YES
687 ], [
688 AC_MSG_RESULT(no)
689 HaveRtldGlobal=NO
690 ])
691 AC_SUBST(HaveRtldGlobal)
692
693 dnl ** RTLD_NOW isn't available on openbsd
694 AC_MSG_CHECKING(for RTLD_NOW from dlfcn.h)
695 AC_EGREP_CPP(yes,
696 [
697 #include <dlfcn.h>
698 #ifdef RTLD_NOW
699 yes
700 #endif
701 ], [
702 AC_MSG_RESULT(yes)
703 AC_DEFINE(HAVE_RTLDNOW,,[Have RTDL_NOW])
704 HaveRtldNow=YES
705 ], [
706 AC_MSG_RESULT(no)
707 HaveRtldNow=NO
708 ])
709 AC_SUBST(HaveRtldNow)
710
711
712 dnl
713 dnl Check of off64_t
714 dnl
715 AC_CACHE_CHECK([for off64_t],samba_cv_HAVE_OFF64_T,[
716 AC_TRY_RUN([
717 #if defined(HAVE_UNISTD_H)
718 #include <unistd.h>
719 #endif
720 #include <stdio.h>
721 #include <sys/stat.h>
722 main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); }],
723 samba_cv_HAVE_OFF64_T=yes,samba_cv_HAVE_OFF64_T=no,samba_cv_HAVE_OFF64_T=cross)])
724 if test x"$samba_cv_HAVE_OFF64_T" = x"yes"; then
725 AC_DEFINE(HAVE_OFF64_T,1,[Whether off64_t is available])
726 fi
727
728
729 # From etr_socket_nsl.m4
730 ETR_SOCKET_NSL
731
732 # From sendfile_samba.m4
733 SENDFILE_CHECK
734
735 # readdir_r()
cdf14c2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@324 5dc97367-97…
alobbs authored
736 LIBWWW_READDIR_R_TYPE
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
737
738
739 dnl
740 dnl IPv6 Support
741 dnl I got this mostly from Apache's tests
742 dnl
743
744 AC_ARG_ENABLE(ipv6,
745 AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support]),
746 [ if test "$enableval" = "no"; then
747 disabled_ipv6=1
748 fi ],
749 [ disabled_ipv6=0 ] )
750
751 AC_SEARCH_LIBS(getaddrinfo, socket inet6)
752 AC_SEARCH_LIBS(getnameinfo, socket inet6)
753 AC_SEARCH_LIBS(gai_strerror, socket inet6)
754 AC_CHECK_FUNC(gai_strerror)
755
756 APR_CHECK_WORKING_GETADDRINFO
757 APR_CHECK_WORKING_GETNAMEINFO
758
759 AC_ACME_SOCKADDR_UN
760 AC_ACME_SOCKADDR_IN6
761 AC_ACME_SOCKADDR_STORAGE
762
763 AC_MSG_CHECKING(if the system supports IPv6)
764 have_ipv6="no"
765
766 if test "$disabled_ipv6" = 1; then
767 AC_MSG_RESULT([no -- disabled by user])
768 else
769 if test "x$ac_cv_acme_sockaddr_in6" = "xyes"; then
770 if test "x$ac_cv_working_getaddrinfo" = "xyes"; then
771 if test "x$ac_cv_working_getnameinfo" = "xyes"; then
772 have_ipv6="yes"
773 AC_MSG_RESULT([yes])
774 AC_DEFINE(HAVE_IPV6, 1, [Define if you have IPv6 support.])
775 else
776 AC_MSG_RESULT([no -- no getnameinfo])
777 fi
778 else
779 AC_MSG_RESULT([no -- no working getaddrinfo])
780 fi
781 else
782 AC_MSG_RESULT([no -- no sockaddr_in6])
783 fi
784 fi
785
786 dnl
787 dnl Test whether SO_RCVTIMEO is broken
788 dnl
789 AC_CACHE_CHECK([whether setsockopt(SO_RCVTIMEO) is broken],
790 ac_cv_so_rcvtimeo_broken, [dnl
791 AC_RUN_IFELSE([AC_LANG_SOURCE([[
792 #if defined(HAVE_SYS_TYPES_H)
793 #include <sys/types.h>
794 #endif
795
796 #if defined(HAVE_SYS_SOCKET_H)
797 #include <sys/socket.h>
798 #endif
799
800 #if defined(HAVE_SYS_TIME_H)
801 #include <sys/time.h>
802 #endif
803
804 int main(void) {
805 int fd;
806 int ret;
807 struct timeval new_tv;
808
809 /* Open the socket (INET/TCP).*/
810 fd = socket(AF_INET, SOCK_STREAM, 0);
811
812 /* set the timeout for the incoming queue */
813 /* 1 second for example */
814 new_tv.tv_sec = 1;
815 new_tv.tv_usec = 0;
816
817 ret = setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &new_tv, sizeof(new_tv));
818 return ret;
819 }
820 ]])],[ac_cv_so_rcvtimeo_broken=no],[ac_cv_so_rcvtimeo_broken=yes],[ac_cv_so_rcvtimeo_broken=cross])])
821 if test x"$ac_cv_so_rcvtimeo_broken" = x"yes"; then
822 AC_DEFINE(HAVE_BROKEN_SO_RCVTIMEO, 1, [Define if setsockopt(SO_RCVTIMEO) is broken])
823 fi
824
fc666b2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1308 5dc97367-9…
alobbs authored
825
826 dnl
827 dnl Look for socklen_t
828 dnl
829 AC_MSG_CHECKING([for socklen_t])
830 AC_TRY_COMPILE(
831 [#include <sys/types.h>
832 #include <sys/socket.h>],
833 [socklen_t len = 42; return 0;],
834 ac_cv_type_socklen_t=yes,
835 ac_cv_type_socklen_t=no
836 )
837
838 if test $ac_cv_type_socklen_t != yes; then
839 AC_DEFINE(socklen_t, int, [Substitute for socklen_t])
840 AC_MSG_RESULT(int)
841 else
842 AC_MSG_RESULT(yes)
843 fi
4d22726 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1172 5dc97367-9…
alobbs authored
844
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
845 dnl
846 dnl Check of __func__ and co..
847 dnl
848 AC_MSG_CHECKING([whether our compiler supports __func__])
849 AC_TRY_COMPILE([],
850 [const char *cp = __func__;],
851 AC_MSG_RESULT([yes]),
852 AC_MSG_RESULT([no])
853 AC_MSG_CHECKING([whether our compiler supports __FUNCTION__])
854 AC_TRY_COMPILE([],
855 [const char *cp = __FUNCTION__;],
856 AC_MSG_RESULT([yes])
857 AC_DEFINE(__func__, __FUNCTION__,
858 [Define to appropriate substitue if compiler doesnt have __func__]),
859 AC_MSG_RESULT([no])
860 AC_DEFINE(__func__, __FILE__,
861 [Define to appropriate substitue if compiler doesnt have __func__])))
862
863 dnl
864 dnl Check for pcre library
865 dnl
36f561a @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@903 5dc97367-97…
alobbs authored
866 have_pcre="built-in"
867
868 AC_ARG_ENABLE(internal_pcre,
869 AC_HELP_STRING([--enable-internal-pcre],[Enable internal PCRE]),
870 use_internal_pcre="$enableval", use_internal_pcre="no")
871
872 if test "x$use_internal_pcre" != "xyes"; then
873 AC_CHECK_LIB(pcre, pcre_compile, have_pcre_lib=yes, have_pcre_lib=no)
874 AC_CHECK_HEADER(pcre.h, have_pcre_include=yes, have_pcre_include=no)
875 if test "$have_pcre_lib $have_pcre_include" = "yes yes"; then
876 have_pcre="yes"
877 fi
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
878 fi
879
36f561a @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@903 5dc97367-97…
alobbs authored
880 AM_CONDITIONAL(USE_INTERNAL_PCRE, test $have_pcre = "built-in")
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
881
882 dnl
883 dnl PAM
884 dnl
885 AC_ARG_ENABLE(pam, AC_HELP_STRING([--disable-pam],[Disable PAM support]), use_pam="$enableval", use_pam="yes")
886 if test "x$use_pam" = "xyes"; then
7a4a352 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@934 5dc97367-97…
alobbs authored
887 AC_CHECK_LIB(pam, pam_start, have_pam_lib=yes, have_pam_lib=no)
dcb92f4 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@535 5dc97367-97…
alobbs authored
888 AC_CHECK_LIB(pam, _pam_dispatch, have_pam_dispatch=yes, have_pam_dispatch=no)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
889 AC_CHECK_HEADER(security/pam_modules.h, have_pam_include=yes, have_pam_include=no)
890 AC_CHECK_HEADERS(security/_pam_macros.h security/pam_appl.h)
891 fi
dcb92f4 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@535 5dc97367-97…
alobbs authored
892
2c2df3e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1314 5dc97367-9…
alobbs authored
893 if test "$use_pam $have_pam_lib $have_pam_include" = "yes yes yes"; then
894 have_pam="yes"
895 else
7a4a352 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@934 5dc97367-97…
alobbs authored
896 have_pam="no"
897 fi
898 AM_CONDITIONAL(HAVE_PAM, test "x$have_pam" = "xyes")
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
899
dcb92f4 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@535 5dc97367-97…
alobbs authored
900 if test "$have_pam_dispatch" = "yes"; then
901 AC_DEFINE(HAVE_PAM_DISPATCH, 1, [Have _pam_dispatch function])
902 fi
903
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
904 dnl
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
905 dnl crypt()
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
906 dnl
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
907 AC_CHECK_HEADERS(crypt.h)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
908
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
909 AC_CHECK_FUNC(crypt, system_crypt="yes", system_crypt="no")
910 AC_CHECK_LIB(crypt, crypt, have_crypt_lib="yes", have_crypt_lib="no")
911 if test "x$have_crypt_lib" = "xyes"; then
912 CRYPT_LIBS="-lcrypt"
913 AC_SUBST(CRYPT_LIBS)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
914 fi
915
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
916 use_crypt="no"
917 if test "$system_crypt $have_crypt_lib" != "no no"; then
918 use_crypt="yes"
919 AC_DEFINE(HAVE_CRYPT, 1, [Have crypt function])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
920 fi
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
921
922 dnl
923 dnl crypt_r()
924 dnl
925 AC_CHECK_FUNC(crypt_r, system_crypt_r="yes", system_crypt_r="no")
926 AC_CHECK_LIB(crypt, crypt_r, have_crypt_r_lib="yes", have_crypt_r_lib="no")
927
928 use_crypt_r="no"
2ae848d @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@676 5dc97367-97…
alobbs authored
929 if test "$system_crypt_r $have_crypt_r_lib" != "no no"; then
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
930 use_crypt_r="yes"
931 AC_DEFINE(HAVE_CRYPT_R, 1, [Have crypt_r function])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
932 fi
933
934 dnl
935 dnl crypt_r and pthread
936 dnl
6db0284 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@675 5dc97367-97…
alobbs authored
937 if test "$use_crypt_r" = "yes"; then
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
938 dnl
939 dnl struct crypt_data
940 dnl
941 oldcflags="$CFLAGS"
942 CFLAGS="$CFLAGS -D_GNU_SOURCE"
943
944 AC_MSG_CHECKING([for struct crypt_data])
945 AC_TRY_COMPILE([#include <crypt.h>],
946 [struct crypt_data data;]
947 ,
948 AC_MSG_RESULT([-D_GNU_SOURCE])
949 CRYPT_CFLAGS="-D_GNU_SOURCE"
950 AC_SUBST(CRYPT_CFLAGS)
951 ,
952 AC_MSG_ERROR([struct crypt_data is not known]))
953
954 CFLAGS="$oldcflags"
955 fi
956
2c2df3e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1314 5dc97367-9…
alobbs authored
957 AM_CONDITIONAL(USE_CRYPT, test "x$use_crypt x$use_crypt_r" != "xno xno")
958
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
959
960 dnl
961 dnl SSL and TLS
962 dnl
963 AC_ARG_ENABLE([tls],
964 [AC_HELP_STRING([--disable-tls],[Disable TLS/SSL support])
965 AC_HELP_STRING([--enable-tls=[gnutls|openssl]])],
966 enable_tls="$enableval", enable_tls="undef")
967
968 case "$enable_tls" in
969 no)
970 check_gnutls=no
971 check_openssl=no
972 ;;
973 undef|yes)
974 check_gnutls=yes
975 check_openssl=yes
976 ;;
977 gnu*)
978 check_gnutls=yes
979 check_openssl=no
980 ;;
981 open*)
982 check_gnutls=no
983 check_openssl=yes
984 ;;
985 *)
986 AC_MSG_ERROR([Incorrect TLS library])
987 ;;
988 esac
989
990 have_tls="no"
991
992 if test "$check_gnutls" = "yes" && test "$have_tls" = "no"
993 then
994 dnl
995 dnl GNUTLS
996 dnl
691a8a9 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@645 5dc97367-97…
alobbs authored
997 PKG_CHECK_MODULES(GNUTLS, gnutls >= "1.0.4", [have_gnutls=yes], [have_gnutls=no])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
998 if test "$have_gnutls" = "yes"
999 then
691a8a9 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@645 5dc97367-97…
alobbs authored
1000 TLS_LIBS="$GNUTLS_LIBS"
1001 TLS_CFLAGS="$GNUTLS_CFLAGS"
93ecbfd @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1173 5dc97367-9…
alobbs authored
1002
1003 AC_CHECK_LIB(gcrypt, gcry_control, [TLS_LIBS="$TLS_LIBS -lgcrypt"])
1004 AC_CHECK_LIB(gpg-error, gpg_strerror, [TLS_LIBS="$TLS_LIBS -lgpg-error"])
1005
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1006 AC_SUBST(TLS_LIBS)
1007 AC_SUBST(TLS_CFLAGS)
1008
1009 AC_DEFINE(HAVE_TLS, 1, [Have TLS support])
1010 AC_DEFINE(HAVE_GNUTLS, 1, [Have libgnutls])
1011 have_tls="gnutls"
1012 else
1013 enable_tls=no
1014 fi
1015 fi
1016
1017 if test "$check_openssl" = "yes" && test "$have_tls" = "no"
1018 then
1019 dnl
1020 dnl OpenSSL
1021 dnl
2ddc0e6 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@933 5dc97367-97…
alobbs authored
1022 AC_CHECK_LIB(crypto, BN_init)
1023
40aafe2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@307 5dc97367-97…
alobbs authored
1024 AC_CHECK_HEADERS([openssl/engine.h])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1025 AC_CHECK_LIB(ssl, SSL_accept, [have_openssl=yes], [have_openssl=no])
1026 if test "$have_openssl" = "yes"
1027 then
1028 TLS_LIBS="-lssl"
1029 AC_SUBST(TLS_LIBS)
1030
1031 AC_DEFINE(HAVE_TLS, 1, [Have TLS support])
1032 AC_DEFINE(HAVE_OPENSSL, 1, [Have OpenSSL library])
1033 have_tls="openssl"
1034 else
1035 enable_tls=no
1036 fi
1037 fi
1038
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1039 dnl
1040 dnl LDAP
1041 dnl
9eb4035 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@400 5dc97367-97…
alobbs authored
1042 AC_ARG_WITH([ldap],
1043 AC_HELP_STRING([--with-ldap=@<:@ARG@:>@],
1044 [use OpenLDAP development library @<:@default=yes@:>@, optionally specify path to dev libs]
1045 ),
1046 [
1047 if test "$withval" = "no"; then
1048 want_ldap="no"
1049 elif test "$withval" = "yes"; then
1050 want_ldap="yes"
1051 else
1052 want_ldap="yes"
1053 LDAP_CONFIG="$withval"
1054 fi
1055 ],
1056 [want_ldap="yes"]
1057 )
1058
1059 if test "$want_ldap" = "yes"; then
1060 AC_CHECK_LIB(ldap, ldap_init, have_ldap_lib=yes, have_ldap_lib=no)
1061 AC_CHECK_HEADER(ldap.h, have_ldap_include=yes, have_ldap_include=no)
314cf73 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@447 5dc97367-97…
alobbs authored
1062
1063 AC_CHECK_LIB(ldap, ldap_start_tls_s, [
1064 AC_DEFINE(LDAP_HAVE_START_TLS_S,, Define if you have ldap_start_tls_s)
1065 ])
1066
9eb4035 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@400 5dc97367-97…
alobbs authored
1067 if test "$have_ldap_lib $have_ldap_include" = "yes yes"; then
1068 have_ldap="yes"
1069 else
1070 have_ldap="no"
1071 fi
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1072 else
9eb4035 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@400 5dc97367-97…
alobbs authored
1073 have_ldap="no"
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1074 fi
9eb4035 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@400 5dc97367-97…
alobbs authored
1075
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1076 AM_CONDITIONAL(HAVE_LDAP, test $have_ldap = "yes")
1077
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1078
1079 dnl
e4c101f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@391 5dc97367-97…
alobbs authored
1080 dnl Check for MySQL 4.0.0 support
1081 dnl
1082 AX_LIB_MYSQL(4.0.0)
1083
cf1a7b6 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@947 5dc97367-97…
alobbs authored
1084 dnl
1085 dnl Python's docutils
1086 dnl
1087 AC_MSG_CHECKING([for Python's docutils])
1088 if python -c "import docutils" >/dev/null 2>/dev/null; then
1089 docutils_found=yes
1090 else
1091 docutils_found=no
1092 fi
1093 AM_CONDITIONAL(PYTHON_DOCUTILS, test "x$docutils_found" = "xyes")
1094 AC_MSG_RESULT([$docutils_found])
1095
1096 if test "x$docutils_found" != "xyes"; then
1097 echo
1098 echo "*WARNING*: Python module docutils is not installed!"
2d62f2e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1202 5dc97367-9…
alobbs authored
1099 echo " It will not be able to generate the documentation."
cf1a7b6 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@947 5dc97367-97…
alobbs authored
1100 echo
1101 fi
e4c101f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@391 5dc97367-97…
alobbs authored
1102
1103 dnl
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1104 dnl WWW root directory
1105 dnl
1106 AC_ARG_WITH(wwwroot, AC_HELP_STRING([--with-wwwroot=DIR], [Set the WWW root directory]),
1107 WWW_ROOT="$withval", WWW_ROOT="$localstatedir/www")
1108
1109 AC_SUBST(WWW_ROOT)
1110
1111
1112 dnl
91a610b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1186 5dc97367-9…
alobbs authored
1113 dnl Look for misc binaries
1114 dnl
1115 AC_PATH_PROG(PHPCGI, php-cgi)
1116 AC_ARG_VAR(PHPCGI, [path to PHP-cgi])
1117
1118 AC_MSG_CHECKING([$PHPCGI supports FastCGI])
2d62f2e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1202 5dc97367-9…
alobbs authored
1119 if test "x$PHPCGI" = "x"; then
91a610b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1186 5dc97367-9…
alobbs authored
1120 AC_MSG_RESULT([no])
1121 else
2d62f2e @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1202 5dc97367-9…
alobbs authored
1122 $PHPCGI -v | grep 'cgi-fcgi' >/dev/null 2>/dev/null
1123 if test $? != 0; then
1124 PHPCGI=""
1125 AC_MSG_RESULT([no])
1126 else
1127 AC_MSG_RESULT([yes])
1128 fi
91a610b @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1186 5dc97367-9…
alobbs authored
1129 fi
1130
1131 if test "x$PHPCGI" = "x"; then
1132 for n in php-cgi php; do
1133 for p in /usr/lib/cgi-bin /usr/bin /usr/local/bin; do
1134 phpcgi_path="$p/php-cgi"
1135 AC_MSG_CHECKING([for $phpcgi_path])
1136 if test -x "$phpcgi_path"; then
1137 $phpcgi_path -v | grep 'cgi-fcgi' >/dev/null 2>/dev/null
1138 if test $? = 0; then
1139 PHPCGI=$phpcgi_path
1140 AC_MSG_RESULT([yes])
1141 else
1142 AC_MSG_RESULT([not fcgi])
1143 fi
1144 break
1145 else
1146 AC_MSG_RESULT([no])
1147 fi
1148 done
1149 if test "x$PHPCGI" != x; then
1150 break;
1151 fi
1152 done
1153 fi
1154
1155 if test "x$PHPCGI" = "x"; then
1156 PHPCGI="php-cgi"
1157 fi
1158
1159 AC_SUBST(PHPCGI)
1160
1161
1162 dnl
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1163 dnl Options
1164 dnl
1165 use_static_module=""
1166 AC_ARG_ENABLE(static-module,
1167 AC_HELP_STRING([--enable-static-module=MODULE][]),
1168 [use_static_module="$use_static_module $enableval "],[])
1169
337832a @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1375 5dc97367-9…
alobbs authored
1170 modules="error_redir server_info file admin dirlist fcgi fastcgi scgi redir common nn cgi phpcgi proxy mirror gzip ncsa combined w3c pam ldap mysql htpasswd plain htdigest round_robin directory extensions request"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1171
1172 # Remove modules that will not be compiles
1173 #
1174 if test "x$have_pam" != "xyes"; then
1175 modules=`echo $modules | sed s/pam//`
1176 fi
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1177 if test "x$have_ldap" != "xyes"; then
1178 modules=`echo $modules | sed s/ldap//`
1179 fi
e4c101f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@391 5dc97367-97…
alobbs authored
1180 if test "x$have_mysql" != "xyes"; then
1181 modules=`echo $modules | sed s/mysql//`
1182 fi
595756c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@680 5dc97367-97…
alobbs authored
1183 if test "$use_crypt" != "yes"; then
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1184 modules=`echo $modules | sed s/htpasswd//`
1185 fi
1186
1187 add_calls=""
1188 init_calls=""
1189 headers=""
1190 ext_defs=""
1191
1192 for mod in $modules; do
1193 AC_MSG_CHECKING([module "$mod"])
1194
cb3d8c1 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1233 5dc97367-9…
alobbs authored
1195 if echo $use_static_module | grep -w $mod >/dev/null || echo $use_static_module | grep all >/dev/null; then
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored
1196 ext_defs="$ext_defs \n extern cherokee_plugin_info_t cherokee_${mod}_info;"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1197
b69d2e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@476 5dc97367-97…
alobbs authored
1198 headers="$headers \n void PLUGIN_INIT_NAME($mod) (cherokee_plugin_loader_t *loader);"
1199 add_calls="$add_calls \n add_static_entry (loader, \"$mod\", PLUGIN_INFO_PTR($mod));"
1200 init_calls="$init_calls \n PLUGIN_INIT_NAME($mod)(loader);"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1201
1202 AC_MSG_RESULT([static])
1203 else
1204 AC_MSG_RESULT([dynamic])
1205 fi
1206 done
1207
1208 printf "$ext_defs\n" > ${srcdir}/cherokee/loader.autoconf.h
1209 printf "$headers \n\n $add_calls \n\n $init_calls\n" > ${srcdir}/cherokee/loader.autoconf.inc
1210
1211 dnl
1212 dnl Static/Dynamic modules
1213 dnl
1214 conf_h="${srcdir}/cherokee/loader.autoconf.h"
1215 AM_CONDITIONAL(STATIC_HANDLER_SERVER_INFO, grep server_info $conf_h >/dev/null)
1216 AM_CONDITIONAL(STATIC_HANDLER_FILE, grep file $conf_h >/dev/null)
1217 AM_CONDITIONAL(STATIC_HANDLER_ADMIN, grep admin $conf_h >/dev/null)
1218 AM_CONDITIONAL(STATIC_HANDLER_DIRLIST, grep dirlist $conf_h >/dev/null)
1219 AM_CONDITIONAL(STATIC_HANDLER_FCGI, grep fcgi $conf_h >/dev/null)
1220 AM_CONDITIONAL(STATIC_HANDLER_FASTCGI, grep fastcgi $conf_h >/dev/null)
1221 AM_CONDITIONAL(STATIC_HANDLER_SCGI, grep scgi $conf_h >/dev/null)
1222 AM_CONDITIONAL(STATIC_HANDLER_REDIR, grep redir $conf_h >/dev/null)
1223 AM_CONDITIONAL(STATIC_HANDLER_ERROR_REDIR, grep redir $conf_h >/dev/null)
1224 AM_CONDITIONAL(STATIC_HANDLER_COMMON, grep common $conf_h >/dev/null)
1225 AM_CONDITIONAL(STATIC_HANDLER_NN, grep nn $conf_h >/dev/null)
1226 AM_CONDITIONAL(STATIC_HANDLER_CGI, grep cgi $conf_h >/dev/null)
1227 AM_CONDITIONAL(STATIC_HANDLER_PHPCGI, grep phpcgi $conf_h >/dev/null)
a5dd2dd @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@247 5dc97367-97…
alobbs authored
1228 AM_CONDITIONAL(STATIC_HANDLER_PROXY, grep proxy $conf_h >/dev/null)
7c793e0 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@529 5dc97367-97…
alobbs authored
1229 AM_CONDITIONAL(STATIC_HANDLER_MIRROR, grep mirror $conf_h >/dev/null)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1230 AM_CONDITIONAL(STATIC_ENCODER_GZIP, grep gzip $conf_h >/dev/null)
1231 AM_CONDITIONAL(STATIC_LOGGER_NCSA, grep ncsa $conf_h >/dev/null)
1232 AM_CONDITIONAL(STATIC_LOGGER_COMBINED, grep combined $conf_h >/dev/null)
1233 AM_CONDITIONAL(STATIC_LOGGER_W3C, grep w3c $conf_h >/dev/null)
1234 AM_CONDITIONAL(STATIC_VALIDATOR_PAM, grep pam $conf_h >/dev/null)
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1235 AM_CONDITIONAL(STATIC_VALIDATOR_LDAP, grep ldap $conf_h >/dev/null)
e4c101f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@391 5dc97367-97…
alobbs authored
1236 AM_CONDITIONAL(STATIC_VALIDATOR_MYSQL, grep mysql $conf_h >/dev/null)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1237 AM_CONDITIONAL(STATIC_VALIDATOR_HTPASSWD, grep htpasswd $conf_h >/dev/null)
1238 AM_CONDITIONAL(STATIC_VALIDATOR_PLAIN, grep plain $conf_h >/dev/null)
1239 AM_CONDITIONAL(STATIC_VALIDATOR_HTDIGEST, grep htdigest $conf_h >/dev/null)
c5205f7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@379 5dc97367-97…
alobbs authored
1240 AM_CONDITIONAL(STATIC_BALANCER_ROUND_ROBIN, grep round_robin $conf_h >/dev/null)
337832a @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1375 5dc97367-9…
alobbs authored
1241 AM_CONDITIONAL(STATIC_RULE_DIRECTORY, grep directory $conf_h >/dev/null)
1242 AM_CONDITIONAL(STATIC_RULE_EXTENSIONS, grep extensions $conf_h >/dev/null)
1243 AM_CONDITIONAL(STATIC_RULE_REQUEST, grep request $conf_h >/dev/null)
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1244
a5ee902 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@693 5dc97367-97…
alobbs authored
1245 AC_OUTPUT([
1246 Makefile
1247 cget/Makefile
1248 cherokee-config
1249 cherokee.pc
1250 cherokee.spec
1251 cherokee/Makefile
1252 cherokee/Makefile.MingW
1253 contrib/Makefile
1254 icons/Makefile
1255 m4/Makefile
1256 qa/Makefile
0940465 @brosner rewritten documentation system for 0.6.0
brosner authored
1257 doc/Makefile
a5ee902 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@693 5dc97367-97…
alobbs authored
1258 themes/Makefile
b60ec79 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1316 5dc97367-9…
alobbs authored
1259 themes/default/Makefile
1260 themes/firefox3/Makefile
a5ee902 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@693 5dc97367-97…
alobbs authored
1261 windows/Makefile
1262 windows/cherokee.nsi
1263 www/Makefile
38780e2 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@974 5dc97367-97…
alobbs authored
1264 admin/Makefile
857941d @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@984 5dc97367-97…
alobbs authored
1265 admin/static/Makefile
4214165 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1032 5dc97367-9…
alobbs authored
1266 admin/static/js/Makefile
1267 admin/static/css/Makefile
1268 admin/static/images/Makefile
a5ee902 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@693 5dc97367-97…
alobbs authored
1269 ])
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1270
1271
1272 methods=""
1273 if test "$have_epoll" = yes; then methods="${methods}epoll "; fi
1274 if test "$have_kqueue" = yes; then methods="${methods}kqueue "; fi
1275 if test "$have_poll" = yes; then methods="${methods}poll "; fi
1276 if test "$have_port" = yes; then methods="${methods}port "; fi
1277 if test "$have_win32_select" = yes; then methods="${methods}win32 "; fi
1278 if test "$have_select" = yes; then methods="${methods}select"; fi
1279
595756c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@680 5dc97367-97…
alobbs authored
1280 if test "$use_crypt_r" = "yes"; then
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1281 crypt_type="multithread"
595756c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@680 5dc97367-97…
alobbs authored
1282 elif test "$use_crypt" = "yes"; then
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1283 crypt_type="single thread"
595756c @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@680 5dc97367-97…
alobbs authored
1284 else
1285 crypt_type="no"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1286 fi
1287
1288 echo
1289 echo ============================
1290 echo "Install prefix $prefix"
1291 echo "cflags $CFLAGS"
1292 echo "trace $enable_trace"
1293 echo "sendfile() $with_sendfile_support"
1294 echo "IPv6 support $have_ipv6"
1295 i=1
1296 for m in $methods; do
1297 echo "Polling method $i $m"
1298 i=`expr $i + 1`
1299 done
50251d8 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@673 5dc97367-97…
alobbs authored
1300 echo "Threading support $have_pthread"
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1301 echo "TLS support $have_tls"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1302 echo "PCRE library $have_pcre"
1303 echo "Compatible PAM $have_pam"
3007777 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@330 5dc97367-97…
alobbs authored
1304 echo "LDAP $have_ldap"
e4c101f @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@391 5dc97367-97…
alobbs authored
1305 echo "MySQL $have_mysql"
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1306 echo "crypt support $crypt_type"
702c2f7 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@1306 5dc97367-9…
alobbs authored
1307 if test "x$is_beta" = "xyes"; then
86dcbbb @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@471 5dc97367-97…
alobbs authored
1308 echo "Beta release $svn_rev"
1309 fi
ae9d971 @alobbs git-svn-id: svn://cherokee-project.com/cherokee/trunk@243 5dc97367-97…
alobbs authored
1310 echo
1311 eval eval echo "Installation dir $bindir"
1312 echo ============================
1313 echo
1314 if test "x$cherokeepath" != "x" ; then
1315 echo Warning: You have an old copy of Cherokee at $cherokeepath.
1316 echo
1317 fi
1318
1319 cat <<THEEND
1320 +--------------------------------------------------------------------+
1321 | License: |
1322 | This software is subject to the GPL License, available in this |
1323 | distribution in the file COPYING. By continuing this installation |
1324 | process, you are bound by the terms of this license agreement. |
1325 | If you do not agree with the terms of this license, you must abort |
1326 | the installation process at this point. |
1327 +--------------------------------------------------------------------+
1328
1329 Thank you for using Cherokee.
1330 THEEND
Something went wrong with that request. Please try again.