# Copyright (c) 2026 Autoconf Archive Maintainers Merge pull request #318 from autoconf-archive/revert-288-luajit Revert "Add LuaJIT support to AX_PROG_LUA macro" Merge pull request #327 from rrthomas/code_coverage-doc AX_CODE_COVERAGE: fix documentation AX_PTHREAD: Fix pthread detection on Solaris 11.4 AX_PTHREAD fails to detect pthread support on Solaris 11.4. This was originally noticed with the copy of ax_pthread.m4 in the GCC source tree: build: Fix ax_pthread.m4 on Solaris 11.4 https://gcc.gnu.org/pipermail/gcc-patches/2026-May/716850.html It turns out the problem is that AX_PTHREAD expects _REENTRANT to be defined on Solaris. However, as described in https://gcc.gnu.org/gcc-16/porting_to.html#solaris and Goodbye (And Good Riddance) to -mt -and -D_REENTRANT https://www.linker-aliens.org/blogs/ali/entry/mtreentrant/ referenced from there, Solaris 11.4 removed references to _REENTRANT from the Solaris system headers. Given that, GCC 16 no longers defines it with -pthread. This started when libpthread was folded into libc in Solaris 11. However, AX_PTHREAD expects _REENTRANT to be defined in multithreaded programs on Solaris, which is no longer true. To detect the situation, this patch checks for XPG7 support which was introduced together with those changes in Solaris 11.4. However, the _REENTRANT check is dubious at best. If a feature isn't detected, this may be because the corresponding feature test macros isn't defined. However, the reverse is not true: a feature way well be available be default without any feature test macro. The fix was tested in the GCC tree as described above, and manually on Solaris 11.3 where _REENTRANT is still referenced and needed. Closes #341. ax_lib_hdf5.m4: fix "The macro 'AC_HAVE_LIBRARY' is obsolete." - from https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Obsolete- Macros.html replaced with AC_CHECK_LIB Closes #342. Merge pull request #323 from jas4711/avoid-timestamps Don't embed build timestamp for AX_AM_MACROS*. Merge pull request #325 from uckelman-sf/fix_ax_pkg_check_modules_whitespace AX_PKG_CHECK_MODULES: Remove extra whitespace from PUBLIC-MODULES and PRIVATE- MODULES arguments Merge pull request #326 from Tropicao/patch-1 ax_python.m4: add new python version Merge pull request #333 from DanielEScherzer/patch-1 ax_prog_bison_version.m4: fix incorrect description Merge pull request #335 from bdrung/boost_python ax_boost_python.m4: try versioned boost_python first Merge pull request #336 from BrianAker/ax_check_compile_flag AX_CHECK_COMPILE_FLAG incorrectly accepts warning flags with GNU compilers AX_GCC_VAR_ATTRIBUTE: add a case for nonstring Without one the attribute falls to the generic fallback, which declares an int: int foo __attribute__((nonstring)); nonstring only applies to arrays and pointers of character type, so the compiler ignores it there and warns: warning: 'nonstring' attribute ignored on objects of type 'int' [-Wattributes] The macro reads any warning as the attribute being unsupported, so the check answers no on every compiler, including the ones that support it. Test it on a char array instead, which is what the attribute is for. Checked against gcc 15, gcc 16 and clang 22. ax_cxx_compile_stdcxx.m4: fix -Wunused issue with C++-17 feature test Some projects may pass `-Wunused -Werror` in as CXX/CXXFLAGS, resulting in a build failure when running the C++-17 feature tests that confirm that `constexpr` lambdas are supported. Use `static_assert` to test the value set in the test, muting the -Wunused issue found by the compiler. AX_CHECK_COMPILE_FLAG incorrectly accept unsupported warning flags with GNU compilers AX_CHECK_COMPILE_FLAG could incorrectly accept unsupported warning flags with GNU compilers because it appended -Werror after the candidate flag being tested. With GCC/G++, diagnostics for wrong-language or otherwise unsupported warning options can be order-sensitive, so a warning emitted for the tested flag may not be promoted to an error when -Werror appears later on the command line. As a result, the probe could succeed even though the flag should have been rejected. This change initializes add_gnu_werror explicitly and places -Werror before the candidate flag in the probe command, so GNU compilers fail these checks reliably. It fixes false positives during configure-time flag detection, especially for warning options that are valid in C but not C++. To highlight how the behavior correct here are two one liners: printf 'int main(){return 0;}\n' | g++-15 -Wmissing-prototypes -Werror -x c++ - printf 'int main(){return 0;}\n' | g++-15 -Werror -Wmissing-prototypes -x c++ - ax_boost_python.m4: try versioned boost_python first Multiple boot_python libraries might be installed on the system. As of March 2026 Ubuntu resolute has libraries for Python 3.13 and 3.14: ``` $ ls -1 /usr/lib/x86_64-linux-gnu/libboost_python*.so* /usr/lib/x86_64-linux-gnu/libboost_python313.so.1.90.0 /usr/lib/x86_64-linux-gnu/libboost_python314.so.1.90.0 ``` This results in picking the wrong version: ``` checking for Python include path... -I/usr/include/python3.14 checking for Python library path... -L/usr/lib/x86_64-linux-gnu -lpython3.14 checking for Python site-packages path... /usr/lib/python3.14/site-packages checking for Python platform specific site-packages path... /usr/lib/python3.14/site-packages checking python extra libraries... -ldl -lm checking python extra linking flags... -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions checking consistency of all components of python development environment... yes checking whether the Boost::Python library is available... yes checking whether boost_python is the correct library... no checking whether boost_python313 is the correct library... yes ``` So try a versioned boost_python version first before trying all available. The for loop will try `boost_python` last anyway. Bug-Ubuntu: https://launchpad.net/bugs/2143679 ax_prog_bison_version.m4: fix incorrect description If the bison version is greater than or equal to the version indicated, commands in `ACTION-IF-TRUE` are executed, otherwise commands in `ACTION-IF-FALSE` are executed. Update serial to 4. ax_code_coverage: use --coverage This GCC option has been available for 20 years, so no need to use the low-level options it implies. As a result, switch (back) to using CODE_COVERAGE_LDFLAGS, retaining CODE_COVERAGE_LIBS for backwards compatibility with earlier versions of this macro. AX_CODE_COVERAGE: fix documentation For automake, we add libraries (*_LIBS variables) to my_program_LDADD or my_library_LIBADD (not my_program_LIBS). AX_LIB_READLINE: remove a spurious line from the example usage code ax_python.m4: add new python version Projects depending on ax_python detection may fail on systems with latest python version (3.13) Add this new version to the list of searched versions AX_PKG_CHECK_MODULES: Remove extra whitespace from PUBLIC-MODULES and PRIVATE- MODULES arguments so it doesn't appear in the configure output. Don't embed build timestamp for AX_AM_MACROS*. Revert "Add LuaJIT support to AX_PROG_LUA macro" Merge pull request #317 from rmenke/rmenke/libgcov-check Make use of libgcov conditional. Merge pull request #316 from hoodmane/float-words-emscripten-fix AX_C_FLOAT_WORDS_BIGENDIAN: fix bug with Emscripten target Make use of libgcov conditional. Not all operating systems have libgcov as a separate library. Only add the library flag if the symbol is not already available. AX_C_FLOAT_WORDS_BIGENDIAN: fix bug with Emscripten target Commit 23be7ccd7f306fbc73b3f33e2f5ead716d120eef "Fix AX_C_FLOAT_WORDS_BIGENDIAN fails whenever interprocedural optimization is enabled." introduced a regression on the Emscripten target because it switched from grepping the object file where the float definitely will live, to grepping conftest$EXEEXT which in the case of Emscripten will be conftest.js but the float is in conftest.wasm. This problem is unique to Emscripten, it is not present on any other webassembly platform. To fix, grep `conftest*` for the float. Merge pull request #291 from eli-schwartz/which-hunt patch #10416: Drop unreliable dependency on `which` program, publicize settable variables in --help ax_switch_flags.m4: properly quote m4_fatal It needs to only run as an argument of m4_if, not all the time. Fixes: 2adff78e224c908fd58df91852c8301c25777a8f ax_check_glx.m4: properly quote m4_fatal It needs to only run as an argument of m4_if, not all the time. Fixes: 40ca66e7e52bb63e3eee2514855fcf3ad2df7673 ax_check_gl.m4: properly quote m4_fatal It needs to only run as an argument of m4_if, not all the time. Fixes: 753493bf7e251997f02559b98fc599d4a337d8cd Bug: https://bugs.gentoo.org/941845 Merge pull request #311 from ojwb/AX_CXX_COMPILE_STDCXX-add-missing-quoting AX_CXX_COMPILE_STDCXX: Add missing quoting AX_CXX_COMPILE_STDCXX: Add missing quoting 5b0d43b767bf3f800f97892905b6d1ba50150f1a added quoting to the definitions of _AX_CXX_COMPILE_STDCXX_testbody_11, etc but _AX_CXX_COMPILE_STDCXX_testbody_23 was missed. I haven't found a situation in which this quoting actually makes a difference, but it does seem more correct to quote here and it really should be done consistently for all the _AX_CXX_COMPILE_STDCXX_testbody_* definitions. See #308 Fix AX_CPU_FREQ - Cache variables must contain _cv_ to be cached otherwise this warning is emitted when generating configure script: AC_CACHE_VAL(ax_cpu_freq, ...): suspicious cache-id, must contain _cv_ to be cached - Arguments quoted - CPU_FREQ defined to CPU frequency only when it could be determined to avoid defining the preprocessor macro to value unknown. - Files with conftest in their name are already automatically removed by Autoconf when finishing the test, so redundant rm -f removed. Merge pull request #296 from Explorer09/ax-prog-cc-for-build AX_PROG_CC_FOR_BUILD patches that fix BUILD_{EXE,OBJ}EXT (Autoconf 2.70) ax_prog_cc_for_build: Support ac_{,cv_}build_prog_cc_stdc Improve compatibility with Autoconf 2.70 and later. Add support for these variables for indicating build compiler capabilities: ax_prog_cc_for_build: Fix ac_cv_prog_cc_c{99,11} regression Fix regression where the ac_cv_prog_cc_c99 and ac_cv_prog_cc_c11 macros are not popped after the AX_PROG_CC_FOR_BUILD call. This can cause subsequents calls of AC_PROG_CC to use wrong cache variables to indicate C standard support. (Regression from serial 19 (16790f97456a6c9b4319dd6ef7b73c9ebc8cae84). Note: It's unlikely for projects to call AC_PROG_CC again after AX_PROG_CC_FOR_BUILD, but such usage is valid.) ax_prog_cc_for_build: Tweak ac_cv_c_compiler_gnu code Adjust the code of setting ac_cv_c_compiler_gnu to align with the code of ac_cv_exeext and ac_cv_objext. The solution is now permanent rather than just a workaround. ax_prog_cc_for_build: Fix BUILD_{EXE,OBJ}EXT for Autoconf 2.70 Autoconf 2.70 introduced a change in AC_SUBST behavior that the variable name in AC_SUBST no longer gets macro expanded. This breaks the rename syntaxes of BUILD_EXEEXT and BUILD_OBJEXT in AX_PROG_CC_FOR_BUILD. Change to an alternative approach of assigning BUILD_EXEEXT and BUILD_OBJEXT manually. The values of EXEEXT and OBJEXT have to be fixed too at the end of the AX_PROG_CC_FOR_BUILD code. Revert broken part of commit 5b0d43b767bf3f800f97892905b6d1ba50150f1a This commit breaks AX_CXX_COMPILE_STDCXX noext/ext option handling, which caused "AX_CXX_COMPILE_STDCXX(20, [noext], [optional])" to result in "checking whether g++ supports C++20 features with -std=gnu++20... yes" which is not the desired outcome when using "noext". It should check for "-std=c++20" instead for "-std=gnu++20", as it did before. See < #issuecomment-2416443298> and . ax_have_qt: migrate from hand-rolled path lookups with `which` to AC_PATH_PROG The "which" utility is not guaranteed to be installed either, and if it is, its behavior is not portable either. This means that when Qt is installed, the `which` check will report a fatal error because the which tool did not exist and the shell returned a nonzero status when attempting to fork+exec. If it did exist, it might not be an implementation of `which` that returns nonzero when commands do not exist. The general scripting suggestion is to use the "command -v" shell builtin is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere. For some in-depth discussions on the topic, see: - https://mywiki.wooledge.org/BashFAQ/081 - https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use- then/85250#85250 Examples of open-source shells likely to be installed as /bin/sh on Linux, which implement the 15-year-old standard: ash, bash, busybox, dash, ksh, mksh and zsh. Since this is an autoconf extension, however, autoconf provides its own guarantees: you are always supposed to use AC_PATH_PROG, which is guaranteed to generate code which does the right thing, and in particular tends to work even on systems which predate POSIX. It officially becomes autoconf's job to make sure path detection works. This has some convenient knock-on effects. In particular, we now permit users to specify the path via $QT_* variables, which are documented inline as being set and are now documented as publicly settable too. This was even already the case with qmake. ax_have_qt: fix documentation bug for QMAKE description Fallout from commit c76565884702b1ef663e66a17023b42032d397d3. Using shell quotes around autoconf macro parameters leads to literal double-quote chars appearing in ./configure --help output, in this case. ax_llvm: migrate from hand-rolled path lookups with `which` to AC_PATH_PROG The "which" utility is not guaranteed to be installed either, and if it is, its behavior is not portable either. This means that when llvm-config is installed, the `which` check will report a fatal error because the which tool did not exist and the shell returned a nonzero status when attempting to fork+exec. If it did exist, it might not be an implementation of `which` that returns nonzero when commands do not exist. The general scripting suggestion is to use the "command -v" shell builtin is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere. For some in-depth discussions on the topic, see: - https://mywiki.wooledge.org/BashFAQ/081 - https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use- then/85250#85250 Examples of open-source shells likely to be installed as /bin/sh on Linux, which implement the 15-year-old standard: ash, bash, busybox, dash, ksh, mksh and zsh. Since this is an autoconf extension, however, autoconf provides its own guarantees: you are always supposed to use AC_PATH_PROG, which is guaranteed to generate code which does the right thing, and in particular tends to work even on systems which predate POSIX. It officially becomes autoconf's job to make sure path detection works. This has some convenient knock-on effects. In particular, we now permit users to specify the path via $LLVM_CONFIG, which is a somewhat standard approach, and we document it as well. ax_llvm: fix longstanding documentation bug for --with-llvm=DIR It accepts a filename, not a directory name, so say that.