aboutsummaryrefslogtreecommitdiffstats
path: root/m4/ax_cxx_compile_stdcxx.m4
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2019-07-14 00:33:40 +0200
committerJay Berkenbilt <ejb@ql.org>2019-11-09 14:18:02 +0100
commit653ce3550d18a07194a4c3bb9b4a3d260ed842cd (patch)
treef08b5d5ddd43bf2b529d9623f045a541f379b3c4 /m4/ax_cxx_compile_stdcxx.m4
parenta1fd00e7e15219c97057c2e245ea9dd0341429d5 (diff)
downloadqpdf-653ce3550d18a07194a4c3bb9b4a3d260ed842cd.tar.zst
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.
Diffstat (limited to 'm4/ax_cxx_compile_stdcxx.m4')
-rw-r--r--[-rwxr-xr-x]m4/ax_cxx_compile_stdcxx.m48
1 files changed, 4 insertions, 4 deletions
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
index 43087b2e..0aa8eb65 100755..100644
--- 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"