From: Richard W.M. Jones Date: Thu, 11 Nov 2010 18:03:12 +0000 (+0000) Subject: build: xml-light is no longer required (thanks Maxim Koltsov). X-Git-Tag: 1.6.2~26 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=b852adb5efbef60c4515168c6eeb7a47d1fc86cc;p=libguestfs.git build: xml-light is no longer required (thanks Maxim Koltsov). At some point we removed the last thing that required xml-light, but were still testing for it at various places in the build. This removes all traces. (cherry picked from commit f6c4026f85fa6ded33a51ec2757abda9f116fd5f) --- diff --git a/README b/README index 8c8cf3d..950e0c4 100644 --- a/README +++ b/README @@ -72,9 +72,8 @@ Requirements - (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 diff --git a/autogen.sh b/autogen.sh index 19cca0e..0c74fae 100755 --- a/autogen.sh +++ b/autogen.sh @@ -42,32 +42,6 @@ if [ ! -z "$BUILDDIR" ]; then 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 diff --git a/configure.ac b/configure.ac index 62bf58f..e5f1076 100644 --- a/configure.ac +++ b/configure.ac @@ -488,7 +488,6 @@ AM_CONDITIONAL([HAVE_FUSE],[test "x$enable_fuse" != "xno"]) 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]), [], @@ -500,14 +499,9 @@ AS_IF([test "x$enable_ocaml" != "xno"], 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 diff --git a/generator/Makefile.am b/generator/Makefile.am index ca5d615..5920917 100644 --- a/generator/Makefile.am +++ b/generator/Makefile.am @@ -51,8 +51,8 @@ OBJECTS = $(SOURCES_ML:.ml=.cmo) 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 diff --git a/ocaml/META.in b/ocaml/META.in index 7d6e52e..a03fc4c 100644 --- a/ocaml/META.in +++ b/ocaml/META.in @@ -1,6 +1,6 @@ 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" diff --git a/ocaml/Makefile.am b/ocaml/Makefile.am index 77c5be9..21177e0 100644 --- a/ocaml/Makefile.am +++ b/ocaml/Makefile.am @@ -38,7 +38,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(OCAMLLIB) -I$(top_srcdir)/ocaml \ $(WARN_CFLAGS) $(WERROR_CFLAGS) if HAVE_OCAML -if HAVE_XML_LIGHT noinst_DATA = mlguestfs.cma mlguestfs.cmxa META @@ -75,23 +74,23 @@ noinst_DATA += bindtests \ 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 @@ -99,11 +98,11 @@ t/guestfs_070_threads: t/guestfs_070_threads.cmx mlguestfs.cmxa 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. @@ -111,14 +110,14 @@ t/guestfs_070_threads.cmx: t/guestfs_070_threads.ml mlguestfs.cmxa $(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 @@ -143,7 +142,6 @@ install-data-hook: 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).