summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-12-12 11:35:28 +0000
committerGary V. Vaughan <gary@gnu.org>2014-12-12 11:44:21 +0000
commit4fede0bc497021e28fde0635c1fa0da010cc2733 (patch)
treef05fb0d1baa1e64dfc623ed4d4e1fe46e7f8fbd2 /m4
parent08279564ff4143059f3f728f9401b5d541f0bd1e (diff)
downloadlibtool-4fede0bc497021e28fde0635c1fa0da010cc2733.tar.gz
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 <gary@gnu.org>
Diffstat (limited to 'm4')
-rw-r--r--m4/libtool.m414
1 files changed, 11 insertions, 3 deletions
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index fd7108e4..0c120ff9 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