From f4a0a3fc7b19b858ec9ebfcc48ad52e9b3056335 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Wed, 20 May 2015 22:35:20 +0200 Subject: [PATCH] build: require json-c >= 0.10 `json_object_object_get_ex` is only available from this version. json-c name has been introduced from 0.11, so we can safely assume that with this name, we have the right version. Do the checks only on old names. --- debian/control | 2 +- m4/json-c.m4 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 45b5ff1f..86c331f4 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 5), dh-autoreconf, libsnmp-dev, libxml2-dev, - libjansson-dev | libjson-c-dev | libjson0-dev, + libjansson-dev | libjson-c-dev | libjson0-dev (>= 0.10), libevent-dev, libreadline-dev, libbsd-dev, diff --git a/m4/json-c.m4 b/m4/json-c.m4 index a107cfbd..bb9d647f 100644 --- a/m4/json-c.m4 +++ b/m4/json-c.m4 @@ -11,7 +11,7 @@ AC_DEFUN([lldp_CHECK_JSONC], [ AC_DEFINE_UNQUOTED([USE_JSONC], 1, [Define to indicate to enable JSON via json-c support]) with_json=json-c ],[ - PKG_CHECK_MODULES([JSONC], [json], [ + PKG_CHECK_MODULES([JSONC], [json >= 0.10], [ AC_SUBST([JSONC_LIBS]) AC_SUBST([JSONC_CFLAGS]) AC_DEFINE_UNQUOTED([USE_JSON], 1, [Define to indicate to enable JSON support]) -- 2.39.5