Diff for /embedaddon/lighttpd/configure.ac between versions 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2014/06/15 20:20:05 version 1.1.1.3, 2016/11/02 10:35:00
Line 1 Line 1
 dnl                                               -*- Autoconf -*-  dnl                                               -*- Autoconf -*-
 dnl Process this file with autoconf to produce a configure script.  dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.57)  AC_PREREQ(2.57)
AC_INIT([lighttpd], [1.4.35], [contact@lighttpd.net])AC_INIT([lighttpd], [1.4.41], [contact@lighttpd.net])
 AC_CONFIG_SRCDIR([src/server.c])  AC_CONFIG_SRCDIR([src/server.c])
 AC_CONFIG_HEADER([config.h])  AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])  AC_CONFIG_MACRO_DIR([m4])
   
AC_CANONICAL_TARGETAC_CANONICAL_HOST
   
 dnl HOW FUCKING BROKEN IS AUTOMAKE...  dnl HOW FUCKING BROKEN IS AUTOMAKE...
 dnl serial-tests is not recognized before 1.12, and required for serial tests with 1.13, sane version checks "impossible"  dnl serial-tests is not recognized before 1.12, and required for serial tests with 1.13, sane version checks "impossible"
Line 18  m4_define([serial_tests], [ Line 18  m4_define([serial_tests], [
       esac])        esac])
 ])  ])
   
AM_INIT_AUTOMAKE([-Wall -Wno-portability -Wno-override foreign dist-bzip2 tar-ustar] serial_tests)AM_INIT_AUTOMAKE([-Wall -Wno-portability -Wno-override foreign dist-xz tar-ustar] serial_tests)
   
 dnl enable with --enable-silent-rules or make V=0 (needs automake >= 1.11)  dnl enable with --enable-silent-rules or make V=0 (needs automake >= 1.11)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])  m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
   
   
   dnl @synopsis TRY_CFLAGS [compiler flags]
   dnl @summary check whether compiler supports given flags and adds them to CFLAGS
   AC_DEFUN([TRY_CFLAGS],
   [dnl
     AC_MSG_CHECKING([if $CC supports $1])
     AC_LANG_PUSH([C])
     ac_try_cflags_saved_cflags="${CFLAGS}"
     CFLAGS="${CFLAGS} $1"
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
       [AC_MSG_RESULT([yes])],
       [
         AC_MSG_ERROR([no])
         CFLAGS="${ac_try_cflags_saved_cflags}"
       ]
     )
     AC_LANG_POP([C])
   ])
   
   dnl @synopsis TRY_LDFLAGS [linker flags]
   dnl @summary check whether linker supports given flags and adds them to LDFLAGS
   AC_DEFUN([TRY_LDFLAGS],
   [dnl
     AC_MSG_CHECKING([if $LD supports $1])
     AC_LANG_PUSH([C])
     ac_try_ldflags_saved_ldflags="${LDFLAGS}"
     LDFLAGS="${LDFLAGS} $1"
     AC_LINK_IFELSE([AC_LANG_PROGRAM([])],
       [AC_MSG_RESULT([yes])],
       [
         AC_MSG_ERROR([no])
         LDFLAGS="${ac_try_ldflags_saved_cflags}"
       ]
     )
     AC_LANG_POP([C])
   ])
   
 dnl Checks for programs.  dnl Checks for programs.
 AC_PROG_CC  AC_PROG_CC
 AM_PROG_CC_C_O  AM_PROG_CC_C_O
Line 52  case $host_os in Line 89  case $host_os in
 esac  esac
 AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)  AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)
   
   if test -z "$LIGHTTPD_STATIC"; then
     LIGHTTPD_STATIC=no
   fi
   AM_CONDITIONAL(LIGHTTPD_STATIC, test x$LIGHTTPD_STATIC = xyes)
   
 AC_EXEEXT  AC_EXEEXT
   
 dnl libtool  dnl libtool
Line 70  AC_HEADER_SYS_WAIT Line 112  AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h \  AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h \
 sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \  sys/socket.h sys/time.h unistd.h sys/sendfile.h sys/uio.h \
 getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \  getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
sys/mman.h sys/event.h port.h pwd.h sys/syslimits.h \sys/mman.h sys/event.h port.h pwd.h \
 sys/resource.h sys/un.h syslog.h sys/prctl.h uuid/uuid.h])  sys/resource.h sys/un.h syslog.h sys/prctl.h uuid/uuid.h])
   
 dnl Checks for typedefs, structures, and compiler characteristics.  dnl Checks for typedefs, structures, and compiler characteristics.
Line 94  dnl AC_FUNC_REALLOC Line 136  dnl AC_FUNC_REALLOC
 AC_TYPE_SIGNAL  AC_TYPE_SIGNAL
 AC_FUNC_STAT  AC_FUNC_STAT
 AC_FUNC_STRFTIME  AC_FUNC_STRFTIME
 AC_CHECK_FUNCS([issetugid inet_pton])  
   
 if test -z "$PKG_CONFIG"; then  if test -z "$PKG_CONFIG"; then
   AC_PATH_PROG(PKG_CONFIG, pkg-config, no)    AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
Line 218  AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable Line 259  AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable
 [WITH_ATTR=$withval],[WITH_ATTR=no])  [WITH_ATTR=$withval],[WITH_ATTR=no])
 AC_MSG_RESULT($withval)  AC_MSG_RESULT($withval)
 if test "$WITH_ATTR" != "no"; then  if test "$WITH_ATTR" != "no"; then
 AC_CHECK_LIB(attr, attr_get, [  # libattr (linux only?)
        AC_CHECK_HEADERS([attr/attributes.h],[  AC_CHECK_LIB(attr, attr_get, [
                ATTR_LIB=-lattr    AC_CHECK_HEADERS([attr/attributes.h],[
                AC_DEFINE([HAVE_XATTR], [1], [libattr])      ATTR_LIB=-lattr
                AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])      AC_DEFINE([HAVE_XATTR], [1], [libattr])
        ])      AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
 ])    ])
 AC_SUBST(ATTR_LIB)  ])
   AC_SUBST(ATTR_LIB)
 
   # (Free)BSD extattr
   AC_CHECK_FUNC([extattr_get_file], [
     AC_CHECK_HEADERS([sys/extattr.h],[
       AC_DEFINE([HAVE_EXTATTR], [1], [BSD extended attributes])
       AC_DEFINE([HAVE_SYS_EXTATTR_H], [1])
     ])
   ])
 fi  fi
   
 dnl openssl on solaris needs -lsocket -lnsl  dnl openssl on solaris needs -lsocket -lnsl
Line 233  AC_SEARCH_LIBS(socket,socket) Line 283  AC_SEARCH_LIBS(socket,socket)
 AC_SEARCH_LIBS(gethostbyname,nsl socket)  AC_SEARCH_LIBS(gethostbyname,nsl socket)
 AC_SEARCH_LIBS(hstrerror,resolv)  AC_SEARCH_LIBS(hstrerror,resolv)
   
   dnl On Haiku accept() and friends are in libnetwork
   AC_SEARCH_LIBS(accept,network)
   
   dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
   AC_SEARCH_LIBS([clock_gettime],[rt])
   
 save_LIBS=$LIBS  save_LIBS=$LIBS
 AC_SEARCH_LIBS(dlopen,dl,[  AC_SEARCH_LIBS(dlopen,dl,[
   AC_CHECK_HEADERS([dlfcn.h],[    AC_CHECK_HEADERS([dlfcn.h],[
Line 256  if test "$WITH_VALGRIND" != "no"; then Line 312  if test "$WITH_VALGRIND" != "no"; then
  AC_CHECK_HEADERS([valgrind/valgrind.h])   AC_CHECK_HEADERS([valgrind/valgrind.h])
 fi  fi
   
   dnl Checking for libunwind
   AC_MSG_CHECKING(for libunwind)
   AC_ARG_WITH(libunwind,
       AC_HELP_STRING([--with-libunwind],[Include libunwind support for backtraces on assert failures]),
       [WITH_LIBUNWIND=$withval],[WITH_LIBUNWIND=no])
   
   if test "$WITH_LIBUNWIND" != "no"; then
     PKG_CHECK_MODULES(LIBUNWIND, libunwind)
     AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
   fi
   
 dnl Check for openssl  dnl Check for openssl
 AC_MSG_CHECKING(for OpenSSL)  AC_MSG_CHECKING(for OpenSSL)
 AC_ARG_WITH(openssl,  AC_ARG_WITH(openssl,
Line 289  AC_ARG_WITH(kerberos5, Line 356  AC_ARG_WITH(kerberos5,
 )  )
   
 if test "x$use_openssl" = "xyes"; then  if test "x$use_openssl" = "xyes"; then
    if test "x$use_kerberos" != "xyes"; then    if test "x$use_kerberos" = "xyes"; then
        CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"        AC_DEFINE([USE_OPENSSL_KERBEROS], [1], [with kerberos])
     fi      fi
   
     AC_CHECK_HEADERS([openssl/ssl.h])      AC_CHECK_HEADERS([openssl/ssl.h])
Line 309  AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable Line 376  AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable
 AC_MSG_RESULT([$WITH_PCRE])  AC_MSG_RESULT([$WITH_PCRE])
   
 if test "$WITH_PCRE" != "no"; then  if test "$WITH_PCRE" != "no"; then
  AC_PATH_PROG(PCRECONFIG, pcre-config)                if test "$WITH_PCRE" != "yes"; then
                         PCRE_LIB="-L$WITH_PCRE/lib -lpcre"
                         CPPFLAGS="$CPPFLAGS -I$WITH_PCRE/include"
                 else
                         AC_PATH_PROG(PCRECONFIG, pcre-config)
                         if test x"$PCRECONFIG" != x; then
                                 PCRE_LIB=`$PCRECONFIG --libs`
                                 CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
                         fi
                 fi
   
  if test x"$PCRECONFIG" != x; then  if test x"$PCRE_LIB" != x; then
    PCRE_LIB=`$PCRECONFIG --libs` 
    CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`" 
     AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])      AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
     AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])      AC_DEFINE([HAVE_PCRE_H], [1], [pcre.h])
       AC_SUBST(PCRE_LIB)
   else    else
     AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])    AC_MSG_ERROR([pcre-config not found, install the pcre-devel package or build with --without-pcre])
   fi    fi
 fi  fi
   
 AC_SUBST(PCRE_LIB)  
   
 AC_MSG_CHECKING(for zlib support)  AC_MSG_CHECKING(for zlib support)
 AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[Enable zlib support for mod_compress]),  AC_ARG_WITH(zlib, AC_HELP_STRING([--with-zlib],[Enable zlib support for mod_compress]),
     [WITH_ZLIB=$withval],[WITH_ZLIB=yes])      [WITH_ZLIB=$withval],[WITH_ZLIB=yes])
 AC_MSG_RESULT([$WITH_ZLIB])  AC_MSG_RESULT([$WITH_ZLIB])
   
 if test "$WITH_ZLIB" != "no"; then  if test "$WITH_ZLIB" != "no"; then
  AC_CHECK_LIB(z, deflate, [                if test "$WITH_ZLIB" != "yes"; then
    AC_CHECK_HEADERS([zlib.h],[                        Z_LIB="-L$WITH_ZLIB -lz"
      Z_LIB=-lz                        CPPFLAGS="$CPPFLAGS -I$WITH_ZLIB"
      AC_DEFINE([HAVE_LIBZ], [1], [libz])                else
      AC_DEFINE([HAVE_ZLIB_H], [1])                        AC_CHECK_LIB(z, deflate, [
    ])                          AC_CHECK_HEADERS([zlib.h],[Z_LIB=-lz])
  ])                        ])
  if test x$Z_LIB = x; then                fi
     AC_MSG_ERROR([zlib-headers and/or libs where not found, install them or build with --without-zlib])
   if test x"$Z_LIB" != x; then
     AC_DEFINE([HAVE_LIBZ], [1], [libz])
     AC_DEFINE([HAVE_ZLIB_H], [1])
     AC_SUBST(Z_LIB)
   else
     AC_MSG_ERROR([zlib-headers and/or libs were not found, install them or build with --without-zlib])
   fi    fi
 fi  fi
 AC_SUBST(Z_LIB)  
   
 AC_MSG_CHECKING(for bzip2 support)  AC_MSG_CHECKING(for bzip2 support)
 AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),  AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),
Line 348  AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enab Line 426  AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enab
 AC_MSG_RESULT([$WITH_BZIP2])  AC_MSG_RESULT([$WITH_BZIP2])
   
 if test "$WITH_BZIP2" != "no"; then  if test "$WITH_BZIP2" != "no"; then
  AC_CHECK_LIB(bz2, BZ2_bzCompress, [                if test "$WITH_BZIP2" != "yes"; then
    AC_CHECK_HEADERS([bzlib.h],[                        BZ_LIB="-L$WITH_BZIP2 -lbz2"
      BZ_LIB=-lbz2                        CPPFLAGS="$CPPFLAGS -I$WITH_BZIP2"
      AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])                else
      AC_DEFINE([HAVE_BZLIB_H], [1])                        AC_CHECK_LIB(bz2, BZ2_bzCompress, [
    ])                          AC_CHECK_HEADERS([bzlib.h],[BZ_LIB=-lbz2])
  ])                        ])
  if test x$BZ_LIB = x; then                fi
     AC_MSG_ERROR([bzip2-headers and/or libs where not found, install them or build with --without-bzip2])
   if test x"$BZ_LIB" != x; then
     AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
     AC_DEFINE([HAVE_BZLIB_H], [1])
     AC_SUBST(BZ_LIB)
   else
     AC_MSG_ERROR([bzip2-headers and/or libs were not found, install them or build with --without-bzip2])
   fi    fi
 fi  fi
 AC_SUBST(BZ_LIB)  
   
 dnl Check for gamin  dnl Check for gamin
 AC_MSG_CHECKING(for FAM)  AC_MSG_CHECKING(for FAM)
Line 368  AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gami Line 451  AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gami
 AC_MSG_RESULT([$WITH_FAM])  AC_MSG_RESULT([$WITH_FAM])
   
 if test "$WITH_FAM" != "no"; then  if test "$WITH_FAM" != "no"; then
  AC_CHECK_LIB(fam, FAMOpen2, [                if test "$WITH_FAM" != "yes"; then
    AC_CHECK_HEADERS([fam.h],[                        FAM_LIBS="-L$WITH_FAM -lfam"
      FAM_LIBS=-lfam                        CPPFLAGS="$CPPFLAGS -I$WITH_FAM"
      AC_DEFINE([HAVE_LIBFAM], [1], [libfam])                else
      AC_DEFINE([HAVE_FAM_H], [1], [fam.h])                        AC_CHECK_LIB(fam, FAMOpen2, [
    ])                          AC_CHECK_HEADERS([fam.h],[FAM_LIBS=-lfam])
  ])                        ])
  if test "x$FAM_LIBS" = x; then                        if test "x$FAM_LIBS" = x; then
    PKG_CHECK_MODULES(FAM, gamin >= 0.1.0, [                          PKG_CHECK_MODULES(FAM, gamin >= 0.1.0)
      AC_DEFINE([HAVE_LIBFAM], [1], [libfam])                        fi
      AC_DEFINE([HAVE_FAM_H], [1], [fam.h])                fi
    ])
   if test x"$FAM_LIBS" != x; then
     OLD_LIBS=$LIBS
     LIBS=$FAM_LIBS
     AC_CHECK_FUNCS([FAMNoExists])
     LIBS=$OLD_LIBS
 
     AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
     AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
     AC_SUBST(FAM_LIBS)
   else
      AC_MSG_ERROR([fam/gamin-headers and/or libs were not found, install them or build with --without-fam])
   fi    fi
   OLD_LIBS=$LIBS  
   LIBS=$FAM_LIBS  
   AC_CHECK_FUNCS([FAMNoExists])  
   LIBS=$OLD_LIBS  
     
   if test x$FAM_LIBS = x; then  
      AC_MSG_ERROR([fam/gamin-headers and/or libs where not found, install them or build with --without-fam])  
   fi  
 fi  fi
   
 AC_MSG_CHECKING(for properties in mod_webdav)  AC_MSG_CHECKING(for properties in mod_webdav)
Line 397  AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webda Line 483  AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webda
 AC_MSG_RESULT([$WITH_WEBDAV_PROPS])  AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
   
 if test "$WITH_WEBDAV_PROPS" != "no"; then  if test "$WITH_WEBDAV_PROPS" != "no"; then
  PKG_CHECK_MODULES(XML, libxml-2.0, [  
     AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])  
     AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])  
  ])  
  PKG_CHECK_MODULES(SQLITE, sqlite3, [  
     AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])  
     AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])  
  ])  
   
 AC_MSG_CHECKING(for locks in mod_webdav)  AC_MSG_CHECKING(for libxml2)
 AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]),  AC_ARG_WITH(libxml, AC_HELP_STRING([--with-libxml],[libxml2 for properties in mod_webdav]),
 [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no])  [WITH_LIBXML=$withval],[WITH_LIBXML=yes])
 AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])  AC_MSG_RESULT([$WITH_LIBXML])
   
 if test "$WITH_WEBDAV_LOCKS" != "no"; then  if test "$WITH_LIBXML" != "no"; then
   AC_CHECK_LIB(uuid, uuid_unparse, [                if test "$WITH_LIBXML" != "yes"; then
         AC_CHECK_HEADERS([uuid/uuid.h],[                        XML_LIBS="-L$WITH_LIBXML/.libs -lxml2"
                 UUID_LIBS=-luuid                        XML_CFLAGS="-I$WITH_LIBXML/include"
                 AC_DEFINE([HAVE_UUID], [1], [libuuid])                else
                 AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available])                        PKG_CHECK_MODULES(XML, libxml-2.0)
         ])                fi
 ]) 
   
 fi    if test x"$XML_LIBS" != x; then
       AC_DEFINE([HAVE_LIBXML2], [1], [libxml2])
       AC_DEFINE([HAVE_LIBXML_H], [1], [libxml.h])
       AC_SUBST(XML_LIBS)
       AC_SUBST(XML_CFLAGS)
     else
       AC_MSG_ERROR([libxml2-headers and/or libs were not found, install them or build with --without-webdav-props])
     fi
   fi
 
   AC_MSG_CHECKING(for sqlite)
   AC_ARG_WITH(sqlite, AC_HELP_STRING([--with-sqlite],[sqlite for properties in mod_webdav]),
   [WITH_SQLITE=$withval],[WITH_SQLITE=yes])
   AC_MSG_RESULT([$WITH_SQLITE])
 
   if test "$WITH_SQLITE" != "no"; then
                 if test "$WITH_SQLITE" != "yes"; then
                         SQLITE_LIBS="-L$WITH_SQLITE/.libs -lsqlite3"
                         SQLITE_CFLAGS="-I$WITH_SQLITE"
                 else
                         PKG_CHECK_MODULES(SQLITE, sqlite3)
                 fi
 
     if test x"$SQLITE_LIBS" != x; then
       AC_DEFINE([HAVE_SQLITE3], [1], [libsqlite3])
       AC_DEFINE([HAVE_SQLITE3_H], [1], [sqlite3.h])
       AC_SUBST(SQLITE_LIBS)
       AC_SUBST(SQLITE_CFLAGS)
     else
       AC_MSG_ERROR([sqlite-headers and/or libs were not found, install them or build with --without-webdav-props])
     fi
   fi
 
   AC_MSG_CHECKING(for locks in mod_webdav)
   AC_ARG_WITH(webdav-locks, AC_HELP_STRING([--with-webdav-locks],[locks in mod_webdav]),
   [WITH_WEBDAV_LOCKS=$withval],[WITH_WEBDAV_LOCKS=no])
   AC_MSG_RESULT([$WITH_WEBDAV_LOCKS])
 
   if test "$WITH_WEBDAV_LOCKS" != "no"; then
 
     AC_MSG_CHECKING(for libuuid)
     AC_ARG_WITH(uuid, AC_HELP_STRING([--with-uuid],[uuid for locks in mod_webdav]),
     [WITH_UUID=$withval],[WITH_UUID=yes])
     AC_MSG_RESULT([$WITH_UUID])
 
     if test "$WITH_UUID" != "no"; then
                 if test "$WITH_UUID" != "yes"; then
                         UUID_LIBS="-L$WITH_UUID -luuid"
                         CPPFLAGS="$CPPFLAGS -I$WITH_UUID"
                 else
                         AC_CHECK_LIB(uuid, uuid_unparse, [
                           AC_CHECK_HEADERS([uuid/uuid.h],[UUID_LIBS=-luuid])
                         ])
                 fi
 
       if test x"$UUID_LIBS" != x; then
         AC_DEFINE([HAVE_UUID], [1], [libuuid])
         AC_DEFINE([HAVE_UUID_H], [1], [uuid/uuid.h is available])
         AC_SUBST(UUID_LIBS)
       else
         AC_MSG_ERROR([uuid-headers and/or libs were not found, install them or build with --without-webdav-locks])
       fi
     fi
 
   fi
 
 fi  fi
 AC_SUBST(UUID_LIBS)  
   
 dnl Check for gdbm  dnl Check for gdbm
 AC_MSG_CHECKING(for gdbm)  AC_MSG_CHECKING(for gdbm)
Line 431  AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm s Line 572  AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm s
 AC_MSG_RESULT([$WITH_GDBM])  AC_MSG_RESULT([$WITH_GDBM])
   
 if test "$WITH_GDBM" != "no"; then  if test "$WITH_GDBM" != "no"; then
 AC_CHECK_LIB(gdbm, gdbm_open, [                if test "$WITH_GDBM" != "yes"; then
         AC_CHECK_HEADERS([gdbm.h],[                        GDBM_LIB="-L$WITH_GDBM -lgdbm"
                 GDBM_LIB=-lgdbm                        CPPFLAGS="$CPPFLAGS -I$WITH_GDBM"
                 AC_DEFINE([HAVE_GDBM], [1], [libgdbm])                else
                 AC_DEFINE([HAVE_GDBM_H], [1])                        AC_CHECK_LIB(gdbm, gdbm_open, [
         ])                          AC_CHECK_HEADERS([gdbm.h],[GDBM_LIB=-lgdbm])
 ])                        ])
 AC_SUBST(GDBM_LIB)                fi
 
   if test x"$GDBM_LIB" != x; then
     AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
     AC_DEFINE([HAVE_GDBM_H], [1])
     AC_SUBST(GDBM_LIB)
   else
     AC_MSG_ERROR([gdbm headers and/or libs were not found, install them or build with --without-gdbm])
   fi
 fi  fi
   
dnl Check for memcachednl Check for memcached
AC_MSG_CHECKING(for memcache)AC_MSG_CHECKING(for memcached)
AC_ARG_WITH(memcache, AC_HELP_STRING([--with-memcache],[memcached storage for mod_trigger_b4_dl]),AC_ARG_WITH(memcached, AC_HELP_STRING([--with-memcached],[memcached storage for mod_trigger_b4_dl]),
[WITH_MEMCACHE=$withval],[WITH_MEMCACHE=no])[WITH_MEMCACHED=$withval],[WITH_MEMCACHED=no])
AC_MSG_RESULT([$WITH_MEMCACHE])AC_MSG_RESULT([$WITH_MEMCACHED])
if test "$WITH_MEMCACHE" != "no"; then
 AC_CHECK_LIB(memcache, mc_new, [if test "$WITH_MEMCACHED" != "no"; then
         AC_CHECK_HEADERS([memcache.h],[                if test "$WITH_MEMCACHED" != "yes"; then
                 MEMCACHE_LIB=-lmemcache                        MEMCACHED_LIB="-L$WITH_MEMCACHED -lMEMCACHED"
                 AC_DEFINE([HAVE_MEMCACHE], [1], [libmemcache])                        CPPFLAGS="$CPPFLAGS -I$WITH_MEMCACHED"
                 AC_DEFINE([HAVE_MEMCACHE_H], [1], [memcache.h])                else
         ])                        AC_CHECK_LIB(memcached, memcached, [
 ])                          AC_CHECK_HEADERS([libmemcached/memcached.h],[
 AC_SUBST(MEMCACHE_LIB)                            MEMCACHED_LIB=-lmemcached
                           ])
                         ])
                 fi
 
   if test x"$MEMCACHED_LIB" != x; then
     AC_DEFINE([USE_MEMCACHED], [1], [libmemcached])
     AC_SUBST(MEMCACHED_LIB)
   else
     AC_MSG_ERROR([memcached headers and/or libs were not found, install them or build with --without-memcached])
   fi
 fi  fi
   
 dnl Check for lua  dnl Check for lua
Line 464  AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engi Line 623  AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engi
   
 AC_MSG_RESULT($WITH_LUA)  AC_MSG_RESULT($WITH_LUA)
 if test "$WITH_LUA" != "no"; then  if test "$WITH_LUA" != "no"; then
 if test "$WITH_LUA" = "yes"; then  found_lua=0
  WITH_LUA=lua  if test "$WITH_LUA" != "yes"; then
 fi    PKG_CHECK_MODULES(LUA, $WITH_LUA >= 5.1, [
 dnl first check for lua5.1 (debian and others), then lua-5.1 (freebsd), then $WITH_LUA (defaults to lua)      found_lua=1
 dnl check "lua" last now that lua5.2 is out    ],[
 PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [      AC_MSG_NOTICE([Couldn't find requested lua pkg-config module $WITH_LUA])
  AC_DEFINE([HAVE_LUA], [1], [liblua])    ])
  AC_DEFINE([HAVE_LUA_H], [1], [lua.h])    if test "$found_lua" = "0"; then
 ],[      LUA_LIBS="-L$WITH_LUA -llua"
  PKG_CHECK_MODULES(LUA, lua-5.1 >= 5.1, [      LUA_CFLAGS="-I$WITH_LUA"
   AC_DEFINE([HAVE_LUA], [1], [liblua])    fi
   AC_DEFINE([HAVE_LUA_H], [1], [lua.h])  else
  ],[    for luaname in lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua; do
   PKG_CHECK_MODULES(LUA, $WITH_LUA >= 5.1, [      if test "$found_lua" = "0"; then
         PKG_CHECK_MODULES(LUA, $luaname >= 5.1, [
           found_lua=1
         ], [
           AC_MSG_NOTICE([Couldn't find $luaname])
         ])
       fi
     done
     if test "$found_lua" = "0"; then
       AC_MSG_ERROR([Couldn't find any lua pkg-config module])
     fi
   fi
 
   if test x"$LUA_LIBS" != x; then
     AC_DEFINE([HAVE_LUA], [1], [liblua])      AC_DEFINE([HAVE_LUA], [1], [liblua])
     AC_DEFINE([HAVE_LUA_H], [1], [lua.h])      AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
   ])    AC_SUBST(LUA_LIBS)
  ])    AC_SUBST(LUA_CFLAGS)
 ])  else
    AC_MSG_ERROR([lua headers and/or libs were not found, install them or build with --without-lua])
 AC_SUBST(LUA_CFLAGS)  fi
 AC_SUBST(LUA_LIBS) 
 fi  fi
   
   dnl search for crypt_r and (fallback) for crypt
 save_LIBS=$LIBS  save_LIBS=$LIBS
AC_SEARCH_LIBS(crypt,crypt,[LIBS=
 AC_SEARCH_LIBS([crypt_r],[crypt],[
   AC_DEFINE([HAVE_CRYPT_R], [1], [crypt_r])
   AC_CHECK_HEADERS([crypt.h],[    AC_CHECK_HEADERS([crypt.h],[
    AC_DEFINE([HAVE_CRYPT_H], [1])    AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
   ])    ])
   
  AC_DEFINE([HAVE_LIBCRYPT], [1], [libcrypt])  CRYPT_LIB=$LIBS
  if test "$ac_cv_search_crypt" != no; then],[
    test "$ac_cv_search_crypt" = "none required" || CRYPT_LIB="$ac_cv_search_crypt"  AC_SEARCH_LIBS([crypt],[crypt],[
  fi    AC_DEFINE([HAVE_CRYPT], [1], [crypt])
     AC_CHECK_HEADERS([crypt.h],[
       AC_DEFINE([HAVE_CRYPT_H], [1], [crypt.h])
     ])
 
     CRYPT_LIB=$LIBS
   ])
 ])  ])
 LIBS=$save_LIBS  LIBS=$save_LIBS
AC_SUBST(CRYPT_LIB)AC_SUBST([CRYPT_LIB])
   
 save_LIBS=$LIBS  save_LIBS=$LIBS
 AC_SEARCH_LIBS(sendfilev,sendfile,[  AC_SEARCH_LIBS(sendfilev,sendfile,[
Line 517  case $host_os in Line 697  case $host_os in
         * ) ;;          * ) ;;
 esac  esac
   
AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop inet_pton issetugid memset mmap munmap strchr \
                   strdup strerror strstr strtol sendfile  getopt socket lstat \                    strdup strerror strstr strtol sendfile  getopt socket lstat \
                   gethostbyname poll epoll_ctl getrlimit chroot \                    gethostbyname poll epoll_ctl getrlimit chroot \
                   getuid select signal pathconf madvise posix_fadvise posix_madvise \                    getuid select signal pathconf madvise posix_fadvise posix_madvise \
                  writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r])                  writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r \
                   memset_s explicit_bzero clock_gettime])
   
   AC_MSG_CHECKING(if weak symbols are supported)
   AC_LINK_IFELSE([AC_LANG_PROGRAM([[
                   __attribute__((weak)) void __dummy(void *x) { }
                   void f(void *x) { __dummy(x); }
           ]])],
           [
                   AC_MSG_RESULT(yes)
                   AC_DEFINE([HAVE_WEAK_SYMBOLS], [1], [weak symbols are supported])
           ],[AC_MSG_RESULT(no)])
   
 AC_MSG_CHECKING(for Large File System support)  AC_MSG_CHECKING(for Large File System support)
 AC_ARG_ENABLE(lfs,  AC_ARG_ENABLE(lfs,
  AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),   AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
Line 613  AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_fou Line 804  AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_fou
   
 dnl check for extra compiler options (warning options)  dnl check for extra compiler options (warning options)
 if test "${GCC}" = "yes"; then  if test "${GCC}" = "yes"; then
    CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic -std=gnu99"  TRY_CFLAGS([-Wall -W -Wshadow -pedantic])
   TRY_CFLAGS([-std=gnu99])
 fi  fi
   
 AC_ARG_ENABLE(extra-warnings,  AC_ARG_ENABLE(extra-warnings,
Line 625  AC_ARG_ENABLE(extra-warnings, Line 817  AC_ARG_ENABLE(extra-warnings,
   esac],[extrawarnings=false])    esac],[extrawarnings=false])
   
 if test x$extrawarnings = xtrue; then  if test x$extrawarnings = xtrue; then
    CFLAGS="${CFLAGS} -g -O2 -g2 -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wno-pointer-sign -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wl,--as-needed -Wformat-security"  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])
   TRY_LDFLAGS([-Wl,--as-needed])
 fi  fi
   
 dnl build version-id  dnl build version-id
Line 653  AC_OUTPUT Line 846  AC_OUTPUT
   
   
 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_status mod_accesslog"  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_status mod_accesslog"
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"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"
   
plugins="mod_rewrite mod_redirect mod_ssi mod_trigger_b4_dl"plugins="mod_rewrite mod_redirect mod_trigger_b4_dl"
 features="regex-conditionals"  features="regex-conditionals"
 if test ! "x$PCRE_LIB" = x; then  if test ! "x$PCRE_LIB" = x; then
         do_build="$do_build $plugins"          do_build="$do_build $plugins"
Line 686  else Line 879  else
         disable_feature="$disable_feature $features"          disable_feature="$disable_feature $features"
 fi  fi
   
features="storage-memcache"features="storage-memcached"
if test ! "x$MEMCACHE_LIB" = x; thenif test ! "x$MEMCACHED_LIB" = x; then
         enable_feature="$enable_feature $features"          enable_feature="$enable_feature $features"
 else  else
         disable_feature="$disable_feature $features"          disable_feature="$disable_feature $features"

Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>