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])
* 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 &&
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",
virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Reboot is not supported without the JSON monitor"));
goto cleanup;
-#if HAVE_YAJL
+#if WITH_YAJL
}
#endif
}
#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
}
-#if HAVE_YAJL
+#if WITH_YAJL
static int virJSONParserInsertValue(virJSONParserPtr parser,
virJSONValuePtr value)
{
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);
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);
test_programs += object-locking
endif
-if HAVE_YAJL
+if WITH_YAJL
test_programs += jsontest
endif
&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