X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=configure.ac;h=8d10cf09e5449a22480c588377d3b39b7e3d3e29;hp=e4df2c6ffa5eb350983338d6f5f1dbfa6b104af5;hb=46e08a159a86d993a44830d70da442cd073859c2;hpb=84763d7fca3668c62ee3fe53d0e00a5a672f687b diff --git a/configure.ac b/configure.ac index e4df2c6..8d10cf0 100644 --- a/configure.ac +++ b/configure.ac @@ -20,7 +20,7 @@ # freeform string. m4_define([libguestfs_major], [1]) m4_define([libguestfs_minor], [13]) -m4_define([libguestfs_release], [12]) +m4_define([libguestfs_release], [26]) AC_INIT([libguestfs],libguestfs_major.libguestfs_minor.libguestfs_release) AC_CONFIG_AUX_DIR([build-aux]) @@ -346,6 +346,11 @@ if test "x$have_libselinux" = "xyes"; then fi AC_SUBST([SELINUX_LIB]) +dnl Check for systemtap/DTrace userspace probes (optional). +dnl http://sourceware.org/systemtap/wiki/AddingUserSpaceProbingToApps +AC_CHECK_HEADERS([sys/sdt.h]) +dnl AC_CHECK_PROG([DTRACE],[dtrace],[dtrace],[no]) + dnl Check for cpio which isn't in the default Pardus install amazingly. AC_CHECK_PROG([CPIO],[cpio],[cpio],[no]) test "x$CPIO" = "xno" && @@ -441,8 +446,53 @@ working. ]) fi + dnl qemu 0.15 was released with broken support for '-machine', + dnl requiring you to add the machine type: '-machine pc,[...]'. + dnl The problem is that 'pc' is only applicable for PC-like + dnl hardware, so we cannot do this as a general solution. Since + dnl qemu 0.15, this problem has been fixed so now the default + dnl machine type is chosen (qemu commit 2645c6dcaf6ea2a51a). + dnl + dnl We need to work out if this qemu is the broken version, so we + dnl can add 'pc' just for this broken version. + dnl + dnl Note that old qemu didn't support the '-machine' option at all. + dnl + dnl We use the -kernel option for testing this, because this option + dnl is processed very late, after qemu has set up the machine. + AC_MSG_CHECKING([for broken '-machine accel=tcg' option in $QEMU]) + LC_ALL=C $QEMU -nographic -machine accel=tcg -kernel /NO_SUCH_FILE \ + > config1.tmp 2>&1 + LC_ALL=C $QEMU -nographic -machine pc,accel=tcg -kernel /NO_SUCH_FILE \ + > config2.tmp 2>&1 + if cmp -s config1.tmp config2.tmp; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + AC_DEFINE([QEMU_MACHINE_TYPE_IS_BROKEN],[1],[qemu -machine accel=tcg option is broken (in qemu 0.15 only)]) + fi + rm config1.tmp config2.tmp + + dnl See if the '-machine [pc,]accel=tcg' option is required in + dnl order to run the virtio-serial test below. This happens when + dnl we run qemu-kvm inside a VM without forcing TCG: + dnl + dnl Could not access KVM kernel module: No such file or directory + dnl failed to initialize KVM: No such file or directory + dnl No accelerator found! + AC_MSG_CHECKING([if -machine @<:@pc,@:>@accel=tcg option is required to test virtio-serial feature]) + if $QEMU -nographic -device \? >/dev/null 2>&1; then + : + elif $QEMU -machine accel=tcg -nographic -device \? >/dev/null 2>&1; then + QEMU_EXTRA_OPTIONS_FOR_TEST="-machine accel=tcg" + elif $QEMU -machine pc,accel=tcg -nographic -device \? >/dev/null 2>&1; then + QEMU_EXTRA_OPTIONS_FOR_TEST="-machine pc,accel=tcg" + # else nothing ... it'll fail below. + fi + AC_MSG_RESULT([$QEMU_EXTRA_OPTIONS_FOR_TEST]) + AC_MSG_CHECKING([for virtio-serial support in $QEMU]) - if $QEMU -nographic -device \? 2>&1 | grep -sq virtio-serial; then + if $QEMU $QEMU_EXTRA_OPTIONS_FOR_TEST -nographic -device \? 2>&1 | grep -sq virtio-serial; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) @@ -887,42 +937,23 @@ AS_IF([test "x$enable_php" != "xno"], AM_CONDITIONAL([HAVE_PHP], [test "x$PHP" != "xno" && test "x$PHPIZE" != "xno"]) dnl Erlang -ERLC=no -ERL_INTERFACEDIR=no +ERLANG=no AC_ARG_ENABLE([erlang], - AS_HELP_STRING([--disable-erlang], [Disable Erlang language bindings]), - [], - [enable_erlang=yes]) -AS_IF([test "x$enable_erlang" != "xno"], - [ - ERLC= - AC_CHECK_PROG([ERLC],[erlc],[erlc],[no]) + AS_HELP_STRING([--disable-erlang], [Disable Erlang language bindings]), + [], + [enable_erlang=yes]) +# NB: Don't use AS_IF here: it doesn't work. +if test "x$enable_erlang" != "xno"; then + ERLANG= + AC_ERLANG_PATH_ERLC([no]) if test "x$ERLC" != "xno"; then - dnl Look for erl_interface directory in various places. - AC_MSG_CHECKING([for erl_interface]) - - for d in \ - $libdir /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64 - do - dir=`ls -1d $d/erlang/lib/erl_interface-* 2>/dev/null` - if test "x$dir" != "x" && test -d "$dir"; then - AC_MSG_RESULT([$dir]) - ERL_INTERFACEDIR=$dir - break - fi - done - - if test "x$ERL_INTERFACEDIR" = "xno"; then - AC_MSG_RESULT([not found]) - fi + AC_ERLANG_CHECK_LIB([erl_interface], [], + [AC_MSG_FAILURE([Erlang erl_interface library not installed. Use --disable-erlang to disable.])]) + AC_ERLANG_SUBST_LIB_DIR fi - - AC_SUBST([ERLC]) - AC_SUBST([ERL_INTERFACEDIR]) - ]) -AM_CONDITIONAL([HAVE_ERLANG], - [test "x$ERLC" != "xno" && test "x$ERL_INTERFACEDIR" != "xno"]) +fi +AM_CONDITIONAL([HAVE_ERLANG], [test "x$ERLANG" != "xno" && test "x$ERLC" != "xno"]) dnl Check for Perl modules needed by Perl virt tools (virt-df, etc.) AS_IF([test "x$PERL" != "xno"], @@ -957,15 +988,19 @@ AC_SUBST([LIBTOOL]) dnl Produce output files. AC_CONFIG_HEADERS([config.h]) dnl http://www.mail-archive.com/automake@gnu.org/msg10204.html +AC_CONFIG_FILES([clone/virt-sysprep], + [chmod +x clone/virt-sysprep]) AC_CONFIG_FILES([podwrapper.sh], [chmod +x podwrapper.sh]) AC_CONFIG_FILES([run], [chmod +x run]) AC_CONFIG_FILES([Makefile + align/Makefile appliance/Makefile capitests/Makefile cat/Makefile caution/Makefile + clone/Makefile csharp/Makefile daemon/Makefile debian/changelog @@ -1004,6 +1039,7 @@ AC_CONFIG_FILES([Makefile ruby/Makefile ruby/Rakefile ruby/examples/Makefile + sparsify/Makefile src/Makefile test-tool/Makefile tools/Makefile])