From 53872a0a1a267040677572c30b68bd1e8b62ebe3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Oct 2024 11:01:25 +0100 Subject: [PATCH] build: Add new dependency on json-c This will eventually replace Jansson for all JSON parsing. However this commit simply introduces the new dependency in the configure script and documents it. I chose json-c 0.14 as the baseline since that is the version in RHEL 9. Probably earlier versions would work. --- docs/guestfs-building.pod | 4 ++++ m4/guestfs-libraries.m4 | 3 +++ 2 files changed, 7 insertions(+) diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 2c0845212..de175aaff 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -189,6 +189,10 @@ I. I. +=item json-c E 0.14 + +I. + =item po4a I if compiling from git. diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4 index 18c4cd307..ee406d273 100644 --- a/m4/guestfs-libraries.m4 +++ b/m4/guestfs-libraries.m4 @@ -304,6 +304,9 @@ LIBS="$old_LIBS" dnl Check for Jansson JSON library (required). PKG_CHECK_MODULES([JANSSON], [jansson >= 2.7]) +dnl Check for JSON-C library (required). +PKG_CHECK_MODULES([JSON_C], [json-c >= 0.14]) + dnl Check for C++ (optional, we just use this to test the header works). AC_PROG_CXX -- 2.43.0