+dnl Optional xml-light for building virt-inspector language bindings
+dnl from the virt-inspector.rng file.
+OCAML_PKG_xml_light=no
+if test "x$OCAMLC" != "xno" -a "x$OCAMLFIND" != "xno"; then
+ AC_CHECK_OCAML_PKG([xml-light])
+fi
+AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"])
+
+dnl Build the OCaml viewer example. This has a lengthy list of
+dnl dependencies and we don't attempt to detect them all. Read
+dnl the top of ocaml/examples/viewer.ml before enabling this.
+AC_ARG_ENABLE([ocaml-viewer],
+ [AS_HELP_STRING([--enable-ocaml-viewer],
+ [enable OCaml viewer (see ocaml/examples) @<:@default=no@:>@])],
+ [],
+ [enable_ocaml_viewer=no])
+AM_CONDITIONAL([BUILD_OCAML_VIEWER],[test "x$enable_ocaml_viewer" = "xyes"])
+