From 653ce3550d18a07194a4c3bb9b4a3d260ed842cd Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 13 Jul 2019 18:33:40 -0400 Subject: Require C++-11 Includes updates to m4/ax_cxx_compile_stdcxx.m4 to make it work with msvc, which supports C++-11 with no flags but doesn't set __cplusplus to a recent value. --- m4/ax_cxx_compile_stdcxx.m4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) mode change 100755 => 100644 m4/ax_cxx_compile_stdcxx.m4 (limited to 'm4/ax_cxx_compile_stdcxx.m4') diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 old mode 100755 new mode 100644 index 43087b2e..0aa8eb65 --- a/m4/ax_cxx_compile_stdcxx.m4 +++ b/m4/ax_cxx_compile_stdcxx.m4 @@ -92,7 +92,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf dnl Cray's crayCC needs "-h std=c++11" for alternative in ${ax_cxx_compile_alternatives}; do - for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do + for switch in "" -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, @@ -165,7 +165,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201103L +#elif __cplusplus < 201103L && ! defined(_MSC_VER) #error "This is not a C++11 compiler" @@ -456,7 +456,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201402L +#elif __cplusplus < 201402L && ! defined(_MSC_VER) #error "This is not a C++14 compiler" @@ -580,7 +580,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ #error "This is not a C++ compiler" -#elif __cplusplus < 201703L +#elif __cplusplus < 201703L && ! defined(_MSC_VER) #error "This is not a C++17 compiler" -- cgit v1.2.3-54-g00ecf