]> xenbits.xensource.com Git - libvirt.git/commitdiff
Convert HAVE_YAJL into WITH_YAJL
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 20 Sep 2012 11:57:13 +0000 (12:57 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 11 Jan 2013 11:03:22 +0000 (11:03 +0000)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
configure.ac
src/qemu/qemu_capabilities.c
src/qemu/qemu_driver.c
src/util/virjson.c
tests/Makefile.am
tests/qemuhelptest.c

index dd28401190331691f6b753b66d73112ff076262d..16013fc09eb616a54cc4926779428c190e51be16 100644 (file)
@@ -1206,15 +1206,15 @@ if test "x$with_yajl" != "xno"; then
   CPPFLAGS="$old_cppflags"
   LIBS="$old_libs"
   if test "x$with_yajl" = "xyes" ; then
-    AC_DEFINE_UNQUOTED([HAVE_YAJL], 1,
+    AC_DEFINE_UNQUOTED([WITH_YAJL], 1,
       [whether YAJL is available for JSON parsing/formatting])
   fi
   if test "x$with_yajl2" = "xyes" ; then
-    AC_DEFINE_UNQUOTED([HAVE_YAJL2], 1,
+    AC_DEFINE_UNQUOTED([WITH_YAJL2], 1,
       [whether YAJL has API version 2])
   fi
 fi
-AM_CONDITIONAL([HAVE_YAJL], [test "x$with_yajl" = "xyes"])
+AM_CONDITIONAL([WITH_YAJL], [test "x$with_yajl" = "xyes"])
 AC_SUBST([YAJL_CFLAGS])
 AC_SUBST([YAJL_LIBS])
 
index 876a75915d07efd1ce1891ddbbe2abde14aadde7..706bf0647b20f595d4cb5492740379370a555bcd 100644 (file)
@@ -1144,7 +1144,7 @@ qemuCapsComputeCmdFlags(const char *help,
      * backported for libvirt. The benefits of JSON mode now
      * outweigh the downside.
      */
-#if HAVE_YAJL
+#if WITH_YAJL
     if (version >= 13000) {
         qemuCapsSet(caps, QEMU_CAPS_MONITOR_JSON);
     } else if (version >= 12000 &&
index 3427d3faa35c89b600940e01e04aabd56d998e11..39175f4b36a928f1da96a2773c738a71ce90e4ee 100644 (file)
@@ -1991,7 +1991,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
             goto cleanup;
         }
     } else {
-#if HAVE_YAJL
+#if WITH_YAJL
         if (qemuCapsGet(priv->caps, QEMU_CAPS_MONITOR_JSON)) {
             if (!qemuCapsGet(priv->caps, QEMU_CAPS_NO_SHUTDOWN)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
@@ -2003,7 +2003,7 @@ qemuDomainReboot(virDomainPtr dom, unsigned int flags)
             virReportError(VIR_ERR_OPERATION_INVALID, "%s",
                            _("Reboot is not supported without the JSON monitor"));
             goto cleanup;
-#if HAVE_YAJL
+#if WITH_YAJL
         }
 #endif
     }
index db5eda269cc01f6420ec96a0933eae62310329b0..e6a3b1b61ef5f34eb4295d434b13796aad4cda76 100644 (file)
 #include "virlog.h"
 #include "virutil.h"
 
-#if HAVE_YAJL
+#if WITH_YAJL
 # include <yajl/yajl_gen.h>
 # include <yajl/yajl_parse.h>
 
-# ifdef HAVE_YAJL2
+# ifdef WITH_YAJL2
 #  define yajl_size_t size_t
 # else
 #  define yajl_size_t unsigned int
@@ -659,7 +659,7 @@ int virJSONValueObjectIsNull(virJSONValuePtr object, const char *key)
 }
 
 
-#if HAVE_YAJL
+#if WITH_YAJL
 static int virJSONParserInsertValue(virJSONParserPtr parser,
                                     virJSONValuePtr value)
 {
@@ -937,13 +937,13 @@ virJSONValuePtr virJSONValueFromString(const char *jsonstring)
     yajl_handle hand;
     virJSONParser parser = { NULL, NULL, 0 };
     virJSONValuePtr ret = NULL;
-# ifndef HAVE_YAJL2
+# ifndef WITH_YAJL2
     yajl_parser_config cfg = { 1, 1 };
 # endif
 
     VIR_DEBUG("string=%s", jsonstring);
 
-# ifdef HAVE_YAJL2
+# ifdef WITH_YAJL2
     hand = yajl_alloc(&parserCallbacks, NULL, &parser);
     if (hand) {
         yajl_config(hand, yajl_allow_comments, 1);
@@ -1061,13 +1061,13 @@ char *virJSONValueToString(virJSONValuePtr object,
     const unsigned char *str;
     char *ret = NULL;
     yajl_size_t len;
-# ifndef HAVE_YAJL2
+# ifndef WITH_YAJL2
     yajl_gen_config conf = { pretty ? 1 : 0, pretty ? "    " : " "};
 # endif
 
     VIR_DEBUG("object=%p", object);
 
-# ifdef HAVE_YAJL2
+# ifdef WITH_YAJL2
     g = yajl_gen_alloc(NULL);
     if (g) {
         yajl_gen_config(g, yajl_gen_beautify, pretty ? 1 : 0);
index 9c7c6fb14ef181445351be8115f48609565b8bba..0e5aec41beb68b38f826f4ba3706761a1a77e9f7 100644 (file)
@@ -146,7 +146,7 @@ if WITH_CIL
 test_programs += object-locking
 endif
 
-if HAVE_YAJL
+if WITH_YAJL
 test_programs += jsontest
 endif
 
index 08091dee53ed1099c1752136f421b62accb3086f..68efd9c7795e7a2dac4084046285cba0a6c476fa 100644 (file)
@@ -56,7 +56,7 @@ static int testHelpStrParsing(const void *data)
                              &version, &is_kvm, &kvm_version, false) == -1)
         goto cleanup;
 
-# ifndef HAVE_YAJL
+# ifndef WITH_YAJL
     if (qemuCapsGet(info->flags, QEMU_CAPS_MONITOR_JSON))
         qemuCapsSet(flags, QEMU_CAPS_MONITOR_JSON);
 # endif