]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: require json-c >= 0.10
authorVincent Bernat <vincent@bernat.im>
Wed, 20 May 2015 20:35:20 +0000 (22:35 +0200)
committerVincent Bernat <vincent@bernat.im>
Wed, 20 May 2015 20:35:20 +0000 (22:35 +0200)
`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
m4/json-c.m4

index 45b5ff1fc1e50f052d909d7ef584fff37c9286dc..86c331f4746abe58918f468c3f9d393a256ea2ee 100644 (file)
@@ -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,
index a107cfbd7daea43951862ec3d9f71c242a701e14..bb9d647f9c0f142a3796e9a87118eb126dc1635b 100644 (file)
@@ -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])