]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltmain.in: Handle the case when no tag is explicitly set, and
authorRobert Boehne <rboehne@gnu.org>
Mon, 1 Apr 2002 22:49:08 +0000 (22:49 +0000)
committerRobert Boehne <rboehne@gnu.org>
Mon, 1 Apr 2002 22:49:08 +0000 (22:49 +0000)
$base_compile has a space in front of $CC, and revert the setting
of tagname checked in on 2002-3-14.

ChangeLog
ltmain.in

index 80b4370b00bce7344ac2715bfe72ef414f4383c5..fe7552f9552d5a5ffe87c408c36569a128448cfd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-04-01  Robert Boehne  <rboehne@gnu.org>
+
+       * ltmain.in: Handle the case when no tag is explicitly set, and
+       $base_compile has a space in front of $CC, and revert the setting
+       of tagname checked in on 2002-3-14.
+
 2002-04-01  Robert Boehne  <rboehne@gnu.org>
 
        * tagdemo/foo.cpp: Use C++ IO to catch problems linking to C++
index a5134efe2e76cfc27dd1074b0581c7f4e8ff5534..7f38c122e8e7ca7b5da2839c3931ba993da44208 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -105,9 +105,6 @@ execute_dlfiles=
 lo2o="s/\\.lo\$/.${objext}/"
 o2lo="s/\\.${objext}\$/.lo/"
 
-# set the tag name so that it defaults to CC
-tagname="CC"
-
 # Parse our command line options once, thoroughly.
 while test "$#" -gt 0
 do
@@ -470,11 +467,15 @@ if test -z "$show_help"; then
     # Only attempt this if the compiler in the base compile
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
-      case "$base_compile " in
-      "$CC "*) ;;
+      case $base_compile in
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when ltconfig was run.
+      "$CC "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      " $CC "*) ;;
       "`$echo $CC` "*) ;;
+      " `$echo $CC` "*) ;;
       *)
        for z in $available_tags; do
          if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
@@ -1520,10 +1521,14 @@ EOF
     # command doesn't match the default compiler.
     if test -n "$available_tags" && test -z "$tagname"; then
       case $base_compile in
-      "$CC "*) ;;
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when ltconfig was run.
+      "$CC "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      " $CC "*) ;;
       "`$echo $CC` "*) ;;
+      " `$echo $CC` "*) ;;
       *)
        for z in $available_tags; do
          if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then