diff options
author | Ali Polatel <alip@exherbo.org> | 2010-05-26 13:04:53 +0300 |
---|---|---|
committer | Ali Polatel <alip@exherbo.org> | 2011-11-05 01:12:35 +0200 |
commit | c1453231206e4e9a74bca54df4dd66b7e03c571c (patch) | |
tree | 6366355218ed0bceb293190f011e9354fb1f0456 /contrib | |
parent | 649db5eab6e67c753301633a9261a08be83d0f3b (diff) |
notmuch-deliver: Add --enable-{gprof,gcov} options to configure
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/notmuch-deliver/configure.ac | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/contrib/notmuch-deliver/configure.ac b/contrib/notmuch-deliver/configure.ac index f3f77161..9d16af16 100644 --- a/contrib/notmuch-deliver/configure.ac +++ b/contrib/notmuch-deliver/configure.ac @@ -113,6 +113,35 @@ WANTED_CFLAGS="-Wall -W -Wextra -Wvla -Wformat=2 -Wformat-security -Wformat-nonl for flag in $WANTED_CFLAGS ; do AX_CHECK_COMPILER_FLAGS([$flag], [NOTMUCH_DELIVER_CFLAGS="$NOTMUCH_DELIVER_CFLAGS $flag"],) done +dnl }}} + +dnl {{{ Profiling +AC_MSG_CHECKING([whether gprof symbols are wanted]) +AC_ARG_ENABLE([gprof], + [AS_HELP_STRING([--enable-gprof], + [Add gprof symbols (-pg) (for debugging)])], + PROFILE="$enableval", + PROFILE="no") +AC_MSG_RESULT([$PROFILE]) +if test x"$PROFILE" = x"yes" ; then + AX_CHECK_COMPILER_FLAGS([-pg],, AC_MSG_ERROR([Your compiler doesn't support -pg flag])) + NOTMUCH_DELIVER_CFLAGS="$NOTMUCH_DELIVER_CFLAGS -pg" + LDFLAGS="$LDFLAGS -pg" +fi +AC_MSG_CHECKING([whether coverage testing should be enabled]) +AC_ARG_ENABLE([gcov], + [AS_HELP_STRING([--enable-gcov], + [add gcov support (for debugging)])], + COVERAGE="$enableval", + COVERAGE="no") +AC_MSG_RESULT([$COVERAGE]) +if test x"$COVERAGE" = x"yes" ; then + AX_CHECK_COMPILER_FLAGS([-fprofile-arcs],, + AC_MSG_ERROR([Your compiler doesn't support -fprofile-arcs flag])) + AX_CHECK_COMPILER_FLAGS([-ftest-coverage],, + AC_MSG_ERROR([Your compiler doesn't support -ftest-coverage flag])) + NOTMUCH_DELIVER_CFLAGS="$NOTMUCH_DELIVER_CFLAGS -fprofile-arcs -ftest-coverage" +fi AC_SUBST([NOTMUCH_DELIVER_CFLAGS]) dnl }}} |