[systemd-devel] [PATCH 24/26] configure.ac: add --enable-hashmap-debug option

Michal Schmidt mschmidt at redhat.com
Thu Oct 16 00:51:02 PDT 2014


The option simply enables hashmap debugging by defining
ENABLE_HASHMAP_DEBUG.

I suggest developing new code with it enabled, to have the iterator checks.
---
 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 945adfc..02a1923 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1307,6 +1307,13 @@ AC_ARG_ENABLE(tests,
        enable_tests=$enableval, enable_tests=yes)
 AM_CONDITIONAL(ENABLE_TESTS, [test x$enable_tests = xyes])
 
+AC_ARG_ENABLE(hashmap-debug,
+       [AC_HELP_STRING([--enable-hashmap-debug], [enable hashmap debugging])],
+       enable_hashmap_debug=$enableval, enable_hashmap_debug=no)
+AS_IF([test x$enable_hashmap_debug = xyes], [
+        AC_DEFINE(ENABLE_HASHMAP_DEBUG, 1, [Define if hashmap debugging is to be enabled])
+])
+
 AC_SUBST([dbuspolicydir], [$with_dbuspolicydir])
 AC_SUBST([dbussessionservicedir], [$with_dbussessionservicedir])
 AC_SUBST([dbussystemservicedir], [$with_dbussystemservicedir])
-- 
2.1.0



More information about the systemd-devel mailing list