diff options
| -rw-r--r-- | configure.ac | 7 | ||||
| -rw-r--r-- | src/utils.c | 6 |
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], | |||
| 45 | [build_dev_tools=false]) | 45 | [build_dev_tools=false]) |
| 46 | AM_CONDITIONAL(BUILD_DEV_TOOLS, test x$build_dev_tools = xtrue) | 46 | AM_CONDITIONAL(BUILD_DEV_TOOLS, test x$build_dev_tools = xtrue) |
| 47 | 47 | ||
| 48 | AC_ARG_ENABLE([debug-code], | ||
| 49 | [AS_HELP_STRING([--enable-debug-code], | ||
| 50 | [enable debug message reporting in library (default is yes)])], | ||
| 51 | [debug_code=true], | ||
| 52 | [debug_code=false]) | ||
| 53 | AM_CONDITIONAL(STRIP_DEBUG_CODE, test x$debug_code = xfalse) | ||
| 54 | |||
| 48 | AC_OUTPUT(Makefile src/Makefile include/Makefile fdi/Makefile libiphone-1.0.pc) | 55 | 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) | |||
| 39 | 39 | ||
| 40 | void log_debug_msg(const char *format, ...) | 40 | void log_debug_msg(const char *format, ...) |
| 41 | { | 41 | { |
| 42 | #ifndef STRIP_DEBUG | 42 | #ifndef STRIP_DEBUG_CODE |
| 43 | 43 | ||
| 44 | va_list args; | 44 | va_list args; |
| 45 | /* run the real fprintf */ | 45 | /* run the real fprintf */ |
| @@ -55,7 +55,7 @@ void log_debug_msg(const char *format, ...) | |||
| 55 | 55 | ||
| 56 | inline void log_debug_buffer(const char *data, const int length) | 56 | inline void log_debug_buffer(const char *data, const int length) |
| 57 | { | 57 | { |
| 58 | #ifndef STRIP_DEBUG | 58 | #ifndef STRIP_DEBUG_CODE |
| 59 | 59 | ||
| 60 | /* run the real fprintf */ | 60 | /* run the real fprintf */ |
| 61 | if (toto_debug) | 61 | if (toto_debug) |
| @@ -66,7 +66,7 @@ inline void log_debug_buffer(const char *data, const int length) | |||
| 66 | 66 | ||
| 67 | inline void dump_debug_buffer(const char *file, const char *data, const int length) | 67 | inline void dump_debug_buffer(const char *file, const char *data, const int length) |
| 68 | { | 68 | { |
| 69 | #ifndef STRIP_DEBUG | 69 | #ifndef STRIP_DEBUG_CODE |
| 70 | 70 | ||
| 71 | /* run the real fprintf */ | 71 | /* run the real fprintf */ |
| 72 | if (toto_debug) { | 72 | if (toto_debug) { |
