From: Peter O'Gorman Date: Thu, 12 Aug 2004 12:29:19 +0000 (+0000) Subject: * configure.ac, libtool.m4: Ensure that a c++ compiler exists before X-Git-Tag: release-1-5-10~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d02623d2731f4f29b089d5d03a438d3618957810;p=thirdparty%2Flibtool.git * configure.ac, libtool.m4: Ensure that a c++ compiler exists before checking for the c++ preprocessor. Apparently reported by multiple people, multiple times. --- diff --git a/ChangeLog b/ChangeLog index 9da79a0fe..356696a71 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-08-12 Peter O'Gorman + * configure.ac, libtool.m4: Ensure that a c++ compiler exists before + checking for the c++ preprocessor. Apparently reported by multiple + people, multiple times. + * libtool.m4 [GNU/linux] (AC_DEPLIBS_CHECK_METHOD): Cleanup, thanks to Daniel Reed. diff --git a/configure.ac b/configure.ac index e69f66e30..078b6baeb 100644 --- a/configure.ac +++ b/configure.ac @@ -104,7 +104,10 @@ AC_PROG_LN_S pushdef([AC_MSG_ERROR], [CXX=no]) AC_PROG_CXX popdef([AC_MSG_ERROR]) -AM_CONDITIONAL(HAVE_CXX, [test "x$CXX" != xno]) +AM_CONDITIONAL(HAVE_CXX, +[test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++")))]) pushdef([AC_MSG_ERROR], [F77=no]) AC_PROG_F77 diff --git a/libtool.m4 b/libtool.m4 index afa4421a4..19cf92191 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -1688,7 +1688,9 @@ if test -f "$ltmain" && test -n "$tagnames"; then case $tagname in CXX) - if test -n "$CXX" && test "X$CXX" != "Xno"; then + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" @@ -2423,10 +2425,21 @@ AC_DEFUN([AC_LIBTOOL_CXX], # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX +# _LT_AC_PROG_CXXCPP +# --------------- +AC_DEFUN([_LT_AC_PROG_CXXCPP], +[ +AC_REQUIRE([AC_PROG_CXX]) +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +fi +])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- @@ -2591,7 +2604,7 @@ AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) -AC_REQUIRE([AC_PROG_CXXCPP]) +AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)=