+1999-04-25 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * ltmain.in (prefer_static_libs): New variable, set to no by
+ default, but set to yes by -static and -all-static. Used instead
+ of build_libtool_libs to decide whether to use a shared or static
+ version of a library, when both versions are available.
+
1999-04-25 Boyd Lynn Gerber <gerberb@zenez.com>
* ltconfig.in (sco3.2v5*): Use LD_RUN_PATH for hard-coding.
ltlibs=
module=no
objs=
+ prefer_static_libs=no
preload=no
prev=
prevarg=
fi
build_libtool_libs=no
build_old_libs=yes
+ prefer_static_libs=yes
break
;;
esac
fi
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# This is a shared library
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
fi
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
esac
fi
- if test "$alldeplibs" = yes; then
- if test "$deplibs_check_method" = pass_all ||
- (test "$build_libtool_libs" = yes && \
- test -n "$library_names"); then
- # Do we only need to link against static libraries?
- continue
- fi
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # Do we only need to link against static libraries?
+ continue
fi
if test -z "$libdir"; then
continue
fi
- if test "$build_libtool_libs" = yes && test -n "$library_names"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
link_against_libtool_libs="$link_against_libtool_libs $lib"
if test -n "$old_archive_from_expsyms_cmds"; then