2005-02-20 14:27:00 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ(2.57)
|
2005-10-31 09:07:55 +00:00
|
|
|
AC_INIT(lighttpd, 1.4.7, jan@kneschke.de)
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/server.c])
|
|
|
|
|
|
|
|
AC_CANONICAL_TARGET
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
2005-02-28 10:36:12 +00:00
|
|
|
AC_CONFIG_HEADER([config.h])
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
AM_MAINTAINER_MODE
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_LD
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_AWK
|
|
|
|
AC_PROG_CPP
|
|
|
|
dnl AC_PROG_CXX
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
|
|
|
|
dnl check environment
|
|
|
|
AC_AIX
|
|
|
|
AC_ISC_POSIX
|
|
|
|
AC_MINIX
|
|
|
|
|
|
|
|
dnl AC_CANONICAL_HOST
|
|
|
|
case $host_os in
|
|
|
|
*darwin*|*cygwin*|*aix*|*mingw* ) NO_RDYNAMIC=yes;;
|
|
|
|
* ) NO_RDYNAMIC=no;;
|
|
|
|
esac
|
|
|
|
AM_CONDITIONAL(NO_RDYNAMIC, test x$NO_RDYNAMIC = xyes)
|
|
|
|
|
|
|
|
AC_EXEEXT
|
|
|
|
|
|
|
|
dnl more automake stuff
|
|
|
|
AM_C_PROTOTYPES
|
|
|
|
|
|
|
|
dnl libtool
|
|
|
|
AC_DISABLE_STATIC
|
|
|
|
AC_ENABLE_SHARED
|
|
|
|
|
|
|
|
AC_LIBTOOL_DLOPEN
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
|
2005-09-30 08:53:03 +00:00
|
|
|
dnl for solaris
|
|
|
|
CPPFLAGS="${CPPFLAGS} -D_REENTRANT -D__EXTENSIONS__"
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
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 \
|
|
|
|
getopt.h sys/epoll.h sys/select.h poll.h sys/poll.h sys/devpoll.h sys/filio.h \
|
2005-10-15 14:29:11 +00:00
|
|
|
sys/mman.h sys/event.h sys/port.h pwd.h sys/syslimits.h \
|
2005-02-20 14:27:00 +00:00
|
|
|
sys/resource.h sys/un.h syslog.h])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_CHAR_UNSIGNED
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
AC_CHECK_MEMBER(struct tm.tm_gmtoff,AC_DEFINE([HAVE_STRUCT_TM_GMTOFF],[1],[gmtoff in struct tm]),,[#include <time.h>])
|
|
|
|
AC_CHECK_TYPES(struct sockaddr_storage,,,[#include <sys/socket.h>])
|
|
|
|
AC_CHECK_TYPES(socklen_t,,,[#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>])
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_FORK
|
|
|
|
dnl AC_FUNC_MALLOC
|
|
|
|
#AC_FUNC_MMAP
|
|
|
|
dnl AC_FUNC_REALLOC
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_STAT
|
|
|
|
AC_FUNC_STRFTIME
|
|
|
|
|
|
|
|
dnl Checks for database.
|
|
|
|
MYSQL_INCLUDE=""
|
2005-08-15 15:30:16 +00:00
|
|
|
MYSQL_LIBS=""
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for MySQL support)
|
|
|
|
AC_ARG_WITH(mysql,
|
|
|
|
AC_HELP_STRING([--with-mysql@<:@=PATH@:>@],[Include MySQL support. PATH is the path to 'mysql_config']),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_MYSQL=$withval],[WITH_MYSQL=no])
|
2005-08-15 15:30:16 +00:00
|
|
|
|
|
|
|
if test "$WITH_MYSQL" != "no"; then
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2005-08-15 15:30:16 +00:00
|
|
|
if test "$WITH_MYSQL" = "yes"; then
|
|
|
|
AC_PATH_PROG(MYSQL_CONFIG, mysql_config)
|
2005-02-20 14:27:00 +00:00
|
|
|
else
|
2005-08-15 15:30:16 +00:00
|
|
|
MYSQL_CONFIG=$WITH_MYSQL
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
2005-08-15 15:30:16 +00:00
|
|
|
|
|
|
|
if test "$MYSQL_CONFIG" = ""; then
|
|
|
|
AC_MSG_ERROR(mysql_config is not found)
|
|
|
|
fi
|
|
|
|
if test \! -x $MYSQL_CONFIG; then
|
|
|
|
AC_MSG_ERROR(mysql_config not exists or not executable, use --with-mysql=path-to-mysql_config)
|
|
|
|
fi
|
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
if $MYSQL_CONFIG | grep -- '--include' > /dev/null ; then
|
2005-08-15 15:30:16 +00:00
|
|
|
MYSQL_INCLUDE="`$MYSQL_CONFIG --include | sed s/\'//g`"
|
|
|
|
else
|
|
|
|
MYSQL_INCLUDE="`$MYSQL_CONFIG --cflags | sed s/\'//g`"
|
|
|
|
fi
|
|
|
|
MYSQL_LIBS="`$MYSQL_CONFIG --libs | sed s/\'//g`"
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for MySQL includes at)
|
|
|
|
AC_MSG_RESULT($MYSQL_INCLUDE)
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for MySQL libraries at)
|
|
|
|
AC_MSG_RESULT($MYSQL_LIBS)
|
|
|
|
dnl check for errmsg.h, which isn't installed by some versions of 3.21
|
|
|
|
old_CPPFLAGS="$CPPFLAGS"
|
|
|
|
CPPFLAGS="$CPPFLAGS $MYSQL_INCLUDE"
|
|
|
|
AC_CHECK_HEADERS(errmsg.h mysql.h)
|
|
|
|
CPPFLAGS="$old_CPPFLAGS"
|
|
|
|
|
|
|
|
AC_DEFINE([HAVE_MYSQL], [1], [mysql support])
|
2005-08-21 20:39:40 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
2005-08-15 15:30:16 +00:00
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
AC_SUBST(MYSQL_LIBS)
|
|
|
|
AC_SUBST(MYSQL_INCLUDE)
|
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for LDAP
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_MSG_CHECKING(for LDAP support)
|
|
|
|
AC_ARG_WITH(ldap, AC_HELP_STRING([--with-ldap],[enable LDAP support]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_LDAP=$withval], [WITH_LDAP=no])
|
|
|
|
AC_MSG_RESULT([$withval])
|
|
|
|
if test "$WITH_LDAP" != "no"; then
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_CHECK_LIB(ldap, ldap_bind, [
|
|
|
|
AC_CHECK_HEADERS([ldap.h],[
|
|
|
|
LDAP_LIB=-lldap
|
|
|
|
AC_DEFINE([HAVE_LIBLDAP], [1], [libldap])
|
|
|
|
AC_DEFINE([HAVE_LDAP_H], [1])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
AC_SUBST(LDAP_LIB)
|
|
|
|
AC_CHECK_LIB(lber, ber_printf, [
|
|
|
|
AC_CHECK_HEADERS([lber.h],[
|
|
|
|
LBER_LIB=-llber
|
|
|
|
AC_DEFINE([HAVE_LIBLBER], [1], [liblber])
|
|
|
|
AC_DEFINE([HAVE_LBER_H], [1])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
AC_SUBST(LBER_LIB)
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for xattr
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_MSG_CHECKING(for extended attributes support)
|
|
|
|
AC_ARG_WITH(attr, AC_HELP_STRING([--with-attr],[enable extended attribute support]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_ATTR=$withval],[WITH_ATTR=no])
|
|
|
|
AC_MSG_RESULT($withval)
|
|
|
|
if test "$WITH_ATTR" != "no"; then
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_CHECK_LIB(attr, attr_get, [
|
|
|
|
AC_CHECK_HEADERS([attr/attributes.h],[
|
|
|
|
ATTR_LIB=-lattr
|
|
|
|
AC_DEFINE([HAVE_XATTR], [1], [libattr])
|
|
|
|
AC_DEFINE([HAVE_ATTR_ATTRIBUTES_H], [1])
|
|
|
|
])
|
|
|
|
])
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_SUBST(ATTR_LIB)
|
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2005-10-31 09:07:55 +00:00
|
|
|
## openssl on solaris needs -lsocket -lnsl
|
|
|
|
AC_SEARCH_LIBS(socket,socket)
|
|
|
|
AC_SEARCH_LIBS(gethostbyname,nsl socket)
|
|
|
|
AC_SEARCH_LIBS(hstrerror,resolv)
|
|
|
|
|
|
|
|
save_LIBS=$LIBS
|
|
|
|
AC_SEARCH_LIBS(dlopen,dl,[
|
|
|
|
AC_CHECK_HEADERS([dlfcn.h],[
|
|
|
|
if test "$ac_cv_search_dlopen" != no; then
|
|
|
|
test "$ac_cv_search_dlopen" = "none required" || DL_LIB="$ac_cv_search_dlopen"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE([HAVE_LIBDL], [1], [libdl])
|
|
|
|
AC_DEFINE([HAVE_DLFCN_H], [1])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
LIBS=$save_LIBS
|
|
|
|
AC_SUBST(DL_LIB)
|
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for valgrind
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_MSG_CHECKING(for valgrind)
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind],[enable internal support for valgrind]),
|
|
|
|
[WITH_VALGRIND=$withval],[WITH_VALGRIND=no])
|
|
|
|
AC_MSG_RESULT([$WITH_VALGRIND])
|
|
|
|
if test "$WITH_VALGRIND" != "no"; then
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_CHECK_HEADERS([valgrind/valgrind.h])
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for openssl
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_MSG_CHECKING(for OpenSSL)
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_ARG_WITH(openssl,
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[Include openssl support (default no)]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_OPENSSL=$withval],[WITH_OPENSSL=no])
|
|
|
|
|
|
|
|
if test "$WITH_OPENSSL" != "no"; then
|
|
|
|
use_openssl=yes
|
|
|
|
if test "$WITH_OPENSSL" != "yes"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$WITH_OPENSSL/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L$WITH_OPENSSL/lib"
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
2005-08-21 20:39:40 +00:00
|
|
|
else
|
2005-02-20 14:27:00 +00:00
|
|
|
use_openssl=no
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
|
|
|
AC_MSG_RESULT([$use_openssl])
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_ARG_WITH(openssl-includes,
|
|
|
|
AC_HELP_STRING([--with-openssl-includes=DIR],[OpenSSL includes]),
|
|
|
|
[ use_openssl=yes CPPFLAGS="$CPPFLAGS -I$withval" ]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(openssl-libs,
|
|
|
|
AC_HELP_STRING([--with-openssl-libs=DIR],[OpenSSL libraries]),
|
|
|
|
[ use_openssl=yes LDFLAGS="$LDFLAGS -L$withval" ]
|
|
|
|
)
|
|
|
|
|
2005-10-31 09:07:55 +00:00
|
|
|
AC_ARG_WITH(kerberos5,
|
|
|
|
AC_HELP_STRING([--with-berberos5],[use Kerberos5 support with OpenSSL]),
|
|
|
|
[ use_kerberos=yes ], [use_kerberos=no]
|
|
|
|
)
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if test "x$use_openssl" = "xyes"; then
|
2005-10-31 09:07:55 +00:00
|
|
|
if test "x$use_kerberos" != "xyes"; then
|
|
|
|
CPPFLAGS="$CPPFLAGS -DOPENSSL_NO_KRB5"
|
|
|
|
fi
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_CHECK_HEADERS([openssl/ssl.h])
|
|
|
|
OLDLIBS="$LIBS"
|
|
|
|
AC_CHECK_LIB(crypto, BIO_f_base64, [
|
|
|
|
AC_CHECK_LIB(ssl, SSL_new, [ SSL_LIB="-lssl -lcrypto"
|
2005-10-31 09:07:55 +00:00
|
|
|
AC_DEFINE(HAVE_LIBSSL, [], [Have libssl]) ], [], [ -lcrypto "$DL_LIB" ])
|
2005-02-20 14:27:00 +00:00
|
|
|
], [], [])
|
|
|
|
LIBS="$OLDLIBS"
|
|
|
|
AC_SUBST(SSL_LIB)
|
|
|
|
fi
|
|
|
|
|
2005-08-29 12:06:45 +00:00
|
|
|
AC_MSG_CHECKING(for perl regular expressions support)
|
|
|
|
AC_ARG_WITH(pcre, AC_HELP_STRING([--with-pcre],[Enable pcre support (default yes)]),
|
|
|
|
[WITH_PCRE=$withval],[WITH_PCRE=yes])
|
|
|
|
AC_MSG_RESULT([$WITH_PCRE])
|
|
|
|
|
|
|
|
if test "x$cross_compiling" = xno -a "$WITH_PCRE" != "no"; then
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_PATH_PROG(PCRECONFIG, pcre-config)
|
|
|
|
|
|
|
|
if test x"$PCRECONFIG" != x; then
|
|
|
|
PCRE_LIB=`$PCRECONFIG --libs`
|
|
|
|
CPPFLAGS="$CPPFLAGS `$PCRECONFIG --cflags`"
|
|
|
|
OLDLIBS="$LIBS"
|
|
|
|
LIBS="$LIBS $PCRE_LIB"
|
|
|
|
AC_CHECK_LIB(pcre, pcre_compile, [
|
|
|
|
AC_CHECK_HEADERS([pcre.h], [
|
|
|
|
AC_DEFINE([HAVE_LIBPCRE], [1], [libpcre])
|
|
|
|
AC_DEFINE([HAVE_PCRE_H], [1])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
LIBS="$OLDLIBS"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(PCRE_LIB)
|
|
|
|
|
|
|
|
AC_CHECK_LIB(z, deflate, [
|
|
|
|
AC_CHECK_HEADERS([zlib.h],[
|
|
|
|
Z_LIB=-lz
|
|
|
|
AC_DEFINE([HAVE_LIBZ], [1], [libz])
|
|
|
|
AC_DEFINE([HAVE_ZLIB_H], [1])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
AC_SUBST(Z_LIB)
|
|
|
|
|
2005-08-29 12:06:45 +00:00
|
|
|
AC_MSG_CHECKING(for bzip2 support)
|
|
|
|
AC_ARG_WITH(bzip2, AC_HELP_STRING([--with-bzip2],[Enable bzip2 support for mod_compress]),
|
|
|
|
[WITH_BZIP2=$withval],[WITH_BZIP2=yes])
|
|
|
|
AC_MSG_RESULT([$WITH_BZIP2])
|
|
|
|
|
|
|
|
if test "$WITH_BZIP2" != "no"; then
|
|
|
|
AC_CHECK_LIB(bz2, BZ2_bzCompress, [
|
|
|
|
AC_CHECK_HEADERS([bzlib.h],[
|
|
|
|
BZ_LIB=-lbz2
|
|
|
|
AC_DEFINE([HAVE_LIBBZ2], [1], [libbz2])
|
|
|
|
AC_DEFINE([HAVE_BZLIB_H], [1])
|
|
|
|
])
|
2005-02-20 14:27:00 +00:00
|
|
|
])
|
2005-08-29 12:06:45 +00:00
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
AC_SUBST(BZ_LIB)
|
|
|
|
|
2005-08-19 11:15:14 +00:00
|
|
|
if test -z "$PKG_CONFIG"; then
|
|
|
|
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
|
|
|
fi
|
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for gamin
|
2005-08-25 17:37:17 +00:00
|
|
|
AC_MSG_CHECKING(for FAM)
|
|
|
|
AC_ARG_WITH(fam, AC_HELP_STRING([--with-fam],[fam/gamin for reducing number of stat() calls]),
|
|
|
|
[WITH_FAM=$withval],[WITH_FAM=no])
|
|
|
|
AC_MSG_RESULT([$WITH_FAM])
|
|
|
|
|
|
|
|
if test "$WITH_FAM" != "no"; then
|
|
|
|
AC_CHECK_LIB(fam, FAMOpen2, [
|
|
|
|
AC_CHECK_HEADERS([fam.h],[
|
|
|
|
FAM_LIBS=-lfam
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
|
|
|
|
AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
|
2005-08-25 17:37:17 +00:00
|
|
|
])
|
|
|
|
])
|
|
|
|
if test "x$FAM_LIBS" = x; then
|
|
|
|
PKG_CHECK_MODULES(FAM, gamin >= 0.1.0, [
|
|
|
|
AC_DEFINE([HAVE_LIBFAM], [1], [libfam])
|
|
|
|
AC_DEFINE([HAVE_FAM_H], [1], [fam.h])
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
OLD_LIBS=$LIBS
|
|
|
|
LIBS=$FAM_LIBS
|
|
|
|
AC_CHECK_FUNCS([FAMNoExists])
|
|
|
|
LIBS=$OLD_LIBS
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
2005-08-08 13:45:45 +00:00
|
|
|
|
2005-08-20 19:10:44 +00:00
|
|
|
AC_MSG_CHECKING(for properties in mod_webdav)
|
|
|
|
AC_ARG_WITH(webdav-props, AC_HELP_STRING([--with-webdav-props],[properties in mod_webdav]),
|
2005-08-22 10:56:06 +00:00
|
|
|
[WITH_WEBDAV_PROPS=$withval],[WITH_WEBDAV_PROPS=no])
|
|
|
|
AC_MSG_RESULT([$WITH_WEBDAV_PROPS])
|
|
|
|
|
|
|
|
if test "$WITH_WEBDAV_PROPS" != "no"; then
|
2005-08-20 19:10:44 +00:00
|
|
|
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])
|
|
|
|
])
|
2005-08-22 10:56:06 +00:00
|
|
|
fi
|
2005-07-07 22:48:42 +00:00
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for gdbm
|
2005-07-07 22:48:42 +00:00
|
|
|
AC_MSG_CHECKING(for gdbm)
|
|
|
|
AC_ARG_WITH(gdbm, AC_HELP_STRING([--with-gdbm],[gdbm storage for mod_trigger_b4_dl]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_GDBM=$withval],[WITH_GDBM=no])
|
|
|
|
AC_MSG_RESULT([$WITH_GDBM])
|
|
|
|
|
|
|
|
if test "$WITH_GDBM" != "no"; then
|
2005-07-07 22:48:42 +00:00
|
|
|
AC_CHECK_LIB(gdbm, gdbm_open, [
|
|
|
|
AC_CHECK_HEADERS([gdbm.h],[
|
|
|
|
GDBM_LIB=-lgdbm
|
|
|
|
AC_DEFINE([HAVE_GDBM], [1], [libgdbm])
|
|
|
|
AC_DEFINE([HAVE_GDBM_H], [1])
|
|
|
|
])
|
|
|
|
])
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_SUBST(GDBM_LIB)
|
|
|
|
fi
|
2005-07-07 22:48:42 +00:00
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
dnl Check for memcache
|
2005-07-10 06:25:10 +00:00
|
|
|
AC_MSG_CHECKING(for memcache)
|
|
|
|
AC_ARG_WITH(memcache, AC_HELP_STRING([--with-memcache],[memcached storage for mod_trigger_b4_dl]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_MEMCACHE=$withval],[WITH_MEMCACHE=no])
|
|
|
|
AC_MSG_RESULT([$WITH_MEMCACHE])
|
|
|
|
if test "$WITH_MEMCACHE" != "no"; then
|
2005-07-07 22:48:42 +00:00
|
|
|
AC_CHECK_LIB(memcache, mc_new, [
|
|
|
|
AC_CHECK_HEADERS([memcache.h],[
|
|
|
|
MEMCACHE_LIB=-lmemcache
|
|
|
|
AC_DEFINE([HAVE_MEMCACHE], [1], [libmemcache])
|
2005-08-20 19:10:44 +00:00
|
|
|
AC_DEFINE([HAVE_MEMCACHE_H], [1], [memcache.h])
|
2005-07-07 22:48:42 +00:00
|
|
|
])
|
|
|
|
])
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_SUBST(MEMCACHE_LIB)
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Check for lua
|
2005-07-15 17:46:13 +00:00
|
|
|
AC_MSG_CHECKING(for lua)
|
|
|
|
AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua engine for mod_cml]),
|
2005-08-21 20:39:40 +00:00
|
|
|
[WITH_LUA=$withval],[WITH_LUA=no])
|
|
|
|
|
|
|
|
AC_MSG_RESULT($WITH_LUA)
|
|
|
|
if test "$WITH_LUA" != "no"; then
|
2005-08-20 19:10:44 +00:00
|
|
|
AC_PATH_PROG(LUACONFIG, lua-config)
|
2005-09-06 09:48:17 +00:00
|
|
|
|
2005-08-20 19:10:44 +00:00
|
|
|
if test x"$LUACONFIG" != x; then
|
|
|
|
LUA_CFLAGS=`$LUACONFIG --include`
|
2005-09-06 09:48:17 +00:00
|
|
|
LUA_LIBS=`$LUACONFIG --libs --extralibs`
|
|
|
|
AC_DEFINE([HAVE_LUA], [1], [liblua])
|
|
|
|
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
|
2005-08-20 19:10:44 +00:00
|
|
|
else
|
|
|
|
AC_CHECK_LIB(lua, lua_open, [
|
2005-09-06 09:48:17 +00:00
|
|
|
AC_CHECK_HEADERS([lua.h],[
|
|
|
|
LUA_LIBS="-llua -llualib"
|
|
|
|
AC_DEFINE([HAVE_LUA], [1], [liblua])
|
|
|
|
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
|
|
|
|
])
|
|
|
|
])
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test x"$LUA_LIBS" = x; then
|
|
|
|
# try pkgconfig
|
|
|
|
PKG_CHECK_MODULES(LUA, lua, [
|
|
|
|
AC_DEFINE([HAVE_LUA], [1], [liblua])
|
|
|
|
AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
|
2005-08-20 19:10:44 +00:00
|
|
|
])
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
2005-09-06 09:48:17 +00:00
|
|
|
|
2005-08-21 20:39:40 +00:00
|
|
|
AC_SUBST(LUA_CFLAGS)
|
2005-09-06 09:48:17 +00:00
|
|
|
AC_SUBST(LUA_LIBS)
|
2005-08-21 20:39:40 +00:00
|
|
|
fi
|
2005-07-15 17:46:13 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
save_LIBS=$LIBS
|
|
|
|
AC_SEARCH_LIBS(crypt,crypt,[
|
|
|
|
AC_CHECK_HEADERS([crypt.h],[
|
|
|
|
AC_DEFINE([HAVE_CRYPT_H], [1])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFINE([HAVE_LIBCRYPT], [1], [libcrypt])
|
|
|
|
if test "$ac_cv_search_crypt" != no; then
|
|
|
|
test "$ac_cv_search_crypt" = "none required" || CRYPT_LIB="$ac_cv_search_crypt"
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
LIBS=$save_LIBS
|
|
|
|
AC_SUBST(CRYPT_LIB)
|
|
|
|
|
|
|
|
save_LIBS=$LIBS
|
|
|
|
AC_SEARCH_LIBS(sendfilev,sendfile,[
|
|
|
|
if test "$ac_cv_search_sendfilev" != no; then
|
|
|
|
test "$ac_cv_search_sendfilev" = "none required" || SENDFILE_LIB="$ac_cv_search_sendfilev"
|
|
|
|
AC_DEFINE([HAVE_SENDFILEV], [1], [solaris sendfilev])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
LIBS=$save_LIBS
|
|
|
|
AC_SUBST(SENDFILE_LIB)
|
|
|
|
|
|
|
|
case $host_os in
|
|
|
|
*mingw* ) LIBS="$LIBS -lwsock32";;
|
|
|
|
* ) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop memset mmap munmap strchr \
|
|
|
|
strdup strerror strstr strtol sendfile getopt socket \
|
|
|
|
gethostbyname poll sigtimedwait epoll_ctl getrlimit chroot \
|
2005-10-31 20:31:26 +00:00
|
|
|
getuid select signal pathconf madvise\
|
2005-02-20 14:27:00 +00:00
|
|
|
writev sigaction sendfile64 send_file kqueue port_create localtime_r])
|
|
|
|
|
2005-06-26 10:36:32 +00:00
|
|
|
AC_MSG_CHECKING(for Large File System support)
|
|
|
|
AC_ARG_ENABLE(lfs,
|
|
|
|
AC_HELP_STRING([--enable-lfs],[Turn on Large File System (default)]),
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES" ;;
|
|
|
|
no) ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-lfs) ;;
|
2005-08-19 11:15:14 +00:00
|
|
|
esac],[CPPFLAGS="${CPPFLAGS} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGE_FILES"
|
|
|
|
enable_lfs=yes])
|
2005-06-26 10:36:32 +00:00
|
|
|
AC_MSG_RESULT($enableval)
|
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
AC_CHECK_SIZEOF(long)
|
|
|
|
AC_CHECK_SIZEOF(off_t)
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if test "x$ac_cv_func_sendfile" = xyes; then
|
|
|
|
# check if sendfile works
|
|
|
|
AC_MSG_CHECKING(if sendfile works)
|
|
|
|
if test "x$cross_compiling" = xno; then
|
|
|
|
AC_TRY_RUN([
|
2005-06-26 10:36:32 +00:00
|
|
|
#ifdef HAVE_SYS_SENDFILE_H
|
|
|
|
#include <sys/sendfile.h>
|
|
|
|
#endif /* HAVE_SYS_SENDFILE_H */
|
2005-02-20 14:27:00 +00:00
|
|
|
#include <errno.h>
|
|
|
|
int main() {
|
|
|
|
int o = 0;
|
2005-10-31 15:34:00 +00:00
|
|
|
if (-1 == sendfile(-1, 0, &o, 0) && errno == ENOSYS) return -1;
|
2005-02-20 14:27:00 +00:00
|
|
|
return 0;
|
|
|
|
} ],
|
|
|
|
AC_MSG_RESULT(yes),
|
|
|
|
[ AC_MSG_RESULT(no)
|
|
|
|
AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile]) ] )
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no, cross-compiling)
|
|
|
|
AC_DEFINE([HAVE_SENDFILE_BROKEN], [1], [broken sendfile])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl Check for IPv6 support
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(ipv6,
|
|
|
|
AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) ipv6=true ;;
|
|
|
|
no) ipv6=false ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-ipv6) ;;
|
|
|
|
esac],[ipv6=true])
|
|
|
|
|
|
|
|
if test x$ipv6 = xtrue; then
|
|
|
|
AC_CACHE_CHECK([for IPv6 support], ac_cv_ipv6_support,
|
|
|
|
[AC_TRY_LINK([ #include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netinet/in.h>], [struct sockaddr_in6 s; struct in6_addr t=in6addr_any; int i=AF_INET6; s; t.s6_addr[0] = 0; ],
|
|
|
|
[ac_cv_ipv6_support=yes], [ac_cv_ipv6_support=no])])
|
|
|
|
|
|
|
|
if test "$ac_cv_ipv6_support" = yes; then
|
|
|
|
AC_DEFINE(HAVE_IPV6,1,[Whether to enable IPv6 support])
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
AM_CONDITIONAL(CROSS_COMPILING, test "x$cross_compiling" = xyes)
|
|
|
|
|
2005-02-27 22:10:01 +00:00
|
|
|
dnl check for fastcgi lib, for the tests only
|
|
|
|
fastcgi_found=no
|
|
|
|
AC_CHECK_LIB(fcgi, FCGI_Accept, [
|
|
|
|
AC_CHECK_HEADERS([fastcgi.h],[
|
|
|
|
fastcgi_found=yes
|
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AM_CONDITIONAL(CHECK_WITH_FASTCGI, test "x$fastcgi_found" = xyes)
|
|
|
|
|
2005-02-20 14:27:00 +00:00
|
|
|
if test "${GCC}" = "yes"; then
|
|
|
|
CFLAGS="${CFLAGS} -Wall -W -Wshadow -pedantic"
|
|
|
|
fi
|
|
|
|
|
|
|
|
dnl build version-id
|
|
|
|
LIGHTTPD_VERSION_ID=`echo $PACKAGE_VERSION | $AWK -F '.' '{print "(" $1 " << 16 | " $2 " << 8 | " $3 ")"}'`
|
|
|
|
AC_DEFINE_UNQUOTED([LIGHTTPD_VERSION_ID], [$LIGHTTPD_VERSION_ID], [lighttpd-version-id])
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile debian/Makefile src/Makefile doc/Makefile tests/Makefile \
|
|
|
|
tests/docroot/Makefile \
|
|
|
|
tests/docroot/123/Makefile \
|
|
|
|
tests/docroot/www/Makefile \
|
|
|
|
tests/docroot/www/go/Makefile \
|
|
|
|
tests/docroot/www/indexfile/Makefile \
|
2005-03-01 10:55:47 +00:00
|
|
|
tests/docroot/www/expire/Makefile \
|
2005-02-20 14:27:00 +00:00
|
|
|
lighttpd.spec distribute.sh cygwin/Makefile cygwin/lighttpd.README
|
|
|
|
openwrt/Makefile openwrt/control openwrt/lighttpd.mk])
|
|
|
|
AC_OUTPUT
|
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
|
2005-08-19 11:15:14 +00:00
|
|
|
do_build="mod_cgi mod_fastcgi mod_proxy mod_evhost mod_simple_vhost mod_access mod_alias mod_setenv mod_usertrack mod_auth mod_status mod_accesslog mod_rrdtool mod_secdownload mod_expire mod_compress mod_dirlisting mod_indexfiles mod_userdir mod_webdav mod_staticfile mod_scgi"
|
2005-08-09 06:42:33 +00:00
|
|
|
|
2005-08-19 11:15:14 +00:00
|
|
|
plugins="mod_rewrite mod_redirect mod_ssi mod_trigger_b4_dl"
|
2005-08-09 06:42:33 +00:00
|
|
|
features="regex-conditionals"
|
2005-02-20 14:27:00 +00:00
|
|
|
if test ! "x$PCRE_LIB" = x; then
|
2005-08-09 06:42:33 +00:00
|
|
|
do_build="$do_build $plugins"
|
|
|
|
enable_feature="$features"
|
|
|
|
else
|
|
|
|
no_build="$no_build $plugins"
|
|
|
|
disable_feature="$features"
|
|
|
|
fi
|
|
|
|
|
|
|
|
plugins="mod_mysql_vhost"
|
|
|
|
if test ! "x$MYSQL_LIBS" = x; then
|
|
|
|
do_build="$do_build $plugins"
|
2005-02-20 14:27:00 +00:00
|
|
|
else
|
2005-08-09 06:42:33 +00:00
|
|
|
no_build="$no_build $plugins"
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
|
|
|
|
2005-08-19 11:15:14 +00:00
|
|
|
plugins="mod_cml"
|
2005-09-06 09:48:17 +00:00
|
|
|
if test ! "x$LUA_LIBS" = x; then
|
2005-08-09 06:42:33 +00:00
|
|
|
do_build="$do_build $plugins"
|
|
|
|
else
|
|
|
|
no_build="$no_build $plugins"
|
|
|
|
fi
|
|
|
|
|
2005-08-19 11:15:14 +00:00
|
|
|
features="storage-gdbm"
|
|
|
|
if test ! "x$GDBM_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
2005-08-21 20:39:40 +00:00
|
|
|
disable_feature="$disable_feature $features"
|
2005-08-19 11:15:14 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
features="storage-memcache"
|
|
|
|
if test ! "x$MEMCACHE_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
2005-08-21 20:39:40 +00:00
|
|
|
disable_feature="$disable_feature $features"
|
2005-08-19 11:15:14 +00:00
|
|
|
fi
|
2005-08-09 06:42:33 +00:00
|
|
|
|
|
|
|
features="compress-gzip compress-deflate"
|
|
|
|
if test ! "x$Z_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
|
|
|
|
|
|
|
features="compress-bzip2"
|
|
|
|
if test ! "x$BZ_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
2005-02-20 14:27:00 +00:00
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
features="auth-ldap"
|
|
|
|
if test ! "x$LDAP_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
else
|
2005-08-09 06:42:33 +00:00
|
|
|
disable_feature="$disable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
features="network-openssl"
|
|
|
|
if test ! "x$SSL_LIB" = x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
else
|
2005-08-09 06:42:33 +00:00
|
|
|
disable_feature="$disable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# no crypt call
|
2005-08-09 06:42:33 +00:00
|
|
|
features="auth-crypt"
|
2005-02-20 14:27:00 +00:00
|
|
|
if test "$ac_cv_search_crypt" = no; then
|
2005-08-09 06:42:33 +00:00
|
|
|
disable_feature="$disable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
else
|
2005-08-09 06:42:33 +00:00
|
|
|
enable_feature="$enable_feature $features"
|
2005-02-20 14:27:00 +00:00
|
|
|
fi
|
2005-08-09 06:42:33 +00:00
|
|
|
|
|
|
|
features="network-ipv6"
|
|
|
|
if test "$ac_cv_ipv6_support" = yes; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
|
|
|
|
|
|
|
features="large-files"
|
|
|
|
if test "$enable_lfs" = yes; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
|
|
|
|
2005-08-19 14:40:02 +00:00
|
|
|
features="stat-cache-fam"
|
2005-08-20 19:10:44 +00:00
|
|
|
if test ! "x$FAM_LIBS" = x; then
|
2005-08-19 14:40:02 +00:00
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
|
|
|
|
2005-08-20 19:10:44 +00:00
|
|
|
features="webdav-properties"
|
|
|
|
if test "x$XML_LIBS" \!= x -a "x$SQLITE_LIBS" \!= x; then
|
|
|
|
enable_feature="$enable_feature $features"
|
|
|
|
else
|
|
|
|
disable_feature="$disable_feature $features"
|
|
|
|
fi
|
2005-08-19 14:40:02 +00:00
|
|
|
|
2005-08-09 06:42:33 +00:00
|
|
|
## output
|
|
|
|
|
|
|
|
$ECHO
|
|
|
|
$ECHO "Plugins:"
|
|
|
|
$ECHO
|
|
|
|
|
|
|
|
$ECHO "enabled: "
|
|
|
|
for p in $do_build; do
|
|
|
|
$ECHO " $p"
|
2005-08-30 11:27:40 +00:00
|
|
|
done | sort
|
2005-08-09 06:42:33 +00:00
|
|
|
|
|
|
|
$ECHO "disabled: "
|
|
|
|
for p in $no_build; do
|
|
|
|
$ECHO " $p"
|
2005-08-30 11:27:40 +00:00
|
|
|
done | sort
|
2005-08-09 06:42:33 +00:00
|
|
|
|
|
|
|
$ECHO
|
|
|
|
$ECHO "Features:"
|
|
|
|
$ECHO
|
|
|
|
|
|
|
|
$ECHO "enabled: "
|
|
|
|
for p in $enable_feature; do
|
|
|
|
$ECHO " $p"
|
2005-08-30 11:27:40 +00:00
|
|
|
done | sort
|
2005-08-09 06:42:33 +00:00
|
|
|
|
|
|
|
$ECHO "disabled: "
|
|
|
|
for p in $disable_feature; do
|
|
|
|
$ECHO " $p"
|
2005-08-30 11:27:40 +00:00
|
|
|
done | sort
|
2005-02-20 14:27:00 +00:00
|
|
|
|
|
|
|
$ECHO
|