build: Require C++20 compiler

This commit is contained in:
MarcoFalke
2023-08-27 10:45:39 +02:00
parent dce1dfbc47
commit fa67f096bd
7 changed files with 8 additions and 18 deletions

View File

@@ -96,18 +96,8 @@ case $host in
;;
esac
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
dnl Require C++20 compiler (no GNU extensions)
AX_CXX_COMPILE_STDCXX([20], [noext], [mandatory])
fi
dnl Unless the user specified OBJCXX, force it to be the same as CXX. This ensures
dnl that we get the same -std flags for both.