It should error out instead of warning if users provide the option
'--with-default-backend=libvirt' and no libvirt devel package installed.
Signed-off-by: Lin Ma <lma(a)suse.com>
---
m4/guestfs-libraries.m4 | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/m4/guestfs-libraries.m4 b/m4/guestfs-libraries.m4
index 6d5f3e3c1..88d4f1cde 100644
--- a/m4/guestfs-libraries.m4
+++ b/m4/guestfs-libraries.m4
@@ -269,8 +269,13 @@ AS_IF([test "$with_libvirt" != "no"],[
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])])
+ ],[
+ if test "$DEFAULT_BACKEND" = "libvirt"; then
+ AC_MSG_ERROR([Please install the libvirt devel package])
+ else
+ AC_MSG_WARN([libvirt not found, some core features will be disabled])
+ fi
+ ])
])
AM_CONDITIONAL([HAVE_LIBVIRT],[test "x$LIBVIRT_LIBS" != "x"])
--
2.15.1