build: disable lcov version check

Ideally we should switch to the standard macro AX_CODE_COVERAGE for
code coverage, but infortunately it's not supported on older distros
(e.g. on Travis).

Keep using the current macro, but remove the lcov version check as
it's not clear why it's needed in the first place (see [1]). The
latest version of lcov is now 1.13.

[1] http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=commit;h=dedd290bdb647704d74c13992bd04275d9cb648e
This commit is contained in:
Beniamino Galvani 2017-10-20 13:39:17 +02:00
parent ebb30c53cd
commit b3b9b2bf38

View file

@ -43,35 +43,13 @@ AC_DEFUN([GNOME_CODE_COVERAGE],[
AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage])
])
# List of supported lcov versions.
lcov_version_list="1.6 1.7 1.8 1.9 1.10"
AC_CHECK_PROG([LCOV], [lcov], [lcov])
AC_CHECK_PROG([GENHTML], [genhtml], [genhtml])
AS_IF([ test "$LCOV" ], [
AC_CACHE_CHECK([for lcov version], gnome_cv_lcov_version, [
gnome_cv_lcov_version=invalid
lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'`
for lcov_check_version in $lcov_version_list; do
if test "$lcov_version" = "$lcov_check_version"; then
gnome_cv_lcov_version="$lcov_check_version (ok)"
fi
done
])
], [
lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list"
AC_MSG_ERROR([$lcov_msg])
AS_IF([ test -z "$LCOV" ], [
AC_MSG_ERROR([lcov is needed to enable code coverage reporting])
])
case $gnome_cv_lcov_version in
""|invalid[)]
lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)."
AC_MSG_ERROR([$lcov_msg])
LCOV="exit 0;"
;;
esac
AS_IF([ test -z "$GENHTML" ], [
AC_MSG_ERROR([Could not find genhtml from the lcov package])
])