Hello,
I encountered an issue with |AX_CXX_COMPILE_STDCXX| (autoconf-archive)
when used in a scenario where the user provides no C++ standard flags.
The macro does not automatically select the highest available standard
as expected. Instead, it may fail the build or require the user to
manually specify |-std=c++XX|, which violates the principle that a
configure script should select the best possible compiler options
without manual intervention.
Steps to reproduce:
1. Use a compiler supporting multiple C++ standards (e.g., gcc 5.x).
2. Run |autoconf| / |./configure| without setting any |CXXFLAGS|
including |-std|.
3. Observe that the macro may fail or not choose |-std=c++11| (or the
highest supported).
Expected behavior:
* |AX_CXX_COMPILE_STDCXX| should automatically detect and use the
highest supported standard if the user does not provide any flags.
* The configure process should succeed without manual intervention.
Actual behavior:
* The macro may require manual |-std| flags to proceed.
* This behavior breaks the contract of configure scripts being able to
configure software out-of-the-box.
Environment:
* Autoconf version: 2.73
* autoconf-archive version: latest
* Compiler: GCC 5.5
* OS: Solaris 10
This is a usability issue that can block clean builds in dual-toolchain
or cross-platform scenarios. I suggest reviewing the default-selection
logic to ensure the macro respects the “automatic best standard”
principle when no user flags are set.
Thank you.