diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2016-03-11 13:17:24 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2016-04-18 21:50:51 +0200 |
commit | 82f8a54854f65d2bf648329d1d9b411de04959cb (patch) | |
tree | 652828cbd158058fd4b67593f3ba06533e0ba2f2 /configure.ac | |
parent | 28274495d61cb434272e0e2307dfd824ee78de8e (diff) | |
download | NetworkManager-82f8a54854f65d2bf648329d1d9b411de04959cb.tar.gz |
libnm-core: use jansson to compare and check team configurations
Optionally link libnm-core against jansson JSON library and use it to
validate and compare team configurations.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index a7bd024a00..01696ebaa4 100644 --- a/configure.ac +++ b/configure.ac @@ -553,6 +553,18 @@ else fi AM_CONDITIONAL(WITH_TEAMDCTL, test "${enable_teamdctl}" = "yes") +PKG_CHECK_MODULES(JANSSON, jansson, [have_jansson=yes], [have_jansson=no]) +AC_ARG_ENABLE(json-validation, AS_HELP_STRING([--enable-json-validation], [Enable JSON validation in libnm]), + [enable_json_validation=${enableval}], [enable_json_validation=${have_jansson}]) +if (test "${enable_json_validation}" = "yes"); then + if test x"$have_jansson" = x"no"; then + AC_MSG_ERROR(Jansson is required for JSON validation) + fi + AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) +else + AC_DEFINE(WITH_JANSSON, 0, [Define if JANSSON is enabled]) +fi + # we usually compile with polkit support. --enable-polkit=yes|no only sets the # default configuration for main.auth-polkit. User can always enable/disable polkit # autorization via config. Only when specifying --enable-polkit=disabled, we do @@ -1178,4 +1190,5 @@ echo " more-asserts: $more_asserts" echo " valgrind: $with_valgrind $with_valgrind_suppressions" echo " code coverage: $enable_code_coverage" echo " LTO: $enable_lto" +echo " JSON validation: $enable_json_validation" echo |