]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: search libraries in the order of preference, rather
authorBenjamin Reed <ranger@befunk.com>
Tue, 3 Jun 2003 18:20:37 +0000 (18:20 +0000)
committerRobert Boehne <rboehne@gnu.org>
Tue, 3 Jun 2003 18:20:37 +0000 (18:20 +0000)
than picking .la's even if they're in a less preferred directory.

ChangeLog
ltmain.in

index 6e025e8f428e6c2672ec7b5d464fd36d047dbd41..ac63c66ab0368f9d99b9b237a49e33a7c7af7ec5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-06-03 Benjamin Reed  <ranger@befunk.com>
+
+       * ltmain.in: search libraries in the order of preference, rather
+       than picking .la's even if they're in a less preferred directory.
 2003-06-03  Robert Millan <rmh@debian.org>
 
        * ltdl.m4: Add support for GNU/FreeBSD.
index d56220fb310c6870941100947598166458a5fd0e..53674dc2f7f98d0e1555e3253751519185402bb1 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -1819,12 +1819,18 @@ EOF
          fi
          name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
          for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-           # Search the libtool library
-           lib="$searchdir/lib${name}.la"
-           if test -f "$lib"; then
-             found=yes
-             break
-           fi
+           for search_ext in .la $shrext .so .a; do
+             # Search the libtool library
+             lib="$searchdir/lib${name}${search_ext}"
+             if test -f "$lib"; then
+               if test "$search_ext" = ".la"; then
+                 found=yes
+               else
+                 found=no
+               fi
+               break 2
+             fi
+           done
          done
          if test "$found" != yes; then
            # deplib doesn't seem to be a libtool library