summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-07-27 21:16:39 +0000
committerRussell Bryant <russell@russellbryant.com>2010-07-27 21:16:39 +0000
commit0aff0b8e732b051a751a1a3fc7759669e34b1757 (patch)
tree39fd9acc8f55217b6af6550229105c21e0db8f29 /configure.ac
parent395a35900aaf8a3ccc1ef0de0c37cc462b4700f4 (diff)
Merged revisions 279953 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r279953 | russell | 2010-07-27 16:16:05 -0500 (Tue, 27 Jul 2010) | 5 lines 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: https://origsvn.digium.com/svn/asterisk/trunk@279954 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 11 insertions, 0 deletions
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