[PATCH 40/89] m4/virt-parted: use LIBVIRT_CHECK_PKG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 configure.ac      |  4 ++--
 m4/virt-parted.m4 | 23 +++++++++--------------
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/configure.ac b/configure.ac
index 56e40919a1..1012735c22 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1380,12 +1380,12 @@ LIBVIRT_CHECK_LIBPARTED
 if test "$with_storage_disk" = "yes" ||
    test "$with_storage_disk" = "check"; then
   if test "$with_storage_disk" = "yes" &&
-     test "$PARTED_FOUND" != "yes"; then
+     test "$with_libparted" != "yes"; then
     AC_MSG_ERROR([Need parted for disk storage driver])
   fi
 
   if test "$with_storage_disk" = "check"; then
-    if test "$PARTED_FOUND" != "yes"; then
+    if test "$with_libparted" != "yes"; then
       with_storage_disk=no
     else
       with_storage_disk=yes
diff --git a/m4/virt-parted.m4 b/m4/virt-parted.m4
index a233ed75c9..a73050a8b1 100644
--- a/m4/virt-parted.m4
+++ b/m4/virt-parted.m4
@@ -19,25 +19,20 @@ dnl
 
 AC_DEFUN([LIBVIRT_CHECK_LIBPARTED], [
   PARTED_REQUIRED="1.8.0"
-  LIBPARTED_CFLAGS=
-  LIBPARTED_LIBS=
 
-  AC_PATH_PROG([PARTED], [parted], [], [$LIBVIRT_SBIN_PATH])
-  if test -z "$PARTED" ; then
-    PARTED_FOUND=no
-  else
-    PARTED_FOUND=yes
-  fi
+  with_libparted=check
+
+  LIBVIRT_CHECK_PKG([LIBPARTED], [libparted], [$PARTED_REQUIRED])
 
-  if test "$PARTED_FOUND" = "yes" && test "x$PKG_CONFIG" != "x" ; then
-    PKG_CHECK_MODULES([LIBPARTED], [libparted >= $PARTED_REQUIRED], [],
-                      [PARTED_FOUND=no])
+  if test "x$with_libparted" = "xyes"; then
+    AC_PATH_PROG([PARTED], [parted], [], [$LIBVIRT_SBIN_PATH])
+    if test -z "$PARTED" ; then
+      with_libparted=no
+    fi
   fi
 
-  if test "$PARTED_FOUND" = "yes"; then
+  if test "x$with_libparted" = "xyes"; then
     AC_DEFINE_UNQUOTED([PARTED], ["$PARTED"],
                        [Location or name of the parted program])
   fi
-  AC_SUBST([LIBPARTED_CFLAGS])
-  AC_SUBST([LIBPARTED_LIBS])
 ])
-- 
2.11.0

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux