summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8e4a7f5)
raw | patch | inline | side by side (parent: 8e4a7f5)
author | Florian Forster <octo@verplant.org> | |
Thu, 1 Jun 2006 19:10:32 +0000 (21:10 +0200) | ||
committer | Florian Forster <octo@verplant.org> | |
Thu, 1 Jun 2006 19:10:32 +0000 (21:10 +0200) |
It's now possible to enable debugging by using the above configure option.
configure.ac | patch | blob | history | |
src/liboping.c | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index c7c33ab179bab83e1f7cf7edab6cdf83061ea443..f5d0acec0fe75a8c714c389ace48764bc21cbc44 100644 (file)
--- a/configure.ac
+++ b/configure.ac
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 ea4fc741e530ab499e342a87ec60ec6117bf58cb..c6e9df5fce61dff99a7909c078048a2ea9ab4c34 100644 (file)
--- a/src/liboping.c
+++ b/src/liboping.c
#include "oping.h"
-#if DEBUG
+#if WITH_DEBUG
# define dprintf(...) printf ("%s[%4i]: %-20s: ", __FILE__, __LINE__, __FUNCTION__); printf (__VA_ARGS__)
#else
# define dprintf(...) /**/