aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2013-04-03 00:41:02 +0000
committerdos-reis <gdr@axiomatics.org>2013-04-03 00:41:02 +0000
commit1e979a3c60f7e79ee8aa3aef8f9d4bb354b17bc1 (patch)
tree0b98d1fee5b751b5ac4d7efd1be0cda12b898049 /config
parent090f72206483b1a918705c079384e9cd2a190671 (diff)
downloadopen-axiom-1e979a3c60f7e79ee8aa3aef8f9d4bb354b17bc1.tar.gz
* config/open-axiom.m4 (OPENAXIOM_REQUIRE_CXX11): New.
* configure.ac: Use it.
Diffstat (limited to 'config')
-rw-r--r--config/open-axiom.m415
1 files changed, 14 insertions, 1 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4
index 90f3e8cd..842e3682 100644
--- a/config/open-axiom.m4
+++ b/config/open-axiom.m4
@@ -216,6 +216,19 @@ case $host in
esac
])
+dnl -----------------------------
+dnl -- OPENAXIOM_REQUIRE_CXX11 --
+dnl -----------------------------
+AC_DEFUN([OPENAXIOM_REQUIRE_CXX11],[
+oa_saved_cxxflags=$CXXFLAGS
+CXXFLAGS="-std=c++11"
+AC_MSG_CHECKING([whether $CXX supports $CXXFLAGS])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
+ [AC_MSG_RESULT([yes])]
+ [CXXFLAGS="$CXXFLAGS $oa_saved_cxxflags"],
+ [AC_MSG_ERROR([OpenAxiom requires a C++11 compiler])])
+])
+
dnl ------------------------------
dnl -- OPENAXIOM_HOST_COMPILERS --
dnl ------------------------------
@@ -229,7 +242,7 @@ OPENAXIOM_CHECK_DELAYED_FFI
## Are we using compilers from GNU?
oa_gnu_compiler=no
AC_PROG_CC
-AC_PROG_CXX
+AC_PROG_CXX([g++ clang++ icpc icc CC xlC c++])
if test x$GCC = xyes || test x$GXX = xyes; then
oa_gnu_compiler=yes
fi