aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorlamadon <jean-luc.lamadon@nokia.com>2009-01-23 09:58:22 +0200
committerlamadon <jean-luc.lamadon@nokia.com>2009-01-23 09:58:22 +0200
commite8d8275ad358c43dbc67d31f9c79694934da5968 (patch)
tree381f5979de84619866a82df281b83d672a3d581a /configure.ac
parent815eb3be4d01a692854410dda767e3e8ce439917 (diff)
Added two profiles debuggcov and debug to configure
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac52
1 files changed, 36 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 384397b5..20aa0c7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,10 +45,46 @@ AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
+######################
+# Coverage option
+######################
+
+AC_ARG_ENABLE(debuggcov,
+ AS_HELP_STRING([--enable-debuggcov=@<:@no/yes/auto@:>@],
+ [compile with coverage profiling and debug (gcc only)]),
+ enable_debuggcov=$enableval,enable_debuggcov=no)
+
+######################
+# Debug option
+######################
+
+AC_ARG_ENABLE(debug,
+ AS_HELP_STRING([--enable-debug=@<:@no/yes/auto@:>@],
+ [compile with debug profiling]),
+ enable_debug=$enableval,enable_debug=no)
+
GLIB_REQUIRED=2.12.0
GEE_REQUIRED=0.1.3
PKG_CHECK_MODULES(CONTEXTD, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED sqlite3 dbus-glib-1 gee-1.0 >= $GEE_REQUIRED)
+
+##################################
+# Flags for coverage measurement
+##################################
+
+if test "x$enable_debuggcov" != "xno"; then
+ CONTEXTD_CFLAGS="$CONTEXTD_CFLAGS -fprofile-arcs -ftest-coverage -g -Wall"
+ CONTEXTD_LIBS="$CONTEXTD_LIBS -lgcov"
+fi
+
+##################################
+# Flags for debugging
+##################################
+
+if test "x$enable_debug" != "xno" ; then
+ CONTEXTD_CFLAGS="$CONTEXTD_CFLAGS -g -Wall -Werror"
+fi
+
AC_SUBST(CONTEXTD_CFLAGS)
AC_SUBST(CONTEXTD_LIBS)
@@ -59,22 +95,6 @@ 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