]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtool: simplify multiple string tests
authorGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 12:09:51 +0000 (19:09 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 2 Oct 2012 14:07:39 +0000 (21:07 +0700)
* build-aux/ltmain.m4sh (func_mode_link): Save test invocations
by using 'test x,y = "$a,$b"' instead of 'test x = "$a" && test y
= "$b"'.
* m4/libtool.m4: Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/ltmain.m4sh
m4/libtool.m4

index 6a2602adbcfb8d332b370fdca302a70b34a9cc3e..2a4823c8e834a7d69160fe91698afb3a5aef75f8 100644 (file)
@@ -6766,7 +6766,7 @@ func_mode_link ()
        fi
 
        # Remove version info from name if versioning should be avoided
-       if test yes = "$avoid_version" && test no = "$need_version"; then
+       if test yes,no = "$avoid_version,$need_version"; then
          major=
          versuffix=
          verstring=
@@ -7949,9 +7949,7 @@ EOF
        func_warning "\`-release' is ignored for programs"
 
       $preload \
-       && test unknown = "$dlopen_support" \
-       && test unknown = "$dlopen_self" \
-       && test unknown = "$dlopen_self_static" \
+       && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \
        && func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
 
       case $host in
@@ -8664,7 +8662,7 @@ dlpreopen='$dlprefiles'
 
 # Directory that this library needs to be installed in:
 libdir='$install_libdir'"
-         if test no = "$installed" && test yes = "$need_relink"; then
+         if test no,yes = "$installed,$need_relink"; then
            $ECHO >> $output "\
 relink_command=\"$relink_command\""
          fi
index 5229e7837d0fd444f1cf861291df20e1c86d0b9a..4e406a2fc1d708047f1228afc07f1adf1aa73c98 100644 (file)
@@ -5227,7 +5227,7 @@ _LT_EOF
       ;;
 
     hpux10*)
-      if test yes = "$GCC" && test no = "$with_gnu_ld"; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
       else
        _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
@@ -5245,7 +5245,7 @@ _LT_EOF
       ;;
 
     hpux11*)
-      if test yes = "$GCC" && test no = "$with_gnu_ld"; then
+      if test yes,no = "$GCC,$with_gnu_ld"; then
        case $host_cpu in
        hppa*64*)
          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
@@ -5590,7 +5590,7 @@ x|xyes)
   # Assume -lc should be added
   _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
 
-  if test yes = "$enable_shared" && test yes = "$GCC"; then
+  if test yes,yes = "$GCC,$enable_shared"; then
     case $_LT_TAGVAR(archive_cmds, $1) in
     *'~'*)
       # FIXME: we may have to deal with multi-command sequences.
@@ -6625,7 +6625,7 @@ if test yes != "$_lt_caught_CXX_error"; then
            output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
            ;;
          *)
-           if test yes = "$GXX" && test no = "$with_gnu_ld"; then
+           if test yes,no = "$GXX,$with_gnu_ld"; then
              _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
              case $host in
                osf3*)
@@ -6716,7 +6716,7 @@ if test yes != "$_lt_caught_CXX_error"; then
            ;;
           *)
            # GNU C++ compiler with Solaris linker
-           if test yes = "$GXX" && test no = "$with_gnu_ld"; then
+           if test yes,no = "$GXX,$with_gnu_ld"; then
              _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
              if $CC --version | $GREP -v '^2\.7' > /dev/null; then
                _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'