# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-AC_INIT([libguestfs],[1.0.5])
+AC_INIT([libguestfs],[1.0.10])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_MSG_ERROR([pod2text must be installed])
dnl Check for QEMU for running binaries on this $host_cpu, fall
-dnl back to basic 'qemu'.
-AC_PATH_PROGS([QEMU],[qemu-system-$host_cpu qemu],[no],
+dnl back to basic 'qemu'. Allow the user to override it.
+default_qemu="qemu-system-$host_cpu qemu"
+# On x86-64, try using KVM first.
+if test "x$host_cpu" = "xx86_64"; then
+ default_qemu="qemu-kvm $default_qemu"
+fi
+AC_ARG_WITH([qemu],
+ [AS_HELP_STRING([--with-qemu],
+ [set default QEMU binary @<:@default=[qemu-kvm] qemu-system-<host> qemu@:>@])],
+ [],
+ [with_qemu="$default_qemu"])
+AC_PATH_PROGS([QEMU],[$with_qemu],[no],
[$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin])
test "x$QEMU" = "xno" && AC_MSG_ERROR([qemu must be installed])
AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.])
AM_CONDITIONAL([HAVE_OCAML],[test "x$OCAMLC" != "xno" -a "x$OCAMLFIND" != "xno"])
dnl Check for Perl (optional, for Perl bindings).
-dnl XXX This isn't quite right, we should check for devel libraries.
+dnl XXX This isn't quite right, we should check for Perl devel library.
AC_CHECK_PROG([PERL],[perl],[perl],[no])
-AM_CONDITIONAL([HAVE_PERL],[test "x$PERL" != "xno"])
+
+dnl Check for Perl modules that must be present to compile and
+dnl test the Perl bindings.
+missing_perl_modules=no
+for pm in Test::More Test::Pod Test::Pod::Coverage ExtUtils::MakeMaker; do
+ AC_MSG_CHECKING([for $pm])
+ if ! perl -M$pm >/dev/null 2>&1; then
+ AC_MSG_RESULT([no])
+ missing_perl_modules=yes
+ else
+ AC_MSG_RESULT([yes])
+ fi
+done
+if test "x$missing_perl_modules" = "xyes"; then
+ AC_MSG_WARN([some Perl modules required to compile or test the Perl bindings are missing])
+fi
+
+AM_CONDITIONAL([HAVE_PERL],
+ [test "x$PERL" != "xno" -a "x$missing_perl_modules" != "xyes"])
dnl Check for Python (optional, for Python bindings).
AC_CHECK_PROG([PYTHON],[python],[python],[no])
ruby/Makefile ruby/Rakefile
java/Makefile
make-initramfs.sh update-initramfs.sh
- libguestfs.spec
+ libguestfs.spec libguestfs.pc
ocaml/META perl/Makefile.PL])
AC_OUTPUT
echo
echo "This is how we have configured the optional components for you today:"
echo
+echo "QEMU ................................ $QEMU"
echo -n "OCaml bindings ...................... "
if test "x$HAVE_OCAML_TRUE" = "x"; then echo "yes"; else echo "no"; fi
echo -n "Perl bindings ....................... "