From: Howard Chu Date: Mon, 29 Aug 2005 10:34:14 +0000 (+0000) Subject: ITS#3977, fix libtool -static behavior to match docs X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~540 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7b6a088a2590fdad10286d10050b769e48554e13;p=openldap ITS#3977, fix libtool -static behavior to match docs --- diff --git a/build/ltmain.sh b/build/ltmain.sh index 6c9fddecc8..a47be71854 100755 --- a/build/ltmain.sh +++ b/build/ltmain.sh @@ -1105,14 +1105,15 @@ EOF if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=yes else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi + prefer_static_libs=built fi build_libtool_libs=no build_old_libs=yes - prefer_static_libs=yes break ;; esac @@ -2491,8 +2492,12 @@ EOF fi link_static=no # Whether the deplib will be linked statically + use_static_libs="$prefer_static_libs" + if test "$use_static_libs" = built && test "$installed" = yes ; then + use_static_libs=no + fi if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes