From: Gary V. Vaughan Date: Fri, 12 Dec 2014 11:35:28 +0000 (+0000) Subject: libtool: take care not to double-apply LT_SYS_LIBRARY_PATH. X-Git-Tag: v2.4.5~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4fede0bc497021e28fde0635c1fa0da010cc2733;p=thirdparty%2Flibtool.git libtool: take care not to double-apply LT_SYS_LIBRARY_PATH. * m4/libtool.m4 (_LT_CONFIG_SAVE_COMMANDS): Copy configure-time LT_SYS_LIBRARY_PATH settings as default, but allow run-time override. (_LT_SYS_DYNAMIC_LINKER): Save the unmunged sys_lib_dlsearch_path_spec value, and use it for _LT_DECL, but then munge it with LT_SYS_LIBRARY_PATH for use in ltdl.m4 macros, such as LT_SYS_DLSEARCH_PATH. Signed-off-by: Gary V. Vaughan --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index fd7108e45..0c120ff96 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -720,6 +720,9 @@ _LT_CONFIG_SAVE_COMMANDS([ _LT_COPYING _LT_LIBTOOL_TAGS +# Configured defaults for sys_lib_dlsearch_path munging. +: \${LT_SYS_LIBRARY_PATH="$LT_SYS_LIBRARY_PATH"} + # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS @@ -3075,12 +3078,17 @@ if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi -func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" - if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi +# lt_cv_sys_lib... is unaugmented for libtool script decls... +lt_cv_sys_lib_dlsearch_path_spec=$sys_lib_dlsearch_path_spec + +# ..but sys_lib_... needs LT_SYS_LIBRARY_PATH munging for +# LT_SYS_DLSEARCH_PATH macro in ltdl.m4 to work with the correct paths: +func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" + _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) @@ -3113,7 +3121,7 @@ _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], +_LT_DECL([sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER