Enhance logging system:

* Removes internal DBG/WARN/ERR macros (but keep them in examples);
 * Removes almost all DEBUG define references;
 * Uses the flexible log4c library to log all messages.
This commit is contained in:
Romuald Conty
2011-09-12 14:50:01 +00:00
parent 580768a489
commit e8eec583ed
14 changed files with 357 additions and 195 deletions

View File

@@ -69,6 +69,17 @@ AC_TYPE_SIGNAL
LIBNFC_CFLAGS='-I$(top_srcdir)/libnfc -I$(top_builddir)/include -I$(top_srcdir)/include'
AC_SUBST(LIBNFC_CFLAGS)
# Checks for log4c
AC_PATH_PROG([LOG4C_CONFIG], [log4c-config])
if test x"$LOG4C_CONFIG" != x""; then
log4c_CFLAGS=`$LOG4C_CONFIG --cflags`
log4c_LIBS=`$LOG4C_CONFIG --libs`
AC_SUBST([log4c_CFLAGS])
AC_SUBST([log4c_LIBS])
AC_DEFINE([HAS_LOG4C], [1], [Define to 1 if log4c is available.])
fi
AM_CONDITIONAL(HAS_LOG4C, [test x"$LOG4C_CONFIG" != x""])
# Debug support (default:no)
AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug output]),[enable_debug=$enableval],[enable_debug="no"])