From bebdb0fda152a29d8e336408d2eee31d06bce0d7 Mon Sep 17 00:00:00 2001 From: russell Date: Tue, 27 Jul 2010 21:16:05 +0000 Subject: Add --enable-coverage option to configure script. This option enables the proper compiler flags for tracking code coverage, which is useful along side automated testing. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.8@279953 f38db490-d61c-443f-a65b-d21fe96a405b --- configure.ac | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index b0adfd761..dfc45a5e8 100644 --- a/configure.ac +++ b/configure.ac @@ -288,6 +288,17 @@ AC_ARG_ENABLE([dev-mode], AC_SUBST(NOISY_BUILD) AC_SUBST(AST_DEVMODE) +AST_CODE_COVERAGE=no +AC_ARG_ENABLE([coverage], + [AS_HELP_STRING([--enable-coverage], + [Turn on code coverage tracking (for gcov)])], + [case "${enableval}" in + y|ye|yes) AST_CODE_COVERAGE=yes ;; + n|no) AST_CODE_COVERAGE=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-coverage) ;; + esac]) +AC_SUBST(AST_CODE_COVERAGE) + # AST_EXT_LIB_SETUP is used to tell configure to handle variables for # various packages. # $1 is the prefix for the variables in makeopts and autoconfig.h -- cgit v1.2.3