File rsyslog-8.4.0-json-c-0.12-configure.patch of Package rsyslog.6132
From: Andreas Stieger <andreas.stieger@gmx.de>
Subject: [PATCH] fix build with json-c 0.12 if it provides a compatibility json.pc
Date: Mon, 22 Sep 2014 20:40:53 +0100
Upstream: submitting
References:
json-c on openSUSE provides a compatibility pkg-config for "json".
The autoconf check find it first, assuming it does not provide
the function json_tokener_error_desc. Check for availability of
function using AC_CHECK_FUNCS instead.
---
configure.ac | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6d8d76d..ee6469d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,14 +32,16 @@ PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES(LIBESTR, libestr >= 0.1.9)
PKG_CHECK_MODULES(LIBLOGGING_STDLOG, liblogging-stdlog >= 1.0.3)
PKG_CHECK_MODULES([JSON_C], [json],, [
- PKG_CHECK_MODULES([JSON_C], [json-c],
- [AC_DEFINE([HAVE_JSON_TOKENER_ERROR_DESC], [1], [we have the newer JSON-C API])])
+ PKG_CHECK_MODULES([JSON_C], [json-c],,)
])
# if int64 is supported, use it
AC_CHECK_LIB(json-c, json_object_new_object,,)
AC_CHECK_FUNCS(json_object_new_int64,,)
+# look for newer API
+AC_CHECK_FUNCS(json_tokener_error_desc,,)
+
case "${host}" in
*-*-linux*)
AC_DEFINE([OS_LINUX], [1], [Indicator for a Linux OS])