]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* configure.ac, libtool.m4: Ensure that a c++ compiler exists before
authorPeter O'Gorman <peter@pogma.com>
Thu, 12 Aug 2004 12:29:19 +0000 (12:29 +0000)
committerPeter O'Gorman <peter@pogma.com>
Thu, 12 Aug 2004 12:29:19 +0000 (12:29 +0000)
checking for the c++ preprocessor. Apparently reported by multiple
people, multiple times.

ChangeLog
configure.ac
libtool.m4

index 9da79a0fe1cb8c8f4cfc0ecbb18c8fa9a9dac442..356696a71ada704b4f30e84ec888d99179fa5c34 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-08-12  Peter O'Gorman  <peter@pogma.com>
 
+       * 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.
 
index e69f66e3015be6d8cac1fd0b47cda7b7820dcd98..078b6baeb61c3d761338856ec1ca98cdad279c8f 100644 (file)
@@ -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
index afa4421a4a1bcabd51de864bd413fe1ff5715516..19cf9219125a2e0ede9142dc57668927659e6029 100644 (file)
@@ -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)=