From 2ca8aa4e5dc4aad08bae3c007cbdc39d0d30ea1f Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 1 Jun 2006 21:10:32 +0200 Subject: [PATCH] Added `--enable-debug' to the configure script. It's now possible to enable debugging by using the above configure option. --- configure.ac | 9 +++++++++ src/liboping.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c7c33ab..f5d0ace 100644 --- a/configure.ac +++ b/configure.ac @@ -158,4 +158,13 @@ AC_CHECK_FUNCS(nanosleep, [], AC_MSG_ERROR(cannot find nanosleep))) AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes") +AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [Enable extensive debugging output.])], +[ + if test "x$enable_debug" = "xyes" + then + AC_DEFINE(WITH_DEBUG, 1, [Define to 1 if you want to get debugging output.]) + fi +], []) +AM_CONDITIONAL(BUILD_WITH_DEBUG, test "x$enable_debug" = "xyes") + AC_OUTPUT(Makefile src/Makefile src/mans/Makefile) diff --git a/src/liboping.c b/src/liboping.c index ea4fc74..c6e9df5 100644 --- a/src/liboping.c +++ b/src/liboping.c @@ -87,7 +87,7 @@ #include "oping.h" -#if DEBUG +#if WITH_DEBUG # define dprintf(...) printf ("%s[%4i]: %-20s: ", __FILE__, __LINE__, __FUNCTION__); printf (__VA_ARGS__) #else # define dprintf(...) /**/ -- 2.11.0