From: Ossama Othman Date: Sat, 4 Dec 1999 21:06:46 +0000 (+0000) Subject: Change name of macro that enables C++ support in libtool from X-Git-Tag: multi-language-merge-point~272 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=baa6a6a4747cc2cdc366420561a737faf091bf10;p=thirdparty%2Flibtool.git Change name of macro that enables C++ support in libtool from "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. --- diff --git a/libtool.m4 b/libtool.m4 index b5912648c..58cde52d7 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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