[mod_proxy] basic support for Upgrade: websocket (fixes #2811)
[lighttpd.git] / configure.ac
blobe818cb5faa32ff687868c57a88a2bd1c024bcd1c
1 dnl                                               -*- Autoconf -*-
2 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.57)
4 AC_INIT([lighttpd], [1.4.46], [contact@lighttpd.net])
5 AC_CONFIG_SRCDIR([src/server.c])
6 AC_CONFIG_HEADER([config.h])
7 AC_CONFIG_MACRO_DIR([m4])
9 AC_CANONICAL_HOST
11 dnl HOW FUCKING BROKEN IS AUTOMAKE...
12 dnl serial-tests is not recognized before 1.12, and required for serial tests with 1.13, sane version checks "impossible"
13 dnl if you don't use the default (symlinked) automake on your box, set AUTOMAKE to the path you're using
14 m4_define([serial_tests], [
15     m4_esyscmd([case `${AUTOMAKE:-automake} --version | head -n 1` in
16       *1.11.*|*1.10.*|*1.9.*);;
17       *) echo serial-tests;;
18       esac])
21 AM_INIT_AUTOMAKE([-Wall -Wno-portability -Wno-override foreign dist-xz tar-ustar] serial_tests)
23 dnl enable with --enable-silent-rules or make V=0 (needs automake >= 1.11)
24 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
27 dnl @synopsis TRY_CFLAGS [compiler flags]
28 dnl @summary check whether compiler supports given flags and adds them to CFLAGS
29 AC_DEFUN([TRY_CFLAGS],
30 [dnl
31   AC_MSG_CHECKING([if $CC supports $1])
32   AC_LANG_PUSH([C])
33   ac_try_cflags_saved_cflags="${CFLAGS}"
34   CFLAGS="${CFLAGS} $1"
35   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
36     [AC_MSG_RESULT([yes])],
37     [
38       AC_MSG_ERROR([no])
39       CFLAGS="${ac_try_cflags_saved_cflags}"
40     ]
41   )
42   AC_LANG_POP([C])
45 dnl @synopsis TRY_LDFLAGS [linker flags]
46 dnl @summary check whether linker supports given flags and adds them to LDFLAGS
47 AC_DEFUN([TRY_LDFLAGS],
48 [dnl
49   AC_MSG_CHECKING([if $LD supports $1])
50   AC_LANG_PUSH([C])
51   ac_try_ldflags_saved_ldflags="${LDFLAGS}"
52   LDFLAGS="${LDFLAGS} $1"
53   AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
54     [AC_MSG_RESULT([yes])],
55     [
56       AC_MSG_ERROR([no])
57       LDFLAGS="${ac_try_ldflags_saved_cflags}"
58     ]
59   )
60   AC_LANG_POP([C])
63 dnl Checks for programs.
64 AC_PROG_CC
65 AX_PROG_CC_FOR_BUILD
66 AM_PROG_CC_C_O
67 AC_PROG_LD
68 AC_PROG_INSTALL
69 AC_PROG_AWK
70 AC_PROG_CPP
71 dnl AC_PROG_CXX
72 AC_PROG_LN_S
73 AC_PROG_MAKE_SET
75 dnl AM_PROG_AR is needed for some linker stuff
76 dnl AC_USE_SYSTEM_EXTENSIONS requires autoconf 2.60
77 m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], [AC_USE_SYSTEM_EXTENSIONS])
78 dnl AM_PROG_AR requires automake 1.11 (and uses AC_COMPILE_IFELSE which wants AC_USE_SYSTEM_EXTENSIONS)
79 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
81 dnl check environment
82 AC_AIX
83 AC_ISC_POSIX
84 AC_MINIX
86 dnl AC_CANONICAL_HOST
87 case $host_os in
88         *darwin*|*cygwin*|*aix*|*mingw*|*midipix* ) NO_RDYNAMIC=yes;;
89         * ) NO_RDYNAMIC=no;;
90 esac
91 AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)
93 if test -z "$LIGHTTPD_STATIC"; then
94   LIGHTTPD_STATIC=no
96 AM_CONDITIONAL(LIGHTTPD_STATIC, test x$LIGHTTPD_STATIC = xyes)
98 AC_EXEEXT
100 dnl libtool
101 AC_DISABLE_STATIC
102 AC_ENABLE_SHARED
104 AC_LIBTOOL_DLOPEN
105 AC_PROG_LIBTOOL
107 dnl for solaris
108 CPPFLAGS="${CPPFLAGS} -D_REENTRANT -D__EXTENSIONS__"
110 dnl Checks for header files.
111 AC_HEADER_STDC
112 AC_HEADER_SYS_WAIT
113 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h strings.h \
114 sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \
115 getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
116 sys/mman.h sys/event.h port.h pwd.h \
117 sys/resource.h sys/un.h syslog.h sys/prctl.h uuid/uuid.h])
119 dnl Checks for typedefs, structures, and compiler characteristics.
120 AC_C_CONST
121 AC_C_INLINE
122 AC_C_CHAR_UNSIGNED
123 AC_TYPE_OFF_T
124 AC_TYPE_PID_T
125 AC_TYPE_SIZE_T
127 AC_CHECK_MEMBER(struct tm.tm_gmtoff,[AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm])],,[#include <time.h>])
128 AC_CHECK_TYPES(struct sockaddr_storage,,,[#include <sys/socket.h>])
129 AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h>
130 #include <sys/socket.h>])
132 dnl Checks for library functions.
133 AC_FUNC_FORK
134 dnl AC_FUNC_MALLOC
135 dnl AC_FUNC_MMAP
136 dnl AC_FUNC_REALLOC
137 AC_TYPE_SIGNAL
138 AC_FUNC_STAT
139 AC_FUNC_STRFTIME
141 if test -z "$PKG_CONFIG"; then
142   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
145 dnl checking for libev
146 AC_MSG_CHECKING(for libev support)
147 AC_ARG_WITH(libev,
148     AC_HELP_STRING([--with-libev@<:@=PATH@:>@],[Include libev support for fdevent handlers in PATH/include and PATH/lib]),
149     [WITH_LIBEV=$withval],[WITH_LIBEV=no])
151 LIBEV_CFLAGS=""
152 LIBEV_LIBS=""
154 if test "$WITH_LIBEV" != "no"; then
155         PKG_CHECK_MODULES(LIBEV, libev, [], [
156                 dnl no pkg-config for libev, searching manually:
158                 if test "$WITH_LIBEV" != "yes"; then
159                         LIBEV_CFLAGS="-I$WITH_LIBEV/include"
160                         LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
161                 else
162                         AC_CHECK_HEADERS([ev.h],[
163                                 AC_CHECK_LIB([ev], [ev_time], [
164                                                 LIBEV_CFLAGS=""
165                                                 LIBEV_LIBS="-lev"
166                                         ],[
167                                         AC_MSG_ERROR([libev not found])
168                                         ]
169                                 )],[
170                                         AC_MSG_ERROR([libev not found])
171                                 ]
172                         )
173                 fi
174         ])
176         AC_DEFINE([HAVE_LIBEV], [1], [libev support])
179 AC_SUBST(LIBEV_CFLAGS)
180 AC_SUBST(LIBEV_LIBS)
181 AC_MSG_RESULT([$WITH_LIBEV])
183 dnl Checks for database.
184 MYSQL_INCLUDE=""
185 MYSQL_LIBS=""
187 AC_MSG_CHECKING(for MySQL support)
188 AC_ARG_WITH(mysql,
189     AC_HELP_STRING([--with-mysql@<:@=PATH@:>@],[Include MySQL support. PATH is the path to 'mysql_config']),
190     [WITH_MYSQL=$withval],[WITH_MYSQL=no])
192 if test "$WITH_MYSQL" != "no"; then
193   AC_MSG_RESULT(yes)
194   if test "$WITH_MYSQL" = "yes"; then
195     AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
196   else
197     MYSQL_CONFIG=$WITH_MYSQL
198   fi
200   if test "$MYSQL_CONFIG" = ""; then
201     AC_MSG_ERROR(mysql_config is not found)
202   fi
203   if test \! -x $MYSQL_CONFIG; then
204     AC_MSG_ERROR(mysql_config not exists or not executable, use --with-mysql=path-to-mysql_config)
205   fi
207   if $MYSQL_CONFIG | grep -- '--include' > /dev/null ; then
208     MYSQL_INCLUDE="`$MYSQL_CONFIG --include | sed s/\'//g`"
209   else
210     MYSQL_INCLUDE="`$MYSQL_CONFIG --cflags | sed s/\'//g`"
211   fi
212   MYSQL_LIBS="`$MYSQL_CONFIG --libs | sed s/\'//g`"
214   AC_MSG_CHECKING(for MySQL includes at)
215   AC_MSG_RESULT($MYSQL_INCLUDE)
217   AC_MSG_CHECKING(for MySQL libraries at)
218   AC_MSG_RESULT($MYSQL_LIBS)
219 dnl check for errmsg.h, which isn't installed by some versions of 3.21
220   old_CPPFLAGS="$CPPFLAGS"
221   CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
222   AC_CHECK_HEADERS(errmsg.h mysql.h)
223   CPPFLAGS="$old_CPPFLAGS"
225   AC_DEFINE([HAVE_MYSQL], [1], [mysql support])
226 else
227   AC_MSG_RESULT(no)
229 AM_CONDITIONAL(BUILD_WITH_MYSQL, test ! $WITH_MYSQL = no)
231 AC_SUBST(MYSQL_LIBS)
232 AC_SUBST(MYSQL_INCLUDE)
235 dnl Checks for database.
236 PGSQL_INCLUDE=""
237 PGSQL_LIBS=""
239 AC_MSG_CHECKING(for PgSQL support)
240 AC_ARG_WITH(pgsql,
241     AC_HELP_STRING([--with-pgsql@<:@=PATH@:>@],[Include PgSQL support. PATH is the path to 'pg_config']),
242     [WITH_PGSQL=$withval],[WITH_PGSQL=no])
244 if test "$WITH_PGSQL" != "no"; then
245   AC_MSG_RESULT(yes)
246   if test "$WITH_PGSQL" = "yes"; then
247     AC_PATH_PROG(PGSQL_CONFIG, pg_config)
248   else
249     PGSQL_CONFIG=$WITH_PGSQL
250   fi
252   if test "$PGSQL_CONFIG" = ""; then
253     AC_MSG_ERROR(pg_config is not found)
254   fi
255   if test \! -x $PGSQL_CONFIG; then
256     AC_MSG_ERROR(pg_config not exists or not executable, use --with-pgsql=path-to-pg_config)
257   fi
259   PGSQL_INCLUDE="-I`$PGSQL_CONFIG --includedir`"
260   PGSQL_LIBS="-L`$PGSQL_CONFIG --libdir` -lpq"
262   AC_MSG_CHECKING(for PgSQL includes at)
263   AC_MSG_RESULT($PGSQL_INCLUDE)
265   AC_MSG_CHECKING(for PgSQL libraries at)
266   AC_MSG_RESULT($PGSQL_LIBS)
268   AC_DEFINE([HAVE_PGSQL], [1], [pgsql support])
269 else
270   AC_MSG_RESULT(no)
272 AM_CONDITIONAL(BUILD_WITH_PGSQL, test ! $WITH_PGSQL = no)
274 AC_SUBST(PGSQL_LIBS)
275 AC_SUBST(PGSQL_INCLUDE)
278 dnl Checks for libdbi library
279 DBI_INCLUDE=""
280 DBI_LIBS=""
282 AC_MSG_CHECKING(for LibDBI support)
283 AC_ARG_WITH(dbi,
284     AC_HELP_STRING([--with-dbi@<:@=PATH@:>@],[Include DBI support in PATH/include/dbi.h and PATH/lib]),
285     [WITH_DBI=$withval],[WITH_DBI=no])
287 if test "$WITH_DBI" != "no"; then
288        AC_MSG_RESULT(yes)
289        if test "$WITH_DBI" != "yes"; then
290                DBI_CFLAGS="-I$WITH_LIBDBI/include"
291                DBI_LIBS="-L$WITH_LIBDBI/lib -ldbi"
292        else
293                AC_CHECK_HEADERS([dbi/dbi.h],[
294                        AC_CHECK_LIB([dbi], [dbi_version], [
295                                        DBI_CFLAGS=""
296                                        DBI_LIBS="-ldbi"
297                                ],[
298                                AC_MSG_ERROR([LibDBI not found])
299                                ]
300                        )],[
301                                AC_MSG_ERROR([LibDBI not found])
302                        ]
303                )
304        fi
306        AC_DEFINE([HAVE_DBI], [1], [LibDBI support])
307 else
308        AC_MSG_RESULT(no)
310 AM_CONDITIONAL(BUILD_WITH_DBI, test ! $WITH_DBI = no)
312 AC_SUBST(DBI_LIBS)
313 AC_SUBST(DBI_CFLAGS)
316 dnl Check for LDAP
317 AC_MSG_CHECKING(for LDAP support)
318 AC_ARG_WITH(ldap, AC_HELP_STRING([--with-ldap],[enable LDAP support]),
319 [WITH_LDAP=$withval], [WITH_LDAP=no])
320 AC_MSG_RESULT([$withval])
321 if test "$WITH_LDAP" != "no"; then
322  AC_CHECK_LIB(ldap, ldap_bind, [
323   AC_CHECK_HEADERS([ldap.h],[
324     LDAP_LIB=-lldap
325     AC_DEFINE([HAVE_LIBLDAP], [1], [libldap])
326     AC_DEFINE([HAVE_LDAP_H], [1])
327     AC_DEFINE([LDAP_DEPRECATED], [1], [Using deprecated ldap api])
328   ])
329  ])
330  AC_SUBST(LDAP_LIB)
331  AC_CHECK_LIB(lber, ber_printf, [
332   AC_CHECK_HEADERS([lber.h],[
333     LBER_LIB=-llber
334     AC_DEFINE([HAVE_LIBLBER], [1], [liblber])
335     AC_DEFINE([HAVE_LBER_H], [1])
336   ])
337  ])
338  AC_SUBST(LBER_LIB)
340 AM_CONDITIONAL(BUILD_WITH_LDAP, test ! $WITH_LDAP = no)
342 dnl Check for xattr
343 AC_MSG_CHECKING(for extended attributes support)
344 AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable extended attribute support]),
345 [WITH_ATTR=$withval],[WITH_ATTR=no])
346 AC_MSG_RESULT($withval)
347 if test "$WITH_ATTR" != "no"; then
348   # libattr (linux only?)
349   AC_CHECK_LIB(attr, attr_get, [
350     AC_CHECK_HEADERS([attr/attributes.h],[
351       ATTR_LIB=-lattr
352       AC_DEFINE([HAVE_XATTR], [1], [libattr])
353       AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
354     ])
355   ])
356   AC_SUBST(ATTR_LIB)
358   # (Free)BSD extattr
359   AC_CHECK_FUNC([extattr_get_file], [
360     AC_CHECK_HEADERS([sys/extattr.h],[
361       AC_DEFINE([HAVE_EXTATTR], [1], [BSD extended attributes])
362       AC_DEFINE([HAVE_SYS_EXTATTR_H], [1])
363     ])
364   ])
367 dnl openssl on solaris needs -lsocket -lnsl
368 AC_SEARCH_LIBS(socket,socket)
369 AC_SEARCH_LIBS(gethostbyname,nsl socket)
371 dnl On Haiku accept() and friends are in libnetwork
372 AC_SEARCH_LIBS(accept,network)
374 dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
375 AC_SEARCH_LIBS([clock_gettime],[rt])
377 save_LIBS=$LIBS
378 AC_SEARCH_LIBS(dlopen,dl,[
379   AC_CHECK_HEADERS([dlfcn.h],[
380     if test "$ac_cv_search_dlopen" != no; then
381       test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen"
382     fi
384     AC_DEFINE([HAVE_LIBDL], [1], [libdl])
385     AC_DEFINE([HAVE_DLFCN_H], [1])
386   ])
388 LIBS=$save_LIBS
389 AC_SUBST(DL_LIB)
391 dnl Check for valgrind
392 AC_MSG_CHECKING(for valgrind)
393 AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind],[enable internal support for valgrind]),
394 [WITH_VALGRIND=$withval],[WITH_VALGRIND=no])
395 AC_MSG_RESULT([$WITH_VALGRIND])
396 if test "$WITH_VALGRIND" != "no"; then
397  AC_CHECK_HEADERS([valgrind/valgrind.h])
400 dnl Checking for libunwind
401 AC_MSG_CHECKING(for libunwind)
402 AC_ARG_WITH(libunwind,
403     AC_HELP_STRING([--with-libunwind],[Include libunwind support for backtraces on assert failures]),
404     [WITH_LIBUNWIND=$withval],[WITH_LIBUNWIND=no])
406 if test "$WITH_LIBUNWIND" != "no"; then
407   PKG_CHECK_MODULES(LIBUNWIND, libunwind)
408   AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
410 AC_MSG_RESULT([$WITH_LIBUNWIND])
412 dnl Checking for kerberos5
413 AC_MSG_CHECKING(for kerberos5)
414 AC_ARG_WITH(krb5,
415         AC_HELP_STRING([--with-krb5@<:@=DIR@:>@],[Use Kerberos 5]),
416         [WITH_KRB5=$withval],[WITH_KRB5=no])
417 if test "$WITH_KRB5" != "no"; then
418         use_krb5=yes
419         if test "x$WITH_KRB5" != "xyes"; then
420                 CPPFLAGS="$CPPFLAGS -I$WITH_KRB5/include"
421                 LDFLAGS="$LDFLAGS -L$WITH_KRB5/lib"
422         fi
423 else
424         use_krb5=no
426 AC_MSG_RESULT([$use_krb5])
427 AM_CONDITIONAL(BUILD_WITH_KRB5, test ! $WITH_KRB5 = no)
429 AC_ARG_WITH(krb5-includes,
430         AC_HELP_STRING([--with-krb5-includes=DIR],[Kerberos includes]),
431         [ use_krb5=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
434 AC_ARG_WITH(krb5-libs,
435         AC_HELP_STRING([--with-krb5-libs=DIR],[Kerberos libraries]),
436         [ use_krb5=yes LDFLAGS="$LDFLAGS -L$withval" ]
439 if test "x$use_krb5" = "xyes"; then
440         AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
441                 AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],[
442                         KRB5_LIB="-lkrb5 -lgssapi_krb5"
443                         AC_DEFINE(HAVE_KRB5, [1], [libgssapi_krb5])
444                 ])
445         ])
446         if test "x$KRB5_LIB" = x; then
447                 AC_MSG_ERROR([gssapi_krb5 headers and/or libs where not found, install them or build with --without-krb5])
448         fi
449         case $host_os in
450                 *cygwin* ) KRB5_LIB="$KRB5_LIB -lcom_err";;
451                 * ) ;;
452         esac
454 AC_SUBST(KRB5_LIB)
456 dnl Check for openssl
457 AC_MSG_CHECKING(for OpenSSL)
458 AC_ARG_WITH(openssl,
459     AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[Include openssl support (default no)]),
460     [WITH_OPENSSL=$withval],[WITH_OPENSSL=no])
462 if test "$WITH_OPENSSL" != "no"; then
463     use_openssl=yes
464     if test "$WITH_OPENSSL" != "yes"; then
465         CPPFLAGS="$CPPFLAGS -I$WITH_OPENSSL/include"
466         LDFLAGS="$LDFLAGS -L$WITH_OPENSSL/lib"
467     fi
468 else
469     use_openssl=no
471 AC_MSG_RESULT([$use_openssl])
472 AM_CONDITIONAL(BUILD_WITH_OPENSSL, test ! $WITH_OPENSSL = no)
474 AC_ARG_WITH(openssl-includes,
475     AC_HELP_STRING([--with-openssl-includes=DIR],[OpenSSL includes]),
476     [ use_openssl=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
479 AC_ARG_WITH(openssl-libs,
480     AC_HELP_STRING([--with-openssl-libs=DIR],[OpenSSL libraries]),
481     [ use_openssl=yes LDFLAGS="$LDFLAGS -L$withval" ]
484 if test "x$use_openssl" = "xyes"; then
485     if test "x$use_krb5" = "xyes"; then
486         AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos])
487     fi
489     AC_CHECK_HEADERS([openssl/ssl.h])
490     OLDLIBS="$LIBS"
491     AC_CHECK_LIB(crypto, BIO_f_base64, [
492       AC_CHECK_LIB(ssl, SSL_new, [ SSL_LIB="-lssl -lcrypto"
493                                  CRYPTO_LIB="-lcrypto"
494                                  AC_DEFINE(HAVE_LIBSSL, [], [Have libssl]) ], [], [ -lcrypto "$DL_LIB" ])
495     ], [], [])
496     LIBS="$OLDLIBS"
497     AC_SUBST(SSL_LIB)
498     AC_SUBST(CRYPTO_LIB)
501 AC_MSG_CHECKING(for perl regular expressions support)
502 AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable pcre support (default yes)]),
503     [WITH_PCRE=$withval],[WITH_PCRE=yes])
504 AC_MSG_RESULT([$WITH_PCRE])
506 if test "$WITH_PCRE" != "no"; then
507                 if test "$WITH_PCRE" != "yes"; then
508                         PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
509                         CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
510                 else
511                         AC_PATH_PROG(PCRECONFIG, pcre-config)
512                         if test x"$PCRECONFIG" != x; then
513                                 PCRE_LIB=`$PCRECONFIG --libs`
514                                 CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
515                         fi
516                 fi
518   if test x"$PCRE_LIB" != x; then
519     AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
520     AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
521     AC_SUBST(PCRE_LIB)
522   else
523     AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
524   fi
527 AC_MSG_CHECKING(for zlib support)
528 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[Enable zlib support for mod_compress]),
529     [WITH_ZLIB=$withval],[WITH_ZLIB=yes])
530 AC_MSG_RESULT([$WITH_ZLIB])
532 if test "$WITH_ZLIB" != "no"; then
533                 if test "$WITH_ZLIB" != "yes"; then
534                         Z_LIB="-L$WITH_ZLIB -lz"
535                         CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB"
536                 else
537                         AC_CHECK_LIB(z, deflate, [
538                           AC_CHECK_HEADERS([zlib.h],[Z_LIB=-lz])
539                         ])
540                 fi
542   if test x"$Z_LIB" != x; then
543     AC_DEFINE([HAVE_LIBZ], [1], [libz])
544     AC_DEFINE([HAVE_ZLIB_H], [1])
545     AC_SUBST(Z_LIB)
546   else
547     AC_MSG_ERROR([zlib-headers and/or libs were not found, install them or build with --without-zlib])
548   fi
551 AC_MSG_CHECKING(for bzip2 support)
552 AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),
553     [WITH_BZIP2=$withval],[WITH_BZIP2=yes])
554 AC_MSG_RESULT([$WITH_BZIP2])
556 if test "$WITH_BZIP2" != "no"; then
557                 if test "$WITH_BZIP2" != "yes"; then
558                         BZ_LIB="-L$WITH_BZIP2 -lbz2"
559                         CPPFLAGS="$CPPFLAGS -I$WITH_BZIP2"
560                 else
561                         AC_CHECK_LIB(bz2, BZ2_bzCompress, [
562                           AC_CHECK_HEADERS([bzlib.h],[BZ_LIB=-lbz2])
563                         ])
564                 fi
566   if test x"$BZ_LIB" != x; then
567     AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
568     AC_DEFINE([HAVE_BZLIB_H], [1])
569     AC_SUBST(BZ_LIB)
570   else
571     AC_MSG_ERROR([bzip2-headers and/or libs were not found, install them or build with --without-bzip2])
572   fi
575 dnl Check for gamin
576 AC_MSG_CHECKING(for FAM)
577 AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gamin for reducing number of stat() calls]),
578 [WITH_FAM=$withval],[WITH_FAM=no])
579 AC_MSG_RESULT([$WITH_FAM])
581 if test "$WITH_FAM" != "no"; then
582                 if test "$WITH_FAM" != "yes"; then
583                         FAM_LIBS="-L$WITH_FAM -lfam"
584                         CPPFLAGS="$CPPFLAGS -I$WITH_FAM"
585                 else
586                         AC_CHECK_LIB(fam, FAMOpen2, [
587                           AC_CHECK_HEADERS([fam.h],[FAM_LIBS=-lfam])
588                         ])
589                         if test "x$FAM_LIBS" = x; then
590                           PKG_CHECK_MODULES(FAM, gamin >= 0.1.0)
591                         fi
592                 fi
594   if test x"$FAM_LIBS" != x; then
595     OLD_LIBS=$LIBS
596     LIBS=$FAM_LIBS
597     AC_CHECK_FUNCS([FAMNoExists])
598     LIBS=$OLD_LIBS
600     AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
601     AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
602     AC_SUBST(FAM_LIBS)
603   else
604      AC_MSG_ERROR([fam/gamin-headers and/or libs were not found, install them or build with --without-fam])
605   fi
608 AC_MSG_CHECKING(for properties in mod_webdav)
609 AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webdav-props],[properties in mod_webdav]),
610 [WITH_WEBDAV_PROPS=$withval],[WITH_WEBDAV_PROPS=no])
611 AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
613 if test "$WITH_WEBDAV_PROPS" != "no"; then
615   AC_MSG_CHECKING(for libxml2)
616   AC_ARG_WITH(libxml, AC_HELP_STRING([--with-libxml],[libxml2 for properties in mod_webdav]),
617   [WITH_LIBXML=$withval],[WITH_LIBXML=yes])
618   AC_MSG_RESULT([$WITH_LIBXML])
620   if test "$WITH_LIBXML" != "no"; then
621                 if test "$WITH_LIBXML" != "yes"; then
622                         XML_LIBS="-L$WITH_LIBXML/.libs -lxml2"
623                         XML_CFLAGS="-I$WITH_LIBXML/include"
624                 else
625                         PKG_CHECK_MODULES(XML, libxml-2.0)
626                 fi
628     if test x"$XML_LIBS" != x; then
629       AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])
630       AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])
631       AC_SUBST(XML_LIBS)
632       AC_SUBST(XML_CFLAGS)
633     else
634       AC_MSG_ERROR([libxml2-headers and/or libs were not found, install them or build with --without-webdav-props])
635     fi
636   fi
638   AC_MSG_CHECKING(for sqlite)
639   AC_ARG_WITH(sqlite, AC_HELP_STRING([--with-sqlite],[sqlite for properties in mod_webdav]),
640   [WITH_SQLITE=$withval],[WITH_SQLITE=yes])
641   AC_MSG_RESULT([$WITH_SQLITE])
643   if test "$WITH_SQLITE" != "no"; then
644                 if test "$WITH_SQLITE" != "yes"; then
645                         SQLITE_LIBS="-L$WITH_SQLITE/.libs -lsqlite3"
646                         SQLITE_CFLAGS="-I$WITH_SQLITE"
647                 else
648                         PKG_CHECK_MODULES(SQLITE, sqlite3)
649                 fi
651     if test x"$SQLITE_LIBS" != x; then
652       AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])
653       AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])
654       AC_SUBST(SQLITE_LIBS)
655       AC_SUBST(SQLITE_CFLAGS)
656     else
657       AC_MSG_ERROR([sqlite-headers and/or libs were not found, install them or build with --without-webdav-props])
658     fi
659   fi
661   AC_MSG_CHECKING(for locks in mod_webdav)
662   AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]),
663   [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no])
664   AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
666   if test "$WITH_WEBDAV_LOCKS" != "no"; then
668     AC_MSG_CHECKING(for libuuid)
669     AC_ARG_WITH(uuid, AC_HELP_STRING([--with-uuid],[uuid for locks in mod_webdav]),
670     [WITH_UUID=$withval],[WITH_UUID=yes])
671     AC_MSG_RESULT([$WITH_UUID])
673     if test "$WITH_UUID" != "no"; then
674                 if test "$WITH_UUID" != "yes"; then
675                         UUID_LIBS="-L$WITH_UUID -luuid"
676                         CPPFLAGS="$CPPFLAGS -I$WITH_UUID"
677                 else
678                         AC_CHECK_LIB(uuid, uuid_unparse, [
679                           AC_CHECK_HEADERS([uuid/uuid.h],[UUID_LIBS=-luuid])
680                         ])
681                 fi
683       if test x"$UUID_LIBS" != x; then
684         AC_DEFINE([HAVE_UUID], [1], [libuuid])
685         AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available])
686         AC_SUBST(UUID_LIBS)
687       else
688         AC_MSG_ERROR([uuid-headers and/or libs were not found, install them or build with --without-webdav-locks])
689       fi
690     fi
692   fi
696 dnl Check for gdbm
697 AC_MSG_CHECKING(for gdbm)
698 AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm storage for mod_trigger_b4_dl]),
699 [WITH_GDBM=$withval],[WITH_GDBM=no])
700 AC_MSG_RESULT([$WITH_GDBM])
702 if test "$WITH_GDBM" != "no"; then
703                 if test "$WITH_GDBM" != "yes"; then
704                         GDBM_LIB="-L$WITH_GDBM -lgdbm"
705                         CPPFLAGS="$CPPFLAGS -I$WITH_GDBM"
706                 else
707                         AC_CHECK_LIB(gdbm, gdbm_open, [
708                           AC_CHECK_HEADERS([gdbm.h],[GDBM_LIB=-lgdbm])
709                         ])
710                 fi
712   if test x"$GDBM_LIB" != x; then
713     AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
714     AC_DEFINE([HAVE_GDBM_H], [1])
715     AC_SUBST(GDBM_LIB)
716   else
717     AC_MSG_ERROR([gdbm headers and/or libs were not found, install them or build with --without-gdbm])
718   fi
720 AM_CONDITIONAL(BUILD_WITH_GDBM, test ! $WITH_GDBM = no)
722 dnl Check for GeoIP
723 AC_MSG_CHECKING(for GeoIP)
724 AC_ARG_WITH(geoip, AC_HELP_STRING([--with-geoip],[IP-based geolocation lookup]),
725 [WITH_GEOIP=$withval],[WITH_GEOIP=no])
726 AC_MSG_RESULT([$WITH_GEOIP])
728 if test "$WITH_GEOIP" != "no"; then
729                 if test "$WITH_GEOIP" != "yes"; then
730                         GEOIP_LIB="-L$WITH_GEOIP -lGeoIP"
731                         CPPFLAGS="$CPPFLAGS -I$WITH_GEOIP"
732                 else
733                         AC_CHECK_LIB(GeoIP, GeoIP_country_name_by_addr, [
734                           AC_CHECK_HEADERS([GeoIP.h],[GEOIP_LIB=-lGeoIP])
735                         ])
736                 fi
738   if test x"$GEOIP_LIB" != x; then
739     AC_DEFINE([HAVE_GEOIP], [1], [libGeoIP])
740     AC_DEFINE([HAVE_GEOIP_H], [1])
741     AC_SUBST(GEOIP_LIB)
742   else
743     AC_MSG_ERROR([GeoIP headers and/or libs were not found, install them or build with --without-geoip])
744   fi
746 AM_CONDITIONAL(BUILD_WITH_GEOIP, test ! $WITH_GEOIP = no)
748 dnl Check for memcached
749 AC_MSG_CHECKING(for memcached)
750 AC_ARG_WITH(memcached, AC_HELP_STRING([--with-memcached],[memcached storage for mod_trigger_b4_dl]),
751 [WITH_MEMCACHED=$withval],[WITH_MEMCACHED=no])
752 AC_MSG_RESULT([$WITH_MEMCACHED])
754 if test "$WITH_MEMCACHED" != "no"; then
755                 if test "$WITH_MEMCACHED" != "yes"; then
756                         MEMCACHED_LIB="-L$WITH_MEMCACHED -lMEMCACHED"
757                         CPPFLAGS="$CPPFLAGS -I$WITH_MEMCACHED"
758                 else
759                         AC_CHECK_LIB(memcached, memcached, [
760                           AC_CHECK_HEADERS([libmemcached/memcached.h],[
761                             MEMCACHED_LIB=-lmemcached
762                           ])
763                         ])
764                 fi
766   if test x"$MEMCACHED_LIB" != x; then
767     AC_DEFINE([USE_MEMCACHED], [1], [libmemcached])
768     AC_SUBST(MEMCACHED_LIB)
769   else
770     AC_MSG_ERROR([memcached headers and/or libs were not found, install them or build with --without-memcached])
771   fi
773 AM_CONDITIONAL(BUILD_WITH_MEMCACHED, test ! $WITH_MEMCACHED = no)
775 AM_CONDITIONAL(BUILD_MOD_TRIGGER_B4_DL, test ! $WITH_MEMCACHED = no || test ! $WITH_GDBM = no)
777 dnl Check for lua
778 AC_MSG_CHECKING(if lua-support is requested)
779 AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engine for mod_cml]),
780 [WITH_LUA=$withval],[WITH_LUA=no])
782 AC_MSG_RESULT($WITH_LUA)
783 if test "$WITH_LUA" != "no"; then
784   found_lua=0
785   if test "$WITH_LUA" != "yes"; then
786     PKG_CHECK_MODULES(LUA, $WITH_LUA >= 5.1, [
787       found_lua=1
788     ],[
789       AC_MSG_NOTICE([Couldn't find requested lua pkg-config module $WITH_LUA])
790     ])
791     if test "$found_lua" = "0"; then
792       LUA_LIBS="-L$WITH_LUA -llua"
793       LUA_CFLAGS="-I$WITH_LUA"
794     fi
795   else
796     for luaname in lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua; do
797       if test "$found_lua" = "0"; then
798         PKG_CHECK_MODULES(LUA, $luaname >= 5.1, [
799           found_lua=1
800         ], [
801           AC_MSG_NOTICE([Couldn't find $luaname])
802         ])
803       fi
804     done
805     if test "$found_lua" = "0"; then
806       AC_MSG_ERROR([Couldn't find any lua pkg-config module])
807     fi
808   fi
810   if test x"$LUA_LIBS" != x; then
811     AC_DEFINE([HAVE_LUA], [1], [liblua])
812     AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
813     AC_SUBST(LUA_LIBS)
814     AC_SUBST(LUA_CFLAGS)
815   else
816     AC_MSG_ERROR([lua headers and/or libs were not found, install them or build with --without-lua])
817   fi
819 AM_CONDITIONAL(BUILD_WITH_LUA, test ! $WITH_LUA = no)
821 dnl search for crypt_r and (fallback) for crypt
822 save_LIBS=$LIBS
823 LIBS=
824 AC_SEARCH_LIBS([crypt_r],[crypt],[
825   AC_DEFINE([HAVE_CRYPT_R], [1], [crypt_r])
826   AC_CHECK_HEADERS([crypt.h],[
827     AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
828   ])
830   CRYPT_LIB=$LIBS
832   AC_SEARCH_LIBS([crypt],[crypt],[
833     AC_DEFINE([HAVE_CRYPT], [1], [crypt])
834     AC_CHECK_HEADERS([crypt.h],[
835       AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
836     ])
838     CRYPT_LIB=$LIBS
839   ])
841 LIBS=$save_LIBS
842 AC_SUBST([CRYPT_LIB])
844 save_LIBS=$LIBS
845 AC_SEARCH_LIBS(sendfilev,sendfile,[
846   if test "$ac_cv_search_sendfilev" != no; then
847     test "$ac_cv_search_sendfilev" = "none required" || SENDFILE_LIB="$ac_cv_search_sendfilev"
848     AC_DEFINE([HAVE_SENDFILEV], [1], [solaris sendfilev])
849   fi
851 LIBS=$save_LIBS
852 AC_SUBST(SENDFILE_LIB)
854 case $host_os in
855         *mingw* ) LIBS="$LIBS -lwsock32";;
856         * ) ;;
857 esac
859 AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop inet_pton issetugid memset mmap munmap strchr \
860                   strdup strerror strstr strtol sendfile  getopt socket lstat \
861                   gethostbyname poll epoll_ctl getrlimit chroot \
862                   getuid select signal pathconf madvise posix_fadvise posix_madvise \
863                   writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r \
864                   memset_s explicit_bzero clock_gettime pipe2 \
865                   getentropy arc4random_buf jrand48 srandom getloadavg])
866 AC_CHECK_HEADERS([linux/random.h],[
867   AC_CHECK_FUNC([getrandom], AC_DEFINE([HAVE_GETRANDOM], [1], [getrandom]))
870 AC_MSG_CHECKING(if weak symbols are supported)
871 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
872                 __attribute__((weak)) void __dummy(void *x) { }
873                 void f(void *x) { __dummy(x); }
874         ]])],
875         [
876                 AC_MSG_RESULT(yes)
877                 AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])
878         ],[AC_MSG_RESULT(no)])
880 AC_MSG_CHECKING(for Large File System support)
881 AC_ARG_ENABLE(lfs,
882  AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
883  [case "${enableval}" in
884    yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
885     no) ;;
886      *) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
887   esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
888          enable_lfs=yes])
889 AC_MSG_RESULT($enableval)
891 AC_CHECK_SIZEOF(long)
892 AC_CHECK_SIZEOF(off_t)
894 if test "x$ac_cv_func_sendfile" = xyes; then
895         dnl check if sendfile works
896         AC_MSG_CHECKING(if sendfile works)
897         if test "x$cross_compiling" = xno; then
898         AC_TRY_RUN([
899                     #ifdef HAVE_SYS_SENDFILE_H
900                     #include <sys/sendfile.h>
901                     #endif /* HAVE_SYS_SENDFILE_H */
902                     #include <errno.h>
903                     int main() {
904                       int o = 0;
905                       if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
906                       return 0;
907                     } ],
908                     AC_MSG_RESULT(yes),
909                     [ AC_MSG_RESULT(no)
910                     AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile]) ] )
911         else
912               AC_MSG_RESULT(no, cross-compiling)
913               AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile])
914         fi
917 dnl Check for IPv6 support
919 AC_ARG_ENABLE(ipv6,
920  AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
921  [case "${enableval}" in
922    yes) ipv6=true ;;
923     no) ipv6=false ;;
924      *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
925   esac],[ipv6=true])
927 if test x$ipv6 = xtrue; then
928   AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
929   [AC_TRY_LINK([ #include <sys/types.h>
930 #include <sys/socket.h>
931 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; ],
932   [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
934   if test "$ac_cv_ipv6_support" = yes; then
935     AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
936   fi
939 # disable mmap by default; if a mmapped file gets truncated, the process gets a SIGBUS signal
940 # on reading the truncated area which we can't handle (yet).
941 # lighttpd may always use mmap with files it owns (created tmp files)
942 AC_ARG_ENABLE(mmap,
943   AC_HELP_STRING([--enable-mmap],[use mmap if available (DANGEROUS, allows local users to trigger SIGBUS crashes)]),
944   [case "${enableval}" in
945    yes) mmap=true ;;
946     no) mmap=false ;;
947      *) AC_MSG_ERROR(bad value ${enableval} for --enable-mmap) ;;
948   esac],[mmap=false])
950 if test x$mmap = xtrue; then
951   AC_DEFINE(ENABLE_MMAP, [1], [Use mmap if available])
954 dnl check for fastcgi lib, for the tests only
955 fastcgi_found=no
956 AC_CHECK_LIB(fcgi, FCGI_Accept, [
957  AC_CHECK_HEADERS([fastcgi.h fastcgi/fastcgi.h],[
958    fastcgi_found=yes
959  ])
962 AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
965 dnl check for extra compiler options (warning options)
966 if test "${GCC}" = "yes"; then
967   TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
968   TRY_CFLAGS([-std=gnu99])
971 AC_ARG_ENABLE(extra-warnings,
972  AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]),
973  [case "${enableval}" in
974    yes) extrawarnings=true ;;
975     no) extrawarnings=false ;;
976      *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;;
977   esac],[extrawarnings=false])
979 if test x$extrawarnings = xtrue; then
980   TRY_CFLAGS([-g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Wsign-compare -Wnested-externs -Wpointer-arith -D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security])
981   TRY_LDFLAGS([-Wl,--as-needed])
984 dnl build version-id
985 LIGHTTPD_VERSION_ID=`echo $PACKAGE_VERSION | $AWK -F '.' '{print "(" $1 " << 16 | " $2 " << 8 | " $3 ")"}'`
986 AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
988 AC_CONFIG_FILES([Makefile src/Makefile
989                  doc/config/conf.d/Makefile \
990                  doc/config/vhosts.d/Makefile \
991                  doc/config/Makefile \
992                  doc/scripts/Makefile \
993                  doc/systemd/Makefile \
994                  doc/outdated/Makefile \
995                  doc/Makefile \
996                  tests/Makefile \
997                  tests/docroot/Makefile \
998                  tests/docroot/123/Makefile \
999                  tests/docroot/www/Makefile \
1000                  tests/docroot/www/go/Makefile \
1001                  tests/docroot/www/indexfile/Makefile \
1002                  tests/docroot/www/expire/Makefile \
1003                  distribute.sh])
1004 AC_OUTPUT
1007 do_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_authn_file mod_status mod_accesslog"
1008 do_build="$do_build mod_rrdtool mod_secdownload mod_expire mod_compress mod_dirlisting mod_indexfile mod_userdir mod_webdav mod_staticfile mod_scgi mod_flv_streaming mod_ssi mod_deflate"
1009 do_build="$do_build mod_vhostdb"
1011 plugins="mod_rewrite mod_redirect"
1012 features="regex-conditionals"
1013 if test ! "x$PCRE_LIB" = x; then
1014         do_build="$do_build $plugins"
1015         enable_feature="$features"
1016 else
1017         no_build="$no_build $plugins"
1018         disable_feature="$features"
1021 plugins="mod_trigger_b4_dl"
1022 if test ! "x$PCRE_LIB" = x; then
1023 if test ! "x$WITH_MEMCACHED" = xno || test ! "x$WITH_GDBM" = xno; then
1024         do_build="$do_build $plugins"
1025 else
1026         no_build="$no_build $plugins"
1030 plugins="mod_authn_mysql mod_mysql_vhost mod_vhostdb_mysql"
1031 if test ! "x$MYSQL_LIBS" = x; then
1032         do_build="$do_build $plugins"
1033 else
1034         no_build="$no_build $plugins"
1037 plugins="mod_vhostdb_pgsql"
1038 if test ! "x$PGSQL_LIBS" = x; then
1039         do_build="$do_build $plugins"
1040 else
1041         no_build="$no_build $plugins"
1044 plugins="mod_vhostdb_dbi"
1045 if test ! "x$DBI_LIBS" = x; then
1046         do_build="$do_build $plugins"
1047 else
1048         no_build="$no_build $plugins"
1051 plugins="mod_cml mod_magnet"
1052 if test ! "x$LUA_LIBS" = x; then
1053         do_build="$do_build $plugins"
1054 else
1055         no_build="$no_build $plugins"
1058 plugins="mod_geoip"
1059 if test ! "x$GEOIP_LIB" = x; then
1060         do_build="$do_build $plugins"
1061 else
1062         no_build="$no_build $plugins"
1065 features="storage-gdbm"
1066 if test ! "x$GDBM_LIB" = x; then
1067         enable_feature="$enable_feature $features"
1068 else
1069         disable_feature="$disable_feature $features"
1072 features="storage-memcached"
1073 if test ! "x$MEMCACHED_LIB" = x; then
1074         enable_feature="$enable_feature $features"
1075 else
1076         disable_feature="$disable_feature $features"
1079 features="compress-gzip compress-deflate"
1080 if test ! "x$Z_LIB" = x; then
1081         enable_feature="$enable_feature $features"
1082 else
1083         disable_feature="$disable_feature $features"
1086 features="compress-bzip2"
1087 if test ! "x$BZ_LIB" = x; then
1088         enable_feature="$enable_feature $features"
1089 else
1090         disable_feature="$disable_feature $features"
1093 plugins="mod_authn_gssapi"
1094 if test ! "x$KRB5_LIB" = x; then
1095         do_build="$do_build $plugins"
1096 else
1097         no_build="$no_build $plugins"
1100 plugins="mod_authn_ldap mod_vhostdb_ldap"
1101 if test ! "x$LDAP_LIB" = x; then
1102         do_build="$do_build $plugins"
1103 else
1104         no_build="$no_build $plugins"
1107 features="network-openssl"
1108 if test ! "x$SSL_LIB" = x; then
1109         enable_feature="$enable_feature $features"
1110 else
1111         disable_feature="$disable_feature $features"
1114 dnl no crypt call
1115 features="auth-crypt"
1116 if test "$ac_cv_search_crypt" = no; then
1117         disable_feature="$disable_feature $features"
1118 else
1119         enable_feature="$enable_feature $features"
1122 features="network-ipv6"
1123 if test "$ac_cv_ipv6_support" = yes; then
1124         enable_feature="$enable_feature $features"
1125 else
1126         disable_feature="$disable_feature $features"
1129 features="large-files"
1130 if test "$enable_lfs" = yes; then
1131         enable_feature="$enable_feature $features"
1132 else
1133         disable_feature="$disable_feature $features"
1136 features="stat-cache-fam"
1137 if test ! "x$FAM_LIBS" = x; then
1138         enable_feature="$enable_feature $features"
1139 else
1140         disable_feature="$disable_feature $features"
1143 features="webdav-properties"
1144 if test "x$XML_LIBS" \!= x -a "x$SQLITE_LIBS" \!= x; then
1145         enable_feature="$enable_feature $features"
1146 else
1147         disable_feature="$disable_feature $features"
1150 features="webdav-locks"
1151 if test "x$UUID_LIBS" \!= x; then
1152         enable_feature="$enable_feature $features"
1153 else
1154         disable_feature="$disable_feature $features"
1158 dnl output
1160 $ECHO
1161 $ECHO "Plugins:"
1162 $ECHO
1164 $ECHO "enabled: "
1165 for p in $do_build; do
1166         $ECHO "  $p"
1167 done | sort
1169 $ECHO "disabled: "
1170 for p in $no_build; do
1171         $ECHO "  $p"
1172 done | sort
1174 $ECHO
1175 $ECHO "Features:"
1176 $ECHO
1178 $ECHO "enabled: "
1179 for p in $enable_feature; do
1180         $ECHO "  $p"
1181 done | sort
1183 $ECHO "disabled: "
1184 for p in $disable_feature; do
1185         $ECHO "  $p"
1186 done | sort
1188 $ECHO