]> granicus.if.org Git - apache/commitdiff
Allow to specify module specific custom linker flags
authorRainer Jung <rjung@apache.org>
Tue, 5 Jul 2011 09:24:23 +0000 (09:24 +0000)
committerRainer Jung <rjung@apache.org>
Tue, 5 Jul 2011 09:24:23 +0000 (09:24 +0000)
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

CHANGES
modules/aaa/config.m4
modules/filters/config.m4
modules/ldap/config.m4
modules/lua/config.m4
modules/proxy/config.m4
modules/ssl/config.m4
server/mpm/event/config3.m4

diff --git a/CHANGES b/CHANGES
index 2a316c28586f6a9369c94c6daabf81fff1d2e150..ca502651fa411651de21d32e7a9ccb36fa038d7f 100644 (file)
--- 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.
index a7f653bfa51d209e89dc16d7f9275fec98366694..38a83cecf0feeac399d139dd3b0c16a54c6364da 100644 (file)
@@ -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
index 65aa152dfc9d3e0fcf5702e8188d5db06933c9f2..ae6eba0d1ba3774b205cc84c4c60a8acb1d9fdb2 100644 (file)
@@ -73,7 +73,7 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
     AC_MSG_CHECKING([for zlib library])
     AC_TRY_LINK([#include <zlib.h>], [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
index 170adb64cc7e46bbdb0cc926ee66020e946ca8a5..35921526d82d631a056d87708c55665f50ff02b3 100644 (file)
@@ -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
index 5d7838d8d4af6032ae14b5de73c078900073699d..95cb01db1cfc67a0bb0aa6d092cb3da7d7a9e227 100644 (file)
@@ -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])
index 387203ec08804788f7d81c8cc97b74de32724943..37c71bf933a1b5385bcd639210c9fc825bd82055 100644 (file)
@@ -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
index b020acafcb049b722522a49aadfd4e623c88fc44..79f1c64bfd05204594c17cde0618965af1956c55 100644 (file)
@@ -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
index abe66477c645f8c0042d337ef691544dff43824a..5c96fe3c30df811f9249b464dc5214f4ca295435 100644 (file)
@@ -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)