build: Remove qemu test and --with-qemu option

We will no longer support overriding the qemu binary at compile time.
Instead we will pick a suitable default qemu at runtime (see other
commits) or allow the user to override qemu at runtime by calling
guestfs_set_hv() or setting LIBGUESTFS_HV.
This commit is contained in:
Richard W.M. Jones
2026-03-17 13:57:58 +00:00
committed by rwmjones
parent 77e447a516
commit 69305ca07b
4 changed files with 0 additions and 56 deletions

View File

@@ -127,10 +127,6 @@ dnl The appliance and any dependencies.
HEADING([Checking the appliance and its dependencies])
m4_include([m4/guestfs-appliance.m4])
dnl Check for QEMU.
HEADING([Checking for QEMU])
m4_include([m4/guestfs-qemu.m4])
dnl Miscellaneous libraries used by other programs.
HEADING([Checking for other libraries])
m4_include([m4/guestfs-misc-libraries.m4])
@@ -312,7 +308,6 @@ feature ()
feature "Daemon" test "x$enable_daemon" = "xyes"
feature "Appliance" test "x$ENABLE_APPLIANCE" = "xyes"
print "QEMU" "$QEMU"
feature "guestfish" true ;# always enabled
feature "FUSE filesystem" test "x$enable_fuse" = "xyes"
print "Default backend" "$DEFAULT_BACKEND"

View File

@@ -33,9 +33,6 @@ let non_daemon_functions = [
depends on the backend, but is usually the location of the
qemu/KVM hypervisor.
The default is chosen when the library was compiled by the
configure script.
You can also override this by setting the C<LIBGUESTFS_HV>
environment variable.

View File

@@ -34,9 +34,6 @@ let non_daemon_functions = [
shortdesc = "set the hypervisor binary (usually qemu)";
longdesc = {|Set the hypervisor binary (usually qemu) that we will use.
The default is chosen when the library was compiled by the
configure script.
You can also override this by setting the C<LIBGUESTFS_HV>
environment variable.

View File

@@ -1,45 +0,0 @@
# libguestfs
# Copyright (C) 2009-2025 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
dnl Check for QEMU for running binaries on this $host_cpu, fall
dnl back to basic 'qemu'. Allow the user to override it.
AS_CASE([$host_cpu],
[i@<:@456@:>@86],[qemu_cpu=i386],
[arm*],[qemu_cpu=arm],
[amd64],[qemu_cpu=x86_64],
[powerpc64 | ppc64le | powerpc64le],[qemu_cpu=ppc64],
[qemu_cpu=$host_cpu])
default_qemu="qemu-kvm kvm qemu-system-$qemu_cpu qemu"
AC_ARG_WITH([qemu],
[AS_HELP_STRING([--with-qemu="bin1 bin2 ..."],
[set default QEMU binary @<:@default="[qemu-kvm] qemu-system-<host> qemu"@:>@])],
dnl --with-qemu or --without-qemu:
[],
dnl neither option was given:
[with_qemu="$default_qemu"]
)
AS_IF([test "x$with_qemu" = "xno"],[
AC_MSG_WARN([qemu was disabled, libguestfs may not work at all])
QEMU=no
],[
AC_PATH_PROGS([QEMU],[$with_qemu],[no],
[$PATH$PATH_SEPARATOR/usr/sbin$PATH_SEPARATOR/sbin$PATH_SEPARATOR/usr/libexec])
test "x$QEMU" = "xno" && AC_MSG_ERROR([qemu must be installed])
AC_DEFINE_UNQUOTED([QEMU],["$QEMU"],[Location of qemu binary.])
])