From 0adc37ab3fd90da4eae7f49d6cd5f59af7ad5522 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Mon, 21 Mar 2005 18:16:49 +0000 Subject: [PATCH] * libtool.m4 (AC_LIBTOOL_SETUP, AC_LIBTOOL_LANG_CXX_CONFIG, AC_LIBTOOL_LANG_F77_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS): For matching compiler names: Pick only first word, allow leading white space.. * tests/sh.test: ..and test for missing `*' at end of patterns. --- ChangeLog | 9 +++++++++ libtool.m4 | 12 ++++++++---- tests/sh.test | 10 ++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a6b21e89..f17aaefb2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-05-21 Gary V. Vaughan , + Ralf Wildenhues + + * libtool.m4 (AC_LIBTOOL_SETUP, AC_LIBTOOL_LANG_CXX_CONFIG, + AC_LIBTOOL_LANG_F77_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS): + 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-19 Ralf Wildenhues * tests/demo-nopic.test: Enhance status output diff --git a/libtool.m4 b/libtool.m4 index f1a787348..4cc6f45e2 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -185,7 +185,8 @@ if test -n "$RANLIB"; then old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi -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 case $deplibs_check_method in @@ -2668,7 +2669,8 @@ test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +cc_basename=`$echo "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately @@ -3733,7 +3735,8 @@ lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC -cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` +cc_basename=`$echo "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -5143,7 +5146,8 @@ ifelse([$1],[CXX],[ # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. - cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + cc_basename=`$echo "X$compiler" \ + | $Xsed -e 's%.*/%%;s%^[ ]*\([^ ]*\).*$%\1%'` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time diff --git a/tests/sh.test b/tests/sh.test index 95907442b..1ee752e2c 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -74,4 +74,14 @@ if $EGREP -n -e '"[^`"]*`[^"`]*"[^"`]*".*`[^`"]*"' $scripts | \ status=1 fi +for s in "$srcdir/../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 -- 2.47.3