aboutsummaryrefslogtreecommitdiff
path: root/m4/gcov.m4
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2012-04-04 14:35:30 -0500
committerTed Gould <ted@gould.cx>2012-04-04 14:35:30 -0500
commitd431c78f3ad88c54a8f3e8c0dec9d872930831da (patch)
tree2a82d9dbc43d2e7fbddb8a580024a83bb2ef7639 /m4/gcov.m4
parent28d27ed11c41ca6859c533e6a084c631225c9912 (diff)
parentc136bda24416af489864fa8e1302a7aca259ba3a (diff)
downloadlibayatana-indicator-d431c78f3ad88c54a8f3e8c0dec9d872930831da.tar.gz
libayatana-indicator-d431c78f3ad88c54a8f3e8c0dec9d872930831da.tar.bz2
libayatana-indicator-d431c78f3ad88c54a8f3e8c0dec9d872930831da.zip
* New upstream release.
* Fix a free that shouldn't be (LP: #969360) * Spelling mistake in error message (LP: #948391) * Add coverage build targets * Fix building AUTHORS and Changelog at dist time
Diffstat (limited to 'm4/gcov.m4')
-rw-r--r--m4/gcov.m422
1 files changed, 13 insertions, 9 deletions
diff --git a/m4/gcov.m4 b/m4/gcov.m4
index 9331cd3..3163584 100644
--- a/m4/gcov.m4
+++ b/m4/gcov.m4
@@ -5,11 +5,10 @@
# * gcovr
#
# Sets ac_cv_check_gcov to yes if tooling is present
-# and reports the executables to the variables LCOV, GCOVR and GENHTML.
+# and reports the executables to the variables LCOV, GCOVR and GENHTML.
AC_DEFUN([AC_TDD_GCOV],
-[AC_CACHE_CHECK([whether code coverage tools are available], ac_cv_check_gcov,
[
-AC_ARG_ENABLE(gcov,
+ AC_ARG_ENABLE(gcov,
AS_HELP_STRING([--enable-gcov],
[enable coverage testing with gcov]),
[use_gcov=$enableval], [use_gcov=no])
@@ -34,7 +33,6 @@ AC_ARG_ENABLE(gcov,
lcov_version_list="1.6 1.7 1.8 1.9"
AC_CHECK_PROG(LCOV, lcov, lcov)
AC_CHECK_PROG(GENHTML, genhtml, genhtml)
- AC_CHECK_PROG(GCOVR, gcovr, gcovr)
if test "$LCOV"; then
AC_CACHE_CHECK([for lcov version], glib_cv_lcov_version, [
@@ -63,10 +61,8 @@ AC_ARG_ENABLE(gcov,
AC_MSG_ERROR([Could not find genhtml from the lcov package])
fi
- if test -z "$GCOVR"; then
- AC_MSG_ERROR([Could not find gcovr; easy_install (or pip) gcovr])
- fi
-
+ ac_cv_check_gcov=yes
+ ac_cv_check_lcov=yes
# Remove all optimization flags from CFLAGS
changequote({,})
@@ -78,5 +74,13 @@ AC_ARG_ENABLE(gcov,
COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage"
COVERAGE_LDFLAGS="-lgcov"
+ # Check availability of gcovr
+ AC_CHECK_PROG(GCOVR, gcovr, gcovr)
+ if test -z "$GCOVR"; then
+ ac_cv_check_gcovr=no
+ else
+ ac_cv_check_gcovr=yes
+ fi
+
fi
-])]) # AC_TDD_GCOV
+]) # AC_TDD_GCOV