From: Alexandre Oliva Date: Sun, 25 Apr 1999 09:40:49 +0000 (+0000) Subject: * ltmain.in (prefer_static_libs): New variable, set to no by X-Git-Tag: release-1-3b~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4221fc8300356394a7bec54800a7d552f4edd17;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 7e04e59eb..721759044 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-04-25 Alexandre Oliva + + * 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 * ltconfig.in (sco3.2v5*): Use LD_RUN_PATH for hard-coding. diff --git a/ltmain.in b/ltmain.in index cc92b2f18..05567764e 100644 --- a/ltmain.in +++ b/ltmain.in @@ -811,6 +811,7 @@ compiler." ltlibs= module=no objs= + prefer_static_libs=no preload=no prev= prevarg= @@ -841,6 +842,7 @@ compiler." fi build_libtool_libs=no build_old_libs=yes + prefer_static_libs=yes break ;; esac @@ -1681,7 +1683,8 @@ compiler." 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 @@ -2571,7 +2574,8 @@ EOF 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. @@ -2606,13 +2610,12 @@ EOF 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 @@ -2624,7 +2627,8 @@ EOF 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