]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: take care not to double-apply LT_SYS_LIBRARY_PATH.
authorGary V. Vaughan <gary@gnu.org>
Fri, 12 Dec 2014 11:35:28 +0000 (11:35 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 12 Dec 2014 11:44:21 +0000 (11:44 +0000)
* 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 <gary@gnu.org>
m4/libtool.m4

index fd7108e45a3e66738c81cc27fec011e0a1c15f2a..0c120ff96f1f1ded7f048c36b5463932d71449bd 100644 (file)
@@ -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