]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Check that the C++ compiler actually works. 1574/head
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 19 Jul 2014 11:18:10 +0000 (13:18 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 19 Jul 2014 11:18:10 +0000 (13:18 +0200)
AC_PROG_CXX still sets CXX, even if it doesn't
find a working C++ compiler:

http://osdir.com/ml/bug-autoconf-gnu/2010-05/msg00002.html

This causes the Boost checks to fail.

If AC_PROG_CXX finds a working compiler, it sets the GXX shell
variable. Test for this.

Fixes #1178

configure.ac

index 095e90ae3ce6f2afd0aee0e558f9b89ba9d56652..f94695c05d053e577222639f8dd2d89c74f5e9e0 100644 (file)
@@ -18,13 +18,17 @@ AC_C_BIGENDIAN
 : ${CXXFLAGS="-Wall -O2"}
 
 AC_PROG_CC
-AC_PROG_CXX
 AM_PROG_CC_C_O
 AC_PROG_YACC
 AM_PROG_LEX
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 
+AC_PROG_CXX
+AS_IF([test "x$CXX" = "xno" || test "x$CXX:x$GXX" = "xg++:x"],
+  AC_MSG_ERROR([no C++ compiler found])
+)
+
 AC_LANG([C++])
 
 AC_CHECK_FUNC([socket], [], [