From: Benjamin Reed Date: Tue, 3 Jun 2003 18:20:37 +0000 (+0000) Subject: * ltmain.in: search libraries in the order of preference, rather X-Git-Tag: help~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80983ca52809ba6849dcca34a95767bcdb00e71d;p=thirdparty%2Flibtool.git * ltmain.in: search libraries in the order of preference, rather than picking .la's even if they're in a less preferred directory. --- diff --git a/ChangeLog b/ChangeLog index 6e025e8f4..ac63c66ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-06-03 Benjamin Reed + + * 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 * ltdl.m4: Add support for GNU/FreeBSD. diff --git a/ltmain.in b/ltmain.in index d56220fb3..53674dc2f 100644 --- 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