From: Charles Wilson Date: Sun, 12 Sep 2010 13:19:51 +0000 (-0400) Subject: When assigning $linklib value, honor [-all]-static[-libtool-libs] X-Git-Tag: v2.4~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef56e98f3bb4ed780a08bced638f8adf673c0041;p=thirdparty%2Flibtool.git When assigning $linklib value, honor [-all]-static[-libtool-libs] * libltdl/config/ltmain.m4sh (func_mode_link): When prefer_static_libs and static library exists, ensure old_library name is used as $linklib. Fixes failure on mingw when both static and shared libraries are present. Signed-off-by: Charles Wilson --- diff --git a/ChangeLog b/ChangeLog index b9abe8a37..6b76340ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-09-12 Charles Wilson + + When assigning $linklib value, honor [-all]-static[-libtool-libs] + + * libltdl/config/ltmain.m4sh (func_mode_link): When prefer_static_libs + and static library exists, ensure old_library name is used as $linklib. + Fixes failure on mingw when both static and shared libraries are + present. + 2010-09-12 Ralf Wildenhues tests: work around zsh use of $options variable. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index 509a421fa..6036f4f83 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -5652,9 +5652,15 @@ func_mode_link () # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi