]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Convert blkid check over to use LIBVIRT_CHECK_PKG
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 20 Sep 2012 14:52:14 +0000 (15:52 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 14 Jan 2013 13:26:47 +0000 (13:26 +0000)
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
configure.ac
m4/virt-blkid.m4 [new file with mode: 0644]

index 09e241738f61625adf0fc99e100e462b06215add..6b18ef0131f02fff3949327c263c7fd373099888 100644 (file)
@@ -108,7 +108,6 @@ LIBPCAP_REQUIRED="1.0.0"
 LIBNL_REQUIRED="1.1"
 LIBSSH2_REQUIRED="1.0"
 LIBSSH2_TRANSPORT_REQUIRED="1.3"
-BLKID_REQUIRED="2.17"
 FUSE_REQUIRED="2.8.6"
 
 dnl Checks for C compiler.
@@ -152,6 +151,7 @@ LIBVIRT_COMPILE_WARNINGS
 LIBVIRT_CHECK_APPARMOR
 LIBVIRT_CHECK_AUDIT
 LIBVIRT_CHECK_AVAHI
+LIBVIRT_CHECK_BLKID
 LIBVIRT_CHECK_CAPNG
 LIBVIRT_CHECK_DBUS
 LIBVIRT_CHECK_HAL
@@ -2305,25 +2305,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 >= $BLKID_REQUIRED],
-     [with_libblkid="yes"],
-     [with_libblkid="no"])
-fi
-
-if test "x$with_libblkid" = "xyes"; then
-  AC_DEFINE([WITH_BLKID], [1], [libblkid is present])
-fi
-AM_CONDITIONAL([WITH_BLKID], [test "x$with_libblkid" = "xyes"])
 
 if test $with_freebsd = yes; then
   default_qemu_user=root
@@ -2577,6 +2558,7 @@ AC_MSG_NOTICE([])
 LIBVIRT_RESULT_APPARMOR
 LIBVIRT_RESULT_AUDIT
 LIBVIRT_RESULT_AVAHI
+LIBVIRT_RESULT_BLKID
 LIBVIRT_RESULT_CAPNG
 LIBVIRT_RESULT_DBUS
 LIBVIRT_RESULT_HAL
diff --git a/m4/virt-blkid.m4 b/m4/virt-blkid.m4
new file mode 100644 (file)
index 0000000..69b7cf4
--- /dev/null
@@ -0,0 +1,26 @@
+dnl The libblkid.so library
+dnl
+dnl Copyright (C) 2012-2013 Red Hat, Inc.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library.  If not, see
+dnl <http://www.gnu.org/licenses/>.
+dnl
+
+AC_DEFUN([LIBVIRT_CHECK_BLKID],[
+  LIBVIRT_CHECK_PKG([BLKID], [blkid], [2.17])
+])
+
+AC_DEFUN([LIBVIRT_RESULT_BLKID],[
+  LIBVIRT_RESULT_LIB([BLKID])
+])