@@ -675,7 +675,7 @@ ANDROID_HOST_TRUE
675675LINUX_HOST_FALSE
676676LINUX_HOST_TRUE
677677WARN_CXXFLAGS
678- HAVE_CXX17
678+ HAVE_CXX20
679679HAVE_MEMFD_CREATE_FALSE
680680HAVE_MEMFD_CREATE_TRUE
681681HAVE_GETCONTEXT_FALSE
@@ -7594,17 +7594,17 @@ fi
75947594
75957595
75967596
7597- ax_cxx_compile_alternatives=" 17 1z " ax_cxx_compile_cxx17_required =true
7597+ ax_cxx_compile_alternatives=" 20 " ax_cxx_compile_cxx20_required =true
75987598 ac_ext=cpp
75997599ac_cpp=' $CXXCPP $CPPFLAGS'
76007600ac_compile=' $CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
76017601ac_link=' $CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
76027602ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
76037603 ac_success=no
76047604
7605- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++17 features by default" >&5
7606- printf %s " checking whether $CXX supports C++17 features by default... " >&6 ; }
7607- if test ${ax_cv_cxx_compile_cxx17 +y}
7605+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++20 features by default" >&5
7606+ printf %s " checking whether $CXX supports C++20 features by default... " >&6 ; }
7607+ if test ${ax_cv_cxx_compile_cxx20 +y}
76087608then :
76097609 printf %s " (cached) " >&6
76107610else $as_nop
@@ -8400,27 +8400,53 @@ namespace cxx17
84008400
84018401
84028402
8403+
8404+ #ifndef __cplusplus
8405+
8406+ #error "This is not a C++ compiler"
8407+
8408+ #elif __cplusplus < 202002L && !defined _MSC_VER
8409+
8410+ #error "This is not a C++20 compiler"
8411+
8412+ #else
8413+
8414+ #include <version>
8415+
8416+ namespace cxx20
8417+ {
8418+
8419+ // As C++20 supports feature test macros in the standard, there is no
8420+ // immediate need to actually test for feature availability on the
8421+ // Autoconf side.
8422+
8423+ } // namespace cxx20
8424+
8425+ #endif // __cplusplus < 202002L && !defined _MSC_VER
8426+
8427+
8428+
84038429_ACEOF
84048430if ac_fn_cxx_try_compile " $LINENO "
84058431then :
8406- ax_cv_cxx_compile_cxx17 =yes
8432+ ax_cv_cxx_compile_cxx20 =yes
84078433else $as_nop
8408- ax_cv_cxx_compile_cxx17 =no
8434+ ax_cv_cxx_compile_cxx20 =no
84098435fi
84108436rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
84118437fi
8412- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ax_cv_cxx_compile_cxx17 " >&5
8413- printf " %s\n" " $ax_cv_cxx_compile_cxx17 " >&6 ; }
8414- if test x$ax_cv_cxx_compile_cxx17 = xyes; then
8438+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : result: $ax_cv_cxx_compile_cxx20 " >&5
8439+ printf " %s\n" " $ax_cv_cxx_compile_cxx20 " >&6 ; }
8440+ if test x$ax_cv_cxx_compile_cxx20 = xyes; then
84158441 ac_success=yes
84168442 fi
84178443
84188444 if test x$ac_success = xno; then
84198445 for alternative in ${ax_cxx_compile_alternatives} ; do
84208446 switch=" -std=gnu++${alternative} "
8421- cachevar=` printf " %s\n" " ax_cv_cxx_compile_cxx17_ $switch " | $as_tr_sh `
8422- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++17 features with $switch " >&5
8423- printf %s " checking whether $CXX supports C++17 features with $switch ... " >&6 ; }
8447+ cachevar=` printf " %s\n" " ax_cv_cxx_compile_cxx20_ $switch " | $as_tr_sh `
8448+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++20 features with $switch " >&5
8449+ printf %s " checking whether $CXX supports C++20 features with $switch ... " >&6 ; }
84248450if eval test \$ {$cachevar +y}
84258451then :
84268452 printf %s " (cached) " >&6
@@ -9219,6 +9245,32 @@ namespace cxx17
92199245
92209246
92219247
9248+
9249+ #ifndef __cplusplus
9250+
9251+ #error "This is not a C++ compiler"
9252+
9253+ #elif __cplusplus < 202002L && !defined _MSC_VER
9254+
9255+ #error "This is not a C++20 compiler"
9256+
9257+ #else
9258+
9259+ #include <version>
9260+
9261+ namespace cxx20
9262+ {
9263+
9264+ // As C++20 supports feature test macros in the standard, there is no
9265+ // immediate need to actually test for feature availability on the
9266+ // Autoconf side.
9267+
9268+ } // namespace cxx20
9269+
9270+ #endif // __cplusplus < 202002L && !defined _MSC_VER
9271+
9272+
9273+
92229274_ACEOF
92239275if ac_fn_cxx_try_compile " $LINENO "
92249276then :
@@ -9246,9 +9298,9 @@ printf "%s\n" "$ac_res" >&6; }
92469298 if test x$ac_success = xno; then
92479299 for alternative in ${ax_cxx_compile_alternatives} ; do
92489300 for switch in -std=c++${alternative} +std=c++${alternative} " -h std=c++${alternative} " ; do
9249- cachevar=` printf " %s\n" " ax_cv_cxx_compile_cxx17_ $switch " | $as_tr_sh `
9250- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++17 features with $switch " >&5
9251- printf %s " checking whether $CXX supports C++17 features with $switch ... " >&6 ; }
9301+ cachevar=` printf " %s\n" " ax_cv_cxx_compile_cxx20_ $switch " | $as_tr_sh `
9302+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : checking whether $CXX supports C++20 features with $switch " >&5
9303+ printf %s " checking whether $CXX supports C++20 features with $switch ... " >&6 ; }
92529304if eval test \$ {$cachevar +y}
92539305then :
92549306 printf %s " (cached) " >&6
@@ -10047,6 +10099,32 @@ namespace cxx17
1004710099
1004810100
1004910101
10102+
10103+ #ifndef __cplusplus
10104+
10105+ #error "This is not a C++ compiler"
10106+
10107+ #elif __cplusplus < 202002L && !defined _MSC_VER
10108+
10109+ #error "This is not a C++20 compiler"
10110+
10111+ #else
10112+
10113+ #include <version>
10114+
10115+ namespace cxx20
10116+ {
10117+
10118+ // As C++20 supports feature test macros in the standard, there is no
10119+ // immediate need to actually test for feature availability on the
10120+ // Autoconf side.
10121+
10122+ } // namespace cxx20
10123+
10124+ #endif // __cplusplus < 202002L && !defined _MSC_VER
10125+
10126+
10127+
1005010128_ACEOF
1005110129if ac_fn_cxx_try_compile " $LINENO "
1005210130then :
@@ -10080,19 +10158,19 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1008010158ac_link=' $CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1008110159ac_compiler_gnu=$ac_cv_c_compiler_gnu
1008210160
10083- if test x$ax_cxx_compile_cxx17_required = xtrue; then
10161+ if test x$ax_cxx_compile_cxx20_required = xtrue; then
1008410162 if test x$ac_success = xno; then
10085- as_fn_error $? " *** A compiler with support for C++17 language features is required." " $LINENO " 5
10163+ as_fn_error $? " *** A compiler with support for C++20 language features is required." " $LINENO " 5
1008610164 fi
1008710165 fi
1008810166 if test x$ac_success = xno; then
10089- HAVE_CXX17 =0
10090- { printf " %s\n" " $as_me :${as_lineno-$LINENO } : No compiler with C++17 support was found" >&5
10091- printf " %s\n" " $as_me : No compiler with C++17 support was found" >&6 ; }
10167+ HAVE_CXX20 =0
10168+ { printf " %s\n" " $as_me :${as_lineno-$LINENO } : No compiler with C++20 support was found" >&5
10169+ printf " %s\n" " $as_me : No compiler with C++20 support was found" >&6 ; }
1009210170 else
10093- HAVE_CXX17 =1
10171+ HAVE_CXX20 =1
1009410172
10095- printf " %s\n" " #define HAVE_CXX17 1" >> confdefs.h
10173+ printf " %s\n" " #define HAVE_CXX20 1" >> confdefs.h
1009610174
1009710175 fi
1009810176
0 commit comments