From 9ed2afa2b9a50367b259d775d442705ecdd5cf12 Mon Sep 17 00:00:00 2001 From: Rainer Jung Date: Tue, 5 Jul 2011 05:31:22 +0000 Subject: [PATCH] Tolerate dependency checking failures in configure for modules that have been enabled only implicitely. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142892 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ acinclude.m4 | 2 +- modules/cache/config.m4 | 20 +++++++++++++++----- modules/filters/config.m4 | 17 ++++++++++++----- modules/lua/config.m4 | 11 +++++++++-- modules/proxy/config.m4 | 3 ++- 6 files changed, 42 insertions(+), 14 deletions(-) diff --git a/CHANGES b/CHANGES index afc7a08c46..2a316c2858 100644 --- a/CHANGES +++ b/CHANGES @@ -23,6 +23,9 @@ Changes with Apache 2.3.14 *) configure: Only link the httpd binary against PCRE. No other support binary needs PCRE. [Rainer Jung] + *) configure: tolerate dependency checking failures for modules if + they have been enabled implicitely. [Rainer Jung] + Changes with Apache 2.3.13 *) ab: Support specifying the local address to use. PR 48930. diff --git a/acinclude.m4 b/acinclude.m4 index edc4e5dd04..4fbca74328 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -282,7 +282,7 @@ AC_DEFUN(APACHE_MODULE,[ AC_ARG_ENABLE(translit($1,_,-),APACHE_HELP_STRING(optname(),$2),,enable_$1=ifelse($5,,maybe-all,$5)) undefine([optname])dnl _apmod_extra_msg="" - dnl When --enable-modules=most or --enable-modules=reallyall is set and the + dnl When --enable-modules=most or --enable-modules=(really)all is set and the dnl module was not explicitly requested, allow a module to disable itself if dnl its pre-reqs fail. dnl XXX: Todo: Allow to disable specific modules even with "reallyall". diff --git a/modules/cache/config.m4 b/modules/cache/config.m4 index 6f742dd75f..e0470fafda 100644 --- a/modules/cache/config.m4 +++ b/modules/cache/config.m4 @@ -38,6 +38,7 @@ if test "x$ap_distcache_configured" = "x"; then ap_distcache_base="" ap_distcache_libs="" ap_distcache_ldflags="" + ap_distcache_with="" dnl Determine the distcache base directory, if any AC_MSG_CHECKING([for user-provided distcache base]) @@ -45,6 +46,7 @@ if test "x$ap_distcache_configured" = "x"; then dnl If --with-distcache specifies a directory, we use that directory or fail if test "x$withval" != "xyes" -a "x$withval" != "x"; then dnl This ensures $withval is actually a directory and that it is absolute + ap_distcache_with="yes" ap_distcache_base="`cd $withval ; pwd`" fi ]) @@ -78,12 +80,16 @@ if test "x$ap_distcache_configured" = "x"; then #if DISTCACHE_CLIENT_API != 0x0001 #error "distcache API version is unrecognised" #endif], - [], - [ap_distcache_found="no"]) - AC_MSG_RESULT($ap_distcache_found) + [], + [ap_distcache_found="no"]) + AC_MSG_RESULT($ap_distcache_found) fi if test "$ap_distcache_found" != "yes"; then - AC_MSG_ERROR([...No distcache detected]) + if test "x$ap_distcache_with" = "x"; then + AC_MSG_WARN([...No distcache detected]) + else + AC_MSG_ERROR([...No distcache detected]) + fi else dnl Run library and function checks AC_MSG_CHECKING(for distcache libraries) @@ -97,7 +103,11 @@ if test "x$ap_distcache_configured" = "x"; then [ap_distcache_found="no"]) AC_MSG_RESULT($ap_distcache_found) if test "$ap_distcache_found" != "yes"; then - AC_MSG_ERROR([... Error, distcache libraries were missing or unusable]) + if test "x$ap_distcache_base" = "x"; then + AC_MSG_WARN([... Error, distcache libraries were missing or unusable]) + else + AC_MSG_ERROR([... Error, distcache libraries were missing or unusable]) + fi fi fi diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index de8dfe7a54..65aa152dfc 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -32,6 +32,7 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [ [ if test "x$withval" != "xyes" && test "x$withval" != "x"; then ap_zlib_base="$withval" + ap_zlib_with="yes" fi ]) if test "x$ap_zlib_base" = "x"; then @@ -71,11 +72,17 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [ APR_ADDTO(LIBS, [-lz]) AC_MSG_CHECKING([for zlib library]) AC_TRY_LINK([#include ], [int i = Z_OK;], - [AC_MSG_RESULT(found) - APR_SETVAR(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])], - [AC_MSG_RESULT(not found) - enable_deflate=no - INCLUDES=$ap_save_includes]) + [AC_MSG_RESULT(found) + APR_SETVAR(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])], + [AC_MSG_RESULT(not found) + enable_deflate=no + INCLUDES=$ap_save_includes + if test "x$ap_zlib_with" = "x"; then + AC_MSG_WARN([... Error, zlib was missing or unusable]) + else + AC_MSG_ERROR([... Error, zlib was missing or unusable]) + fi + ]) LDFLAGS=$ap_save_ldflags CPPFLAGS=$ap_save_cppflags APR_REMOVEFROM(LIBS, [-lz]) diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 index 38e3b0ea13..5d7838d8d4 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -115,8 +115,15 @@ AC_SUBST(LUA_LIBS) AC_SUBST(LUA_CFLAGS) if test -z "${LUA_LIBS}"; then - AC_MSG_NOTICE([*** Lua 5.1 library not found.]) - ifelse([$2], , AC_MSG_ERROR([Lua 5.1 library is required]), $2) + AC_MSG_WARN([*** Lua 5.1 library not found.]) + ifelse([$2], , + enable_lua="no" + if test -z "${lua_path}"; then + AC_MSG_WARN([Lua 5.1 library is required]) + else + AC_MSG_ERROR([Lua 5.1 library is required]) + fi, + $2) else AC_MSG_NOTICE([using '${LUA_LIBS}' for Lua Library]) AC_ARG_ENABLE(luajit, diff --git a/modules/proxy/config.m4 b/modules/proxy/config.m4 index 193813eda8..387203ec08 100644 --- a/modules/proxy/config.m4 +++ b/modules/proxy/config.m4 @@ -53,7 +53,8 @@ APACHE_MODULE(proxy_fcgi, Apache proxy FastCGI module. Requires and is enabled APACHE_MODULE(proxy_scgi, Apache proxy SCGI module. Requires and is enabled by --enable-proxy., $proxy_scgi_objs, , $proxy_mods_enable) APACHE_MODULE(proxy_fdpass, Apache proxy to Unix Daemon Socket module. Requires --enable-proxy., $proxy_fdpass_objs, , $proxy_mods_fdpass_enable, [ if test $ac_cv_have_decl_CMSG_DATA = "no"; then - AC_MSG_ERROR([Your system does not support CMSG_DATA.]) + AC_MSG_WARN([Your system does not support CMSG_DATA.]) + enable_proxy_fdpass=no fi ]) APACHE_MODULE(proxy_ajp, Apache proxy AJP module. Requires and is enabled by --enable-proxy., $proxy_ajp_objs, , $proxy_mods_enable) -- 2.40.0