As a side effect, debug print are turned off by default Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]> --- configure.ac | 14 ++++++++++++++ helper/Makefile.am | 3 ++- 2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 3e89b0a..aa992fc 100644 --- a/configure.ac +++ b/configure.ac @@ -231,6 +231,19 @@ AC_ARG_ENABLE([debug-print], ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG_PRINT=$ODP_DEBUG_PRINT" ########################################################################## +# Enable/disable ODPH_DEBUG_PRINT +########################################################################## +ODPH_DEBUG_PRINT=0 +AC_ARG_ENABLE([helper-debug-print], + [ --enable-helper-debug-print display debugging information for ODP helpers], + [if test "x$enableval" = "xyes"; then + ODPH_DEBUG_PRINT=1 + else + ODPH_DEBUG_PRINT=0 + fi]) +ODPH_CFLAGS="$ODPH_CFLAGS -DODPH_DEBUG_PRINT=$ODPH_DEBUG_PRINT" + +########################################################################## # Enable/disable ODP_DEBUG ########################################################################## ODP_DEBUG=0 @@ -310,6 +323,7 @@ AC_SUBST([CFLAGS]) AC_SUBST([AM_LDFLAGS]) AC_SUBST([LDFLAGS]) AC_SUBST([EXEEXT]) +AC_SUBST([ODPH_CFLAGS]) AC_OUTPUT AC_MSG_RESULT([ diff --git a/helper/Makefile.am b/helper/Makefile.am index d09d900..2ef4e8b 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -4,7 +4,8 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.pc LIB = $(top_builddir)/lib -AM_CFLAGS = -I$(srcdir)/include +AM_CFLAGS = $(ODPH_CFLAGS) +AM_CFLAGS += -I$(srcdir)/include AM_CFLAGS += -I$(top_srcdir)/platform/@with_platform@/include AM_CFLAGS += -I$(top_srcdir)/include AM_CFLAGS += -I$(top_builddir)/platform/@with_platform@/include -- 2.10.1.4.g0ffc436
