From: Ralf Wildenhues Date: Mon, 21 Mar 2005 17:59:39 +0000 (+0000) Subject: * m4/libtool.m4 (_LT_SETUP, _LT_LANG_CXX_CONFIG, * _LT_LANG_F77_CONFIG): X-Git-Tag: release-2-1b~707 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2803fc9eeb6aa485c30720edf0f5796f695b0ab7;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 e6e1e7247..3bfb9b5b5 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-21 Ralf Wildenhues * TODO: Update. diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 17b7f743e..e18213ad9 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -193,7 +193,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 @@ -4681,7 +4682,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 @@ -5784,7 +5786,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