* 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 <libtool@cwilson.fastmail.fm>
+2010-09-12 Charles Wilson <libtool@cwilson.fastmail.fm>
+
+ 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 <Ralf.Wildenhues@gmx.de>
tests: work around zsh use of $options variable.
# 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