mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-04-26 00:16:18 +00:00
Improves log feature:
* Add --disable-log * Add a log level filter, configurable using conf file (ie. /etc/nfc/libnfc.conf) or environment var LIBNFC_LOG_LEVEL
This commit is contained in:
17
configure.ac
17
configure.ac
@@ -69,16 +69,27 @@ AC_TYPE_OFF_T
|
||||
LIBNFC_CFLAGS='-I$(top_srcdir)/libnfc -I$(top_builddir)/include -I$(top_srcdir)/include'
|
||||
AC_SUBST(LIBNFC_CFLAGS)
|
||||
|
||||
# Debug support (default:no)
|
||||
AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug output]),[enable_debug=$enableval],[enable_debug="no"])
|
||||
# Log support (default:yes)
|
||||
AC_ARG_ENABLE([log],AS_HELP_STRING([--disable-log],[Disable any logs]),[enable_log=$enableval],[enable_log="yes"])
|
||||
AC_MSG_CHECKING(for log flag)
|
||||
AC_MSG_RESULT($enable_log)
|
||||
AM_CONDITIONAL([WITH_LOG], [test "$enable_log" != "no"])
|
||||
|
||||
if test x"$enable_log" = "xyes"
|
||||
then
|
||||
AC_DEFINE([LOG], [1], [Enable log])
|
||||
fi
|
||||
|
||||
# Debug support (default:no)
|
||||
AC_ARG_ENABLE([debug],AS_HELP_STRING([--enable-debug],[Enable debug mode]),[enable_debug=$enableval],[enable_debug="no"])
|
||||
AC_MSG_CHECKING(for debug flag)
|
||||
AC_MSG_RESULT($enable_debug)
|
||||
AM_CONDITIONAL([WITH_DEBUG], [test "$enable_debug" != "no"])
|
||||
|
||||
if test x"$enable_debug" = "xyes"
|
||||
then
|
||||
CFLAGS="$CFLAGS -g -DDEBUG -O0 -ggdb"
|
||||
AC_DEFINE([DEBUG], [1], [Enable debug flag])
|
||||
CFLAGS="$CFLAGS -g -O0 -ggdb"
|
||||
fi
|
||||
|
||||
# Handle --with-drivers option
|
||||
|
||||
Reference in New Issue
Block a user