From: Richard W.M. Jones <"Richard W.M. Jones "> Date: Wed, 16 Apr 2008 13:24:40 +0000 (+0100) Subject: Just the OCaml bindings (C library). X-Git-Tag: 0.6.1.1~44 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=387659e02777e9098f58f1d4afaa6b8ce561663c;p=ocaml-libvirt.git Just the OCaml bindings (C library). --- diff --git a/Makefile.in b/Makefile.in index 52776e0..da44e9c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,7 +25,7 @@ MAKENSIS = @MAKENSIS@ OCAMLDOC = @OCAMLDOC@ OCAMLDOCFLAGS := -html -sort -SUBDIRS = @subdirs@ +SUBDIRS = libvirt mlvirsh examples all opt depend install: for d in $(SUBDIRS); do \ @@ -40,9 +40,6 @@ clean: rm -f examples/list_domains rm -f examples/node_info rm -f mlvirsh/mlvirsh - rm -f virt-ctrl/virt-ctrl - rm -f virt-top/virt-top - rm -f virt-df/virt-df distclean: clean rm -f config.h config.log config.status configure @@ -53,9 +50,6 @@ distclean: clean rm -f libvirt/Makefile rm -f examples/Makefile rm -f mlvirsh/Makefile - rm -f virt-ctrl/Makefile - rm -f virt-top/Makefile - rm -f virt-df/Makefile # Developer documentation (in html/ subdirectory). diff --git a/README b/README index 7fb9726..78a4df8 100644 --- a/README +++ b/README @@ -9,141 +9,6 @@ This is a complete set of OCaml bindings around libvirt, exposing all known functionality to OCaml programs. -Requirements ----------------------------------------------------------------------- - -PLEASE NOTE: The list of requirements looks long but you DO NOT NEED -all of these packages, so pay careful attention to what is required -('R') and what is optional ('O'). - -ALSO NOTE: Binaries are available for many platforms. You only need -the packages below if you want to build from source. - - W h a t y o u w a n t t o b u i l d - - |Bindings, |Docs, |virt-top |virt-ctrl |virt-df |Windows - |examples, |manpages | | | |version - |mlvirsh | | | | | - --------------+----------+---------+---------+----------+----------+------ - GNU make | R | R | R | R | R | R - | | | | | | - gcc | R | | R | R | R | R - | | | | | | - libvirt | R | | R | R | R | R - | >= 0.2.1 | | | | | - | | | | | | - ocaml | R | | R | R | R | R - | >= 3.08 | | | | >= 3.10 | - | | | | | | - findlib | HR | R | HR | HR | HR | Note [1] - | | | | | | - ocaml-gettext | O | O | O | O | O | Note [2] - | | | | | | - MinGW + MSYS | | | | | | R - --------------+----------+---------+---------+----------+----------+------ - ocamldoc | | R | | | | O - | | | | | | - perldoc | | O | | | | - --------------+----------+---------+---------+----------+----------+------ - ocaml-curses | | | R | | | - | | | | | | - Extlib | | | R | | R | - | | | | | | - xml-light | | | O | | R | - | | | | | | - ocaml-calendar| | | O | | | - | | | | | | - ocaml CSV | | | O | | | - | | | | | | - bitmatch | | | | | R | - --------------+----------+---------+---------+----------+----------+------ - GTK2 | | | | R | | O - | | | | | | - lablgtk2 | | | | R | | O - | | | | >= 2.10.0| | - ocaml-dbus | | | | O | | - | | | | >= 0.06 | | - gnome-icon-theme | | | O | | - --------------+----------+---------+---------+----------+----------+------ - NSIS | | | | | | O - --------------+----------+---------+---------+----------+----------+------ - - R = required - HR = highly recommended (use if possible) - O = optional (just improves functionality, but not required) - n/a = not available - -Note [1]: Findlib was recently ported to Windows and in future we may -require it because it will let us remove a lot of hacks from the -Makefiles. - -Note [2]: It's not clear if ocaml-gettext works on Windows. - -Where to get the packages: - - libvirt >= 0.2.1 from http://libvirt.org/ (get the latest version available) - or packaged in Debian, Ubuntu and Fedora - - ocaml >= 3.08 from http://caml.inria.fr/ - or packaged in Debian, Ubuntu and Fedora - - findlib from http://www.ocaml-programming.de/packages/ - or packaged in Debian, Ubuntu and Fedora as 'ocaml-findlib' - - ocaml-gettext from http://www.le-gall.net/sylvain+violaine/ocaml-gettext.html - + patch for OCaml 3.10: - http://www.annexia.org/tmp/ocaml-gettext-0.2.0-20080321.patch - (This should appear in ocaml-gettext 0.3.0 shortly). - - MinGW + MSYS from http://www.mingw.org/ (only needed for Windows) - - ocamldoc part of OCaml itself - or part of the ocaml package in Debian, Ubuntu - or packaged in Fedora as 'ocaml-ocamldoc' - - perldoc part of Perl - or packaged in Debian, Ubuntu and Fedora - - ocaml-curses from http://www.nongnu.org/ocaml-tmk/ - or packaged in Debian, Ubuntu as 'libcurses-ocaml-dev' - or packaged in Fedora as 'ocaml-curses-devel' - - Extlib from http://ocaml-lib.sourceforge.net/ - or packaged in Debian, Unbuntu as 'libextlib-ocaml-dev' - or packaged in Fedora as 'ocaml-extlib-devel' - - xml-light from http://tech.motion-twin.com/doc/xml-light/ - or packaged in Debian, Ubuntu as 'libxml-light-ocaml-dev' - or packaged in Fedora as 'ocaml-xml-light-devel' - - ocaml CSV from http://merjis.com/developers/csv - or packaged in Debian, Ubuntu as 'libcsv-ocaml-dev' - or packaged in Fedora as 'ocaml-csv-devel' - - ocaml-calendar from http://www.lri.fr/~signoles/prog.en.html - or packaged in Debian, Ubuntu as 'libcalendar-ocaml-dev' - or packaged in Fedora as 'ocaml-calendar-devel' - - bitmatch from http://et.redhat.com/~rjones/bitmatch/ - - GTK2 from http://gtk.org/ - or packaged in Debian, Ubuntu and Fedora - - lablgtk2 >= 2.10.0 - from http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk.html - or packaged in Debian, Ubuntu as 'liblablgtk2-ocaml-dev' - or packaged in Fedora 9 as 'ocaml-lablgtk-devel' - - gnome-icon-theme part of GNOME - - ocaml-dbus >= 0.06 - from http://tab.snarc.org/projects/ocaml_dbus/ - or packaged in Fedora 9 as 'ocaml-dbus-devel' - (not yet available for Debian or Ubuntu AFAIK) - - NSIS from http://nsis.sf.net - - Building ---------------------------------------------------------------------- @@ -157,8 +22,7 @@ Building make doc # Build HTML documentation in html/ subdirectory. -Then have a look at the programs 'mlvirsh.opt', 'virt-top.opt' -and 'virt-ctrl.opt'. +Then have a look at the program 'mlvirsh.opt'. Note: If you want to run the programs without first installing, you may need to set your $LD_LIBRARY_PATH environment variable so it @@ -220,17 +84,6 @@ At the time of writing: % size 15% 13% -virt-ctrl ----------------------------------------------------------------------- - -'virt-ctrl' (originally called 'mlvirtmanager') is a reimplementation -of virt-manager in OCaml. It is not feature-complete by any means, -but does allow you to show the running domains and start and stop -defined domains. The main functionality _missing_ is the ability to -define new virtual machines, change the resources allocated to -domains, or show the machine console. - - Programming ---------------------------------------------------------------------- @@ -246,6 +99,3 @@ Subdirectories libvirt/ The OCaml bindings. examples/ Some example programs using the bindings. mlvirsh/ 'mlvirsh' command line tool. -virt-ctrl/ 'virt-ctrl' graphical tool. -virt-top/ 'virt-top' tool. -virt-df/ 'virt-df' tool. diff --git a/config.h.in b/config.h.in index ab90ff8..886a316 100644 --- a/config.h.in +++ b/config.h.in @@ -3,9 +3,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `ncurses' library (-lncurses). */ -#undef HAVE_LIBNCURSES - /* Define to 1 if you have the `virt' library (-lvirt). */ #undef HAVE_LIBVIRT diff --git a/configure.ac b/configure.ac index 4ed972e..6d68217 100644 --- a/configure.ac +++ b/configure.ac @@ -144,123 +144,32 @@ dnl Check for optional types added since 0.2.1. AC_CHECK_TYPES([virJobPtr, virStoragePoolPtr, virStorageVolPtr],,, [#include ]) -dnl Check for optional ncurses. -AC_CHECK_LIB(ncurses,initscr) - -dnl Check for optional GNOME icons (from gnome-icon-theme package). -AC_ARG_WITH(icons, - AC_HELP_STRING([--with-icons=PATH], - [Set path to installed icons @<:@default=/usr/share/icons@:>@]), - [],[with_icons=/usr/share/icons]) -icons="" -if test "x$with_icons" != "xno"; then - for size in 16 24 32 48; do - for f in devices/computer.png; do - fname="${with_icons}/gnome/${size}x${size}/${f}" - AC_MSG_CHECKING([checking for icon $fname]) - if test -f "$fname"; then - AC_MSG_RESULT([yes]) - icons="$size $f $fname $icons" - else - AC_MSG_RESULT([no]) - fi - done - done -fi -AC_SUBST(with_icons) -AC_SUBST(icons) - dnl Check for basic OCaml environment & findlib. -dnl Note that findlib is not necessary, but things will work better -dnl if it is present. AC_PROG_OCAML AC_PROG_FINDLIB -if test "x$OCAMLFIND" != "x"; then - dnl Use ocamlfind to find the required packages ... - - 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 - - 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) - AC_CHECK_OCAML_PKG(xml-light) - AC_CHECK_OCAML_PKG(csv) - AC_CHECK_OCAML_PKG(dbus) - AC_CHECK_OCAML_PKG(gettext) - AC_CHECK_OCAML_PKG(bitmatch) - - dnl Need to check which version of calendar is installed. - AC_CHECK_OCAML_MODULE(calendar,pkg_calendar2,CalendarLib.Date,[+calendar]) - if test "x$pkg_calendar2" = "xno"; then - AC_CHECK_OCAML_PKG(calendar) - fi - - AC_SUBST(pkg_unix) - AC_SUBST(pkg_extlib) - AC_SUBST(pkg_lablgtk2) - AC_SUBST(pkg_curses) - AC_SUBST(pkg_gettext) - AC_SUBST(pkg_xml_light) - AC_SUBST(pkg_csv) - AC_SUBST(pkg_dbus) - AC_SUBST(pkg_gettext) - AC_SUBST(pkg_calendar) - AC_SUBST(pkg_calendar2) -else - dnl Use a basic module test if there is no findlib ... - - dnl Check for required OCaml modules. - AC_CHECK_OCAML_MODULE(unix,pkg_unix,Unix,[.]) - if test "x$pkg_unix" = "xno"; then - AC_MSG_ERROR([Cannot find required OCaml package 'unix']) - fi - - dnl Check for optional OCaml modules. - AC_CHECK_OCAML_MODULE(extlib,pkg_extlib,ExtString,[+extlib]) - AC_CHECK_OCAML_MODULE(lablgtk2,pkg_lablgtk2,GMain,[+lablgtk2]) - AC_CHECK_OCAML_MODULE(curses,pkg_curses,Curses,[+curses]) - AC_CHECK_OCAML_MODULE(gettext,pkg_gettext,Gettext,[+gettext]) dnl XXX - AC_CHECK_OCAML_MODULE(xml-light,pkg_xml_light,Xml,[+xml-light]) - AC_CHECK_OCAML_MODULE(csv,pkg_csv,Csv,[+csv]) - AC_CHECK_OCAML_MODULE(dbus,pkg_dbus,DBus,[+dbus]) - AC_CHECK_OCAML_MODULE(gettext,pkg_gettext,Gettext,[+gettext]) - AC_CHECK_OCAML_MODULE(bitmatch,pkg_bitmatch,Bitmatch,[+bitmatch]) - dnl XXX Version check - see above. - AC_CHECK_OCAML_MODULE(calendar,pkg_calendar,Calendar,[+calendar]) +if test "x$OCAMLFIND" = "x"; then + AC_MSG_ERROR([OCaml findlib is required]) fi -dnl Which subpackages (== subdirs) will we build? -subdirs="libvirt examples mlvirsh" -if test "x$pkg_lablgtk2" != "xno"; then - subdirs="$subdirs virt-ctrl" -fi -if test "x$pkg_extlib" != "xno" -a "x$pkg_curses" != "xno"; then - subdirs="$subdirs virt-top" -fi -if test "x$pkg_extlib" != "xno" \ - -a "x$pkg_xml_light" != "xno" \ - -a "x$pkg_bitmatch" != "xno"; then - subdirs="$subdirs virt-df" +dnl Use ocamlfind to find the required packages ... + +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_SUBST(subdirs) -dnl Check for optional perldoc (for building manual pages). -AC_CHECK_PROG(HAVE_PERLDOC,perldoc,perldoc) +dnl Check for optional OCaml packages. +AC_CHECK_OCAML_PKG(gettext) -dnl Check for optional gdk-pixbuf-mlsource (for icons). -AC_CHECK_PROG(HAVE_GDK_PIXBUF_MLSOURCE,gdk-pixbuf-mlsource,gdk-pixbuf-mlsource) +AC_SUBST(pkg_gettext) dnl Check for recommended ocaml-gettext tool. AC_CHECK_PROG(OCAML_GETTEXT,ocaml-gettext,ocaml-gettext) dnl Check for optional NSIS (for building a Windows installer). +dnl XXX This probably doesn't work at the moment XXX AC_ARG_WITH([nsis], [AS_HELP_STRING([--with-nsis], [use NSIS to build a Windows installer])], @@ -351,7 +260,7 @@ AC_SUBST(GTK_PATH) dnl Write gettext modules for the programs. dnl http://www.le-gall.net/sylvain+violaine/documentation/ocaml-gettext/html/reference-manual/ch03s04.html -for d in mlvirsh virt-ctrl virt-df virt-top; do +for d in mlvirsh; do f=`echo $d | tr - _`_gettext.ml AC_MSG_NOTICE([creating $d/$f]) rm -f $d/$f @@ -388,7 +297,6 @@ done dnl Summary. echo "------------------------------------------------------------" echo "Thanks for downloading" $PACKAGE_STRING -echo " subpackages to build : $subdirs" echo "------------------------------------------------------------" dnl Produce output files. @@ -401,9 +309,6 @@ AC_CONFIG_FILES([META libvirt/Makefile examples/Makefile mlvirsh/Makefile - virt-ctrl/Makefile - virt-top/Makefile - virt-df/Makefile ]) if test "x$MAKENSIS" != "x"; then AC_CONFIG_FILES([wininstaller.nsis])