+2008-01-04 Richard Jones <rjones@redhat.com>
+
+ Make extlib an optional dependency.
+ * Makefile.in, README, configure.ac, examples/Makefile.in,
+ libvirt/Makefile.in, mlvirtmanager/Makefile.in: Much code
+ doesn't really need extlib, so make it optional.
+ Bail earlier in configure step if we don't have ocamlfind.
+
2007-12-20 Richard Jones <rjones@redhat.com>
* libvirt/libvirt_c.c: Use enter/leave_blocking_section around
INSTALL = @INSTALL@
+pkg_extlib = @pkg_extlib@
pkg_lablgtk2 = @pkg_lablgtk2@
pkg_curses = @pkg_curses@
pkg_xml_light = @pkg_xml_light@
OCAMLDOCFLAGS := -html -sort
-SUBDIRS := libvirt examples mlvirsh
+SUBDIRS := libvirt examples
+
+ifeq ($(pkg_extlib),yes)
+SUBDIRS += mlvirsh
+endif
ifeq ($(pkg_lablgtk2),yes)
SUBDIRS += mlvirtmanager
endif
-ifeq ($(pkg_curses),yes)
+ifeq ($(pkg_extlib)$(pkg_curses),yesyes)
SUBDIRS += virt-top
endif
-ifeq ($(pkg_xml_light),yes)
+ifeq ($(pkg_extlib)$(pkg_xml_light),yesyes)
SUBDIRS += virt-df
endif
rm -f mlvirsh/mlvirsh
rm -f mlvirtmanager/mlvirtmanager
rm -f virt-top/virt-top
+ rm -f virt-df/virt-df
distclean: clean
rm -f config.h config.log config.status configure
Requirements
----------------------------------------------------------------------
-To build the bindings and mlvirsh (required):
+To build the bindings (required):
GNU make, gcc
libvirt >= 0.2.1 (from http://libvirt.org/,
get the latest version if you can)
ocaml >= 3.08 (from http://caml.inria.fr/)
findlib (from http://www.ocaml-programming.de/packages/)
- Extlib (from http://ocaml-lib.sourceforge.net/)
To build the OCaml interface documentation (optional):
ocamldoc (part of OCaml itself)
+To build mlvirsh (optional):
+
+ Extlib (from http://ocaml-lib.sourceforge.net/)
+
To build virt-top (optional):
ocaml-curses (from http://www.nongnu.org/ocaml-tmk/)
+ Extlib (from http://ocaml-lib.sourceforge.net/)
xml-light (from http://tech.motion-twin.com/doc/xml-light/)
ocaml CSV library (from http://merjis.com/developers/csv)
ocaml-calendar (http://www.lri.fr/~signoles/prog.en.html)
- [Only ocaml-curses is required for building virt-top. The other
- packages are not required, but you will get reduced functionality].
+ [Only ocaml-curses and Extlib are required for building virt-top.
+ The other packages are not required, but you will get reduced
+ functionality].
To build mlvirtmanager (optional):
dnl Check for basic OCaml environment & findlib.
AC_PROG_OCAML
AC_PROG_FINDLIB
+if test "x$OCAMLFIND" = "x"; then
+ AC_MSG_ERROR([Cannot find required program 'ocamlfind' (part of findlib)])
+fi
dnl Check for required OCaml packages.
AC_CHECK_OCAML_PKG(unix)
if test "x$pkg_unix" != "xyes"; then
AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
fi
-AC_CHECK_OCAML_PKG(extlib)
-if test "x$pkg_extlib" != "xyes"; then
- AC_MSG_ERROR([Cannot find required OCaml package 'extlib'])
-fi
dnl Check for optional OCaml packages.
+AC_CHECK_OCAML_PKG(extlib)
AC_CHECK_OCAML_PKG(lablgtk2)
AC_CHECK_OCAML_PKG(curses)
AC_CHECK_OCAML_PKG(gettext)
-OCAMLCPACKAGES := -package extlib,unix -I ../libvirt
+OCAMLCPACKAGES := -package unix -I ../libvirt
OCAMLCFLAGS := -g
OCAMLCLIBS := -linkpkg
-g
LDFLAGS := @LDFLAGS@
-OCAMLCPACKAGES := -package extlib,unix
+OCAMLCPACKAGES := -package unix
OCAMLCFLAGS := -g
OCAMLCLIBS := -linkpkg
exec_prefix = @exec_prefix@
bindir = @bindir@
-OCAMLCPACKAGES := -package extlib,unix,lablgtk2 -I ../libvirt
+OCAMLCPACKAGES := -package unix,lablgtk2 -I ../libvirt
OCAMLCFLAGS := -g
OCAMLCLIBS := -linkpkg