summaryrefslogtreecommitdiff
path: root/build-aux/ltmain.in
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-12-11 21:49:19 +0000
committerGary V. Vaughan <gary@gnu.org>2014-12-11 23:06:09 +0000
commit08279564ff4143059f3f728f9401b5d541f0bd1e (patch)
tree61adeecf7c701ec8df08c6a5c42eb6bf770039e9 /build-aux/ltmain.in
parent663f9192417ce9defbdf5aa0c9f3b2dc08c9256d (diff)
downloadlibtool-08279564ff4143059f3f728f9401b5d541f0bd1e.tar.gz
libtool: support LT_SYS_LIBRARY_PATH for adjusting bad guesses.
Revert 8728e07 and 440fee6. Some GNU/Linux distributions install libraries into /lib64 (or /usr/lib64) on 64-bit machines, while /lib (/usr/lib respectively) stays for multilib variant. Other distributions keep /usr/lib for 64-bit variant and reserve other directory for multilib. Detection of what approach a given system uses is difficult, however, especially because Glibc's ldconfig does not report the full and correct list of search paths. Allow the user to adjust Libtools heuristically determined search paths with the new LT_SYS_LIBRARY_PATH environment variable at both compile-time, when libtool is called, and at configure time. * m4/libtool.m4 (_LT_PREPARE_MUNGE_PATH_LIST): Define a new function to munge a libtool path list according to a user supplied colon-delimited path. (_LT_SYS_DYNAMIC_LINKER): Require _LT_PREPARE_MUNGE_PATH_LIST. Mark LT_SYS_LIBRARY_PATH as precious to autoconf (to survive automatic "autoreconf"). Call the new func_munge_path_list function on sys_lib_dlsearch_path_spec - this propagates results to generated libtool script. (_LT_CONFIG): Expand _LT_PREPARE_MUNGE_PATH_LIST into generated libtool script. * build-aux/ltmain.in (func_mode_link): Call it to adjust sys_lib_dlsearch_path according to LT_SYS_LIBRARY_PATH. * doc/libtool.texi: Document new LT_SYS_LIBRARY_PATH. * doc/notes.texi: Likewise. * NEWS: Update. References: http://thread.gmane.org/gmane.comp.gnu.libtool.general/8339/focus=8345 Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'build-aux/ltmain.in')
-rw-r--r--build-aux/ltmain.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index a72c007c..42048dfe 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -5525,6 +5525,9 @@ func_mode_link ()
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
func_dirname "$output" "/" ""
output_objdir=$func_dirname_result$objdir
func_to_tool_file "$output_objdir/"