[network-manager-vpnc/th/vpn-editor-split-bgo766170: 10/20] build: add "--with-more-asserts" configure option



commit f84d007bbf8ffa5454e372197d4769a943ea9682
Author: Thomas Haller <thaller redhat com>
Date:   Mon May 9 12:06:25 2016 +0200

    build: add "--with-more-asserts" configure option

 configure.ac |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f8dba0a..1ccb16e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,17 @@ if ! test x"$ac_distver" = x""; then
   AC_DEFINE_UNQUOTED(DIST_VERSION, "$ac_distver", [Define the distribution version string])
 fi
 
+AC_ARG_WITH(more-asserts,
+            AS_HELP_STRING([--with-more-asserts=level], [Enable more assertions for debugging (default: 0)]),
+            [more_asserts=${with_more_asserts}],
+            [more_asserts=no])
+if test "${more_asserts}" = "no"; then
+    more_asserts=0
+elif test "${more_asserts}" = "yes" -o "#${more_asserts}#" != "$(printf '%s' "${more_asserts}" | sed -n 
'1s/^[0-9]\+$/#\0#/p')"; then
+    more_asserts=100
+fi
+AC_DEFINE_UNQUOTED(NM_MORE_ASSERTS, $more_asserts, [Define if more asserts are enabled])
+
 AC_CONFIG_FILES([
 Makefile
 shared/Makefile


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]