]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* m4/libtool.m4 (_LT_CC_BASENAME): New macro to figure out $cc_basename.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 15 Apr 2005 13:36:56 +0000 (13:36 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 15 Apr 2005 13:36:56 +0000 (13:36 +0000)
Skip ccache, distcc, purify, cmdline options, `$host_alias-' prefix.
(_LT_SETUP, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
_LT_LANG_GCJ_CONFIG, _LT_LANG_RC_CONFIG): Use.
* NEWS, TODO: Update.

ChangeLog
NEWS
TODO
m4/libtool.m4

index 62e163c4981e57ebddc7135a47bc35b429e2f269..ee79fe2951886a5cf6b4d45db76f9533ebbe5ee9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-04-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * m4/libtool.m4 (_LT_CC_BASENAME): New macro to figure out $cc_basename.
+       Skip ccache, distcc, purify, cmdline options, `$host_alias-' prefix.
+       (_LT_SETUP, _LT_LANG_CXX_CONFIG, _LT_LANG_F77_CONFIG,
+       _LT_LANG_GCJ_CONFIG, _LT_LANG_RC_CONFIG): Use.
+       * NEWS, TODO: Update.
+
 2005-04-15  Gary V. Vaughan  <gary@gnu.org>
 
        * libltdl/configure.ac (AC_OUTPUT): loaders/Makefile is no longer
diff --git a/NEWS b/NEWS
index e2fdca8c5f460bb37a5126340f804aaa1154075a..4957862befee0a5430246e5adf40e3ab3bfb27a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@ New in 2.1b: 2005-??-??; CVS version 2.1a, Libtool team:
 * Support (mostly) for DragonFly BSD.
 * Allow shell special characters like `$' in source file names, but not
   in object names, to enhance GCJ support.
+* Detection of compiler wrappers like distcc/ccache and $host_alias prefix.
 \f
 New in 1.9h: 2004-??-??; CVS version 1.9g, Libtool team:
 * Libtool versions can now be parallel installed, except that only one
diff --git a/TODO b/TODO
index 093d72ca8878f2ae15aaee006d8eb450afe68e61..20781cb15710d63aa3949a987512e2eab4ecea69 100644 (file)
--- a/TODO
+++ b/TODO
@@ -118,8 +118,6 @@ GNU Libtool
     - cross compile
     - dirs with ~
     - multiple input files
-    - look at the wrapper-in-wrapper problem: `libtool' vs.
-        distcc, ccache, mpicc.
 
 2.3. libtool
 ------------
index 8f32239751dbcbfb558b3ceaf175015432b4f701..bc7956be5d3afa3c8cc6a441bf64720ec7e19ddb 100644 (file)
@@ -90,6 +90,20 @@ dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
 
 
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+  case $cc_temp in
+    ccache | *[[\\/]]ccache | distcc | *[[\\/]]distcc | purify | *[[\\/]]purify | \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
 # _LT_SETUP
 # ---------
 m4_defun([_LT_SETUP],
@@ -193,8 +207,7 @@ 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%.*/%%;s%^[   ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 
 # Only perform the check for file, if the check method requires it
 test -z "$MAGIC_CMD" && MAGIC_CMD=file
@@ -4701,8 +4714,7 @@ 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%.*/%%;s%^[         ]*\([^  ]*\).*$%\1%'`
+  _LT_CC_BASENAME([$compiler])
 
   if test -n "$compiler"; then
     # We don't want -fno-exception when compiling C++ code, so set the
@@ -5828,8 +5840,7 @@ 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%.*/%%;s%^[         ]*\([^  ]*\).*$%\1%'`
+  _LT_CC_BASENAME([$compiler])
 
   if test -n "$compiler"; then
     AC_MSG_CHECKING([if libtool supports shared libraries])
@@ -5917,8 +5928,7 @@ lt_save_CC="$CC"
 CC=${GCJ-"gcj"}
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-cc_basename=`$ECHO "X$compiler" \
-    | $Xsed -e 's%.*/%%;s%^[   ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 
 # GCJ did not exist at the time GCC didn't implicitly link libc in.
 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -5975,8 +5985,7 @@ lt_save_CC="$CC"
 CC=${RC-"windres"}
 compiler=$CC
 _LT_TAGVAR(compiler, $1)=$CC
-cc_basename=`$ECHO "X$compiler" \
-    | $Xsed -e 's%.*/%%;s%^[   ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
 if test -n "$compiler"; then