diff options
author | Gary V. Vaughan <gary@gnu.org> | 2012-10-02 18:08:29 +0700 |
---|---|---|
committer | Gary V. Vaughan <gary@gnu.org> | 2012-10-02 21:07:13 +0700 |
commit | 3b802dd319883400f031f64f5e81fe34902d25d8 (patch) | |
tree | f48209d556cc98bdf694a60a0b75cd8b0a00cbe4 | |
parent | de7482d17c1f9f731cbba3ec347903884acf2c65 (diff) | |
download | libtool-3b802dd319883400f031f64f5e81fe34902d25d8.tar.gz |
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 <gary@gnu.org>
-rw-r--r-- | build-aux/ltmain.m4sh | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/build-aux/ltmain.m4sh b/build-aux/ltmain.m4sh index 9469324e..4283a82e 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 |