diff mbox series

[PATCHv3,2/2] configure.ac: helper: print debug config option

Message ID 20170127151915.16510-2-maxim.uvarov@linaro.org
State New
Headers show
Series [PATCHv3,1/2] helper: fix compilation with warnings | expand

Commit Message

Maxim Uvarov Jan. 27, 2017, 3:19 p.m. UTC
Add debug pritn config option for helper and do not
drop configure options for building helper.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>

---
 configure.ac        | 10 ++++++++++
 helper/Makefile.am  |  2 +-
 helper/odph_debug.h |  4 ----
 3 files changed, 11 insertions(+), 5 deletions(-)

-- 
2.11.0.295.gd7dffce
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 2cf65363..daa9b310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -245,6 +245,16 @@  AC_ARG_ENABLE([debug-print],
     fi])
 ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG_PRINT=$ODP_DEBUG_PRINT"
 
+ODPH_DEBUG_PRINT=0
+AC_ARG_ENABLE([helper-debug-print],
+    [  --enable-helper-debug-print    display helper debugging information],
+    [if test "x$enableval" = "xyes"; then
+	ODPH_DEBUG_PRINT=1
+     else
+	ODPH_DEBUG_PRINT=0
+    fi])
+ODP_CFLAGS="$ODP_CFLAGS -DODPH_DEBUG_PRINT=$ODPH_DEBUG_PRINT"
+
 ##########################################################################
 # Enable/disable ODP_DEBUG
 ##########################################################################
diff --git a/helper/Makefile.am b/helper/Makefile.am
index 4d24a691..d484679d 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -4,7 +4,7 @@  pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux-generic.pc
 
 LIB   = $(top_builddir)/lib
-AM_CFLAGS  = -I$(srcdir)/include
+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
diff --git a/helper/odph_debug.h b/helper/odph_debug.h
index 9c216cd1..36c743c2 100644
--- a/helper/odph_debug.h
+++ b/helper/odph_debug.h
@@ -19,10 +19,6 @@ 
 extern "C" {
 #endif
 
-#ifndef ODPH_DEBUG_PRINT
-#define ODPH_DEBUG_PRINT 1
-#endif
-
 /**
  * log level.
  */