mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
configure: Add --without-libvirt option.
Normally we check if libvirt is installed, and the default is still to do this. However having this option makes it simpler to check if a change to the code has broken the case where libvirt is not installed. In fact, this change revealed one such place, which is also fixed in this commit.
This commit is contained in:
@@ -693,12 +693,19 @@ AC_CHECK_LIB([magic],[magic_file],
|
||||
[AC_MSG_WARN([libmagic not found, some core features will be disabled])])
|
||||
|
||||
dnl libvirt (highly recommended)
|
||||
PKG_CHECK_MODULES([LIBVIRT], [libvirt],
|
||||
AC_ARG_WITH([libvirt],
|
||||
[AS_HELP_STRING([--without-libvirt],
|
||||
[disable libvirt support @<:@default=check@:>@])],
|
||||
[],
|
||||
[with_libvirt=check])
|
||||
AS_IF([test "$with_libvirt" != "no"],[
|
||||
PKG_CHECK_MODULES([LIBVIRT], [libvirt],
|
||||
[AC_SUBST([LIBVIRT_CFLAGS])
|
||||
AC_SUBST([LIBVIRT_LIBS])
|
||||
AC_DEFINE([HAVE_LIBVIRT],[1],[libvirt found at compile time.])
|
||||
],
|
||||
[AC_MSG_WARN([libvirt not found, some core features will be disabled])])
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_LIBVIRT],[test "x$LIBVIRT_LIBS" != "x"])
|
||||
|
||||
dnl libxml2 (highly recommended)
|
||||
|
||||
@@ -1523,12 +1523,6 @@ max_disks_libvirt (guestfs_h *g)
|
||||
NOT_IMPL (-1);
|
||||
}
|
||||
|
||||
static int
|
||||
hot_add_drive_libvirt (guestfs_h *g, struct drive *drv, size_t drv_index)
|
||||
{
|
||||
NOT_IMPL (-1);
|
||||
}
|
||||
|
||||
struct attach_ops attach_ops_libvirt = {
|
||||
.launch = launch_libvirt,
|
||||
.shutdown = shutdown_libvirt,
|
||||
|
||||
Reference in New Issue
Block a user