0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-25 23:14:13 +01:00

configure: Upgrade to gnu++20.

Downgrade to gnu++2a for compatibility for now.
This commit is contained in:
Jason Volk 2022-06-17 19:27:28 -07:00
parent 78848925ee
commit 3f4621461c
2 changed files with 32 additions and 2 deletions

View file

@ -41,7 +41,8 @@ AC_PROG_LIBTOOL
AC_PROG_MAKE_SET
AC_LANG(C++)
AX_CXX_COMPILE_STDCXX([17], [gnu], [mandatory], 201703)
AX_CXX_COMPILE_STDCXX([20], [gnu], [optional], 202002)
AX_CXX_COMPILE_STDCXX([2a], [gnu], [mandatory], 201709)
dnl ***************************************************************************
@ -2558,7 +2559,7 @@ RB_HELP_STRING([--with-included-boost[[[=shared]]]], [Use the boost sources from
boost_linkage="$withval"
boost_version="boost-${BOOST_VERSION_MIN}.${BOOST_VERSION_MIN_PATCH}"
boost_cxxflags="-std=gnu++17"
boost_cxxflags="-std=gnu++20"
bash tools/boostrap.sh $BTOOLSET $BOOST_BUILT_LIBS $boost_variant $withval multi $boost_version $boost_cxxflags
AS_IF([ test $? != 0 ],
[

View file

@ -48,6 +48,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [],
[$1], [14], [],
[$1], [17], [],
[$1], [2a], [],
[$1], [20], [],
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
@ -157,6 +158,22 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1)
)
dnl Test body for checking C++2a support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_2a],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11($1)
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1)
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17($1)
)
dnl Test body for checking C++20 support
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20],
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11($1)
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14($1)
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17($1)
)
dnl Tests for new features in C++11
@ -573,3 +590,15 @@ namespace cxx14
#endif // __cplusplus >= $1L
]])
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
]])
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_2a], [[
]])
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[
]])