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

@@ -179,7 +179,7 @@
/*****************************************************************************/
#ifdef NM_MORE_ASSERTS
#if NM_MORE_ASSERTS
#define nm_assert(cond) G_STMT_START { g_assert (cond); } G_STMT_END
#else
#define nm_assert(cond) G_STMT_START { if (FALSE) { if (cond) { } } } G_STMT_END