From: Gary V. Vaughan Date: Tue, 2 Oct 2012 11:08:29 +0000 (+0700) Subject: libtool: use false or : for $valid_a_lib, and simplify X-Git-Tag: v2.4.2.418~168^2~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b802dd319883400f031f64f5e81fe34902d25d8;p=thirdparty%2Flibtool.git libtool: use false or : for $valid_a_lib, and simplify * build-aux/ltmain.m4sh (func_mode_link): Save a string comparison by setting $valid_a_lib to false or : and using it directly as the first argument to if. Signed-off-by: Gary V. Vaughan --- diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh index 9469324ec..4283a82e2 100644 --- a/build-aux/ltmain.m4sh +++ b/build-aux/ltmain.m4sh @@ -5563,21 +5563,26 @@ func_mode_link () case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) - valid_a_lib=no + valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes + valid_a_lib=: fi ;; pass_all) - valid_a_lib=yes + valid_a_lib=: ;; esac - if test yes != "$valid_a_lib"; then + if $valid_a_lib; then + echo + $ECHO "*** Warning: Linking the shared library $output against the" + $ECHO "*** static library $deplib is not portable!" + deplibs="$deplib $deplibs" + else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" @@ -5585,11 +5590,6 @@ func_mode_link () echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" fi ;; esac