From fe50df3d47283db968190a09009b335ccaf421bb Mon Sep 17 00:00:00 2001 From: Jean-Philippe Orsini Date: Sun, 2 Nov 2014 10:26:05 +0100 Subject: [PATCH] require at least json >=0.11 --- configure | 32 ++++++++++++++++---------------- configure.ac | 4 ++-- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/configure b/configure index 18f295d..9a69925 100755 --- a/configure +++ b/configure @@ -6896,12 +6896,12 @@ if test -n "$JSON_CFLAGS"; then pkg_cv_JSON_CFLAGS="$JSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11.99\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c >= 0.11.99") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json-c" 2>/dev/null` + pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json-c >= 0.11.99" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6913,12 +6913,12 @@ if test -n "$JSON_LIBS"; then pkg_cv_JSON_LIBS="$JSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json-c") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json-c >= 0.11.99\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json-c >= 0.11.99") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json-c" 2>/dev/null` + pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json-c >= 0.11.99" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6939,9 +6939,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-c" 2>&1` + JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json-c >= 0.11.99" 2>&1` else - JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-c" 2>&1` + JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json-c >= 0.11.99" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$JSON_PKG_ERRORS" >&5 @@ -6973,12 +6973,12 @@ if test -n "$JSON_CFLAGS"; then pkg_cv_JSON_CFLAGS="$JSON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json >= 0.11.99\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json >= 0.11.99") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json" 2>/dev/null` + pkg_cv_JSON_CFLAGS=`$PKG_CONFIG --cflags "json >= 0.11.99" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -6990,12 +6990,12 @@ if test -n "$JSON_LIBS"; then pkg_cv_JSON_LIBS="$JSON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json\""; } >&5 - ($PKG_CONFIG --exists --print-errors "json") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"json >= 0.11.99\""; } >&5 + ($PKG_CONFIG --exists --print-errors "json >= 0.11.99") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json" 2>/dev/null` + pkg_cv_JSON_LIBS=`$PKG_CONFIG --libs "json >= 0.11.99" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -7016,9 +7016,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json" 2>&1` + JSON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "json >= 0.11.99" 2>&1` else - JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json" 2>&1` + JSON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "json >= 0.11.99" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$JSON_PKG_ERRORS" >&5 diff --git a/configure.ac b/configure.ac index 7b0aa27..0a898e9 100644 --- a/configure.ac +++ b/configure.ac @@ -32,13 +32,13 @@ AC_SUBST(CURL_LIBS) # Checks JSON JSON_LIBS= PKG_CHECK_MODULES(JSON, - json-c, + json-c >= 0.11.99, [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], [AC_MSG_WARN("json-c missing")]) if test "$JSON_LIBS" == ""; then PKG_CHECK_MODULES(JSON, - json, + json >= 0.11.99, [AC_DEFINE([HAVE_JSON],[1],[Use JSON]) AC_DEFINE([HAVE_JSON_0],[1],[Use JSON0])], [AC_MSG_WARN("json0 missing")]) -- 2.7.4