]> git.ipfire.org Git - thirdparty/autoconf.git/commit
AC_PROG_CXX now tries C++23, C++20, C++17, C++14
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 May 2024 16:20:56 +0000 (09:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 May 2024 16:24:02 +0000 (09:24 -0700)
commitf6522328c71a62e3d182def319167ac15c8feaa5
tree392cfdf21999b9027128d4d376cb3b482d776475
parente6c9cb69c8c0a4ef9ce0538d7b4106dad3d7ad47
AC_PROG_CXX now tries C++23, C++20, C++17, C++14

The recent glitch with C++11 underscores the fact that it’s
long past time for Autoconf to catch up with the C++ standards.
Add simple tests for each iteration of the C++ standard.
They can be improved later as needed.  When testing for these
newer standards, do not also test for features required by earlier
standards, as this isn’t all that helpful, leads to an O(N**2)
growth of ‘configure’, and can result in problems such as the
C++11 vs C++20 bug recently fixed.
* lib/autoconf/c.m4 (_AC_CXX_CXX14_TEST_PROGRAM)
(_AC_CXX_CXX17_TEST_PROGRAM, _AC_CXX_CXX20_TEST_PROGRAM)
(_AC_CXX_CXX23_TEST_PROGRAM, _AC_CXX_CXX14_OPTIONS)
(_AC_CXX_CXX17_OPTIONS, _AC_CXX_CXX20_OPTIONS)
(_AC_CXX_CXX23_OPTIONS): New macros.
(_AC_C_C23_TEST_PROGRAM, _AC_C_C23_OPTIONS): New macros.
(_AC_PROG_CC_STDC_EDITION): Try C23 first.
(_AC_PROG_CXX_STDCXX_EDITION): Use them.
NEWS
doc/autoconf.texi
lib/autoconf/c.m4