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

[libvirt] [PATCH 29/29] Convert libblkid check over to use LIBVIRT_CHECK_PKG



From: "Daniel P. Berrange" <berrange redhat com>

Signed-off-by: Daniel P. Berrange <berrange redhat com>
---
 configure.ac        | 22 ++--------------------
 m4/virt-libblkid.m4 |  9 +++++++++
 2 files changed, 11 insertions(+), 20 deletions(-)
 create mode 100644 m4/virt-libblkid.m4

diff --git a/configure.ac b/configure.ac
index b6a19b3..c66527a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,7 +108,6 @@ LIBPCAP_REQUIRED="1.0.0"
 LIBNL_REQUIRED="1.1"
 LIBSSH2_REQUIRED="1.0"
 LIBSSH2_TRANSPORT_REQUIRED="1.3"
-LIBBLKID_REQUIRED="2.17"
 
 dnl Checks for C compiler.
 AC_PROG_CC
@@ -149,6 +148,7 @@ LIBVIRT_CHECK_CAPNG
 LIBVIRT_CHECK_DBUS
 LIBVIRT_CHECK_HAL
 LIBVIRT_CHECK_LIBATTR
+LIBVIRT_CHECK_LIBBLKID
 LIBVIRT_CHECK_NETCF
 LIBVIRT_CHECK_NUMACTL
 LIBVIRT_CHECK_SANLOCK
@@ -2225,25 +2225,6 @@ if test "$with_interface" = "yes" ; then
 fi
 AM_CONDITIONAL([WITH_INTERFACE], [test "$with_interface" = "yes"])
 
-dnl libblkid is used by several storage drivers; therefore we probe
-dnl for it unconditionally.
-AC_ARG_WITH([libblkid],
-  [AS_HELP_STRING([--with-libblkid],
-    [use libblkid to scan for filesystems and partitions @<:@default=check@:>@])],
-  [],
-  [with_libblkid=check])
-
-if test "x$with_libblkid" = "xyes" || test "x$with_libblkid" = "xcheck"; then
-   PKG_CHECK_MODULES([BLKID],
-     [blkid >= $LIBBLKID_REQUIRED],
-     [with_libblkid="yes"],
-     [with_libblkid="no"])
-fi
-
-if test "x$with_libblkid" = "xyes"; then
-  AC_DEFINE([WITH_LIBBLKID], [1], [libblkid is present])
-fi
-AM_CONDITIONAL([WITH_LIBBLKID], [test "x$with_libblkid" = "xyes"])
 
 AC_ARG_WITH([qemu-user],
   AC_HELP_STRING([--with-qemu-user], [username to run QEMU system instance as @<:@default=root@:>@]),
@@ -2495,6 +2476,7 @@ LIBVIRT_RESULT_CAPNG
 LIBVIRT_RESULT_DBUS
 LIBVIRT_RESULT_HAL
 LIBVIRT_RESULT_LIBATTR
+LIBVIRT_RESULT_LIBBLKID
 LIBVIRT_RESULT_NETCF
 LIBVIRT_RESULT_NUMACTL
 LIBVIRT_RESULT_SANLOCK
diff --git a/m4/virt-libblkid.m4 b/m4/virt-libblkid.m4
new file mode 100644
index 0000000..880a309
--- /dev/null
+++ b/m4/virt-libblkid.m4
@@ -0,0 +1,9 @@
+dnl The libblkid.so library
+
+AC_DEFUN([LIBVIRT_CHECK_LIBBLKID],[
+  LIBVIRT_CHECK_PKG([LIBBLKID], [libblkid], [blkid], [2.17])
+])
+
+AC_DEFUN([LIBVIRT_RESULT_LIBBLKID],[
+  LIBVIRT_RESULT_LIB([LIBBLKID], [libblkid])
+])
-- 
1.7.11.4


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