Add configure CFG_CXX_VERSION

This commit is contained in:
Wilson Snyder 2024-12-19 20:56:47 -05:00
parent bb45fd6c6c
commit 8a121803f5
2 changed files with 10 additions and 2 deletions

View File

@ -176,8 +176,10 @@ AC_PROG_CXX
AC_PROG_INSTALL
AC_LANG_PUSH(C++)
cxx_version=$($CXX --version | head -1)
AC_MSG_RESULT([compiler is $CXX --version = $cxx_version])
CFG_CXX_VERSION=`$CXX --version | head -1`
AC_MSG_RESULT([compiler $CXX --version = $CFG_CXX_VERSION])
AC_SUBST(CFG_CXX_VERSION)
AC_MSG_CHECKING([that C++ compiler can compile simple program])
AC_RUN_IFELSE(
[AC_LANG_SOURCE([int main() { return 0; }])],

View File

@ -23,6 +23,12 @@ PYTHON3 = @PYTHON3@
CFG_WITH_CCWARN = @CFG_WITH_CCWARN@
CFG_WITH_LONGTESTS = @CFG_WITH_LONGTESTS@
# Compiler version found during configure. This make variable is not used
# here, but note that if this differs from what `$(CXX) --version` prints,
# then there may be strange results such as unexpected warnings, as
# configure determines compiler characteristics.
CFG_CXX_VERSION = "@CFG_CXX_VERSION@"
# Compiler flags to enable profiling
CFG_CXXFLAGS_PROFILE = @CFG_CXXFLAGS_PROFILE@
# Select language required to compile (often empty)