unknown versions in config.report on Linuxes
Two issues cause unknown versions to appear in config.report for me:
-
$CPP
is used as the preprocessor command, but it is not a canonical, documented autoconf variable, is not used anywhere else inconfigure.ac
and it evaluates to nothing on some systems. - On Linuxes that have decimal
$CXX -dumpversion
e.g.10.2
, theexpr
used to compare versions doesn't work. You may use this script to test:
#!/bin/sh
if expr 10.2 \> 5 > /dev/null; then
echo it works!
else
echo something is wrong :/
fi
Getting rid of the backslash works on Linux, but then fails on BSDs. test
with -lt
just fails on both. So a portable solution has to be done.
A fix is proposed.
Before:
$ cat config.report | grep VERSION
CXX_VERSION: g++ (GCC) 10.2.0
PYTHON_VERSION: 3.9
BOOST_VERSION: unknown
CRYPTO_VERSION: unknown
LOG4CPLUS_VERSION: unknown
MYSQL_VERSION: 10.5.8
PGSQL_VERSION: PostgreSQL 13.1
CQL_VERSION: 2.7.1
GTEST_VERSION: unknown
After:
$ cat config.report | grep VERSION
CXX_VERSION: g++ (GCC) 10.2.0
PYTHON_VERSION: 3.9
BOOST_VERSION: 1.75
CRYPTO_VERSION: 2.17.3
LOG4CPLUS_VERSION: 2.0.5
MYSQL_VERSION: 10.5.8
PGSQL_VERSION: PostgreSQL 13.1
CQL_VERSION: 2.7.1
GTEST_VERSION: unknown