- (Optional) xmllint to validate virt-inspector RELAX NG schema
-- (Optional) OCaml + OCaml library xml-light if you want to rebuild
- the generated files, and also to build the OCaml bindings
- (http://tech.motion-twin.com/xmllight.html)
+- (Optional) OCaml if you want to rebuild the generated files, and
+ also to build the OCaml bindings
- (Optional) local Fedora mirror
CONFIGUREDIR=..
fi
-# Ensure that an ocaml package is present for build-from sources.
-# This is *not* for anything that is required at configure-time
-# when configure is run from a distribution tarball. From those,
-# nothing ocaml-related is required.
-# ocamlfind cannot detect the presence of -devel packages directly,
-# so if $pkg ends in -devel, first check for the base package, and
-# if that's found, check for the existence of $base.cmxa in the
-# resulting directory.
-require_ocaml_pkg()
-{
- pkg=$1
- case $pkg in
- *-devel)
- local base=${pkg%%-devel}
- local dir=$(ocamlfind query "$base") || return 1
- test -f "$dir/$base.cmxa" || return 1
- ;;
- *) ocamlfind query "$pkg" > /dev/null 2>&1 || return 1;;
- esac
- return 0
-}
-
-{ require_ocaml_pkg xml-light && require_ocaml_pkg xml-light-devel; } \
- || { echo "you must have ocaml, ocamlfind, ocaml-xml-light" \
- "and ocaml-xml-light-devel" >&2; exit 1; }
-
# If no arguments were specified and configure has run before, use the previous
# arguments
if test $# == 0 && test -x ./config.status; then
dnl Check for OCaml (optional, for OCaml bindings).
OCAMLC=no
OCAMLFIND=no
-OCAML_PKG_xml_light=no
AC_ARG_ENABLE([ocaml],
AS_HELP_STRING([--disable-ocaml], [Disable OCaml language bindings]),
[],
OCAMLFIND=
AC_PROG_OCAML
AC_PROG_FINDLIB
-
- dnl Optional xml-light for running the generator.
- if test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"; then
- AC_CHECK_OCAML_PKG([xml-light])
- fi])
+ ])
AM_CONDITIONAL([HAVE_OCAML],
[test "x$OCAMLC" != "xno" && test "x$OCAMLFIND" != "xno"])
-AM_CONDITIONAL([HAVE_XML_LIGHT],[test "x$OCAML_PKG_xml_light" != "xno"])
dnl Check for Perl (optional, for Perl bindings).
PERL=no
EXTRA_DIST = $(SOURCES)
-OCAMLCFLAGS = -I +xml-light -I +../pkg-lib/xml-light -warn-error CDEFLMPSUVYZX
-OCAMLCLIBS = xml-light.cma unix.cma str.cma
+OCAMLCFLAGS = -warn-error CDEFLMPSUVYZX
+OCAMLCLIBS = unix.cma str.cma
noinst_PROGRAM = generator
name="guestfs"
version="@PACKAGE_VERSION@"
-description="libguestfs and virt-inspector bindings for OCaml"
-requires="xml-light,unix"
+description="libguestfs bindings for OCaml"
+requires="unix"
archive(byte)="mlguestfs.cma"
archive(native)="mlguestfs.cmxa"
$(WARN_CFLAGS) $(WERROR_CFLAGS)
if HAVE_OCAML
-if HAVE_XML_LIGHT
noinst_DATA = mlguestfs.cma mlguestfs.cmxa META
bindtests: bindtests.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_005_load: t/guestfs_005_load.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_010_launch: t/guestfs_010_launch.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_050_lvcreate: t/guestfs_050_lvcreate.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_060_readdir: t/guestfs_060_readdir.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_070_threads: t/guestfs_070_threads.cmx mlguestfs.cmxa
mkdir -p t
t/guestfs_080_optargs: t/guestfs_080_optargs.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
t/guestfs_400_progress: t/guestfs_400_progress.cmx mlguestfs.cmxa
mkdir -p t
- $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package xml-light,unix -linkpkg mlguestfs.cmxa $< -o $@
+ $(OCAMLFIND) ocamlopt -cclib -L$(top_builddir)/src/.libs -I . -package unix -linkpkg mlguestfs.cmxa $< -o $@
# Need to rebuild the tests from source if the main library has
# changed at all, otherwise we get inconsistent assumptions.
$(OCAMLFIND) ocamlopt -package unix,threads -thread -linkpkg -c $< -o $@
t/%.cmx: t/%.ml mlguestfs.cmxa
- $(OCAMLFIND) ocamlopt -package xml-light,unix -linkpkg -c $< -o $@
+ $(OCAMLFIND) ocamlopt -package unix -linkpkg -c $< -o $@
.mli.cmi:
- $(OCAMLFIND) ocamlc -package xml-light,unix -c $< -o $@
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $@
.ml.cmo:
- $(OCAMLFIND) ocamlc -package xml-light,unix -c $< -o $@
+ $(OCAMLFIND) ocamlc -package unix -c $< -o $@
.ml.cmx:
- $(OCAMLFIND) ocamlopt -package xml-light,unix -c $< -o $@
+ $(OCAMLFIND) ocamlopt -package unix -c $< -o $@
depend: .depend
CLEANFILES += $(noinst_DATA)
endif
-endif
# Tell version 3.79 and up of GNU make to not build goals in this
# directory in parallel. (Possible solution for RHBZ#502309).