CHANGE print DEBUG message only if configured with debug
diff --git a/configure.ac b/configure.ac
index bd51d41..3b7073a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,7 +72,7 @@
 
 AC_ARG_ENABLE([debug],
     AC_HELP_STRING([--enable-debug],[Compile with debug options]),
-    CFLAGS="$CFLAGS -g -O0"
+    CFLAGS="$CFLAGS -g -O0 -DDBG"
     CONFIGURE_PARAMS="--enable-debug $CONFIGURE_PARAMS",
     CFLAGS="$CFLAGS -O3"
 )
diff --git a/src/netopeerguid.h b/src/netopeerguid.h
index a087efb..08ef498 100644
--- a/src/netopeerguid.h
+++ b/src/netopeerguid.h
@@ -94,6 +94,8 @@
 
 json_object *create_error_reply(const char *errmess);
 
+#ifdef DBG
+
 #define DEBUG(...) \
 if (daemonize) { \
     syslog(LOG_DEBUG, __VA_ARGS__); \
@@ -102,6 +104,12 @@
     fprintf(stderr, "\n"); \
 }
 
+#else
+
+#define DEBUG(...)
+
+#endif
+
 #define ERROR(...) \
 if (daemonize) { \
     syslog(LOG_ERR, __VA_ARGS__); \