]> granicus.if.org Git - apache/commitdiff
Respect platform specific runpath linker flag
authorRainer Jung <rjung@apache.org>
Mon, 4 Jul 2011 15:19:00 +0000 (15:19 +0000)
committerRainer Jung <rjung@apache.org>
Mon, 4 Jul 2011 15:19:00 +0000 (15:19 +0000)
when building mod_deflate and mod_lua.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1142713 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/filters/config.m4
modules/lua/config.m4

diff --git a/CHANGES b/CHANGES
index 52223f60d7fd7a6ea0514bc02b4c8c2b2e133631..b7dcd0be8018faaa8e445c7b731f86978a720c77 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,9 @@ Changes with Apache 2.3.14
   *) mod_socache_dc: use correct build variable MOD_SOCACHE_DC_LDADD
      instead of MOD_SOCACHE_LDADD in build macro. [Rainer Jung]
 
+  *) mod_lua, mod_deflate: respect platform specific runpath linker
+     flag. [Rainer Jung]
+
 Changes with Apache 2.3.13
 
   *) ab: Support specifying the local address to use. PR 48930.
index b9084a178753c496cd05c33839018448e62c56bf..990bb5d75097e38205b7b50870c3edcc9c8c2420 100644 (file)
@@ -56,20 +56,23 @@ APACHE_MODULE(deflate, Deflate transfer encoding support, , , most, [
     ap_save_includes=$INCLUDES
     ap_save_ldflags=$LDFLAGS
     ap_save_cppflags=$CPPFLAGS
+    ap_zlib_ldflags=""
     if test "$ap_zlib_base" != "/usr"; then
       APR_ADDTO(INCLUDES, [-I${ap_zlib_base}/include])
       dnl put in CPPFLAGS temporarily so that AC_TRY_LINK below will work
       CPPFLAGS="$CPPFLAGS $INCLUDES"
       APR_ADDTO(LDFLAGS, [-L${ap_zlib_base}/lib])
+      APR_ADDTO(ap_zlib_ldflags, [-L${ap_zlib_base}/lib])
       if test "x$ap_platform_runtime_link_flag" != "x"; then
          APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag${ap_zlib_base}/lib])
+         APR_ADDTO(ap_zlib_ldflags, [$ap_platform_runtime_link_flag${ap_zlib_base}/lib])
       fi
     fi
     APR_ADDTO(LIBS, [-lz])
     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, [-lz])],
+     APR_SETVAR(MOD_DEFLATE_LDADD, [$ap_zlib_ldflags -lz])],
     [AC_MSG_RESULT(not found)
      enable_deflate=no
      INCLUDES=$ap_save_includes
index 4b40dec04c8ba284ea0bb69e82d5d52b8e2164d6..38e3b0ea13f980a1758536d126c38200652485ff 100644 (file)
@@ -57,6 +57,9 @@ for x in $test_paths ; do
         LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
         AC_CHECK_LIB(lua5.1, luaL_newstate, [
             LUA_LIBS="-L$x/lib -llua5.1 $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib])
+            fi
             LUA_CFLAGS="-I$x/include/lua5.1"
             ])
         CFLAGS=$save_CFLAGS
@@ -74,6 +77,9 @@ for x in $test_paths ; do
         LDFLAGS="-L$x/lib/lua51 $LDFLAGS $lib_m"
         AC_CHECK_LIB(lua, luaL_newstate, [
             LUA_LIBS="-L$x/lib/lua51 -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib/lua51])
+            fi
             LUA_CFLAGS="-I$x/include/lua51"
             ])
         CFLAGS=$save_CFLAGS
@@ -91,6 +97,9 @@ for x in $test_paths ; do
         LDFLAGS="-L$x/lib $LDFLAGS $lib_m"
         AC_CHECK_LIB(lua, luaL_newstate, [
             LUA_LIBS="-L$x/lib -llua $lib_m"
+            if test "x$ap_platform_runtime_link_flag" != "x"; then
+               APR_ADDTO(LUA_LIBS, [$ap_platform_runtime_link_flag$x/lib])
+            fi
             LUA_CFLAGS="-I$x/include"
             ])
         CFLAGS=$save_CFLAGS