summaryrefslogtreecommitdiffstats
path: root/m4macros/ax_cpp11.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4macros/ax_cpp11.m4')
-rw-r--r--m4macros/ax_cpp11.m429
1 files changed, 3 insertions, 26 deletions
diff --git a/m4macros/ax_cpp11.m4 b/m4macros/ax_cpp11.m4
index 86f3ec4359..65a7044c4b 100644
--- a/m4macros/ax_cpp11.m4
+++ b/m4macros/ax_cpp11.m4
@@ -1,10 +1,8 @@
AC_DEFUN([AX_ISC_CPP11], [
CXX_SAVED=$CXX
-CPPFLAGS_SAVED=$CPPFLAGS
feature=
for retry in "none" "--std=c++11" "--std=c++0x" "--std=c++1x" "fail"; do
- CPPFLAGS=$CPPFLAGS_SAVED
if test "$retry" = "fail"; then
AC_MSG_ERROR([$feature (a C++11 feature) is not supported])
fi
@@ -227,38 +225,17 @@ for retry in "none" "--std=c++11" "--std=c++0x" "--std=c++1x" "fail"; do
[AC_MSG_RESULT([no])
continue])
- AC_MSG_CHECKING(noreturn support)
- feature="noreturn"
- CPPFLAGS="-Werror=implicit-fallthrough -Wimplicit-fallthrough $CPPFLAGS"
+ AC_MSG_CHECKING(chrono support)
+ feature="chrono"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [#include <cstdlib>
- [[[noreturn]]] void f() {exit(0);}],
- [int i = 0;
- switch (i) {
- case 0:
- f();
- default:
- i++;
- break;
- }])],
- [AC_MSG_RESULT([yes])],
- [AC_MSG_RESULT([no])
- continue])
- CPPFLAGS=$CPPFLAGS_SAVED
-
- AC_MSG_CHECKING(chrono support)
- feature="chrono"
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
[#include <chrono>
using namespace std::chrono;],
[auto now = high_resolution_clock::now();])],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
continue])
- break
-
+ break
done
])dnl AX_ISC_CPP11