From 7cbfebbf3df0d26f518811e0bfb7abf270c83e37 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 10 Apr 2020 22:17:04 -0700 Subject: Update ax_cxx_compile_stdcxx.m4 --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6526c38da0..6bc64c0fea 100644 --- a/configure.ac +++ b/configure.ac @@ -62,7 +62,7 @@ case $host in ;; esac dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory], [nodefault]) +AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) dnl Check if -latomic is required for CHECK_ATOMIC -- cgit v1.2.3 From 7829685e27aae25efb32e07368175c8f664b2218 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 11 Apr 2020 00:30:43 -0700 Subject: Add configure option for c++17 --- configure.ac | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 6bc64c0fea..37fec20522 100644 --- a/configure.ac +++ b/configure.ac @@ -61,8 +61,20 @@ case $host in lt_cv_deplibs_check_method="pass_all" ;; esac -dnl Require C++11 compiler (no GNU extensions) -AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) + +AC_ARG_ENABLE([c++17], + [AS_HELP_STRING([--enable-c++17], + [enable compilation in c++17 mode (disabled by default)])], + [use_cxx17=$enableval], + [use_cxx17=no]) + +dnl Require C++11 or C++17 compiler (no GNU extensions) +if test "x$use_cxx17" = xyes; then + AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory]) +else + AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) +fi + dnl Check if -latomic is required for CHECK_ATOMIC -- cgit v1.2.3