X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=contrib%2Fnotmuch-deliver%2Fconfigure.ac;h=4deb6587b5649dbae9e6772d6104b4bc631244e5;hb=38b245b46a51be82a5a5f798255cbbbbc0186f78;hp=f3f77161122294b0eb90696949d8fb98d4750b99;hpb=af863f8c7f1f1571df4f1172ec4e963fa654945e;p=notmuch diff --git a/contrib/notmuch-deliver/configure.ac b/contrib/notmuch-deliver/configure.ac index f3f77161..4deb6587 100644 --- a/contrib/notmuch-deliver/configure.ac +++ b/contrib/notmuch-deliver/configure.ac @@ -67,7 +67,7 @@ AC_STRUCT_TM dnl }}} dnl {{{ Check for library functions -AC_CHECK_FUNCS([setgroups initgroups symlink readlink strcasecmp utime utimes]) +AC_CHECK_FUNCS([setgroups initgroups symlink readlink strcasecmp utime utimes splice]) dnl }}} dnl {{{ gethostname() @@ -113,14 +113,44 @@ 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 }}} dnl {{{ Output -AM_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_LINKS([maildrop/numlib/config.h:config.h]) AC_OUTPUT( Makefile - numlib/Makefile + maildrop/numlib/Makefile src/Makefile ) dnl }}}