From: Robert Boehne Date: Mon, 1 Apr 2002 22:49:08 +0000 (+0000) Subject: * ltmain.in: Handle the case when no tag is explicitly set, and X-Git-Tag: release-1-5~126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77082a4f971e2b7fee5e4572adb5ce2b78f8a78c;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 80b4370b0..fe7552f95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-04-01 Robert Boehne + + * 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 * tagdemo/foo.cpp: Use C++ IO to catch problems linking to C++ diff --git a/ltmain.in b/ltmain.in index a5134efe2..7f38c122e 100644 --- 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