build: make NM_MORE_ASSERTS define numeric for different levels of more-asserts

Allows to enable more-asserts more granularly.

Unfortunately, the old check was "${enable_more_asserts} == "yes", thus
we cannot extend "--enable-more-assert=level" because that would mean
that the same build script cannot set the option on both old and new
NetworkManager.
Thus, add a new option --with-more-asserts=level. If you put the
following in your build script, it will work as expected whether
you build a new or an old version of NetworkManager.
  ./configure --enable-more-asserts --with-more-asserts=5
This commit is contained in:
Thomas Haller
2015-10-05 13:48:01 +02:00
parent 0907f3c21e
commit 6395c829bb
5 changed files with 20 additions and 6 deletions

View File

@@ -1727,7 +1727,7 @@ nmp_cache_free (NMPCache *cache)
void
ASSERT_nmp_cache_is_consistent (const NMPCache *cache)
{
#ifdef NM_MORE_ASSERTS
#if NM_MORE_ASSERTS
NMMultiIndexIter iter_multi;
GHashTableIter iter_hash;
guint i, len;