]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in (link mode): Move library search paths that coincide
authorJacob Meuser <jakemsr@jakemsr.com>
Sun, 18 Dec 2005 17:59:07 +0000 (17:59 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 18 Dec 2005 17:59:07 +0000 (17:59 +0000)
with paths to not yet installed libraries to the beginning of
the library search list.

ChangeLog
ltmain.in

index cf75f6b184e05f833249b182f38f22cdb135aafc..2f5c75bae875d002ca447ac483ceb2bac4d6e225 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-18  Jacob Meuser <jakemsr@jakemsr.com>,
+           Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * 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  <jkj@sco.com>,
            Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
 
index 10a434a9c56c6db5e1d7416937494a8e4106cbcb..78c927fcae91919c030d6790d8b9fd88449bd37c 100644 (file)
--- 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"