From b6188825eae24fd15db2186beeb9daefec0a4c7c Mon Sep 17 00:00:00 2001 From: Jacob Meuser Date: Sun, 18 Dec 2005 17:59:07 +0000 Subject: [PATCH] * ltmain.in (link mode): Move library search paths that coincide with paths to not yet installed libraries to the beginning of the library search list. --- ChangeLog | 7 +++++++ ltmain.in | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/ChangeLog b/ChangeLog index cf75f6b18..2f5c75bae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-12-18 Jacob Meuser , + Ralf Wildenhues + + * ltmain.in (link mode): Move library search paths that coincide + with paths to not yet installed libraries to the beginning of + the library search list. + 2005-12-18 Kean Johnston , Ralf Wildenhues diff --git a/ltmain.in b/ltmain.in index 10a434a9c..78c927fca 100644 --- a/ltmain.in +++ b/ltmain.in @@ -3767,6 +3767,35 @@ EOF deplibs=$newdeplibs fi + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + deplibs="$new_libs" + + # All the library-specific variables (install_libdir is set above). library_names= old_library= @@ -4281,6 +4310,35 @@ EOF ;; esac + + # move library search paths that coincide with paths to not yet + # installed libraries to the beginning of the library search list + new_libs= + for path in $notinst_path; do + case " $new_libs " in + *" -L$path/$objdir "*) ;; + *) + case " $compile_deplibs " in + *" -L$path/$objdir "*) + new_libs="$new_libs -L$path/$objdir" ;; + esac + ;; + esac + done + for deplib in $compile_deplibs; do + case $deplib in + -L*) + case " $new_libs " in + *" $deplib "*) ;; + *) new_libs="$new_libs $deplib" ;; + esac + ;; + *) new_libs="$new_libs $deplib" ;; + esac + done + compile_deplibs="$new_libs" + + compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" -- 2.47.3