diff mbox series

[v4,4/9] configure: provide a way to enable all debugging options at once

Message ID 1504112406-3108-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v4,1/9] configure: enable all tests by default | expand

Commit Message

Github ODP bot Aug. 30, 2017, 5 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Adding --enable-debug=full to configure will enable all debugging
options.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 155 (lumag:improve-build-2)
 ** https://github.com/Linaro/odp/pull/155
 ** Patch: https://github.com/Linaro/odp/pull/155.patch
 ** Base sha: 7508c5ac906bb7cb1d339b4c5e924f3a18e504ca
 ** Merge commit sha: 82cd6ec8e88e93808778f00e24852395a62ae20b
 **/
 configure.ac | 45 +++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 22 deletions(-)
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index dcf14629..df0a0f61 100644
--- a/configure.ac
+++ b/configure.ac
@@ -239,39 +239,40 @@  DX_INIT_DOXYGEN($PACKAGE_NAME,
 		${builddir}/doc/driver-api-guide/output)
 
 ##########################################################################
+# Enable/disable ODP_DEBUG
+##########################################################################
+AC_ARG_ENABLE([debug],
+    [AS_HELP_STRING([--enable-debug],
+		    [include additional debugging code ]
+		    [(set to 'full' to enable all --enable-*-debug-* options)])])
+
+AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1],
+      [ODP_DEBUG=0])
+AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG],
+		   [Define to 1 to include additional debug code])
+
+##########################################################################
 # Enable/disable ODP_DEBUG_PRINT
 ##########################################################################
-ODP_DEBUG_PRINT=0
 AC_ARG_ENABLE([debug-print],
-    [  --enable-debug-print    display debugging information],
-    [if test "x$enableval" = "xyes"; then
-	ODP_DEBUG_PRINT=1
-    fi])
+    [AS_HELP_STRING([--enable-debug-print], [display debugging information])],
+    [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_debug_print=yes],
+	       [enable_debug_print=no])])
+AS_IF([test "x$enable_debug_print" != "xno"], [ODP_DEBUG_PRINT=1],
+      [ODP_DEBUG_PRINT=0])
 AC_DEFINE_UNQUOTED([ODP_DEBUG_PRINT], [$ODP_DEBUG_PRINT],
 		   [Define to 1 to display debug information])
 
-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
-    fi])
+    [AS_HELP_STRING([--enable-helper-debug-print], [display helper debugging information])],
+    [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug_print=yes],
+	       [enable_helper_debug_print=no])])
+AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1],
+      [ODPH_DEBUG_PRINT=0])
 AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT],
 		   [Define to 1 to display helper debug information])
 
 ##########################################################################
-# Enable/disable ODP_DEBUG
-##########################################################################
-ODP_DEBUG=0
-AC_ARG_ENABLE([debug],
-    [  --enable-debug          include additional code],
-    [if test "x$enableval" = "xyes"; then
-	ODP_DEBUG=1
-    fi])
-AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG],
-		   [Define to 1 to include additional debug code])
-
-##########################################################################
 # Enable/disable ABI compatible build
 ##########################################################################
 ODP_ABI_COMPAT=1