From: Rainer Jung Date: Tue, 5 Jul 2011 09:24:23 +0000 (+0000) Subject: Allow to specify module specific custom linker flags X-Git-Tag: 2.3.14^2~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a68daf2a8258b2b5139a9c2d22b509c870441975;p=thirdparty%2Fapache%2Fhttpd.git Allow to specify module specific custom linker flags via the MOD_XXX_LDADD variables. Use APR_ADDTO instead of APR_SETVAR or direct variable assignment. This is especially useful when building mod_lua or mod_deflate against a lua resp. libz which are installed in non-standard locations. One can add "-R ..." to MOD_LUA_LDADD and MOD_DEFLATE_LDADD before configure to fix the RPATH/RUNPATH of those modules. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142938 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2a316c28586..ca502651fa4 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,9 @@ Changes with Apache 2.3.14 *) configure: tolerate dependency checking failures for modules if they have been enabled implicitely. [Rainer Jung] + *) configure: Allow to specify module specific custom linker flags via + the MOD_XXX_LDADD variables. [Rainer Jung] + Changes with Apache 2.3.13 *) ab: Support specifying the local address to use. PR 48930. diff --git a/modules/aaa/config.m4 b/modules/aaa/config.m4 index a7f653bfa51..38a83cecf0f 100644 --- a/modules/aaa/config.m4 +++ b/modules/aaa/config.m4 @@ -41,7 +41,7 @@ dnl LDAP authentication module. This module has both the authn and authz dnl modules in one, so as to share the LDAP server config directives. APACHE_MODULE(authnz_ldap, LDAP based authentication, , , no, [ if test "$ap_has_ldap" = "1" ; then - MOD_AUTHNZ_LDAP_LDADD="$LDADD_ldap" + APR_ADDTO(MOD_AUTHNZ_LDAP_LDADD, [$LDADD_ldap]) else enable_authnz_ldap=no fi diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index 65aa152dfc9..ae6eba0d1ba 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -73,7 +73,7 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [ 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])], + APR_ADDTO(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])], [AC_MSG_RESULT(not found) enable_deflate=no INCLUDES=$ap_save_includes diff --git a/modules/ldap/config.m4 b/modules/ldap/config.m4 index 170adb64cc7..35921526d82 100644 --- a/modules/ldap/config.m4 +++ b/modules/ldap/config.m4 @@ -15,7 +15,7 @@ ap_ldap_url.lo dnl APACHE_MODULE(ldap, LDAP caching and connection pooling services, $ldap_objects, , no, [ if test "$ap_has_ldap" = "1" ; then - MOD_LDAP_LDADD="$LDADD_ldap" + APR_ADDTO(MOD_LDAP_LDADD, [$LDADD_ldap]) else enable_ldap=no fi diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 index 5d7838d8d4a..95cb01db1cf 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -137,8 +137,8 @@ lua_objects="lua_apr.lo lua_config.lo mod_lua.lo lua_request.lo lua_vmprep.lo" APACHE_MODULE(lua, Apache Lua Framework, $lua_objects, , no, [ CHECK_LUA() - APR_ADDTO(INCLUDES, ["$LUA_CFLAGS"]) - MOD_LUA_LDADD="$LUA_LIBS" + APR_ADDTO(INCLUDES, [$LUA_CFLAGS]) + APR_ADDTO(MOD_LUA_LDADD, [$LUA_LIBS]) ]) APR_ADDTO(INCLUDES, [-I\$(top_srcdir)/$modpath_current]) diff --git a/modules/proxy/config.m4 b/modules/proxy/config.m4 index 387203ec088..37c71bf933a 100644 --- a/modules/proxy/config.m4 +++ b/modules/proxy/config.m4 @@ -63,7 +63,7 @@ APACHE_MODULE(proxy_balancer, Apache proxy BALANCER module. Requires and is ena APACHE_MODULE(serf, [Reverse proxy module using Serf], , , no, [ APACHE_CHECK_SERF if test "$ac_cv_serf" = "yes" ; then - APR_SETVAR(MOD_SERF_LDADD, [\$(SERF_LIBS)]) + APR_ADDTO(MOD_SERF_LDADD, [\$(SERF_LIBS)]) else enable_serf=no fi diff --git a/modules/ssl/config.m4 b/modules/ssl/config.m4 index b020acafcb0..79f1c64bfd0 100644 --- a/modules/ssl/config.m4 +++ b/modules/ssl/config.m4 @@ -45,7 +45,7 @@ ssl_util_ocsp.lo dnl dnl # hook module into the Autoconf mechanism (--enable-ssl option) APACHE_MODULE(ssl, [SSL/TLS support (mod_ssl)], $ssl_objs, , no, [ APACHE_CHECK_SSL_TOOLKIT - APR_SETVAR(MOD_SSL_LDADD, [\$(SSL_LIBS)]) + APR_ADDTO(MOD_SSL_LDADD, [\$(SSL_LIBS)]) CHECK_OCSP if test "x$enable_ssl" = "xshared"; then # The only symbol which needs to be exported is the module diff --git a/server/mpm/event/config3.m4 b/server/mpm/event/config3.m4 index abe66477c64..5c96fe3c30d 100644 --- a/server/mpm/event/config3.m4 +++ b/server/mpm/event/config3.m4 @@ -2,7 +2,7 @@ dnl ## XXX - Need a more thorough check of the proper flags to use APACHE_CHECK_SERF if test "$ac_cv_serf" = yes ; then - APR_SETVAR(MOD_MPM_EVENT_LDADD,[\$(SERF_LIBS)]) + APR_ADDTO(MOD_MPM_EVENT_LDADD,[\$(SERF_LIBS)]) fi APACHE_SUBST(MOD_MPM_EVENT_LDADD)