root/tags/lighttpd-1.4.19/configure.in

Revision 2123, 18.6 kB (checked in by jan, 6 months ago)

make configure checks for --with-pcre, --with-zlib and --with-bzip2 failing if the headers aren't found

Line 
1#                                               -*- Autoconf -*-
2# Process this file with autoconf to produce a configure script.
3AC_PREREQ(2.57)
4AC_INIT(lighttpd, 1.4.19, jan@kneschke.de)
5AC_CONFIG_SRCDIR([src/server.c])
6
7AC_CANONICAL_TARGET
8
9AM_INIT_AUTOMAKE
10
11AC_CONFIG_HEADER([config.h])
12
13AM_MAINTAINER_MODE
14
15# Checks for programs.
16AC_PROG_CC
17AM_PROG_CC_C_O
18AC_PROG_LD
19AC_PROG_INSTALL
20AC_PROG_AWK
21AC_PROG_CPP
22dnl AC_PROG_CXX
23AC_PROG_LN_S
24AC_PROG_MAKE_SET
25
26dnl check environment
27AC_AIX
28AC_ISC_POSIX
29AC_MINIX
30
31dnl AC_CANONICAL_HOST
32case $host_os in
33        *darwin*|*cygwin*|*aix*|*mingw* ) NO_RDYNAMIC=yes;;
34        * ) NO_RDYNAMIC=no;;
35esac
36AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)
37
38AC_EXEEXT
39
40dnl more automake stuff
41AM_C_PROTOTYPES
42
43dnl libtool
44AC_DISABLE_STATIC
45AC_ENABLE_SHARED
46
47AC_LIBTOOL_DLOPEN
48AC_PROG_LIBTOOL
49
50dnl for solaris
51CPPFLAGS="${CPPFLAGS} -D_REENTRANT -D__EXTENSIONS__"
52
53# Checks for header files.
54AC_HEADER_STDC
55AC_HEADER_SYS_WAIT
56AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h \
57sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \
58getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
59sys/mman.h sys/event.h sys/port.h pwd.h sys/syslimits.h \
60sys/resource.h sys/un.h syslog.h sys/prctl.h uuid/uuid.h])
61
62# Checks for typedefs, structures, and compiler characteristics.
63AC_C_CONST
64AC_C_INLINE
65AC_C_CHAR_UNSIGNED
66AC_TYPE_OFF_T
67AC_TYPE_PID_T
68AC_TYPE_SIZE_T
69
70AC_CHECK_MEMBER(struct tm.tm_gmtoff,[AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm])],,[#include <time.h>])
71AC_CHECK_TYPES(struct sockaddr_storage,,,[#include <sys/socket.h>])
72AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h>
73#include <sys/socket.h>])
74
75# Checks for library functions.
76AC_FUNC_FORK
77dnl AC_FUNC_MALLOC
78#AC_FUNC_MMAP
79dnl AC_FUNC_REALLOC
80AC_TYPE_SIGNAL
81AC_FUNC_STAT
82AC_FUNC_STRFTIME
83
84dnl Checks for database.
85MYSQL_INCLUDE=""
86MYSQL_LIBS=""
87
88AC_MSG_CHECKING(for MySQL support)
89AC_ARG_WITH(mysql,
90    AC_HELP_STRING([--with-mysql@<:@=PATH@:>@],[Include MySQL support. PATH is the path to 'mysql_config']),
91    [WITH_MYSQL=$withval],[WITH_MYSQL=no])
92
93if test "$WITH_MYSQL" != "no"; then
94  AC_MSG_RESULT(yes)
95  if test "$WITH_MYSQL" = "yes"; then
96    AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
97  else
98    MYSQL_CONFIG=$WITH_MYSQL
99  fi
100
101  if test "$MYSQL_CONFIG" = ""; then
102    AC_MSG_ERROR(mysql_config is not found)
103  fi
104  if test \! -x $MYSQL_CONFIG; then
105    AC_MSG_ERROR(mysql_config not exists or not executable, use --with-mysql=path-to-mysql_config)
106  fi
107
108  if $MYSQL_CONFIG | grep -- '--include' > /dev/null ; then
109    MYSQL_INCLUDE="`$MYSQL_CONFIG --include | sed s/\'//g`"
110  else
111    MYSQL_INCLUDE="`$MYSQL_CONFIG --cflags | sed s/\'//g`"
112  fi
113  MYSQL_LIBS="`$MYSQL_CONFIG --libs | sed s/\'//g`"
114
115  AC_MSG_CHECKING(for MySQL includes at)
116  AC_MSG_RESULT($MYSQL_INCLUDE)
117
118  AC_MSG_CHECKING(for MySQL libraries at)
119  AC_MSG_RESULT($MYSQL_LIBS)
120dnl check for errmsg.h, which isn't installed by some versions of 3.21
121  old_CPPFLAGS="$CPPFLAGS"
122  CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
123  AC_CHECK_HEADERS(errmsg.h mysql.h)
124  CPPFLAGS="$old_CPPFLAGS"
125
126  AC_DEFINE([HAVE_MYSQL], [1], [mysql support])
127else
128  AC_MSG_RESULT(no)
129fi
130
131AC_SUBST(MYSQL_LIBS)
132AC_SUBST(MYSQL_INCLUDE)
133
134dnl Check for LDAP
135AC_MSG_CHECKING(for LDAP support)
136AC_ARG_WITH(ldap, AC_HELP_STRING([--with-ldap],[enable LDAP support]),
137[WITH_LDAP=$withval], [WITH_LDAP=no])
138AC_MSG_RESULT([$withval])
139if test "$WITH_LDAP" != "no"; then
140 AC_CHECK_LIB(ldap, ldap_bind, [
141  AC_CHECK_HEADERS([ldap.h],[
142    LDAP_LIB=-lldap
143    AC_DEFINE([HAVE_LIBLDAP], [1], [libldap])
144    AC_DEFINE([HAVE_LDAP_H], [1])
145  ])
146 ])
147 AC_SUBST(LDAP_LIB)
148 AC_CHECK_LIB(lber, ber_printf, [
149  AC_CHECK_HEADERS([lber.h],[
150    LBER_LIB=-llber
151    AC_DEFINE([HAVE_LIBLBER], [1], [liblber])
152    AC_DEFINE([HAVE_LBER_H], [1])
153  ])
154 ])
155 AC_SUBST(LBER_LIB)
156fi
157
158dnl Check for xattr
159AC_MSG_CHECKING(for extended attributes support)
160AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable extended attribute support]),
161[WITH_ATTR=$withval],[WITH_ATTR=no])
162AC_MSG_RESULT($withval)
163if test "$WITH_ATTR" != "no"; then
164 AC_CHECK_LIB(attr, attr_get, [
165        AC_CHECK_HEADERS([attr/attributes.h],[
166                ATTR_LIB=-lattr
167                AC_DEFINE([HAVE_XATTR], [1], [libattr])
168                AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
169        ])
170 ])
171 AC_SUBST(ATTR_LIB)
172fi
173
174## openssl on solaris needs -lsocket -lnsl
175AC_SEARCH_LIBS(socket,socket)
176AC_SEARCH_LIBS(gethostbyname,nsl socket)
177AC_SEARCH_LIBS(hstrerror,resolv)
178
179save_LIBS=$LIBS
180AC_SEARCH_LIBS(dlopen,dl,[
181  AC_CHECK_HEADERS([dlfcn.h],[
182    if test "$ac_cv_search_dlopen" != no; then
183      test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen"
184    fi
185
186    AC_DEFINE([HAVE_LIBDL], [1], [libdl])
187    AC_DEFINE([HAVE_DLFCN_H], [1])
188  ])
189])
190LIBS=$save_LIBS
191AC_SUBST(DL_LIB)
192
193dnl Check for valgrind
194AC_MSG_CHECKING(for valgrind)
195AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind],[enable internal support for valgrind]),
196[WITH_VALGRIND=$withval],[WITH_VALGRIND=no])
197AC_MSG_RESULT([$WITH_VALGRIND])
198if test "$WITH_VALGRIND" != "no"; then
199 AC_CHECK_HEADERS([valgrind/valgrind.h])
200fi
201
202dnl Check for openssl
203AC_MSG_CHECKING(for OpenSSL)
204AC_ARG_WITH(openssl,
205    AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[Include openssl support (default no)]),
206    [WITH_OPENSSL=$withval],[WITH_OPENSSL=no])
207
208if test "$WITH_OPENSSL" != "no"; then
209    use_openssl=yes
210    if test "$WITH_OPENSSL" != "yes"; then
211        CPPFLAGS="$CPPFLAGS -I$WITH_OPENSSL/include"
212        LDFLAGS="$LDFLAGS -L$WITH_OPENSSL/lib"
213    fi
214else
215    use_openssl=no
216fi
217AC_MSG_RESULT([$use_openssl])
218
219AC_ARG_WITH(openssl-includes,
220    AC_HELP_STRING([--with-openssl-includes=DIR],[OpenSSL includes]),
221    [ use_openssl=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
222)
223
224AC_ARG_WITH(openssl-libs,
225    AC_HELP_STRING([--with-openssl-libs=DIR],[OpenSSL libraries]),
226    [ use_openssl=yes LDFLAGS="$LDFLAGS -L$withval" ]
227)
228
229AC_ARG_WITH(kerberos5,
230    AC_HELP_STRING([--with-kerberos5],[use Kerberos5 support with OpenSSL]),
231    [ use_kerberos=yes ], [use_kerberos=no]
232)
233
234if test "x$use_openssl" = "xyes"; then
235    if test "x$use_kerberos" != "xyes"; then
236        CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"
237    fi
238
239    AC_CHECK_HEADERS([openssl/ssl.h])
240    OLDLIBS="$LIBS"
241    AC_CHECK_LIB(crypto, BIO_f_base64, [
242      AC_CHECK_LIB(ssl, SSL_new, [ SSL_LIB="-lssl -lcrypto"
243                                 AC_DEFINE(HAVE_LIBSSL, [], [Have libssl]) ], [], [ -lcrypto "$DL_LIB" ])
244    ], [], [])
245    LIBS="$OLDLIBS"
246    AC_SUBST(SSL_LIB)
247fi
248
249AC_MSG_CHECKING(for perl regular expressions support)
250AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable pcre support (default yes)]),
251    [WITH_PCRE=$withval],[WITH_PCRE=yes])
252AC_MSG_RESULT([$WITH_PCRE])
253
254if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
255  AC_PATH_PROG(PCRECONFIG, pcre-config)
256
257  if test x"$PCRECONFIG" != x; then
258    PCRE_LIB=`$PCRECONFIG --libs`
259    CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
260    OLDLIBS="$LIBS"
261    LIBS="$LIBS $PCRE_LIB"
262    AC_CHECK_LIB(pcre, pcre_compile, [
263      AC_CHECK_HEADERS([pcre.h], [
264        AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
265        AC_DEFINE([HAVE_PCRE_H], [1])
266      ])
267    ])
268    LIBS="$OLDLIBS"
269  else
270     AC_MSG_ERROR([pcre-config not found, install the pcre-devel package and build with --without-pcre])
271  fi
272fi
273
274AC_SUBST(PCRE_LIB)
275
276AC_MSG_CHECKING(for zlib support)
277AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[Enable zlib support for mod_compress]),
278    [WITH_ZLIB=$withval],[WITH_ZLIB=yes])
279AC_MSG_RESULT([$WITH_ZLIB])
280
281if test "$WITH_ZLIB" != "no"; then
282  AC_CHECK_LIB(z, deflate, [
283    AC_CHECK_HEADERS([zlib.h],[
284      Z_LIB=-lz
285      AC_DEFINE([HAVE_LIBZ], [1], [libz])
286      AC_DEFINE([HAVE_ZLIB_H], [1])
287    ])
288  ])
289  if test x$Z_LIB = x; then
290     AC_MSG_ERROR([zlib-headers and/or libs where not found, install them or build with --without-zlib])
291  fi
292fi
293AC_SUBST(Z_LIB)
294
295AC_MSG_CHECKING(for bzip2 support)
296AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),
297    [WITH_BZIP2=$withval],[WITH_BZIP2=yes])
298AC_MSG_RESULT([$WITH_BZIP2])
299
300if test "$WITH_BZIP2" != "no"; then
301  AC_CHECK_LIB(bz2, BZ2_bzCompress, [
302    AC_CHECK_HEADERS([bzlib.h],[
303      BZ_LIB=-lbz2
304      AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
305      AC_DEFINE([HAVE_BZLIB_H], [1])
306    ])
307  ])
308  if test x$BZ_LIB = x; then
309     AC_MSG_ERROR([bzip2-headers and/or libs where not found, install them or build with --without-bzip2])
310  fi
311fi
312AC_SUBST(BZ_LIB)
313
314if test -z "$PKG_CONFIG"; then
315  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
316fi
317
318dnl Check for gamin
319AC_MSG_CHECKING(for FAM)
320AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gamin for reducing number of stat() calls]),
321[WITH_FAM=$withval],[WITH_FAM=no])
322AC_MSG_RESULT([$WITH_FAM])
323
324if test "$WITH_FAM" != "no"; then
325  AC_CHECK_LIB(fam, FAMOpen2, [
326    AC_CHECK_HEADERS([fam.h],[
327      FAM_LIBS=-lfam
328      AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
329      AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
330    ])
331  ])
332  if test "x$FAM_LIBS" = x; then
333    PKG_CHECK_MODULES(FAM, gamin >= 0.1.0, [
334      AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
335      AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
336    ])
337  fi
338  OLD_LIBS=$LIBS
339  LIBS=$FAM_LIBS
340  AC_CHECK_FUNCS([FAMNoExists])
341  LIBS=$OLD_LIBS
342 
343  if test x$FAM_LIBS = x; then
344     AC_MSG_ERROR([fam/gamin-headers and/or libs where not found, install them or build with --without-fam])
345  fi
346fi
347
348AC_MSG_CHECKING(for properties in mod_webdav)
349AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webdav-props],[properties in mod_webdav]),
350[WITH_WEBDAV_PROPS=$withval],[WITH_WEBDAV_PROPS=no])
351AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
352
353if test "$WITH_WEBDAV_PROPS" != "no"; then
354 PKG_CHECK_MODULES(XML, libxml-2.0, [
355    AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])
356    AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])
357 ])
358 PKG_CHECK_MODULES(SQLITE, sqlite3, [
359    AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])
360    AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])
361 ])
362
363 AC_MSG_CHECKING(for locks in mod_webdav)
364 AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]),
365 [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no])
366 AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
367
368 if test "$WITH_WEBDAV_LOCKS" != "no"; then
369   AC_CHECK_LIB(uuid, uuid_unparse, [
370         AC_CHECK_HEADERS([uuid/uuid.h],[
371                 UUID_LIBS=-luuid
372                 AC_DEFINE([HAVE_UUID], [1], [libuuid])
373                 AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available])
374         ])
375 ])
376
377 fi
378fi
379AC_SUBST(UUID_LIBS)
380
381dnl Check for gdbm
382AC_MSG_CHECKING(for gdbm)
383AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm storage for mod_trigger_b4_dl]),
384[WITH_GDBM=$withval],[WITH_GDBM=no])
385AC_MSG_RESULT([$WITH_GDBM])
386
387if test "$WITH_GDBM" != "no"; then
388 AC_CHECK_LIB(gdbm, gdbm_open, [
389         AC_CHECK_HEADERS([gdbm.h],[
390                 GDBM_LIB=-lgdbm
391                 AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
392                 AC_DEFINE([HAVE_GDBM_H], [1])
393         ])
394 ])
395 AC_SUBST(GDBM_LIB)
396fi
397
398dnl Check for memcache
399AC_MSG_CHECKING(for memcache)
400AC_ARG_WITH(memcache, AC_HELP_STRING([--with-memcache],[memcached storage for mod_trigger_b4_dl]),
401[WITH_MEMCACHE=$withval],[WITH_MEMCACHE=no])
402AC_MSG_RESULT([$WITH_MEMCACHE])
403if test "$WITH_MEMCACHE" != "no"; then
404 AC_CHECK_LIB(memcache, mc_new, [
405         AC_CHECK_HEADERS([memcache.h],[
406                 MEMCACHE_LIB=-lmemcache
407                 AC_DEFINE([HAVE_MEMCACHE], [1], [libmemcache])
408                 AC_DEFINE([HAVE_MEMCACHE_H], [1], [memcache.h])
409         ])
410 ])
411 AC_SUBST(MEMCACHE_LIB)
412fi
413
414dnl Check for lua
415AC_MSG_CHECKING(if lua-support is requested)
416AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engine for mod_cml]),
417[WITH_LUA=$withval],[WITH_LUA=no])
418
419AC_MSG_RESULT($WITH_LUA)
420if test "$WITH_LUA" != "no"; then
421 if test "$WITH_LUA" = "yes"; then
422  WITH_LUA=lua
423 fi
424 PKG_CHECK_MODULES(LUA, $WITH_LUA >= 5.1, [
425   AC_DEFINE([HAVE_LUA], [1], [liblua])
426   AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
427 ])
428
429 AC_SUBST(LUA_CFLAGS)
430 AC_SUBST(LUA_LIBS)
431fi
432
433save_LIBS=$LIBS
434AC_SEARCH_LIBS(crypt,crypt,[
435  AC_CHECK_HEADERS([crypt.h],[
436    AC_DEFINE([HAVE_CRYPT_H], [1])
437  ])
438
439  AC_DEFINE([HAVE_LIBCRYPT], [1], [libcrypt])
440  if test "$ac_cv_search_crypt" != no; then
441    test "$ac_cv_search_crypt" = "none required" || CRYPT_LIB="$ac_cv_search_crypt"
442  fi
443])
444LIBS=$save_LIBS
445AC_SUBST(CRYPT_LIB)
446
447save_LIBS=$LIBS
448AC_SEARCH_LIBS(sendfilev,sendfile,[
449  if test "$ac_cv_search_sendfilev" != no; then
450    test "$ac_cv_search_sendfilev" = "none required" || SENDFILE_LIB="$ac_cv_search_sendfilev"
451    AC_DEFINE([HAVE_SENDFILEV], [1], [solaris sendfilev])
452  fi
453])
454LIBS=$save_LIBS
455AC_SUBST(SENDFILE_LIB)
456
457case $host_os in
458        *mingw* ) LIBS="$LIBS -lwsock32";;
459        * ) ;;
460esac
461
462AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
463                  strdup strerror strstr strtol sendfile  getopt socket lstat \
464                  gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
465                  getuid select signal pathconf madvise posix_fadvise posix_madvise \
466                  writev sigaction sendfile64 send_file kqueue port_create localtime_r])
467
468AC_MSG_CHECKING(for Large File System support)
469AC_ARG_ENABLE(lfs,
470 AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
471 [case "${enableval}" in
472   yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
473    no) ;;
474     *) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
475  esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
476         enable_lfs=yes])
477AC_MSG_RESULT($enableval)
478
479AC_CHECK_SIZEOF(long)
480AC_CHECK_SIZEOF(off_t)
481
482if test "x$ac_cv_func_sendfile" = xyes; then
483        # check if sendfile works
484        AC_MSG_CHECKING(if sendfile works)
485        if test "x$cross_compiling" = xno; then
486        AC_TRY_RUN([
487                    #ifdef HAVE_SYS_SENDFILE_H
488                    #include <sys/sendfile.h>
489                    #endif /* HAVE_SYS_SENDFILE_H */
490                    #include <errno.h>
491                    int main() {
492                      int o = 0;
493                      if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
494                      return 0;
495                    } ],
496                    AC_MSG_RESULT(yes),
497                    [ AC_MSG_RESULT(no)
498                    AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile]) ] )
499        else
500              AC_MSG_RESULT(no, cross-compiling)
501              AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile])
502        fi
503fi
504
505dnl Check for IPv6 support
506
507AC_ARG_ENABLE(ipv6,
508 AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
509 [case "${enableval}" in
510   yes) ipv6=true ;;
511    no) ipv6=false ;;
512     *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
513  esac],[ipv6=true])
514
515if test x$ipv6 = xtrue; then
516  AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
517  [AC_TRY_LINK([ #include <sys/types.h>
518#include <sys/socket.h>
519#include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; ],
520  [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
521
522  if test "$ac_cv_ipv6_support" = yes; then
523    AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
524  fi
525fi
526
527
528AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
529
530dnl check for fastcgi lib, for the tests only
531fastcgi_found=no
532AC_CHECK_LIB(fcgi, FCGI_Accept, [
533 AC_CHECK_HEADERS([fastcgi.h fastcgi/fastcgi.h],[
534   fastcgi_found=yes
535 ])
536])
537
538AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
539
540
541if test "${GCC}" = "yes"; then
542       CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"
543fi
544
545dnl build version-id
546LIGHTTPD_VERSION_ID=`echo $PACKAGE_VERSION | $AWK -F '.' '{print "(" $1 " << 16 | " $2 " << 8 | " $3 ")"}'`
547AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
548
549AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile tests/Makefile \
550                 tests/docroot/Makefile \
551                 tests/docroot/123/Makefile \
552                 tests/docroot/www/Makefile \
553                 tests/docroot/www/go/Makefile \
554                 tests/docroot/www/indexfile/Makefile \
555                 tests/docroot/www/expire/Makefile \
556                 lighttpd.spec distribute.sh cygwin/Makefile cygwin/lighttpd.README
557                 openwrt/Makefile openwrt/control openwrt/lighttpd.mk])
558AC_OUTPUT
559
560
561do_build="mod_cgi mod_fastcgi mod_extforward mod_proxy mod_evhost mod_simple_vhost mod_access mod_alias mod_setenv mod_usertrack mod_auth mod_status mod_accesslog mod_rrdtool mod_secdownload mod_expire mod_compress mod_dirlisting mod_indexfiles mod_userdir mod_webdav mod_staticfile mod_scgi mod_flv_streaming"
562
563plugins="mod_rewrite mod_redirect mod_ssi mod_trigger_b4_dl"
564features="regex-conditionals"
565if test ! "x$PCRE_LIB" = x; then
566        do_build="$do_build $plugins"
567        enable_feature="$features"
568else
569        no_build="$no_build $plugins"
570        disable_feature="$features"
571fi
572
573plugins="mod_mysql_vhost"
574if test ! "x$MYSQL_LIBS" = x; then
575        do_build="$do_build $plugins"
576else
577        no_build="$no_build $plugins"
578fi
579
580plugins="mod_cml mod_magnet"
581if test ! "x$LUA_LIBS" = x; then
582        do_build="$do_build $plugins"
583else
584        no_build="$no_build $plugins"
585fi
586
587features="storage-gdbm"
588if test ! "x$GDBM_LIB" = x; then
589        enable_feature="$enable_feature $features"
590else
591        disable_feature="$disable_feature $features"
592fi
593
594features="storage-memcache"
595if test ! "x$MEMCACHE_LIB" = x; then
596        enable_feature="$enable_feature $features"
597else
598        disable_feature="$disable_feature $features"
599fi
600
601features="compress-gzip compress-deflate"
602if test ! "x$Z_LIB" = x; then
603        enable_feature="$enable_feature $features"
604else
605        disable_feature="$disable_feature $features"
606fi
607
608features="compress-bzip2"
609if test ! "x$BZ_LIB" = x; then
610        enable_feature="$enable_feature $features"
611else
612        disable_feature="$disable_feature $features"
613fi
614
615features="auth-ldap"
616if test ! "x$LDAP_LIB" = x; then
617        enable_feature="$enable_feature $features"
618else
619        disable_feature="$disable_feature $features"
620fi
621
622features="network-openssl"
623if test ! "x$SSL_LIB" = x; then
624        enable_feature="$enable_feature $features"
625else
626        disable_feature="$disable_feature $features"
627fi
628
629# no crypt call
630features="auth-crypt"
631if test "$ac_cv_search_crypt" = no; then
632        disable_feature="$disable_feature $features"
633else
634        enable_feature="$enable_feature $features"
635fi
636
637features="network-ipv6"
638if test "$ac_cv_ipv6_support" = yes; then
639        enable_feature="$enable_feature $features"
640else
641        disable_feature="$disable_feature $features"
642fi
643
644features="large-files"
645if test "$enable_lfs" = yes; then
646        enable_feature="$enable_feature $features"
647else
648        disable_feature="$disable_feature $features"
649fi
650
651features="stat-cache-fam"
652if test ! "x$FAM_LIBS" = x; then
653        enable_feature="$enable_feature $features"
654else
655        disable_feature="$disable_feature $features"
656fi
657
658features="webdav-properties"
659if test "x$XML_LIBS" \!= x -a "x$SQLITE_LIBS" \!= x; then
660        enable_feature="$enable_feature $features"
661else
662        disable_feature="$disable_feature $features"
663fi
664
665features="webdav-locks"
666if test "x$UUID_LIBS" \!= x; then
667        enable_feature="$enable_feature $features"
668else
669        disable_feature="$disable_feature $features"
670fi
671
672
673## output
674
675$ECHO
676$ECHO "Plugins:"
677$ECHO
678
679$ECHO "enabled: "
680for p in $do_build; do
681        $ECHO "  $p"
682done | sort
683
684$ECHO "disabled: "
685for p in $no_build; do
686        $ECHO "  $p"
687done | sort
688
689$ECHO
690$ECHO "Features:"
691$ECHO
692
693$ECHO "enabled: "
694for p in $enable_feature; do
695        $ECHO "  $p"
696done | sort
697
698$ECHO "disabled: "
699for p in $disable_feature; do
700        $ECHO "  $p"
701done | sort
702
703$ECHO
Note: See TracBrowser for help on using the browser.