summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
-rw-r--r--src/utils.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 2c08d10..645b3fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,4 +45,11 @@ AC_ARG_ENABLE([dev-tools],
[build_dev_tools=false])
AM_CONDITIONAL(BUILD_DEV_TOOLS, test x$build_dev_tools = xtrue)
+AC_ARG_ENABLE([debug-code],
+ [AS_HELP_STRING([--enable-debug-code],
+ [enable debug message reporting in library (default is yes)])],
+ [debug_code=true],
+ [debug_code=false])
+AM_CONDITIONAL(STRIP_DEBUG_CODE, test x$debug_code = xfalse)
+
AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile libiphone-1.0.pc)
diff --git a/src/utils.c b/src/utils.c
index e54403b..049777a 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -39,7 +39,7 @@ void iphone_set_debug(int level)
void log_debug_msg(const char *format, ...)
{
-#ifndef STRIP_DEBUG
+#ifndef STRIP_DEBUG_CODE
va_list args;
/* run the real fprintf */
@@ -55,7 +55,7 @@ void log_debug_msg(const char *format, ...)
inline void log_debug_buffer(const char *data, const int length)
{
-#ifndef STRIP_DEBUG
+#ifndef STRIP_DEBUG_CODE
/* run the real fprintf */
if (toto_debug)
@@ -66,7 +66,7 @@ inline void log_debug_buffer(const char *data, const int length)
inline void dump_debug_buffer(const char *file, const char *data, const int length)
{
-#ifndef STRIP_DEBUG
+#ifndef STRIP_DEBUG_CODE
/* run the real fprintf */
if (toto_debug) {