Skip to content

Commits on Source 6

META
ocaml-libvirt-*.tar.gz
ocaml-libvirt-*.exe
html
configure
config.log
config.status
config.h
config.cache
Makefile
Make.rules
*/Makefile
autom4te.cache
core
core.*
*.a
*.cma
*.cmi
*.cmo
*.cmx
*.cma
*.cmxa
*.o
*.so
*.a
*.opt
*.dll
*.exe
*.o
*.opt
*.so
*~
libvirt/libvirt_version.ml
examples/domain_events
examples/get_cpu_stats
examples/list_domains
examples/node_info
virt-ctrl/virt-ctrl
virt-top/virt-top
virt-df/virt-df
*.orig
po/*.mo
po/*.po.bak
virt-df/virt_df_lvm2_lexer.ml
virt-df/virt_df_lvm2_parser.ml
virt-df/virt_df_lvm2_parser.mli
Make.rules
Makefile
core
core.*
/META
/aclocal.m4
/autom4te.cache
/config.cache
/config.h
/config.h.in
/config.log
/config.status
/configure
/examples/domain_events
/examples/get_all_domain_stats
/examples/get_cpu_stats
/examples/list_domains
/examples/list_secrets
/examples/node_info
/html/
/libvirt/libvirt_c.c
/libvirt/libvirt_version.ml
/ocaml-libvirt-*.exe
/ocaml-libvirt-*.tar.gz
......@@ -10,14 +10,15 @@ COPYING.LIB
contrib/0001-Add-Libvirt.Domain.get_cpu_stats_total.patch
examples/.depend
examples/domain_events.ml
examples/get_all_domain_stats.ml
examples/get_cpu_stats.ml
examples/list_domains.ml
examples/list_secrets.ml
examples/node_info.ml
examples/Makefile.in
install-sh
libvirt/.depend
libvirt/generator.pl
libvirt/libvirt_c.c
libvirt/libvirt_c_epilogue.c
libvirt/libvirt_c_oneoffs.c
libvirt/libvirt_c_prologue.c
......
......@@ -23,7 +23,7 @@ INSTALL = @INSTALL@
MAKENSIS = @MAKENSIS@
OCAMLDOC = @OCAMLDOC@
OCAMLDOCFLAGS := -html -sort
OCAMLDOCFLAGS := -html -sort -colorize-code
SUBDIRS = libvirt examples
......@@ -37,10 +37,12 @@ clean:
for d in . $(SUBDIRS); do \
(cd $$d; rm -f *.cmi *.cmo *.cmx *.cma *.cmxa *.o *.a *.so *.opt *~ *.dll *.exe core); \
done
rm -f libvirt/libvirt_c.c
rm -f examples/list_domains
rm -f examples/node_info
rm -f examples/get_cpu_stats
rm -f examples/domain_events
rm -f examples/get_all_domain_stats
distclean: clean
rm -f config.h config.log config.status configure
......
......@@ -2,8 +2,8 @@ ocaml-libvirt
----------------------------------------------------------------------
Copyright (C) 2007-2009 Richard W.M. Jones, Red Hat Inc.
http://libvirt.org/ocaml/
http://libvirt.org/
https://libvirt.org/ocaml/
https://libvirt.org/
This is a complete set of OCaml bindings around libvirt, exposing all
known functionality to OCaml programs.
......@@ -28,7 +28,7 @@ Programming
For documentation on these bindings, read libvirt.mli and/or 'make
doc' and browse the HTML documentation in the html/ subdirectory.
For documentation on libvirt itself, see http://libvirt.org/html/
For documentation on libvirt itself, see https://libvirt.org/html/
License
......
Turn VIR_ERR_NO_DOMAIN and NO_NETWORK errors into Not_found exceptions.
We should add a way to use the authentication mechanisms, like
virConnectOpenAuth:
http://www.redhat.com/archives/libvir-list/2008-April/msg00235.html
dnl autoconf macros for OCaml
dnl by Olivier Andrieu
dnl modified by Richard W.M. Jones
dnl from a configure.in by Jean-Christophe Fillitre,
dnl from a first script by Georges Mariano
dnl
dnl defines AC_PROG_OCAML that will check the OCaml compiler
dnl and set the following variables :
dnl OCAMLC "ocamlc" if present in the path, or a failure
dnl or "ocamlc.opt" if present with same version number as ocamlc
dnl OCAMLOPT "ocamlopt" (or "ocamlopt.opt" if present), or "no"
dnl OCAMLBEST either "byte" if no native compiler was found,
dnl or "opt" otherwise
dnl OCAMLDEP "ocamldep"
dnl OCAMLLIB the path to the ocaml standard library
dnl OCAMLVERSION the ocaml version number
AC_DEFUN(AC_PROG_OCAML,
[dnl
# checking for ocamlc
AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,AC_MSG_ERROR(Cannot find ocamlc.))
OCAMLVERSION=`$OCAMLC -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
AC_MSG_RESULT(OCaml version is $OCAMLVERSION)
OCAMLLIB=`$OCAMLC -where 2>/dev/null || $OCAMLC -v|tail -1|cut -d ' ' -f 4`
AC_MSG_RESULT(OCaml library path is $OCAMLLIB)
# checking for ocamlopt
AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt)
OCAMLBEST=byte
if test -z "$OCAMLOPT"; then
AC_MSG_WARN(Cannot find ocamlopt; bytecode compilation only.)
else
TMPVERSION=`$OCAMLOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(versions differs from ocamlc; ocamlopt discarded.)
unset OCAMLOPT
else
OCAMLBEST=opt
fi
fi
# checking for ocamlc.opt
AC_CHECK_PROG(OCAMLCDOTOPT,ocamlc.opt,ocamlc.opt)
if test -z "$OCAMLCDOTOPT"; then
TMPVERSION=`$OCAMLCDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(versions differs from ocamlc; ocamlc.opt discarded.)
else
OCAMLC=$OCAMLCDOTOPT
fi
fi
# checking for ocamlopt.opt
if test "$OCAMLOPT" ; then
AC_CHECK_PROG(OCAMLOPTDOTOPT,ocamlopt.opt,ocamlopt.opt)
if test "$OCAMLOPTDOTOPT"; then
TMPVER=`$OCAMLOPTDOTOPT -v | sed -n -e 's|.*version* *\(.*\)$|\1|p' `
if test "$TMPVER" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(version differs from ocamlc; ocamlopt.opt discarded.)
else
OCAMLOPT=$OCAMLOPTDOTOPT
fi
fi
fi
# checking for ocamldep
AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,AC_MSG_ERROR(Cannot find ocamldep.))
#checking for ocamlmktop
AC_CHECK_PROG(OCAMLMKTOP,ocamlmktop,ocamlmktop, AC_MSG_WARN(Cannot find ocamlmktop.))
#checking for ocamlmklib
AC_CHECK_PROG(OCAMLMKLIB,ocamlmklib,ocamlmklib, AC_MSG_WARN(Cannot find ocamlmklib.))
# checking for ocamldoc
AC_CHECK_PROG(OCAMLDOC,ocamldoc,ocamldoc, AC_MSG_WARN(Cannot find ocamldoc.))
AC_SUBST(OCAMLC)
AC_SUBST(OCAMLOPT)
AC_SUBST(OCAMLDEP)
AC_SUBST(OCAMLBEST)
AC_SUBST(OCAMLVERSION)
AC_SUBST(OCAMLLIB)
AC_SUBST(OCAMLMKLIB)
AC_SUBST(OCAMLDOC)
])
dnl macro AC_PROG_OCAML_TOOLS will check OCamllex and OCamlyacc :
dnl OCAMLLEX "ocamllex" or "ocamllex.opt" if present
dnl OCAMLYACC "ocamlyac"
AC_DEFUN(AC_PROG_OCAML_TOOLS,
[dnl
# checking for ocamllex and ocamlyacc
AC_CHECK_PROG(OCAMLLEX,ocamllex,ocamllex)
if test "$OCAMLLEX"; then
AC_CHECK_PROG(OCAMLLEXDOTOPT,ocamllex.opt,ocamllex.opt)
if test "$OCAMLLEXDOTOPT"; then
OCAMLLEX=$OCAMLLEXDOTOPT
fi
else
AC_MSG_ERROR(Cannot find ocamllex.)
fi
AC_CHECK_PROG(OCAMLYACC,ocamlyacc,ocamlyacc,AC_MSG_ERROR(Cannot find ocamlyacc.))
AC_SUBST(OCAMLLEX)
AC_SUBST(OCAMLYACC)
])
dnl AC_PROG_CAMLP4 checks for Camlp4
AC_DEFUN(AC_PROG_CAMLP4,
[dnl
AC_REQUIRE([AC_PROG_OCAML])
# checking for camlp4
AC_CHECK_PROG(CAMLP4,camlp4,camlp4)
if test "$CAMLP4"; then
TMPVERSION=`$CAMLP4 -v 2>&1| sed -n -e 's|.*version *\(.*\)$|\1|p'`
if test "$TMPVERSION" != "$OCAMLVERSION" ; then
AC_MSG_RESULT(versions differs from ocamlc)
fi
fi
])
dnl macro AC_PROG_FINDLIB will check for the presence of
dnl ocamlfind
AC_DEFUN(AC_PROG_FINDLIB,
[dnl
# checking for ocamlfind
AC_CHECK_PROG(OCAMLFIND,ocamlfind,ocamlfind,
AC_MSG_WARN([ocamlfind not found]))
AC_SUBST(OCAMLFIND)
])
dnl AC_CHECK_OCAML_PKG checks wether a findlib package is present
dnl defines pkg_name to "yes"
AC_DEFUN(AC_CHECK_OCAML_PKG,
[dnl
AC_REQUIRE([AC_PROG_FINDLIB])
AC_MSG_CHECKING(findlib package $1)
if $OCAMLFIND query $1 >/dev/null 2>/dev/null; then
AC_MSG_RESULT(found)
eval "pkg_`echo $1 | tr - _`=yes"
else
AC_MSG_RESULT(not found)
eval "pkg_`echo $1 | tr - _`=no"
fi
])
dnl AC_CHECK_OCAML_MODULE looks for a module in a given path
dnl 1st arg -> name (just for printing messages)
dnl 2nd arg -> env var name (set to include path, or "no" if not found)
dnl 3rd arg -> module to check
dnl 4th arg -> default include dirs to check
AC_DEFUN([AC_CHECK_OCAML_MODULE],
[dnl
AC_MSG_CHECKING(for module $1)
cat > conftest.ml <<EOF
open $3
EOF
unset found
for $2 in $$2 $4 ; do
if $OCAMLC -c -I "$$2" conftest.ml >&5 2>&5 ; then
found=yes
break
fi
done
if test "$found" ; then
AC_MSG_RESULT($$2)
else
AC_MSG_RESULT(not found)
$2=no
fi
AC_SUBST($2)])
This diff is collapsed.
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `virt' library (-lvirt). */
#undef HAVE_LIBVIRT
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
#undef NO_MINUS_C_MINUS_O
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if the C compiler supports function prototypes. */
#undef PROTOTYPES
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define like PROTOTYPES; this can be used by system headers. */
#undef __PROTOTYPES
This diff is collapsed.
This diff is collapsed.
# ocaml-libvirt
# Copyright (C) 2007-2008 Red Hat Inc., Richard W.M. Jones
# Copyright (C) 2007-2015 Red Hat Inc., Richard W.M. Jones
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
......@@ -18,6 +18,7 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(ocaml-libvirt,0.6.1.4)
AC_CONFIG_MACRO_DIRS([m4])
dnl Check for basic C environment.
AC_PROG_CC
......@@ -47,25 +48,15 @@ AC_SUBST(WARNINGS)
AC_SUBST(CFLAGS_FPIC)
AC_SUBST(WIN32)
dnl Check for libvirt development environment.
AC_ARG_WITH(libvirt,
AC_HELP_STRING([--with-libvirt=PATH],[Set path to installed libvirt]),
[if test "x$withval" != "x"; then
CFLAGS="$CFLAGS -I$withval/include"
LDFLAGS="$LDFLAGS -L$withval/lib"
dnl Check for perl (required).
AC_CHECK_PROG([PERL],[perl],[perl],[no])
if test "x$PERL" = "xno"; then
AC_MSG_ERROR([Perl must be installed to build])
fi
])
AC_CHECK_LIB(virt,virConnectOpen,
[],
AC_MSG_ERROR([You must install libvirt library]))
AC_CHECK_HEADER([libvirt/libvirt.h],
[],
AC_MSG_ERROR([You must install libvirt development package]))
dnl We also use <libvirt/virterror.h>
AC_CHECK_HEADER([libvirt/virterror.h],
[],
AC_MSG_ERROR([You must install libvirt development package]))
dnl Check for libvirt development environment.
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 1.2.8])
dnl Check for basic OCaml environment & findlib.
AC_PROG_OCAML
......@@ -75,104 +66,13 @@ if test "x$OCAMLFIND" = "x"; then
AC_MSG_ERROR([OCaml findlib is required])
fi
dnl Use ocamlfind to find the required packages ...
dnl Check for required OCaml packages.
OCAML_PKG_unix=no
AC_CHECK_OCAML_PKG(unix)
if test "x$pkg_unix" != "xyes"; then
if test "x$OCAML_PKG_unix" = "xno"; then
AC_MSG_ERROR([Cannot find required OCaml package 'unix'])
fi
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])],
[],
[with_nsis=no])
MAKENSIS=
LIBVIRT_DLL_PATH=
LIBXDR_DLL_PATH=
LIBXML2_DLL_PATH=
GNUTLS_DLL_PATH=
GTK_PATH=
GTK_DLL_PATH=
[
msys_to_win_dir () {
eval pushd "\$$1" > /dev/null
eval $1=`pwd -W`
popd > /dev/null
}
]
if test "x$with_nsis" != "xno"; then
AC_PATH_PROG(MAKENSIS,makensis,[],[$with_nsis:$PATH])
if test "x$MAKENSIS" = "x"; then
AC_MSG_FAILURE([--with-nsis was given, but could not find MAKENSIS.EXE])
fi
# MAKENSIS is set so we will build a rule for making a Windows
# installer. To support this, generate wininstaller.nsis.
saved_IFS=$IFS
IFS=$PATH_SEPARATOR
for d in $PATH; do
IFS=$saved_IFS
echo Checking $d for DLLs ... >&5
if test -f "$d/libvirt-0.dll"; then
LIBVIRT_DLL_PATH="$d"
fi
if test -f "$d/libxdr.dll"; then
LIBXDR_DLL_PATH="$d"
fi
if test -f "$d/libxml2-2.dll"; then
LIBXML2_DLL_PATH="$d"
fi
if test -f "$d/libgpg-error-0.dll"; then
GNUTLS_DLL_PATH="$d"
fi
if test -f "$d/libgtk-win32-2.0-0.dll"; then
GTK_DLL_PATH="$d"
GTK_PATH="$d/.."
fi
done
IFS=$saved_IFS
if test "x$LIBVIRT_DLL_PATH" = "x"; then
AC_MSG_FAILURE([cannot find libvirt-0.dll in PATH])
fi
if test "x$LIBXDR_DLL_PATH" = "x"; then
AC_MSG_FAILURE([cannot find libxdr.dll in PATH])
fi
if test "x$LIBXML2_DLL_PATH" = "x"; then
AC_MSG_FAILURE([cannot find libxml2-2.dll in PATH])
fi
if test "x$GNUTLS_DLL_PATH" = "x"; then
AC_MSG_FAILURE([cannot find GnuTLS DLLs in PATH])
fi
if test "x$GTK_DLL_PATH" = "x"; then
AC_MSG_WARN([cannot find GTK DLLs in PATH])
fi
# Change the paths to Windows paths.
msys_to_win_dir LIBVIRT_DLL_PATH
msys_to_win_dir LIBXDR_DLL_PATH
msys_to_win_dir LIBXML2_DLL_PATH
msys_to_win_dir GNUTLS_DLL_PATH
if test "x$GTK_DLL_PATH" != "x"; then
msys_to_win_dir GTK_DLL_PATH
msys_to_win_dir GTK_PATH
fi
fi
AC_SUBST(MAKENSIS)
AC_SUBST(LIBVIRT_DLL_PATH)
AC_SUBST(LIBXDR_DLL_PATH)
AC_SUBST(LIBXML2_DLL_PATH)
AC_SUBST(GNUTLS_DLL_PATH)
AC_SUBST(GTK_DLL_PATH)
AC_SUBST(GTK_PATH)
dnl Summary.
echo "------------------------------------------------------------"
echo "Thanks for downloading" $PACKAGE_STRING
......@@ -187,7 +87,4 @@ AC_CONFIG_FILES([META
libvirt/Makefile
examples/Makefile
])
if test "x$MAKENSIS" != "x"; then
AC_CONFIG_FILES([wininstaller.nsis])
fi
AC_OUTPUT
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.