]> granicus.if.org Git - apache/blobdiff - configure.in
* configure.in: Remove unnecessary $builddir/server/mpm/$mpm and
[apache] / configure.in
index fd49adc2aee29e5a7b758895724dc6d2dcc65c46..7ee2252a2e3397c2ae3fb938e96cc613ce8c8861 100644 (file)
@@ -24,7 +24,7 @@ dnl Something seems broken here.
 AC_PREFIX_DEFAULT(/usr/local/apache2)
 
 dnl Get the layout here, so we can pass the required variables to apr
-APACHE_ENABLE_LAYOUT
+APR_ENABLE_LAYOUT(Apache, [errordir iconsdir htdocsdir cgidir])
 
 dnl reparse the configure arguments.
 APR_PARSE_ARGUMENTS
@@ -68,12 +68,16 @@ if test "$apr_found" = "no"; then
 fi
 
 if test "$apr_found" = "reconfig"; then
-  APR_SUBDIR_CONFIG(srclib/apr, [$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir])
+  APR_SUBDIR_CONFIG(srclib/apr,
+                    [$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir],
+                    [--enable-layout=*|\'--enable-layout=*])
   dnl We must be the first to build and the last to be cleaned
   AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS"
   AP_CLEAN_SRCLIB_DIRS="$AP_CLEAN_SRCLIB_DIRS apr"
 fi
 
+APR_SETIFNULL(CC, `$apr_config --cc`)
+APR_SETIFNULL(CPP, `$apr_config --cpp`)
 APR_ADDTO(CFLAGS, `$apr_config --cflags`)
 APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`)
 APR_ADDTO(LDFLAGS, `$apr_config --ldflags`)
@@ -91,7 +95,9 @@ if test "$apu_found" = "no"; then
 fi
 
 if test "$apu_found" = "reconfig"; then
-  APR_SUBDIR_CONFIG(srclib/apr-util, [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir])
+  APR_SUBDIR_CONFIG(srclib/apr-util,
+                    [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir],
+                    [--enable-layout=*|\'--enable-layout=*])
   dnl We must be the last to build and the first to be cleaned
   AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util"
   AP_CLEAN_SRCLIB_DIRS="apr-util $AP_CLEAN_SRCLIB_DIRS"
@@ -102,9 +108,16 @@ APR_ADDTO(INCLUDES, `$apu_config --includes`)
 APU_BINDIR=`$apu_config --bindir`
 APU_INCLUDEDIR=`$apu_config --includedir`
 
+dnl In case we picked up CC and CPP from APR, get that info into the
+dnl config cache so that PCRE uses it.  Otherwise, CC and CPP used for
+dnl PCRE and for our config tests will be whatever PCRE determines.
+AC_PROG_CC
+AC_PROG_CPP
+
 echo $ac_n "${nl}Configuring PCRE regular expression library ...${nl}"
 
-APR_SUBDIR_CONFIG(srclib/pcre, [--prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir])
+APR_SUBDIR_CONFIG(srclib/pcre,
+                  [--prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir])
 
 echo $ac_n "${nl}Configuring Apache httpd ...${nl}"
 
@@ -115,13 +128,14 @@ abs_builddir=`pwd`
 dnl If the source dir is not equal to the build dir, 
 dnl then we are running in VPATH mode.
 
+APR_ADDTO(INCLUDES, [-I.])
+
 if test "$abs_builddir" != "$abs_srcdir"; then
-  USE_VPATH=1
-  APR_ADDTO(INCLUDES, [-I. -I\$(srcdir) -I\$(top_builddir)/os/\$(OS_DIR) -I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_builddir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_builddir)/modules/http -I\$(top_srcdir)/modules/http -I\$(top_builddir)/modules/proxy -I\$(top_srcdir)/modules/proxy -I\$(top_builddir)/modules/filters -I\$(top_srcdir)/modules/filters -I\$(top_builddir)/include -I\$(top_srcdir)/include])
-else
-  APR_ADDTO(INCLUDES, [-I. -I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy -I\$(top_srcdir)/include])
+  APR_ADDTO(INCLUDES, [-I\$(top_builddir)/include])
 fi
 
+APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/server/mpm/\$(MPM_SUBDIR_NAME) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy -I\$(top_srcdir)/include -I\$(top_srcdir)/modules/generators])
+
 echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}"
 
 case $host in
@@ -147,7 +161,7 @@ case $host in
       LIBTOOL="$my_libtool \$(LTFLAGS)"
       libtoolversion=`$my_libtool --version`
       case $libtoolversion in
-          *1.4*)
+          *1.[[45]]*)
               SH_LIBTOOL='$(LIBTOOL)'
               SHLTCFLAGS="-prefer-pic"
               LTCFLAGS="-prefer-non-pic -static"
@@ -231,8 +245,6 @@ dnl ## Check for programs
 
 AC_PATH_PROG(RM, rm)
 AC_PROG_AWK
-AC_PROG_CC
-AC_PROG_CPP
 AC_PROG_INSTALL
 AC_PROG_LN_S
 AC_CHECK_TOOL(RANLIB, ranlib, true)
@@ -268,6 +280,7 @@ sys/socket.h \
 pwd.h \
 grp.h \
 strings.h \
+sys/prctl.h \
 sys/processor.h \
 sys/sem.h
 )
@@ -281,6 +294,7 @@ if test "$ac_cv_prog_gcc" = "yes"; then
 fi
 
 dnl ## Check for library functions
+AC_SEARCH_LIBS(sqrt, m)
 
 dnl See Comment #Spoon
 
@@ -289,6 +303,7 @@ getpwnam \
 getgrnam \
 initgroups \
 bindprocessor \
+prctl \
 timegm \
 )
 
@@ -298,7 +313,7 @@ AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff,
 #include <time.h>], [struct tm tm; tm.tm_gmtoff;],
   ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)])
 if test "$ac_cv_struct_tm_gmtoff" = "yes"; then
-    AC_DEFINE(HAVE_GMTOFF)
+    AC_DEFINE(HAVE_GMTOFF, 1, [Define if struct tm has a tm_gmtoff field])
 fi
 
 dnl ## Set up any appropriate OS-specific environment variables for apachectl
@@ -328,14 +343,7 @@ AC_ARG_WITH(port,APACHE_HELP_STRING(--with-port=PORT,Port on which to listen (de
         [if test "$withval" = "yes"; then AC_MSG_ERROR('option --with-port requires a value (the TCP port number)'); else PORT="$withval"; fi],
        [PORT=80])
 
-dnl ## See if APR has IPv6 support
-ap_old_cppflags=$CPPFLAGS
-CPPFLAGS="$CPPFLAGS $INCLUDES"
-AC_TRY_COMPILE([#include <apr.h>], [
-#if !APR_HAVE_IPV6
-#error APR does not have IPv6 support
-#endif], apr_have_ipv6=yes, apr_have_ipv6=no)
-CPPFLAGS=$ap_old_cppflags
+APR_CHECK_APR_DEFINE(APR_HAVE_IPV6)
 
 AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets to handle IPv4 connections),
 [ 
@@ -352,18 +360,17 @@ AC_ARG_ENABLE(v4-mapped,APACHE_HELP_STRING(--enable-v4-mapped,Allow IPv6 sockets
 esac
 ])
 
-if test $v4mapped = "yes" -o $apr_have_ipv6 = "no"; then
-    nonssl_listen_stmt_1=""
-    nonssl_listen_stmt_2="Listen @@Port@@"
-    if test $apr_have_ipv6 = "yes"; then
-        AC_DEFINE(AP_ENABLE_V4_MAPPED, 1,
-                  [Allow IPv4 connections on IPv6 listening sockets])
-    fi
-else
-    nonssl_listen_stmt_1="Listen 0.0.0.0:@@Port@@"
-    nonssl_listen_stmt_2="Listen [[::]]:@@Port@@"
+if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
+    AC_DEFINE(AP_ENABLE_V4_MAPPED, 1,
+              [Allow IPv4 connections on IPv6 listening sockets])
 fi
 
+AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable fatal exception hook),
+[
+    AC_DEFINE(AP_ENABLE_EXCEPTION_HOOK, 1,
+              [Allow modules to run hook after a fatal exception])
+])dnl
+
 AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings),
 [
   APR_ADDTO(CPPFLAGS, -DAP_DEBUG)
@@ -497,8 +504,7 @@ else
 fi
 
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
-APACHE_FAST_OUTPUT(os/beos/Makefile os/os2/Makefile os/Makefile)
-APACHE_FAST_OUTPUT(os/unix/Makefile server/Makefile)
+APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile srclib/pcre/Makefile)
 
 if test -d ./test; then
@@ -562,7 +568,7 @@ AC_SUBST(ap_make_delimiter)
 dnl Ensure that docs/conf is created.
 test -d docs/conf||$mkdir_p docs/conf
 
-AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd-std.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,[true],[
+AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd-std.conf docs/conf/ssl-std.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,[true],[
   APACHE_GEN_MAKEFILES
 ])