X-Git-Url: https://granicus.if.org/sourcecode?a=blobdiff_plain;f=configure.in;h=0d9a19150a93131e4b354877e838e57e61cd9741;hb=e8da0ffbc0285fe144e254ba81f71d5848c4f529;hp=44fcf3ff0e01791747a50bcde58c548c5f6e66e6;hpb=bc8cdc7896dbff2f4dd4af5df3cc8c5a409f7291;p=apache diff --git a/configure.in b/configure.in index 44fcf3ff0e..0d9a19150a 100644 --- a/configure.in +++ b/configure.in @@ -16,6 +16,7 @@ dnl # sinclude(build/apr_common.m4) sinclude(build/find_apr.m4) sinclude(build/find_apu.m4) +sinclude(build/find_ldap.m4) sinclude(acinclude.m4) dnl Later versions of autoconf (>= 2.62) by default cause the produced @@ -93,9 +94,9 @@ if test "$apr_found" = "reconfig"; then dnl We have to find apr-N-config when we reconfigure APR. for majorver in 1 2; do - test_apr_config="$srcdir/srclib/apr/apr-${majorver}-config" - if test -f $test_apr_config; then - apr_config=$test_apr_config + test_apr_config="./srclib/apr/apr-${majorver}-config" + if test -f "$test_apr_config"; then + apr_config="$test_apr_config" fi done fi @@ -104,6 +105,8 @@ APR_SETIFNULL(CC, `$apr_config --cc`) APR_SETIFNULL(CPP, `$apr_config --cpp`) APR_ADDTO(CFLAGS, `$apr_config --cflags`) APR_ADDTO(CPPFLAGS, `$apr_config --cppflags`) +dnl internal-only CPPFLAGS (shouldn't affect third-party module builds) +INTERNAL_CPPFLAGS="" APR_ADDTO(LDFLAGS, `$apr_config --ldflags`) SHLIBPATH_VAR=`$apr_config --shlib-path-var` APR_BINDIR=`$apr_config --bindir` @@ -150,7 +153,7 @@ if test "$apu_found" = "reconfig"; then AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util" AP_CLEAN_SRCLIB_DIRS="apr-util $AP_CLEAN_SRCLIB_DIRS" dnl APR and APR-Util major versions must match - apu_config="${srcdir}/srclib/apr-util/apu-${apr_major_version}-config" + apu_config="./srclib/apr-util/apu-${apr_major_version}-config" fi if test "$apu_found" = "obsolete"; then @@ -170,6 +173,9 @@ dnl PCRE and for our config tests will be whatever PCRE determines. AC_PROG_CC AC_PROG_CPP +dnl Try to get c99 support for variadic macros +ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) + 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). @@ -201,9 +207,7 @@ else AC_MSG_ERROR([pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/]) fi APACHE_SUBST(PCRE_LIBS) - -dnl Add PCRE_LIBS to HTTPD_LDFLAGS -APR_ADDTO(HTTPD_LDFLAGS, [\$(PCRE_LIBS)]) +APR_ADDTO(AP_LIBS, [\$(PCRE_LIBS)]) echo $ac_n "${nl}Configuring Apache httpd ...${nl}" @@ -216,7 +220,7 @@ if test "$abs_builddir" != "$abs_srcdir"; then APR_ADDTO(INCLUDES, [-I\$(top_builddir)/include]) fi -APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/modules/http -I\$(top_srcdir)/modules/aaa -I\$(top_srcdir)/modules/filters -I\$(top_srcdir)/modules/proxy -I\$(top_srcdir)/modules/session -I\$(top_srcdir)/include -I\$(top_srcdir)/modules/core -I\$(top_srcdir)/modules/generators -I\$(top_srcdir)/modules/mappers -I\$(top_srcdir)/modules/database]) +APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/os/\$(OS_DIR) -I\$(top_srcdir)/include]) # apr/apr-util --includes may pick up system paths for dependent # libraries, so ensure these are later in INCLUDES than local source @@ -227,33 +231,54 @@ APR_ADDTO(INCLUDES, $APU_INCLUDES) dnl Add in path to PCRE includes APR_ADDTO(INCLUDES, $PCRE_INCLUDES) -if test "x$LTFLAGS" = "x"; then - LTFLAGS='--silent' -fi -my_libtool=`$apr_config --apr-libtool` -LIBTOOL="$my_libtool \$(LTFLAGS)" -libtoolversion=`$my_libtool --version` -case $libtoolversion in - *1.[[45]]* | *[[2-9]].[[0-9]]*) - SH_LIBTOOL='$(LIBTOOL)' - SHLTCFLAGS="-prefer-pic" - LTCFLAGS="-prefer-non-pic -static" - ;; - *) - SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)' - SHLTCFLAGS="" - LTCFLAGS="" - ;; +echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}" + +case $host in + *os2*) + # Use a custom made libtool replacement + echo "using aplibtool" + LIBTOOL="$abs_srcdir/srclib/apr/build/aplibtool" + SH_LIBTOOL="$LIBTOOL --shared --export-all" + SH_LIBS="\$(ALL_LIBS)" + CORE_IMPLIB_FILE="ApacheCoreOS2.la" + CORE_IMPLIB="$abs_srcdir/server/$CORE_IMPLIB_FILE" + MK_IMPLIB="emximp" + other_targets="$other_targets os2core" + INSTALL_PROG_FLAGS="-e .exe" + SHLTCFLAGS="" + LTCFLAGS="" + ;; + *) + if test "x$LTFLAGS" = "x"; then + LTFLAGS='--silent' + fi + my_libtool=`$apr_config --apr-libtool` + LIBTOOL="$my_libtool \$(LTFLAGS)" + libtoolversion=`$my_libtool --version` + case $libtoolversion in + *1.[[45]]* | *[[2-9]].[[0-9]]*) + SH_LIBTOOL='$(LIBTOOL)' + SHLTCFLAGS="-prefer-pic" + LTCFLAGS="-prefer-non-pic -static" + ;; + *) + SH_LIBTOOL='$(SHELL) $(top_builddir)/shlibtool $(LTFLAGS)' + SHLTCFLAGS="" + LTCFLAGS="" + ;; + esac + ;; esac APACHE_SUBST(SHLTCFLAGS) APACHE_SUBST(LTCFLAGS) -echo $ac_n "${nl}Applying OS-specific hints for httpd ...${nl}" - case $host in *-apple-aux3*) APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) ;; + *os2-emx*) + APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) + ;; *-linux-*) case `uname -r` in 2.[[2-9]]* ) @@ -283,7 +308,7 @@ case $host in APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1]) ;; *mingw32*) - APR_ADDTO(CPPFLAGS, [-DAP_DECLARE_EXPORT]) + APR_ADDTO(INTERNAL_CPPFLAGS, [-DAP_DECLARE_EXPORT]) APR_SETIFNULL(ac_cv_func_times, [no]) APR_SETIFNULL(ac_cv_func_getpwnam, [no]) APR_SETIFNULL(ac_cv_func_getgrnam, [no]) @@ -343,7 +368,15 @@ fi if test "${apu_found}" = "yes"; then # Require at least APR-util 1.3.x otherwise fail - APACHE_CHECK_APxVER([apu], 1, 3) + if test "${apr_found}" = "yes"; then + # we need to add the APR includes to CPPFLAGS + apu_ckver_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS `$apr_config --includes`" + APACHE_CHECK_APxVER([apu], 1, 3) + CPPFLAGS="$apu_ckver_CPPFLAGS" + else + APACHE_CHECK_APxVER([apu], 1, 3) + fi fi dnl Check for what we can generate dependency files with @@ -390,6 +423,13 @@ MATH_LIBS="$LIBS" APACHE_SUBST(MATH_LIBS) LIBS="$saved_LIBS" +saved_LIBS="$LIBS" +LIBS="" +AC_SEARCH_LIBS(crypt, crypt) +CRYPT_LIBS="$LIBS" +APACHE_SUBST(CRYPT_LIBS) +LIBS="$saved_LIBS" + dnl See Comment #Spoon AC_CHECK_FUNCS( \ @@ -399,7 +439,8 @@ initgroups \ bindprocessor \ prctl \ timegm \ -getpgid +getpgid \ +fopen64 ) dnl confirm that a void pointer is large enough to store a long integer @@ -472,27 +513,12 @@ esac APACHE_SUBST(DTRACE) -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), -[ - v4mapped=$enableval -], +AC_ARG_ENABLE(hook-probes,APACHE_HELP_STRING(--enable-hook-probes,Enable APR hook probes), [ - case $host in - *freebsd5*|*netbsd*|*openbsd*) - v4mapped=no - ;; - *) - v4mapped=yes - ;; -esac -]) - -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_DEFINE(AP_HOOK_PROBES_ENABLED, 1, + [Enable the APR hook probes capability, reading from ap_hook_probes.h]) + APR_ADDTO(INTERNAL_CPPFLAGS, -DAP_HOOK_PROBES_ENABLED) +])dnl AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable fatal exception hook), [ @@ -503,6 +529,41 @@ AC_ARG_ENABLE(exception-hook,APACHE_HELP_STRING(--enable-exception-hook,Enable f AC_ARG_ENABLE(maintainer-mode,APACHE_HELP_STRING(--enable-maintainer-mode,Turn on debugging and compile time warnings), [ APR_ADDTO(CPPFLAGS, -DAP_DEBUG) + if test "$GCC" = "yes"; then + APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith]) + AC_CACHE_CHECK([whether gcc accepts -Wdeclaration-after-statement], [ap_cv_cc_Wdas], [ + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo() { return 0; }])], + [ap_cv_cc_Wdas=yes], [ap_cv_cc_Wdas=no]) + CFLAGS=$save_CFLAGS + ]) + if test "$ap_cv_cc_Wdas" = "yes"; then + APR_ADDTO(CFLAGS,[-Wdeclaration-after-statement]) + fi + elif test "$AIX_XLC" = "yes"; then + APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + fi +])dnl + +AC_ARG_ENABLE(debugger-mode,APACHE_HELP_STRING(--enable-debugger-mode,Turn on debugging and compile time warnings and turn off optimization), +[ + APR_ADDTO(CPPFLAGS, -DAP_DEBUG) + if test "$GCC" = "yes"; then + APR_ADDTO(CFLAGS,[-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -Wpointer-arith -O0]) + AC_CACHE_CHECK([whether gcc accepts -Wdeclaration-after-statement], [ap_cv_cc_Wdas], [ + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Wdeclaration-after-statement" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([int foo() { return 0; }])], + [ap_cv_cc_Wdas=yes], [ap_cv_cc_Wdas=no]) + CFLAGS=$save_CFLAGS + ]) + if test "$ap_cv_cc_Wdas" = "yes"; then + APR_ADDTO(CFLAGS,[-Wdeclaration-after-statement]) + fi + elif test "$AIX_XLC" = "yes"; then + APR_ADDTO(CFLAGS,-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro) + fi ])dnl dnl Conditionally enable PIE support for GNU toolchains. @@ -555,7 +616,7 @@ fi dnl enable_so tells us if *any* modules can be built as DSOs -if test "$enable_so" = "yes"; then +if test "$enable_so" = "yes" -o "$enable_so" = "static"; then case $host in *-ibm-aix*) APR_ADDTO(HTTPD_LDFLAGS, [-Wl,-uXML_Parse -Wl,-bE:$abs_builddir/server/httpd.exp]) @@ -639,6 +700,31 @@ if test "$AP_NONBLOCK_WHEN_MULTI_LISTEN" = "1"; then [Listening sockets are non-blocking when there are more than 1]) fi +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), +[ + v4mapped=$enableval +], +[ + case $host in + *freebsd5*|*netbsd*|*openbsd*) + v4mapped=no + ;; + *) + v4mapped=yes + ;; + esac + if ap_mpm_is_enabled winnt; then + dnl WinNT MPM doesn't support this. + v4mapped=no + fi +]) + +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 APACHE_FAST_OUTPUT(Makefile modules/Makefile srclib/Makefile) APACHE_FAST_OUTPUT(os/Makefile server/Makefile)