]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Change name of macro that enables C++ support in libtool from
authorOssama Othman <ossama@debian.org>
Sat, 4 Dec 1999 21:06:46 +0000 (21:06 +0000)
committerOssama Othman <ossama@debian.org>
Sat, 4 Dec 1999 21:06:46 +0000 (21:06 +0000)
"AC_LIBTOOL_CPP" to "AC_LIBTOOL_CXX."  "CPP" is typically
associated with preprocessors, whereas CXX is associated with C++
compilers.

Moved LTCC before CC in call to ltconfig to make sure LTCC is not
set to the compiler pointed to by CC after CC has been reset to
another compiler.

Call ltconfig with ${CONFIG_SHELL-/bin/sh} just like we do in
AC_PROG_LIBTOOL.

Save value of $CC and $CFLAGS before resetting them for use with
configuration tags.

libtool.m4

index b5912648c5f7069c4fc9339caab69c8201d40924..58cde52d7416b793d9f066e36c3754dc1576b4fc 100644 (file)
@@ -669,12 +669,18 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   fi
 ])
 
-# AC_LIBTOOL_CPP - enable checks for C++ support
-AC_DEFUN(AC_LIBTOOL_CPP,
+# AC_LIBTOOL_CXX - enable support for C++ libraries
+AC_DEFUN(AC_LIBTOOL_CXX,
 [AC_REQUIRE([AC_PROG_CXX])
 AC_REQUIRE([AC_PROG_CXXCPP])
 AC_REQUIRE([AC_PROG_LIBTOOL])
-CC=$CXX CFLAGS=$CXXFLAGS LTCC=$CC $ac_aux_dir/ltconfig -o libtool --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh
+lt_save_CC="$CC"
+lt_save_CFLAGS="$CFLAGS"
+dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
+dnl is set to the C++ compiler.
+LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh || AC_MSG_ERROR([libtool tag configuration failed])
+CC="$lt_save_CC"
+CFLAGS="$lt_save_CFLAGS"
 ])
 
 dnl old names