]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
configure: Allow to enable debug mode
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Nov 2017 21:32:55 +0000 (22:32 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 Nov 2017 21:32:55 +0000 (22:32 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
configure.ac

index 0362331a6bf7789458440a9d8c7a9260f79d7eb8..15127165ca50cfc8ca225c74fb31ea44b5bd9333 100644 (file)
@@ -56,6 +56,13 @@ AC_PROG_LN_S
 AC_PROG_MKDIR_P
 AC_PROG_SED
 
+AC_ARG_ENABLE([debug],
+       AS_HELP_STRING([--enable-debug], [enable debug messages @<:@default=disabled@:>@]),
+       [], [enable_debug=no])
+AS_IF([test "x$enable_debug" = "xyes"], [
+       AC_DEFINE(ENABLE_DEBUG, [1], [Debug messages.])
+])
+
 # pkg-config
 PKG_PROG_PKG_CONFIG
 # This makes sure pkg.m4 is available.
@@ -167,6 +174,8 @@ AC_OUTPUT
 AC_MSG_RESULT([
        $PACKAGE_NAME $VERSION
 
+       Debug:                  ${enable_debug}
+
        CFLAGS:                 ${OUR_CFLAGS} ${CFLAGS}
        CPPFLAGS:               ${OUR_CPPFLAGS} ${CPPFLAGS}
        LDFLAGS:                ${OUR_LDFLAGS} ${LDFLAGS}