]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
Add libjson version check on configure to fix build error
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Thu, 14 Oct 2021 03:48:36 +0000 (12:48 +0900)
committerSteven Seungcheol Lee <sc108.lee@samsung.com>
Mon, 22 Nov 2021 10:16:26 +0000 (19:16 +0900)
json_util_get_last_err, json_object_to_fd are supported from json-c-0.13-20171207
if json-c version is lower than 0.13, build without it

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
configure

index dcf1699131dc9474e762cbcc9da2c306ff82a168..d67ed8e5e155b8a7034bc8a91eff86b14f346200 100755 (executable)
--- a/configure
+++ b/configure
@@ -199,9 +199,8 @@ print_config "libuuid" "${libuuid}"
 # check for libjson-c
 libjsonc="no"
 if [ -z "$disable_json" ] ; then
-    ${ld} -o /dev/null -ljson-c >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-       libjsonc="yes"
+    if pkg-config --atleast-version=0.13 json-c; then
+        libjsonc="yes"
     fi
 fi
 print_config "libjson-c" "${libjsonc}"