[libvirt] [PATCH] m4: Fix xenstore detection

Andrea Bolognani posted 1 patch 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180314151010.8472-1-abologna@redhat.com
Test syntax-check passed
m4/virt-driver-xen.m4 | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[libvirt] [PATCH] m4: Fix xenstore detection
Posted by Andrea Bolognani 6 years ago
Commit 596fc3e3897e introduced the ability to detect xenstore
using pkg-config for systems with Xen 4.9, but accidentally broke
detection for all other systems. Fix the logic so that it works
in all cases.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 m4/virt-driver-xen.m4 | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/m4/virt-driver-xen.m4 b/m4/virt-driver-xen.m4
index 52d4f51626..1d0acfa363 100644
--- a/m4/virt-driver-xen.m4
+++ b/m4/virt-driver-xen.m4
@@ -42,7 +42,6 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_XEN], [
 
     if test "$xen_path_provided" = "no" ; then
       PKG_CHECK_MODULES([XEN], [xenstore], [
-          fail=0
           with_xen=yes
         ], [
           fail=1
@@ -52,8 +51,8 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_XEN], [
     if test "$xen_path_provided" = "yes" || test "$fail" = 1 ; then
       CFLAGS="$CFLAGS $XEN_CFLAGS"
       LIBS="$LIBS $XEN_LIBS"
+      fail=0
       AC_CHECK_LIB([xenstore], [xs_read], [
-             fail=0
              with_xen=yes
              XEN_LIBS="$XEN_LIBS -lxenstore"
          ],[
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] m4: Fix xenstore detection
Posted by Michal Privoznik 6 years ago
On 03/14/2018 04:10 PM, Andrea Bolognani wrote:
> Commit 596fc3e3897e introduced the ability to detect xenstore
> using pkg-config for systems with Xen 4.9, but accidentally broke
> detection for all other systems. Fix the logic so that it works
> in all cases.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  m4/virt-driver-xen.m4 | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

ACK

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list