X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=configure.ac;h=a8980400b4c5ceb118954c9e67cc42b5488d88f6;hp=d641048e3d5757eec3af65bb0e8cb494abbeea52;hb=e5b86fce27b0900d653911e64a85c3857c2fe604;hpb=f99cb04943f1c4583e52df684011766add78ea28 diff --git a/configure.ac b/configure.ac index d641048..a898040 100644 --- a/configure.ac +++ b/configure.ac @@ -15,7 +15,7 @@ # 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.7]) +AC_INIT([libguestfs],[1.0.14]) AM_INIT_AUTOMAKE AC_CONFIG_MACRO_DIR([m4]) @@ -35,6 +35,9 @@ AM_PROG_CC_C_O dnl Check support for 64 bit file offsets. AC_SYS_LARGEFILE +dnl Check sizeof long. +AC_CHECK_SIZEOF([long]) + dnl Headers. AC_CHECK_HEADERS([errno.h sys/types.h sys/un.h sys/wait.h sys/socket.h]) @@ -70,6 +73,34 @@ AC_PATH_PROGS([QEMU],[$with_qemu],[no], test "x$QEMU" = "xno" && AC_MSG_ERROR([qemu must be installed]) AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.]) +dnl Check that the chosen qemu has vmchannel support. +dnl http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html +if test "x$vmchannel_test" != "xno"; then + AC_MSG_CHECKING([for vmchannel support in $QEMU]) + vmchannelout=`$QEMU -net channel /dev/zero 2>&1 ||:` + echo "vmchannel test command output: $vmchannelout" >&AS_MESSAGE_LOG_FD + if ! echo $vmchannelout | grep -sq "vmchannel wrong port number" ; then + AC_MSG_RESULT([no]) + AC_MSG_FAILURE( +[I did not find vmchannel support in $QEMU. + +vmchannel support is vital for libguestfs to operate. You need a version +of qemu >= 0.10, or the following patch backported to earlier versions: + +http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg01042.html + +You can override this test by setting the environment variable +vmchannel_test=no However if you don't have vmchannel support +in your qemu, then this just delays the pain. + +If I am using the wrong qemu or you want to compile qemu from source +and install it in another location, then you should configure with +the --with-qemu option. +]) + fi + AC_MSG_RESULT([yes]) +fi + dnl Check for febootstrap etc. AC_CHECK_PROG([FEBOOTSTRAP], [febootstrap],[febootstrap],[no]) @@ -147,9 +178,27 @@ AC_PROG_FINDLIB 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]) @@ -340,7 +389,7 @@ AC_CONFIG_FILES([Makefile src/Makefile fish/Makefile examples/Makefile 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