]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
build: allow use of older versions of json-c
authorVincent Bernat <vincent@bernat.im>
Fri, 3 Oct 2014 20:32:35 +0000 (22:32 +0200)
committerVincent Bernat <vincent@bernat.im>
Fri, 3 Oct 2014 20:32:35 +0000 (22:32 +0200)
json-c library was first just named json. When requesting compilation
with json-c, also check for this library.

m4/json-c.m4
src/client/jsonc_writer.c

index cfab01eb449581fb544ddf8cdf6b45a3bbd01284..4fa65faacf69981df51af5ed89851451beca0f7b 100644 (file)
@@ -3,8 +3,9 @@
 #
 
 AC_DEFUN([lldp_CHECK_JSONC], [
-   PKG_CHECK_MODULES([JSONC], [json-c >= 0], [],
-      [AC_MSG_ERROR([*** unable to find json-c])])
+   PKG_CHECK_MODULES([JSONC], [json-c], [],
+      [PKG_CHECK_MODULES([JSONC], [json], [],
+        [AC_MSG_ERROR([*** unable to find json-c])])])
 
    AC_SUBST([JSONC_LIBS])
    AC_SUBST([JSONC_CFLAGS])
index da780a373ba28a945562e4540265753934ab1842..db9de438c6577602f933a6cfe83b73786cdf48b4 100644 (file)
@@ -23,7 +23,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <json-c/json.h>
+#include <json.h>
 #include <sys/queue.h>
 
 #include "writer.h"