[autobuild] require autoconf >= 2.60, automake >= 1.14
[lighttpd.git] / configure.ac
blob54af32feed79650324cec7643cfbc9802d8ddea4
1 dnl                                               -*- Autoconf -*-
2 dnl Process this file with autoconf to produce a configure script.
3 AC_PREREQ(2.60)
4 AC_INIT([lighttpd], [1.4.48], [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 AM_INIT_AUTOMAKE([1.14 -Wall -Wno-portability -Wno-override foreign dist-xz tar-ustar serial-tests silent-rules])
13 dnl @synopsis TRY_CFLAGS [compiler flags]
14 dnl @summary check whether compiler supports given flags and adds them to CFLAGS
15 AC_DEFUN([TRY_CFLAGS],
16 [dnl
17   AC_MSG_CHECKING([if $CC supports $1])
18   AC_LANG_PUSH([C])
19   ac_try_cflags_saved_cflags="${CFLAGS}"
20   CFLAGS="${CFLAGS} $1"
21   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
22     [AC_MSG_RESULT([yes])],
23     [
24       AC_MSG_ERROR([no])
25       CFLAGS="${ac_try_cflags_saved_cflags}"
26     ]
27   )
28   AC_LANG_POP([C])
31 dnl @synopsis TRY_LDFLAGS [linker flags]
32 dnl @summary check whether linker supports given flags and adds them to LDFLAGS
33 AC_DEFUN([TRY_LDFLAGS],
34 [dnl
35   AC_MSG_CHECKING([if $LD supports $1])
36   AC_LANG_PUSH([C])
37   ac_try_ldflags_saved_ldflags="${LDFLAGS}"
38   LDFLAGS="${LDFLAGS} $1"
39   AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
40     [AC_MSG_RESULT([yes])],
41     [
42       AC_MSG_ERROR([no])
43       LDFLAGS="${ac_try_ldflags_saved_cflags}"
44     ]
45   )
46   AC_LANG_POP([C])
49 dnl Checks for programs.
50 AC_PROG_CC
51 AC_PROG_CC_STDC
52 AX_PROG_CC_FOR_BUILD
53 AC_PROG_LD
54 AC_PROG_INSTALL
55 AC_PROG_AWK
56 AC_PROG_CPP
57 AC_PROG_MAKE_SET
59 AC_USE_SYSTEM_EXTENSIONS
60 AM_PROG_AR
62 dnl AC_CANONICAL_HOST
63 case $host_os in
64         *darwin*|*cygwin*|*aix*|*mingw*|*midipix* ) NO_RDYNAMIC=yes;;
65         * ) NO_RDYNAMIC=no;;
66 esac
67 AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)
69 if test -z "$LIGHTTPD_STATIC"; then
70   LIGHTTPD_STATIC=no
72 AM_CONDITIONAL(LIGHTTPD_STATIC, test x$LIGHTTPD_STATIC = xyes)
74 AC_EXEEXT
76 dnl libtool
77 AC_DISABLE_STATIC
78 AC_ENABLE_SHARED
80 AC_LIBTOOL_DLOPEN
81 AC_PROG_LIBTOOL
83 dnl for solaris
84 CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
86 dnl Checks for header files.
87 AC_HEADER_STDC
88 AC_HEADER_SYS_WAIT
89 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h strings.h \
90 sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \
91 getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
92 sys/mman.h sys/event.h port.h pwd.h \
93 sys/resource.h sys/un.h syslog.h sys/prctl.h uuid/uuid.h])
95 dnl Checks for typedefs, structures, and compiler characteristics.
96 AC_C_CONST
97 AC_C_INLINE
98 AC_C_CHAR_UNSIGNED
99 AC_TYPE_OFF_T
100 AC_TYPE_PID_T
101 AC_TYPE_SIZE_T
103 AC_CHECK_MEMBER(struct tm.tm_gmtoff,[AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm])],,[#include <time.h>])
104 AC_CHECK_TYPES(struct sockaddr_storage,,,[#include <sys/socket.h>])
105 AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h>
106 #include <sys/socket.h>])
108 dnl Checks for library functions.
109 AC_FUNC_FORK
110 dnl AC_FUNC_MALLOC
111 dnl AC_FUNC_MMAP
112 dnl AC_FUNC_REALLOC
113 AC_TYPE_SIGNAL
114 AC_FUNC_STAT
115 AC_FUNC_STRFTIME
117 if test -z "$PKG_CONFIG"; then
118   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
121 dnl checking for libev
122 AC_MSG_CHECKING(for libev support)
123 AC_ARG_WITH(libev,
124     AC_HELP_STRING([--with-libev@<:@=PATH@:>@],[Include libev support for fdevent handlers in PATH/include and PATH/lib]),
125     [WITH_LIBEV=$withval],[WITH_LIBEV=no])
127 LIBEV_CFLAGS=""
128 LIBEV_LIBS=""
130 if test "$WITH_LIBEV" != "no"; then
131         PKG_CHECK_MODULES(LIBEV, libev, [], [
132                 dnl no pkg-config for libev, searching manually:
134                 if test "$WITH_LIBEV" != "yes"; then
135                         LIBEV_CFLAGS="-I$WITH_LIBEV/include"
136                         LIBEV_LIBS="-L$WITH_LIBEV/lib -lev"
137                 else
138                         AC_CHECK_HEADERS([ev.h],[
139                                 AC_CHECK_LIB([ev], [ev_time], [
140                                                 LIBEV_CFLAGS=""
141                                                 LIBEV_LIBS="-lev"
142                                         ],[
143                                         AC_MSG_ERROR([libev not found])
144                                         ]
145                                 )],[
146                                         AC_MSG_ERROR([libev not found])
147                                 ]
148                         )
149                 fi
150         ])
152         AC_DEFINE([HAVE_LIBEV], [1], [libev support])
155 AC_SUBST(LIBEV_CFLAGS)
156 AC_SUBST(LIBEV_LIBS)
157 AC_MSG_RESULT([$WITH_LIBEV])
159 dnl Checks for database.
160 MYSQL_INCLUDE=""
161 MYSQL_LIBS=""
163 AC_MSG_CHECKING(for MySQL support)
164 AC_ARG_WITH(mysql,
165     AC_HELP_STRING([--with-mysql@<:@=PATH@:>@],[Include MySQL support. PATH is the path to 'mysql_config']),
166     [WITH_MYSQL=$withval],[WITH_MYSQL=no])
168 if test "$WITH_MYSQL" != "no"; then
169   AC_MSG_RESULT(yes)
170   if test "$WITH_MYSQL" = "yes"; then
171     AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
172   else
173     MYSQL_CONFIG=$WITH_MYSQL
174   fi
176   if test "$MYSQL_CONFIG" = ""; then
177     AC_MSG_ERROR(mysql_config is not found)
178   fi
179   if test \! -x $MYSQL_CONFIG; then
180     AC_MSG_ERROR(mysql_config not exists or not executable, use --with-mysql=path-to-mysql_config)
181   fi
183   if $MYSQL_CONFIG | grep -- '--include' > /dev/null ; then
184     MYSQL_INCLUDE="`$MYSQL_CONFIG --include | sed s/\'//g`"
185   else
186     MYSQL_INCLUDE="`$MYSQL_CONFIG --cflags | sed s/\'//g`"
187   fi
188   MYSQL_LIBS="`$MYSQL_CONFIG --libs | sed s/\'//g`"
190   AC_MSG_CHECKING(for MySQL includes at)
191   AC_MSG_RESULT($MYSQL_INCLUDE)
193   AC_MSG_CHECKING(for MySQL libraries at)
194   AC_MSG_RESULT($MYSQL_LIBS)
195 dnl check for errmsg.h, which isn't installed by some versions of 3.21
196   old_CPPFLAGS="$CPPFLAGS"
197   CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
198   AC_CHECK_HEADERS(errmsg.h mysql.h)
199   CPPFLAGS="$old_CPPFLAGS"
201   AC_DEFINE([HAVE_MYSQL], [1], [mysql support])
202 else
203   AC_MSG_RESULT(no)
205 AM_CONDITIONAL(BUILD_WITH_MYSQL, test ! $WITH_MYSQL = no)
207 AC_SUBST(MYSQL_LIBS)
208 AC_SUBST(MYSQL_INCLUDE)
211 dnl Checks for database.
212 PGSQL_INCLUDE=""
213 PGSQL_LIBS=""
215 AC_MSG_CHECKING(for PgSQL support)
216 AC_ARG_WITH(pgsql,
217     AC_HELP_STRING([--with-pgsql@<:@=PATH@:>@],[Include PgSQL support. PATH is the path to 'pg_config']),
218     [WITH_PGSQL=$withval],[WITH_PGSQL=no])
220 if test "$WITH_PGSQL" != "no"; then
221   AC_MSG_RESULT(yes)
222   if test "$WITH_PGSQL" = "yes"; then
223     AC_PATH_PROG(PGSQL_CONFIG, pg_config)
224   else
225     PGSQL_CONFIG=$WITH_PGSQL
226   fi
228   if test "$PGSQL_CONFIG" = ""; then
229     AC_MSG_ERROR(pg_config is not found)
230   fi
231   if test \! -x $PGSQL_CONFIG; then
232     AC_MSG_ERROR(pg_config not exists or not executable, use --with-pgsql=path-to-pg_config)
233   fi
235   PGSQL_INCLUDE="-I`$PGSQL_CONFIG --includedir`"
236   PGSQL_LIBS="-L`$PGSQL_CONFIG --libdir` -lpq"
238   AC_MSG_CHECKING(for PgSQL includes at)
239   AC_MSG_RESULT($PGSQL_INCLUDE)
241   AC_MSG_CHECKING(for PgSQL libraries at)
242   AC_MSG_RESULT($PGSQL_LIBS)
244   AC_DEFINE([HAVE_PGSQL], [1], [pgsql support])
245 else
246   AC_MSG_RESULT(no)
248 AM_CONDITIONAL(BUILD_WITH_PGSQL, test ! $WITH_PGSQL = no)
250 AC_SUBST(PGSQL_LIBS)
251 AC_SUBST(PGSQL_INCLUDE)
254 dnl Checks for libdbi library
255 DBI_INCLUDE=""
256 DBI_LIBS=""
258 AC_MSG_CHECKING(for LibDBI support)
259 AC_ARG_WITH(dbi,
260     AC_HELP_STRING([--with-dbi@<:@=PATH@:>@],[Include DBI support in PATH/include/dbi.h and PATH/lib]),
261     [WITH_DBI=$withval],[WITH_DBI=no])
263 if test "$WITH_DBI" != "no"; then
264        AC_MSG_RESULT(yes)
265        if test "$WITH_DBI" != "yes"; then
266                DBI_CFLAGS="-I$WITH_LIBDBI/include"
267                DBI_LIBS="-L$WITH_LIBDBI/lib -ldbi"
268        else
269                AC_CHECK_HEADERS([dbi/dbi.h],[
270                        AC_CHECK_LIB([dbi], [dbi_version], [
271                                        DBI_CFLAGS=""
272                                        DBI_LIBS="-ldbi"
273                                ],[
274                                AC_MSG_ERROR([LibDBI not found])
275                                ]
276                        )],[
277                                AC_MSG_ERROR([LibDBI not found])
278                        ]
279                )
280        fi
282        AC_DEFINE([HAVE_DBI], [1], [LibDBI support])
283 else
284        AC_MSG_RESULT(no)
286 AM_CONDITIONAL(BUILD_WITH_DBI, test ! $WITH_DBI = no)
288 AC_SUBST(DBI_LIBS)
289 AC_SUBST(DBI_CFLAGS)
292 dnl Check for LDAP
293 AC_MSG_CHECKING(for LDAP support)
294 AC_ARG_WITH(ldap, AC_HELP_STRING([--with-ldap],[enable LDAP support]),
295 [WITH_LDAP=$withval], [WITH_LDAP=no])
296 AC_MSG_RESULT([$withval])
297 if test "$WITH_LDAP" != "no"; then
298  AC_CHECK_LIB(ldap, ldap_bind, [
299   AC_CHECK_HEADERS([ldap.h],[
300     LDAP_LIB=-lldap
301     AC_DEFINE([HAVE_LIBLDAP], [1], [libldap])
302     AC_DEFINE([HAVE_LDAP_H], [1])
303     AC_DEFINE([LDAP_DEPRECATED], [1], [Using deprecated ldap api])
304   ])
305  ])
306  AC_SUBST(LDAP_LIB)
307  AC_CHECK_LIB(lber, ber_printf, [
308   AC_CHECK_HEADERS([lber.h],[
309     LBER_LIB=-llber
310     AC_DEFINE([HAVE_LIBLBER], [1], [liblber])
311     AC_DEFINE([HAVE_LBER_H], [1])
312   ])
313  ])
314  AC_SUBST(LBER_LIB)
316 AM_CONDITIONAL(BUILD_WITH_LDAP, test ! $WITH_LDAP = no)
318 dnl Check for xattr
319 AC_MSG_CHECKING(for extended attributes support)
320 AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable extended attribute support]),
321 [WITH_ATTR=$withval],[WITH_ATTR=no])
322 AC_MSG_RESULT($withval)
323 if test "$WITH_ATTR" != "no"; then
324   # libattr (linux only?)
325   AC_CHECK_LIB(attr, attr_get, [
326     AC_CHECK_HEADERS([attr/attributes.h],[
327       ATTR_LIB=-lattr
328       AC_DEFINE([HAVE_XATTR], [1], [libattr])
329       AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
330     ])
331   ])
332   AC_SUBST(ATTR_LIB)
334   # (Free)BSD extattr
335   AC_CHECK_FUNC([extattr_get_file], [
336     AC_CHECK_HEADERS([sys/extattr.h],[
337       AC_DEFINE([HAVE_EXTATTR], [1], [BSD extended attributes])
338       AC_DEFINE([HAVE_SYS_EXTATTR_H], [1])
339     ])
340   ])
343 dnl openssl on solaris needs -lsocket -lnsl
344 AC_SEARCH_LIBS(socket,socket)
345 AC_SEARCH_LIBS(gethostbyname,nsl socket)
347 dnl On Haiku accept() and friends are in libnetwork
348 AC_SEARCH_LIBS(accept,network)
350 dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
351 AC_SEARCH_LIBS([clock_gettime],[rt])
353 save_LIBS=$LIBS
354 AC_SEARCH_LIBS(dlopen,dl,[
355   AC_CHECK_HEADERS([dlfcn.h],[
356     if test "$ac_cv_search_dlopen" != no; then
357       test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen"
358     fi
360     AC_DEFINE([HAVE_LIBDL], [1], [libdl])
361     AC_DEFINE([HAVE_DLFCN_H], [1])
362   ])
364 LIBS=$save_LIBS
365 AC_SUBST(DL_LIB)
367 dnl Check for valgrind
368 AC_MSG_CHECKING(for valgrind)
369 AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind],[enable internal support for valgrind]),
370 [WITH_VALGRIND=$withval],[WITH_VALGRIND=no])
371 AC_MSG_RESULT([$WITH_VALGRIND])
372 if test "$WITH_VALGRIND" != "no"; then
373  AC_CHECK_HEADERS([valgrind/valgrind.h])
376 dnl Checking for libunwind
377 AC_MSG_CHECKING(for libunwind)
378 AC_ARG_WITH(libunwind,
379     AC_HELP_STRING([--with-libunwind],[Include libunwind support for backtraces on assert failures]),
380     [WITH_LIBUNWIND=$withval],[WITH_LIBUNWIND=no])
382 if test "$WITH_LIBUNWIND" != "no"; then
383   PKG_CHECK_MODULES(LIBUNWIND, libunwind)
384   AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
386 AC_MSG_RESULT([$WITH_LIBUNWIND])
388 dnl Checking for kerberos5
389 AC_MSG_CHECKING(for kerberos5)
390 AC_ARG_WITH(krb5,
391         AC_HELP_STRING([--with-krb5@<:@=DIR@:>@],[Use Kerberos 5]),
392         [WITH_KRB5=$withval],[WITH_KRB5=no])
393 if test "$WITH_KRB5" != "no"; then
394         use_krb5=yes
395         if test "x$WITH_KRB5" != "xyes"; then
396                 CPPFLAGS="$CPPFLAGS -I$WITH_KRB5/include"
397                 LDFLAGS="$LDFLAGS -L$WITH_KRB5/lib"
398         fi
399 else
400         use_krb5=no
402 AC_MSG_RESULT([$use_krb5])
403 AM_CONDITIONAL(BUILD_WITH_KRB5, test ! $WITH_KRB5 = no)
405 AC_ARG_WITH(krb5-includes,
406         AC_HELP_STRING([--with-krb5-includes=DIR],[Kerberos includes]),
407         [ use_krb5=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
410 AC_ARG_WITH(krb5-libs,
411         AC_HELP_STRING([--with-krb5-libs=DIR],[Kerberos libraries]),
412         [ use_krb5=yes LDFLAGS="$LDFLAGS -L$withval" ]
415 if test "x$use_krb5" = "xyes"; then
416         AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
417                 AC_CHECK_HEADERS([gssapi/gssapi_krb5.h],[
418                         KRB5_LIB="-lkrb5 -lgssapi_krb5"
419                         AC_DEFINE(HAVE_KRB5, [1], [libgssapi_krb5])
420                 ])
421         ])
422         if test "x$KRB5_LIB" = x; then
423                 AC_MSG_ERROR([gssapi_krb5 headers and/or libs where not found, install them or build with --without-krb5])
424         fi
425         case $host_os in
426                 *darwin*|*cygwin* ) KRB5_LIB="$KRB5_LIB -lcom_err";;
427                 * ) ;;
428         esac
430 AC_SUBST(KRB5_LIB)
432 dnl Check for openssl
433 AC_MSG_CHECKING(for OpenSSL)
434 AC_ARG_WITH(openssl,
435     AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[Include openssl support (default no)]),
436     [WITH_OPENSSL=$withval],[WITH_OPENSSL=no])
438 if test "$WITH_OPENSSL" != "no"; then
439     use_openssl=yes
440     if test "$WITH_OPENSSL" != "yes"; then
441         CPPFLAGS="$CPPFLAGS -I$WITH_OPENSSL/include"
442         LDFLAGS="$LDFLAGS -L$WITH_OPENSSL/lib"
443     fi
444 else
445     use_openssl=no
447 AC_MSG_RESULT([$use_openssl])
448 AM_CONDITIONAL(BUILD_WITH_OPENSSL, test ! $WITH_OPENSSL = no)
450 AC_ARG_WITH(openssl-includes,
451     AC_HELP_STRING([--with-openssl-includes=DIR],[OpenSSL includes]),
452     [ use_openssl=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
455 AC_ARG_WITH(openssl-libs,
456     AC_HELP_STRING([--with-openssl-libs=DIR],[OpenSSL libraries]),
457     [ use_openssl=yes LDFLAGS="$LDFLAGS -L$withval" ]
460 if test "x$use_openssl" = "xyes"; then
461     if test "x$use_krb5" = "xyes"; then
462         AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos])
463     fi
465     AC_CHECK_HEADERS([openssl/ssl.h])
466     OLDLIBS="$LIBS"
467     AC_CHECK_LIB(crypto, BIO_f_base64, [
468       AC_CHECK_LIB(ssl, SSL_new, [ SSL_LIB="-lssl -lcrypto"
469                                  CRYPTO_LIB="-lcrypto"
470                                  AC_DEFINE(HAVE_LIBSSL, [], [Have libssl]) ], [], [ -lcrypto "$DL_LIB" ])
471     ], [], [])
472     LIBS="$OLDLIBS"
473     AC_SUBST(SSL_LIB)
474     AC_SUBST(CRYPTO_LIB)
477 AC_MSG_CHECKING(for perl regular expressions support)
478 AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable pcre support (default yes)]),
479     [WITH_PCRE=$withval],[WITH_PCRE=yes])
480 AC_MSG_RESULT([$WITH_PCRE])
482 if test "$WITH_PCRE" != "no"; then
483                 if test "$WITH_PCRE" != "yes"; then
484                         PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
485                         CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
486                 else
487                         AC_PATH_PROG(PCRECONFIG, pcre-config)
488                         if test x"$PCRECONFIG" != x; then
489                                 PCRE_LIB=`$PCRECONFIG --libs`
490                                 CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
491                         fi
492                 fi
494   if test x"$PCRE_LIB" != x; then
495     AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
496     AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
497     AC_SUBST(PCRE_LIB)
498   else
499     AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
500   fi
503 AC_MSG_CHECKING(for zlib support)
504 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[Enable zlib support for mod_compress]),
505     [WITH_ZLIB=$withval],[WITH_ZLIB=yes])
506 AC_MSG_RESULT([$WITH_ZLIB])
508 if test "$WITH_ZLIB" != "no"; then
509                 if test "$WITH_ZLIB" != "yes"; then
510                         Z_LIB="-L$WITH_ZLIB -lz"
511                         CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB"
512                 else
513                         AC_CHECK_LIB(z, deflate, [
514                           AC_CHECK_HEADERS([zlib.h],[Z_LIB=-lz])
515                         ])
516                 fi
518   if test x"$Z_LIB" != x; then
519     AC_DEFINE([HAVE_LIBZ], [1], [libz])
520     AC_DEFINE([HAVE_ZLIB_H], [1])
521     AC_SUBST(Z_LIB)
522   else
523     AC_MSG_ERROR([zlib-headers and/or libs were not found, install them or build with --without-zlib])
524   fi
527 AC_MSG_CHECKING(for bzip2 support)
528 AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),
529     [WITH_BZIP2=$withval],[WITH_BZIP2=yes])
530 AC_MSG_RESULT([$WITH_BZIP2])
532 if test "$WITH_BZIP2" != "no"; then
533                 if test "$WITH_BZIP2" != "yes"; then
534                         BZ_LIB="-L$WITH_BZIP2 -lbz2"
535                         CPPFLAGS="$CPPFLAGS -I$WITH_BZIP2"
536                 else
537                         AC_CHECK_LIB(bz2, BZ2_bzCompress, [
538                           AC_CHECK_HEADERS([bzlib.h],[BZ_LIB=-lbz2])
539                         ])
540                 fi
542   if test x"$BZ_LIB" != x; then
543     AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
544     AC_DEFINE([HAVE_BZLIB_H], [1])
545     AC_SUBST(BZ_LIB)
546   else
547     AC_MSG_ERROR([bzip2-headers and/or libs were not found, install them or build with --without-bzip2])
548   fi
551 dnl Check for gamin
552 AC_MSG_CHECKING(for FAM)
553 AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gamin for reducing number of stat() calls]),
554 [WITH_FAM=$withval],[WITH_FAM=no])
555 AC_MSG_RESULT([$WITH_FAM])
557 if test "$WITH_FAM" != "no"; then
558                 if test "$WITH_FAM" != "yes"; then
559                         FAM_LIBS="-L$WITH_FAM -lfam"
560                         CPPFLAGS="$CPPFLAGS -I$WITH_FAM"
561                 else
562                         AC_CHECK_LIB(fam, FAMOpen2, [
563                           AC_CHECK_HEADERS([fam.h],[FAM_LIBS=-lfam])
564                         ])
565                         if test "x$FAM_LIBS" = x; then
566                           PKG_CHECK_MODULES(FAM, gamin >= 0.1.0)
567                         fi
568                 fi
570   if test x"$FAM_LIBS" != x; then
571     OLD_LIBS=$LIBS
572     LIBS=$FAM_LIBS
573     AC_CHECK_FUNCS([FAMNoExists])
574     LIBS=$OLD_LIBS
576     AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
577     AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
578     AC_SUBST(FAM_LIBS)
579   else
580      AC_MSG_ERROR([fam/gamin-headers and/or libs were not found, install them or build with --without-fam])
581   fi
584 AC_MSG_CHECKING(for properties in mod_webdav)
585 AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webdav-props],[properties in mod_webdav]),
586 [WITH_WEBDAV_PROPS=$withval],[WITH_WEBDAV_PROPS=no])
587 AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
589 if test "$WITH_WEBDAV_PROPS" != "no"; then
591   AC_MSG_CHECKING(for libxml2)
592   AC_ARG_WITH(libxml, AC_HELP_STRING([--with-libxml],[libxml2 for properties in mod_webdav]),
593   [WITH_LIBXML=$withval],[WITH_LIBXML=yes])
594   AC_MSG_RESULT([$WITH_LIBXML])
596   if test "$WITH_LIBXML" != "no"; then
597                 if test "$WITH_LIBXML" != "yes"; then
598                         XML_LIBS="-L$WITH_LIBXML/.libs -lxml2"
599                         XML_CFLAGS="-I$WITH_LIBXML/include"
600                 else
601                         PKG_CHECK_MODULES(XML, libxml-2.0)
602                 fi
604     if test x"$XML_LIBS" != x; then
605       AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])
606       AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])
607       AC_SUBST(XML_LIBS)
608       AC_SUBST(XML_CFLAGS)
609     else
610       AC_MSG_ERROR([libxml2-headers and/or libs were not found, install them or build with --without-webdav-props])
611     fi
612   fi
614   AC_MSG_CHECKING(for sqlite)
615   AC_ARG_WITH(sqlite, AC_HELP_STRING([--with-sqlite],[sqlite for properties in mod_webdav]),
616   [WITH_SQLITE=$withval],[WITH_SQLITE=yes])
617   AC_MSG_RESULT([$WITH_SQLITE])
619   if test "$WITH_SQLITE" != "no"; then
620                 if test "$WITH_SQLITE" != "yes"; then
621                         SQLITE_LIBS="-L$WITH_SQLITE/.libs -lsqlite3"
622                         SQLITE_CFLAGS="-I$WITH_SQLITE"
623                 else
624                         PKG_CHECK_MODULES(SQLITE, sqlite3)
625                 fi
627     if test x"$SQLITE_LIBS" != x; then
628       AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])
629       AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])
630       AC_SUBST(SQLITE_LIBS)
631       AC_SUBST(SQLITE_CFLAGS)
632     else
633       AC_MSG_ERROR([sqlite-headers and/or libs were not found, install them or build with --without-webdav-props])
634     fi
635   fi
637   AC_MSG_CHECKING(for locks in mod_webdav)
638   AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]),
639   [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no])
640   AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
642   if test "$WITH_WEBDAV_LOCKS" != "no"; then
644     AC_MSG_CHECKING(for libuuid)
645     AC_ARG_WITH(uuid, AC_HELP_STRING([--with-uuid],[uuid for locks in mod_webdav]),
646     [WITH_UUID=$withval],[WITH_UUID=yes])
647     AC_MSG_RESULT([$WITH_UUID])
649     if test "$WITH_UUID" != "no"; then
650                 if test "$WITH_UUID" != "yes"; then
651                         UUID_LIBS="-L$WITH_UUID -luuid"
652                         CPPFLAGS="$CPPFLAGS -I$WITH_UUID"
653                 else
654                         AC_CHECK_LIB(uuid, uuid_unparse, [
655                           AC_CHECK_HEADERS([uuid/uuid.h],[UUID_LIBS=-luuid])
656                         ])
657                 fi
659       if test x"$UUID_LIBS" != x; then
660         AC_DEFINE([HAVE_UUID], [1], [libuuid])
661         AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available])
662         AC_SUBST(UUID_LIBS)
663       else
664         AC_MSG_ERROR([uuid-headers and/or libs were not found, install them or build with --without-webdav-locks])
665       fi
666     fi
668   fi
672 dnl Check for gdbm
673 AC_MSG_CHECKING(for gdbm)
674 AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm storage for mod_trigger_b4_dl]),
675 [WITH_GDBM=$withval],[WITH_GDBM=no])
676 AC_MSG_RESULT([$WITH_GDBM])
678 if test "$WITH_GDBM" != "no"; then
679                 if test "$WITH_GDBM" != "yes"; then
680                         GDBM_LIB="-L$WITH_GDBM -lgdbm"
681                         CPPFLAGS="$CPPFLAGS -I$WITH_GDBM"
682                 else
683                         AC_CHECK_LIB(gdbm, gdbm_open, [
684                           AC_CHECK_HEADERS([gdbm.h],[GDBM_LIB=-lgdbm])
685                         ])
686                 fi
688   if test x"$GDBM_LIB" != x; then
689     AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
690     AC_DEFINE([HAVE_GDBM_H], [1])
691     AC_SUBST(GDBM_LIB)
692   else
693     AC_MSG_ERROR([gdbm headers and/or libs were not found, install them or build with --without-gdbm])
694   fi
696 AM_CONDITIONAL(BUILD_WITH_GDBM, test ! $WITH_GDBM = no)
698 dnl Check for GeoIP
699 AC_MSG_CHECKING(for GeoIP)
700 AC_ARG_WITH(geoip, AC_HELP_STRING([--with-geoip],[IP-based geolocation lookup]),
701 [WITH_GEOIP=$withval],[WITH_GEOIP=no])
702 AC_MSG_RESULT([$WITH_GEOIP])
704 if test "$WITH_GEOIP" != "no"; then
705                 if test "$WITH_GEOIP" != "yes"; then
706                         GEOIP_LIB="-L$WITH_GEOIP -lGeoIP"
707                         CPPFLAGS="$CPPFLAGS -I$WITH_GEOIP"
708                 else
709                         AC_CHECK_LIB(GeoIP, GeoIP_country_name_by_addr, [
710                           AC_CHECK_HEADERS([GeoIP.h],[GEOIP_LIB=-lGeoIP])
711                         ])
712                 fi
714   if test x"$GEOIP_LIB" != x; then
715     AC_DEFINE([HAVE_GEOIP], [1], [libGeoIP])
716     AC_DEFINE([HAVE_GEOIP_H], [1])
717     AC_SUBST(GEOIP_LIB)
718   else
719     AC_MSG_ERROR([GeoIP headers and/or libs were not found, install them or build with --without-geoip])
720   fi
722 AM_CONDITIONAL(BUILD_WITH_GEOIP, test ! $WITH_GEOIP = no)
724 dnl Check for memcached
725 AC_MSG_CHECKING(for memcached)
726 AC_ARG_WITH(memcached, AC_HELP_STRING([--with-memcached],[memcached storage for mod_trigger_b4_dl]),
727 [WITH_MEMCACHED=$withval],[WITH_MEMCACHED=no])
728 AC_MSG_RESULT([$WITH_MEMCACHED])
730 if test "$WITH_MEMCACHED" != "no"; then
731                 if test "$WITH_MEMCACHED" != "yes"; then
732                         MEMCACHED_LIB="-L$WITH_MEMCACHED -lMEMCACHED"
733                         CPPFLAGS="$CPPFLAGS -I$WITH_MEMCACHED"
734                 else
735                         AC_CHECK_LIB(memcached, memcached, [
736                           AC_CHECK_HEADERS([libmemcached/memcached.h],[
737                             MEMCACHED_LIB=-lmemcached
738                           ])
739                         ])
740                 fi
742   if test x"$MEMCACHED_LIB" != x; then
743     AC_DEFINE([USE_MEMCACHED], [1], [libmemcached])
744     AC_SUBST(MEMCACHED_LIB)
745   else
746     AC_MSG_ERROR([memcached headers and/or libs were not found, install them or build with --without-memcached])
747   fi
749 AM_CONDITIONAL(BUILD_WITH_MEMCACHED, test ! $WITH_MEMCACHED = no)
751 AM_CONDITIONAL(BUILD_MOD_TRIGGER_B4_DL, test ! $WITH_MEMCACHED = no || test ! $WITH_GDBM = no)
753 dnl Check for lua
754 AC_MSG_CHECKING(if lua-support is requested)
755 AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engine for mod_cml]),
756 [WITH_LUA=$withval],[WITH_LUA=no])
758 AC_MSG_RESULT($WITH_LUA)
759 if test "$WITH_LUA" != "no"; then
760   found_lua=0
761   if test "$WITH_LUA" != "yes"; then
762     PKG_CHECK_MODULES(LUA, $WITH_LUA >= 5.1, [
763       found_lua=1
764     ],[
765       AC_MSG_NOTICE([Couldn't find requested lua pkg-config module $WITH_LUA])
766     ])
767     if test "$found_lua" = "0"; then
768       LUA_LIBS="-L$WITH_LUA -llua"
769       LUA_CFLAGS="-I$WITH_LUA"
770     fi
771   else
772     for luaname in lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua; do
773       if test "$found_lua" = "0"; then
774         PKG_CHECK_MODULES(LUA, $luaname >= 5.1, [
775           found_lua=1
776         ], [
777           AC_MSG_NOTICE([Couldn't find $luaname])
778         ])
779       fi
780     done
781     if test "$found_lua" = "0"; then
782       AC_MSG_ERROR([Couldn't find any lua pkg-config module])
783     fi
784   fi
786   if test x"$LUA_LIBS" != x; then
787     AC_DEFINE([HAVE_LUA], [1], [liblua])
788     AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
789     AC_SUBST(LUA_LIBS)
790     AC_SUBST(LUA_CFLAGS)
791   else
792     AC_MSG_ERROR([lua headers and/or libs were not found, install them or build with --without-lua])
793   fi
795 AM_CONDITIONAL(BUILD_WITH_LUA, test ! $WITH_LUA = no)
797 dnl search for crypt_r and (fallback) for crypt
798 save_LIBS=$LIBS
799 LIBS=
800 AC_SEARCH_LIBS([crypt_r],[crypt],[
801   AC_DEFINE([HAVE_CRYPT_R], [1], [crypt_r])
802   AC_CHECK_HEADERS([crypt.h],[
803     AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
804   ])
806   CRYPT_LIB=$LIBS
808   AC_SEARCH_LIBS([crypt],[crypt],[
809     AC_DEFINE([HAVE_CRYPT], [1], [crypt])
810     AC_CHECK_HEADERS([crypt.h],[
811       AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
812     ])
814     CRYPT_LIB=$LIBS
815   ])
817 LIBS=$save_LIBS
818 AC_SUBST([CRYPT_LIB])
820 save_LIBS=$LIBS
821 AC_SEARCH_LIBS(sendfilev,sendfile,[
822   if test "$ac_cv_search_sendfilev" != no; then
823     test "$ac_cv_search_sendfilev" = "none required" || SENDFILE_LIB="$ac_cv_search_sendfilev"
824     AC_DEFINE([HAVE_SENDFILEV], [1], [solaris sendfilev])
825   fi
827 LIBS=$save_LIBS
828 AC_SUBST(SENDFILE_LIB)
830 case $host_os in
831         *mingw* ) LIBS="$LIBS -lwsock32";;
832         * ) ;;
833 esac
835 AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop inet_pton issetugid memset mmap munmap strchr \
836                   strdup strerror strstr strtol sendfile  getopt socket lstat \
837                   gethostbyname poll epoll_ctl getrlimit chroot \
838                   getuid select signal pathconf madvise posix_fadvise posix_madvise \
839                   writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r \
840                   memset_s explicit_bzero clock_gettime pipe2 \
841                   arc4random_buf jrand48 srandom getloadavg])
842 AC_CHECK_HEADERS([sys/random.h],[
843   AC_CHECK_FUNC([getentropy], AC_DEFINE([HAVE_GETENTROPY], [1], [getentropy]))
845 AC_CHECK_HEADERS([linux/random.h],[
846   AC_CHECK_FUNC([getrandom], AC_DEFINE([HAVE_GETRANDOM], [1], [getrandom]))
849 AC_MSG_CHECKING(if weak symbols are supported)
850 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
851                 __attribute__((weak)) void __dummy(void *x) { }
852                 void f(void *x) { __dummy(x); }
853         ]])],
854         [
855                 AC_MSG_RESULT(yes)
856                 AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])
857         ],[AC_MSG_RESULT(no)])
859 AC_MSG_CHECKING(for Large File System support)
860 AC_ARG_ENABLE(lfs,
861  AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
862  [case "${enableval}" in
863    yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
864     no) ;;
865      *) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
866   esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
867          enable_lfs=yes])
868 AC_MSG_RESULT($enableval)
870 AC_CHECK_SIZEOF(long)
871 AC_CHECK_SIZEOF(off_t)
873 if test "x$ac_cv_func_sendfile" = xyes; then
874         dnl check if sendfile works
875         AC_MSG_CHECKING(if sendfile works)
876         if test "x$cross_compiling" = xno; then
877         AC_TRY_RUN([
878                     #ifdef HAVE_SYS_SENDFILE_H
879                     #include <sys/sendfile.h>
880                     #endif /* HAVE_SYS_SENDFILE_H */
881                     #include <errno.h>
882                     int main() {
883                       int o = 0;
884                       if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
885                       return 0;
886                     } ],
887                     AC_MSG_RESULT(yes),
888                     [ AC_MSG_RESULT(no)
889                     AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile]) ] )
890         else
891               AC_MSG_RESULT(no, cross-compiling)
892               AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile])
893         fi
896 dnl Check for IPv6 support
898 AC_ARG_ENABLE(ipv6,
899  AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
900  [case "${enableval}" in
901    yes) ipv6=true ;;
902     no) ipv6=false ;;
903      *) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
904   esac],[ipv6=true])
906 if test x$ipv6 = xtrue; then
907   AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
908   [AC_TRY_LINK([ #include <sys/types.h>
909 #include <sys/socket.h>
910 #include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; ],
911   [ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
913   if test "$ac_cv_ipv6_support" = yes; then
914     AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
915   fi
918 # disable mmap by default; if a mmapped file gets truncated, the process gets a SIGBUS signal
919 # on reading the truncated area which we can't handle (yet).
920 # lighttpd may always use mmap with files it owns (created tmp files)
921 AC_ARG_ENABLE(mmap,
922   AC_HELP_STRING([--enable-mmap],[use mmap if available (DANGEROUS, allows local users to trigger SIGBUS crashes)]),
923   [case "${enableval}" in
924    yes) mmap=true ;;
925     no) mmap=false ;;
926      *) AC_MSG_ERROR(bad value ${enableval} for --enable-mmap) ;;
927   esac],[mmap=false])
929 if test x$mmap = xtrue; then
930   AC_DEFINE(ENABLE_MMAP, [1], [Use mmap if available])
933 dnl check for fastcgi lib, for the tests only
934 fastcgi_found=no
935 AC_CHECK_LIB(fcgi, FCGI_Accept, [
936  AC_CHECK_HEADERS([fastcgi.h fastcgi/fastcgi.h],[
937    fastcgi_found=yes
938  ])
941 AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
944 dnl check for extra compiler options (warning options)
945 if test "${GCC}" = "yes"; then
946   TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
949 AC_ARG_ENABLE(extra-warnings,
950  AC_HELP_STRING([--enable-extra-warnings],[enable extra warnings (gcc specific)]),
951  [case "${enableval}" in
952  error) extrawarnings=error ;;
953    yes) extrawarnings=true ;;
954     no) extrawarnings=false ;;
955      *) AC_MSG_ERROR(bad value ${enableval} for --enable-extra-warnings) ;;
956   esac],[extrawarnings=false])
958 if test x$extrawarnings = xtrue || test x$extrawarnings = xerror; then
959   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])
960   TRY_LDFLAGS([-Wl,--as-needed])
961   if test x$extrawarnings = xerror; then
962     AS_VAR_APPEND([CFLAGS], [" -Werror"])
963     AS_VAR_APPEND([LDFLAGS], [" -Wl,--fatal-warnings"])
964   fi
967 dnl build version-id
968 LIGHTTPD_VERSION_ID=`echo $PACKAGE_VERSION | $AWK -F '.' '{print "(" $1 " << 16 | " $2 " << 8 | " $3 ")"}'`
969 AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
971 AC_CONFIG_FILES([Makefile src/Makefile
972                  doc/config/conf.d/Makefile \
973                  doc/config/vhosts.d/Makefile \
974                  doc/config/Makefile \
975                  doc/scripts/Makefile \
976                  doc/systemd/Makefile \
977                  doc/outdated/Makefile \
978                  doc/Makefile \
979                  tests/Makefile \
980                  tests/docroot/Makefile \
981                  tests/docroot/123/Makefile \
982                  tests/docroot/www/Makefile \
983                  tests/docroot/www/go/Makefile \
984                  tests/docroot/www/indexfile/Makefile \
985                  tests/docroot/www/expire/Makefile \
986                  distribute.sh])
987 AC_OUTPUT
990 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"
991 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"
992 do_build="$do_build mod_vhostdb mod_wstunnel"
994 plugins="mod_rewrite mod_redirect"
995 features="regex-conditionals"
996 if test ! "x$PCRE_LIB" = x; then
997         do_build="$do_build $plugins"
998         enable_feature="$features"
999 else
1000         no_build="$no_build $plugins"
1001         disable_feature="$features"
1004 plugins="mod_trigger_b4_dl"
1005 if test ! "x$PCRE_LIB" = x; then
1006 if test ! "x$WITH_MEMCACHED" = xno || test ! "x$WITH_GDBM" = xno; then
1007         do_build="$do_build $plugins"
1008 else
1009         no_build="$no_build $plugins"
1013 plugins="mod_authn_mysql mod_mysql_vhost mod_vhostdb_mysql"
1014 if test ! "x$MYSQL_LIBS" = x; then
1015         do_build="$do_build $plugins"
1016 else
1017         no_build="$no_build $plugins"
1020 plugins="mod_vhostdb_pgsql"
1021 if test ! "x$PGSQL_LIBS" = x; then
1022         do_build="$do_build $plugins"
1023 else
1024         no_build="$no_build $plugins"
1027 plugins="mod_vhostdb_dbi"
1028 if test ! "x$DBI_LIBS" = x; then
1029         do_build="$do_build $plugins"
1030 else
1031         no_build="$no_build $plugins"
1034 plugins="mod_cml mod_magnet"
1035 if test ! "x$LUA_LIBS" = x; then
1036         do_build="$do_build $plugins"
1037 else
1038         no_build="$no_build $plugins"
1041 plugins="mod_geoip"
1042 if test ! "x$GEOIP_LIB" = x; then
1043         do_build="$do_build $plugins"
1044 else
1045         no_build="$no_build $plugins"
1048 features="storage-gdbm"
1049 if test ! "x$GDBM_LIB" = x; then
1050         enable_feature="$enable_feature $features"
1051 else
1052         disable_feature="$disable_feature $features"
1055 features="storage-memcached"
1056 if test ! "x$MEMCACHED_LIB" = x; then
1057         enable_feature="$enable_feature $features"
1058 else
1059         disable_feature="$disable_feature $features"
1062 features="compress-gzip compress-deflate"
1063 if test ! "x$Z_LIB" = x; then
1064         enable_feature="$enable_feature $features"
1065 else
1066         disable_feature="$disable_feature $features"
1069 features="compress-bzip2"
1070 if test ! "x$BZ_LIB" = x; then
1071         enable_feature="$enable_feature $features"
1072 else
1073         disable_feature="$disable_feature $features"
1076 plugins="mod_authn_gssapi"
1077 if test ! "x$KRB5_LIB" = x; then
1078         do_build="$do_build $plugins"
1079 else
1080         no_build="$no_build $plugins"
1083 plugins="mod_authn_ldap mod_vhostdb_ldap"
1084 if test ! "x$LDAP_LIB" = x; then
1085         do_build="$do_build $plugins"
1086 else
1087         no_build="$no_build $plugins"
1090 features="network-openssl"
1091 if test ! "x$SSL_LIB" = x; then
1092         enable_feature="$enable_feature $features"
1093 else
1094         disable_feature="$disable_feature $features"
1097 dnl no crypt call
1098 features="auth-crypt"
1099 if test "$ac_cv_search_crypt" = no; then
1100         disable_feature="$disable_feature $features"
1101 else
1102         enable_feature="$enable_feature $features"
1105 features="network-ipv6"
1106 if test "$ac_cv_ipv6_support" = yes; then
1107         enable_feature="$enable_feature $features"
1108 else
1109         disable_feature="$disable_feature $features"
1112 features="large-files"
1113 if test "$enable_lfs" = yes; then
1114         enable_feature="$enable_feature $features"
1115 else
1116         disable_feature="$disable_feature $features"
1119 features="stat-cache-fam"
1120 if test ! "x$FAM_LIBS" = x; then
1121         enable_feature="$enable_feature $features"
1122 else
1123         disable_feature="$disable_feature $features"
1126 features="webdav-properties"
1127 if test "x$XML_LIBS" \!= x -a "x$SQLITE_LIBS" \!= x; then
1128         enable_feature="$enable_feature $features"
1129 else
1130         disable_feature="$disable_feature $features"
1133 features="webdav-locks"
1134 if test "x$UUID_LIBS" \!= x; then
1135         enable_feature="$enable_feature $features"
1136 else
1137         disable_feature="$disable_feature $features"
1141 dnl output
1143 $ECHO
1144 $ECHO "Plugins:"
1145 $ECHO
1147 $ECHO "enabled: "
1148 for p in $do_build; do
1149         $ECHO "  $p"
1150 done | sort
1152 $ECHO "disabled: "
1153 for p in $no_build; do
1154         $ECHO "  $p"
1155 done | sort
1157 $ECHO
1158 $ECHO "Features:"
1159 $ECHO
1161 $ECHO "enabled: "
1162 for p in $enable_feature; do
1163         $ECHO "  $p"
1164 done | sort
1166 $ECHO "disabled: "
1167 for p in $disable_feature; do
1168         $ECHO "  $p"
1169 done | sort
1171 $ECHO