summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>2005-04-15 13:36:56 +0000
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>2005-04-15 13:36:56 +0000
commit5b9fd5f43a2055801f7bd74d90652adf42394cdb (patch)
tree5cca7f765d44e9d6670682d1bc48b8d54e1c00ff
parentebb37d1a3921aeaa085a3885af8f4f7a1da887fa (diff)
downloadlibtool-5b9fd5f43a2055801f7bd74d90652adf42394cdb.tar.gz
* 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.
-rw-r--r--ChangeLog8
-rw-r--r--NEWS1
-rw-r--r--TODO2
-rw-r--r--m4/libtool.m429
4 files changed, 28 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 62e163c4..ee79fe29 100644
--- 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 e2fdca8c..4957862b 100644
--- 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.
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 093d72ca..20781cb1 100644
--- 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
------------
diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 8f322397..bc7956be 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -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