acinclude.m4 revision 5b43275cebfb0ff9961ac462f3a96f7fe612d327
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl APACHE_HELP_STRING(LHS, RHS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl Autoconf 2.50 can not handle substr correctly. It does have
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl AC_HELP_STRING, so let's try to call it if we can.
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl Note: this define must be on one line so that it can be properly returned
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl as the help string.
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_HELP_STRING,[ifelse(regexp(AC_ACVERSION, 2\.1), -1, AC_HELP_STRING($1,$2),[ ]$1 substr([ ],len($1))$2)])dnl
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl APACHE_SUBST(VARIABLE)
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl Makes VARIABLE available in generated files
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl (do not use @variable@ in Makefiles, but $(variable))
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_SUBST,[
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_VAR_SUBST="$APACHE_VAR_SUBST $1"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl AC_SUBST($1)
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl APACHE_FAST_OUTPUT(FILENAME)
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl Perform substitutions on FILENAME (Makefiles only)
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_FAST_OUTPUT,[
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_FAST_OUTPUT_FILES="$APACHE_FAST_OUTPUT_FILES $1"
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl APACHE_GEN_CONFIG_VARS
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_GEN_CONFIG_VARS,[
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(abs_srcdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(bindir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(sbindir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(cgidir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(logfiledir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(exec_prefix)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(datadir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(localstatedir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(mandir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(libdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(libexecdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(htdocsdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(manualdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(includedir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(errordir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(iconsdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(sysconfdir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(installbuilddir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(runtimedir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(proxycachedir)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(other_targets)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(progname)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(prefix)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(AWK)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CC)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CPP)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CXX)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CPPFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CXXFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(LTFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(LT_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(SH_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(HTTPD_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(UTIL_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(LIBS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(DEFS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(INCLUDES)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(NOTEST_CPPFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(NOTEST_CFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(NOTEST_CXXFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(NOTEST_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(NOTEST_LIBS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_CPPFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_CFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_CXXFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_LDFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_LIBS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(EXTRA_INCLUDES)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(INTERNAL_CPPFLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(LIBTOOL)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(SHELL)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(RSYNC)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(MODULE_DIRS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(MODULE_CLEANDIRS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(PORT)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(SSLPORT)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CORE_IMPLIB_FILE)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(CORE_IMPLIB)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(SH_LIBS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(SH_LIBTOOL)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(MK_IMPLIB)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(MKDEP)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(INSTALL_PROG_FLAGS)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(DSO_MODULES)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APR_BINDIR)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APR_INCLUDEDIR)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APR_VERSION)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APR_CONFIG)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APU_BINDIR)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APU_INCLUDEDIR)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APU_VERSION)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl APACHE_SUBST(APU_CONFIG)
cb5caa98562cf06753163f558cbcfe30b8f4673adjl abs_srcdir="`(cd $srcdir && pwd)`"
cb5caa98562cf06753163f558cbcfe30b8f4673adjl echo creating config_vars.mk
cb5caa98562cf06753163f558cbcfe30b8f4673adjl test -d build || $mkdir_p build
cb5caa98562cf06753163f558cbcfe30b8f4673adjl for i in $APACHE_VAR_SUBST; do
cb5caa98562cf06753163f558cbcfe30b8f4673adjl eval echo "$i = \$$i" >> build/config_vars.mk
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl APACHE_GEN_MAKEFILES
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl Creates Makefiles
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_GEN_MAKEFILES,[
cb5caa98562cf06753163f558cbcfe30b8f4673adjl $SHELL $srcdir/build/fastgen.sh $srcdir $ac_cv_mkdir_p $BSD_MAKEFILE $APACHE_FAST_OUTPUT_FILES
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl ## APACHE_OUTPUT(file)
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl ## adds "file" to the list of files generated by AC_OUTPUT
cb5caa98562cf06753163f558cbcfe30b8f4673adjldnl ## This macro can be used several times.
cb5caa98562cf06753163f558cbcfe30b8f4673adjlAC_DEFUN(APACHE_OUTPUT, [
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
[Define to 'int' if <sys/resource.h> doesn't define it for us])
test -d $1 || $srcdir/build/mkdir.sh $modpath_current
echo "static = $modpath_static" >> $modpath_current/modules.mk
echo "shared = $modpath_shared" >> $modpath_current/modules.mk
APACHE_FAST_OUTPUT($modpath_current/Makefile)
objects="mod_$1.lo"
libname="libmod_$1.la"
cat >>$modpath_current/modules.mk<<EOF
libname="mod_$1.la"
cat >>$modpath_current/modules.mk<<EOF
dnl objects -- one or more .lo files to link into the MPM module (default: mpmname.lo)
dnl path -- relative path to MPM (default: server/mpm/mpmname)
objects="$1.lo"
mpmpath="server/mpm/$1"
test -d $mpmpath || $srcdir/build/mkdir.sh $mpmpath
APACHE_FAST_OUTPUT($mpmpath/Makefile)
libname="lib$1.la"
cat >$mpmpath/modules.mk<<EOF
DISTCLEAN_TARGETS = modules.mk
libname="mod_mpm_$1.la"
cat >$mpmpath/modules.mk<<EOF
DISTCLEAN_TARGETS = modules.mk
dnl basically: yes/no is a hard setting. "most" means follow the "most"
dnl explicit yes/no always overrides, except if the user selects
AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),,enable_$1=ifelse($5,,maybe-all,$5))
enable_$1=`echo $enable_$1|sed 's/shared,*//'`
APACHE_HELP_STRING(--enable-modules=MODULE-LIST,Space-separated list of modules to enable | "all" | "most" | "few" | "none" | "reallyall"),[
APACHE_HELP_STRING(--enable-mods-shared=MODULE-LIST,Space-separated list of shared modules to enable | "all" | "most" | "few" | "reallyall"),[
APACHE_HELP_STRING(--enable-mods-static=MODULE-LIST,Space-separated list of static modules to enable | "all" | "most" | "few" | "reallyall"),[
dnl Configure for the detected openssl/ssl-c toolkit installation, giving
dnl Determine the SSL/TLS toolkit's base directory, if any
AC_MSG_CHECKING([for user-provided SSL/TLS toolkit base])
AC_ARG_WITH(sslc, APACHE_HELP_STRING(--with-sslc=DIR,RSA SSL-C SSL/TLS toolkit), [
AC_ARG_WITH(ssl, APACHE_HELP_STRING(--with-ssl=DIR,OpenSSL SSL/TLS toolkit), [
-f "${ap_ssltk_base}/lib/pkgconfig/openssl.pc"; then
dnl the system openssl.pc might be picked up instead.
PKG_CONFIG_PATH="${ap_ssltk_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
APR_ADDTO(CPPFLAGS, [-I$ap_ssltk_base/include])
APR_ADDTO(INCLUDES, [-I$ap_ssltk_base/include])
APR_ADDTO(LDFLAGS, [-L$ap_ssltk_base/lib])
APR_ADDTO(SSL_LIBS, [-L$ap_ssltk_base/lib])
APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_ssltk_base/lib])
APR_ADDTO(SSL_LIBS, [$ap_platform_runtime_link_flag$ap_ssltk_base/lib])
AC_TRY_COMPILE([#include <openssl/opensslv.h>],[
[dnl Replace this with OPENSSL_VERSION_TEXT from opensslv.h?
AC_CHECK_HEADERS([sslc.h], [ap_ssltk_type="sslc"], [ap_ssltk_type=""])
AC_TRY_COMPILE([#include <sslc.h>],[
AC_CHECK_HEADERS([openssl/engine.h])
AC_MSG_ERROR([... Error, SSL/TLS libraries were missing or unusable])
CPPFLAGS="$CPPFLAGS $APR_INCLUDES $APU_INCLUDES -I$serf_prefix/include/serf-0"
AC_CHECK_HEADERS(serf.h,[
LDFLAGS="$LDFLAGS -L$serf_prefix/lib"
APR_SETVAR(SERF_LIBS, [-L$serf_prefix/lib -lserf-0])
APR_ADDTO(INCLUDES, [-I$serf_prefix/include/serf-0])
dnl Checks for APR or APR-util of given major/minor version or later;
#include <$1_version.h>