From: Rainer Jung Date: Mon, 4 Jul 2011 15:19:00 +0000 (+0000) Subject: Respect platform specific runpath linker flag X-Git-Tag: 2.3.14^2~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2dd8ef18f6d4bbcdd89465cb586ee07f7398537;p=apache Respect platform specific runpath linker flag 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 --- diff --git a/CHANGES b/CHANGES index 52223f60d7..b7dcd0be80 100644 --- 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. diff --git a/modules/filters/config.m4 b/modules/filters/config.m4 index b9084a1787..990bb5d750 100644 --- a/modules/filters/config.m4 +++ b/modules/filters/config.m4 @@ -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 ], [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 diff --git a/modules/lua/config.m4 b/modules/lua/config.m4 index 4b40dec04c..38e3b0ea13 100644 --- a/modules/lua/config.m4 +++ b/modules/lua/config.m4 @@ -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