]> granicus.if.org Git - apache/blobdiff - configure.in
Add support for TLS Next Protocol Negotiation:
[apache] / configure.in
index 9a32f686176c6670f56e9439104030a22df4d6f2..10d645cd7ed6bdc1e12568231f4054ee7cb30492 100644 (file)
@@ -10,6 +10,14 @@ AC_INIT(ABOUT_APACHE)
 AC_CONFIG_HEADER(include/ap_config_auto.h)
 AC_CONFIG_AUX_DIR(build)
 
+dnl Absolute source/build directory
+abs_srcdir=`(cd $srcdir && pwd)`
+abs_builddir=`pwd`
+
+dnl Ensure that the httpd version is included
+HTTPD_VERSION=`$abs_srcdir/build/get-version.sh all $abs_srcdir/include/ap_release.h AP_SERVER`
+AC_SUBST(HTTPD_VERSION)
+
 dnl #
 dnl # Include our own M4 macros along with those for APR and libtool
 dnl #
@@ -78,9 +86,12 @@ AC_ARG_WITH(included-apr,
 APACHE_HELP_STRING(--with-included-apr,Use bundled copies of APR/APR-Util))
 
 if test "x$with_included_apr" = "xyes"; then
-   apr_found=reconfig
+  apr_found=reconfig
+  if test ! -d srclib/apr && test ! -d $srcdir/srclib/apr; then
+    AC_MSG_ERROR([Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.])
+  fi
 else 
-   APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2)
+  APR_FIND_APR("$srcdir/srclib/apr", "./srclib/apr", 1, 1 2)
 fi
 
 if test "$apr_found" = "no"; then
@@ -122,9 +133,12 @@ APR_CONFIG="$APR_BINDIR/apr-${apr_major_version}-config"
 echo $ac_n "${nl}Configuring Apache Portable Runtime Utility library...${nl}"
 
 if test "x${apr_major_version}" = "x2"; then
-   apu_found=obsolete
+  apu_found=obsolete
 elif test "x$with_included_apr" = "xyes"; then
-   apu_found=reconfig
+  apu_found=reconfig
+  if test ! -d srclib/apr-util && test ! -d $srcdir/srclib/apr-util; then
+    AC_MSG_ERROR([Bundled APR-Util requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.])
+  fi
 else 
    dnl If httpd is buildconf'ed against an apr 2.x tree, then 1.x
    dnl isn't supported. 
@@ -179,16 +193,20 @@ AC_PROG_CPP
 dnl Try to get c99 support for variadic macros
 ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99])
 
+dnl In case of cross compilation we set CC_FOR_BUILD to cc unless
+dnl we got already CC_FOR_BUILD from environment.
+if test "x${build_alias}" != "x${host_alias}"; then
+  if test "x${CC_FOR_BUILD}" = "x"; then
+    CC_FOR_BUILD=cc
+  fi
+fi
+
 if test "x${cache_file}" = "x/dev/null"; then
   # Likewise, ensure that CC and CPP are passed through to the pcre
   # configure script iff caching is disabled (the autoconf 2.5x default).
   export CC; export CPP
 fi
 
-dnl Absolute source/build directory
-abs_srcdir=`(cd $srcdir && pwd)`
-abs_builddir=`pwd`
-
 AC_ARG_WITH(pcre,
 APACHE_HELP_STRING(--with-pcre=PATH,Use external PCRE library))
 
@@ -540,7 +558,16 @@ AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable f
               [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),
+AC_ARG_ENABLE(load-all-modules,APACHE_HELP_STRING(--enable-load-all-modules,Load all modules),
+[
+  LOAD_ALL_MODULES=$enableval
+  AC_MSG_NOTICE([Setting "LOAD_ALL_MODULES" to $LOAD_ALL_MODULES])
+],
+[
+  LOAD_ALL_MODULES="no"
+])
+
+AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings and load all compiled modules),
 [
   APR_ADDTO(CPPFLAGS, -DAP_DEBUG)
   if test "$GCC" = "yes"; then
@@ -553,6 +580,10 @@ AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn o
   elif test "$AIX_XLC" = "yes"; then
     APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro)
   fi
+  if test "x$enable_load_all_modules" = "x"; then
+    LOAD_ALL_MODULES=yes
+    AC_MSG_NOTICE([Maintainer mode setting "LOAD_ALL_MODULES" to $LOAD_ALL_MODULES])
+  fi
 ])dnl
 
 AC_ARG_ENABLE(debugger-mode,APACHE_HELP_STRING(--enable-debugger-mode,Turn on debugging and compile time warnings and turn off optimization),
@@ -730,14 +761,6 @@ if test $v4mapped = "yes" -a $ac_cv_define_APR_HAVE_IPV6 = "yes"; then
               [Allow IPv4 connections on IPv6 listening sockets])
 fi
 
-AC_ARG_ENABLE(load-all-modules,APACHE_HELP_STRING(--enable-load-all-modules,Load all modules),
-[ 
-  LOAD_ALL_MODULES=$enableval
-],
-[
-  LOAD_ALL_MODULES="no"
-])
-
 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) 
 APACHE_FAST_OUTPUT(os/Makefile server/Makefile)
 APACHE_FAST_OUTPUT(support/Makefile)
@@ -801,10 +824,6 @@ AC_SUBST(ap_make_delimiter)
 dnl Ensure that docs/conf is created.
 test -d docs/conf||$mkdir_p docs/conf
 
-dnl Ensure that the httpd version is included
-HTTPD_VERSION=`$abs_srcdir/build/get-version.sh all $abs_srcdir/include/ap_release.h AP_SERVER`
-AC_SUBST(HTTPD_VERSION)
-
-AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd.conf docs/conf/extra/httpd-autoindex.conf docs/conf/extra/httpd-dav.conf docs/conf/extra/httpd-default.conf docs/conf/extra/httpd-info.conf docs/conf/extra/httpd-languages.conf docs/conf/extra/httpd-manual.conf docs/conf/extra/httpd-mpm.conf docs/conf/extra/httpd-multilang-errordoc.conf docs/conf/extra/httpd-ssl.conf docs/conf/extra/httpd-userdir.conf docs/conf/extra/httpd-vhosts.conf docs/conf/extra/proxy-html.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 build/pkg/pkginfo build/config_vars.sh,[true],[
+AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd.conf docs/conf/extra/httpd-autoindex.conf docs/conf/extra/httpd-dav.conf docs/conf/extra/httpd-default.conf docs/conf/extra/httpd-info.conf docs/conf/extra/httpd-languages.conf docs/conf/extra/httpd-manual.conf docs/conf/extra/httpd-mpm.conf docs/conf/extra/httpd-multilang-errordoc.conf docs/conf/extra/httpd-policy.conf docs/conf/extra/httpd-ssl.conf docs/conf/extra/httpd-userdir.conf docs/conf/extra/httpd-vhosts.conf docs/conf/extra/proxy-html.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 build/pkg/pkginfo build/config_vars.sh,[true],[
   APACHE_GEN_MAKEFILES
 ])