From: Ralf Wildenhues Date: Mon, 21 Mar 2005 18:00:45 +0000 (+0000) Subject: * m4/libtool.m4 (_LT_SETUP, _LT_LANG_CXX_CONFIG, * _LT_LANG_F77_CONFIG): X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68c87704889e83b0906dbde6aca18b464f3117d9;p=thirdparty%2Flibtool.git * m4/libtool.m4 (_LT_SETUP, _LT_LANG_CXX_CONFIG, * _LT_LANG_F77_CONFIG): For matching compiler names: Pick only first word, allow leading white space.. * tests/sh.test: ..and test for missing `*' at end of patterns. --- diff --git a/ChangeLog b/ChangeLog index 856ff7b6e..0198798d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-05-21 Gary V. Vaughan , + Ralf Wildenhues + + * m4/libtool.m4 (_LT_SETUP, _LT_LANG_CXX_CONFIG, * _LT_LANG_F77_CONFIG): + For matching compiler names: Pick only first word, allow leading white + space.. + * tests/sh.test: ..and test for missing `*' at end of patterns. + 2005-03-20 Peter Ekberg * m4/libtool.m4 (_LT_LINKER_SHLIBS) [ irix5, irix6, nonstopux ]: diff --git a/m4/libtool.m4 b/m4/libtool.m4 index b24b83477..f7b0c785e 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -192,7 +192,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o -cc_basename=`$ECHO X"$compiler" | $Xsed -e 's%^.*/%%'` +cc_basename=`$ECHO "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file @@ -4675,7 +4676,8 @@ if test "$_lt_caught_CXX_error" != yes; then CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC - cc_basename=`$ECHO X"$compiler" | $Xsed -e 's%^.*/%%'` + cc_basename=`$ECHO "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the @@ -5778,7 +5780,8 @@ if test "$_lt_caught_F77_error" != yes; then CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC - cc_basename=`$ECHO X"$compiler" | $Xsed -e 's%^.*/%%'` + cc_basename=`$ECHO "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) diff --git a/tests/sh.test b/tests/sh.test index 84deb1123..f8c9b7de6 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -105,4 +105,14 @@ func_foo () fi done +for s in "$srcdir/../m4/libtool.m4" +do + if $SED -n '/case \$cc_basename in/,/esac/ { + /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p + };' $s | $EGREP .; then + echo "\$cc_basename matches should include a trailing \`*' in $s." + status=$EXIT_FAILURE + fi +done + exit $status