Merge pull request #64 from czchen/feature/debug
Let --enable-debug define DEBUG instead of ENABLE_DEBUG in config.h
This commit is contained in:
commit
3963bddb1f
2 changed files with 2 additions and 2 deletions
|
@ -80,7 +80,7 @@ AC_SUBST(DEPS_LIBS)
|
||||||
|
|
||||||
AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[enable debug]))
|
AC_ARG_ENABLE(debug,AS_HELP_STRING([--enable-debug],[enable debug]))
|
||||||
if test "x$enable_debug" = "xyes"; then
|
if test "x$enable_debug" = "xyes"; then
|
||||||
AC_DEFINE(ENABLE_DEBUG, 1, "debug")
|
AC_DEFINE(DEBUG, 1, "debug")
|
||||||
fi
|
fi
|
||||||
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
|
AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes")
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ typedef unsigned char bool;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
#define info(fmt, ...) \
|
#define info(fmt, ...) \
|
||||||
do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
|
do { fprintf(stderr, fmt, ##__VA_ARGS__); } while (0)
|
||||||
|
|
||||||
#define debug(fmt, ...) \
|
#define debug(fmt, ...) \
|
||||||
do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
|
do { fprintf(stderr, "%s:%d:%s(): " fmt, __FILE__, \
|
||||||
|
|
Loading…
Reference in a new issue