aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-02-11 13:08:55 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-03-24 11:37:42 +0100
commit999982b06ce1d1280e5ce48f9253c6c536f41a12 (patch)
treea1ca9d806ad795669812e6b68d315947dc0c99e3 /configure.ac
parentfae679065e4ef0c6383bbdd1876aaed6c1e40104 (diff)
build: Add --enable-c++20 option
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 63ff6a1ebd..f59418205c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,8 +78,18 @@ AC_ARG_WITH([seccomp],
[seccomp_found=$withval],
[seccomp_found=auto])
+AC_ARG_ENABLE([c++20],
+ [AS_HELP_STRING([--enable-c++20],
+ [enable compilation in c++20 mode (disabled by default)])],
+ [use_cxx20=$enableval],
+ [use_cxx20=no])
+
dnl Require C++17 compiler (no GNU extensions)
+if test "$use_cxx20" = "no"; then
AX_CXX_COMPILE_STDCXX([17], [noext], [mandatory])
+else
+AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
+fi
dnl Check if -latomic is required for <std::atomic>
CHECK_ATOMIC