require at least json >=0.11 v1.3.2
authorJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 2 Nov 2014 09:26:05 +0000 (10:26 +0100)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 2 Nov 2014 09:26:05 +0000 (10:26 +0100)
configure
configure.ac

index 18f295d..9a69925 100755 (executable)
--- 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
index 7b0aa27..0a898e9 100644 (file)
@@ -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")])