diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2020-04-11 00:30:43 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2020-04-11 02:15:25 -0700 |
commit | 7829685e27aae25efb32e07368175c8f664b2218 (patch) | |
tree | 5c9732f13b8fca67f20dd9eff0e790ace70088b8 /configure.ac | |
parent | 0fbde488b24f62b4bbbde216647941dcac65c81a (diff) |
Add configure option for c++17
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 14 insertions, 2 deletions
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 <std::atomic> CHECK_ATOMIC |