aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorlamadon <jean-luc.lamadon@nokia.com>2009-01-09 10:20:51 +0200
committerlamadon <jean-luc.lamadon@nokia.com>2009-01-09 10:20:51 +0200
commitc118a35dcd4c65fc7ce2fd7eaf23152c1510a88f (patch)
tree6a78b2d92216cac12e80e45c9f29ffc1c59c0a16 /configure.ac
parent82214d691c4be65f52cb1820b45ceb60c3e9ffa9 (diff)
Added new configure option --enable-gcov
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7b05f8d7..ac3d529f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
AC_INIT([ContextKit], [0.1.1], [rob.taylor@codethink.co.uk], ContextKit)
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS(config.h)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AM_INIT_AUTOMAKE([-Wall -Werror dist-bzip2])
AM_MAINTAINER_MODE
# Honor aclocal flags
@@ -57,6 +57,22 @@ AC_SUBST(LOCATION_LIBS)
AM_CONDITIONAL(HAVE_LOCATION, test x$have_location = xyes)
+######################
+# Coverage
+######################
+
+AC_ARG_ENABLE(gcov,
+ AS_HELP_STRING([--enable-gcov=@<:@no/yes/auto@:>@],
+ [compile with coverage profiling (gcc only)]),
+ enable_gcov=$enableval,enable_gcov=no)
+
+if test "x$enable_gcov" != "xno"; then
+ CONTEXTD_CFLAGS="$CONTEXTD_CFLAGS -fprofile-arcs -ftest-coverage"
+ CONTEXTD_LIBS="$CONTEXTD_LIBS -lgcov"
+fi
+
+AC_SUBST(CONTEXTD_CFLAGS)
+
AC_CONFIG_FILES([Makefile])
AC_OUTPUT