]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4 (_LT_CC_BASENAME): New macro to figure out $cc_basename.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 15 Apr 2005 13:38:13 +0000 (13:38 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Fri, 15 Apr 2005 13:38:13 +0000 (13:38 +0000)
Skip ccache, distcc, purify, cmdline options, `$host_alias-' prefix.
(AC_LIBTOOL_SETUP, AC_LIBTOOL_LANG_CXX_CONFIG,
AC_LIBTOOL_LANG_F77_CONFIG,  AC_LIBTOOL_LANG_GCJ_CONFIG,
AC_LIBTOOL_LANG_RC_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS): Use.
* NEWS: Update.

ChangeLog
NEWS
libtool.m4

index 651f717bc49cecf36d8fb46a91a4e26a24d7043b..bebcf7eea5b647ca7502bedfbb6d7d839d3144f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-04-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * libtool.m4 (_LT_CC_BASENAME): New macro to figure out $cc_basename.
+       Skip ccache, distcc, purify, cmdline options, `$host_alias-' prefix.
+       (AC_LIBTOOL_SETUP, AC_LIBTOOL_LANG_CXX_CONFIG,
+       AC_LIBTOOL_LANG_F77_CONFIG,  AC_LIBTOOL_LANG_GCJ_CONFIG,
+       AC_LIBTOOL_LANG_RC_CONFIG, AC_LIBTOOL_PROG_LD_SHLIBS): Use.
+       * NEWS: Update.
+
 2005-04-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * libtool.m4 (AC_LIBTOOL_SETUP, AC_LIBTOOL_CONFIG): Fix
diff --git a/NEWS b/NEWS
index e16b3260767382ce3edfe6f82dac2210e15a5bd8..52cab4008c5316a061f76c1ea50ef1226c09c264 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ NEWS - list of user-visible changes between releases of GNU Libtool
 New in 1.5.15a: 2005-??-??; CVS version 1.5.15a, Libtool team:
 * 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.
 * Bug Fixes.
 \f
 New in 1.5.14: 2005-02-12; CVS version 1.5.13a, Libtool team:
index 16cd67b214a49ad17779a12a1961eb8c1f818851..444f84295422982673907358fa855d772563cb3b 100644 (file)
@@ -185,8 +185,7 @@ if test -n "$RANLIB"; then
   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
-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
 case $deplibs_check_method in
@@ -233,6 +232,20 @@ compiler=$CC
 ])# _LT_AC_SYS_COMPILER
 
 
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
+AC_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_AC_SYS_LIBPATH_AIX
 # ----------------------
 # Links a minimal program and checks the executable
@@ -2670,8 +2683,7 @@ 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%.*/%%;s%^[  ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 
 # We don't want -fno-exception wen compiling C++ code, so set the
 # no_builtin_flag separately
@@ -3736,8 +3748,7 @@ lt_save_CC="$CC"
 CC=${F77-"f77"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo "X$compiler" \
-     | $Xsed -e 's%.*/%%;s%^[  ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 
 AC_MSG_CHECKING([if libtool supports shared libraries])
 AC_MSG_RESULT([$can_build_shared])
@@ -3817,8 +3828,7 @@ lt_save_CC="$CC"
 CC=${GCJ-"gcj"}
 compiler=$CC
 _LT_AC_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_AC_TAGVAR(archive_cmds_need_lc, $1)=no
@@ -3874,8 +3884,7 @@ lt_save_CC="$CC"
 CC=${RC-"windres"}
 compiler=$CC
 _LT_AC_TAGVAR(compiler, $1)=$CC
-cc_basename=`$echo "X$compiler" \
-     | $Xsed -e 's%.*/%%;s%^[  ]*\([^  ]*\).*$%\1%'`
+_LT_CC_BASENAME([$compiler])
 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
 
 AC_LIBTOOL_CONFIG($1)
@@ -5151,8 +5160,7 @@ 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%.*/%%;s%^[         ]*\([^  ]*\).*$%\1%'`
+  _LT_CC_BASENAME([$compiler])
   case $host_os in
   cygwin* | mingw* | pw32*)
     # FIXME: the MSVC++ port hasn't been tested in a loooong time