diff mbox

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

Message ID 1483029648-16521-2-git-send-email-maxim.uvarov@linaro.org
State Superseded
Headers show

Commit Message

Maxim Uvarov Dec. 29, 2016, 4:40 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.7.1.250.gff4ea60
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 54d62f7..b4991d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -230,6 +230,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 d09d900..1fe42e3 100644
--- a/helper/Makefile.am
+++ b/helper/Makefile.am
@@ -4,7 +4,7 @@  pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = $(top_builddir)/pkgconfig/libodphelper-linux.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 9c216cd..36c743c 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.
  */