]> err.no Git - util-linux/commitdiff
mount: fsprobe: add libvolume_id support to configure.ac
authorKarel Zak <kzak@redhat.com>
Wed, 9 May 2007 15:35:27 +0000 (17:35 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 17 May 2007 10:53:52 +0000 (12:53 +0200)
The patch add new option --with-fsprobe=<name> (where the <name> is
blkid or volume_id). The blkid is default. The mount cannot be
compiled without a filesystem detection library.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
configure.ac

index 2ee7e92a30b4a286539de6d664d613ba9995b3b1..983ceab32bafa78f7cb46948dc6e4cf432eedff1 100644 (file)
@@ -71,8 +71,26 @@ AC_DEFUN([UTIL_CHECK_LIB], [
 UTIL_CHECK_LIB(uuid, uuid_is_null)
 UTIL_CHECK_LIB(util, openpty)
 UTIL_CHECK_LIB(termcap, tgetnum)
-UTIL_CHECK_LIB(blkid, blkid_known_fstype)
 
+AC_ARG_WITH([fsprobe],
+  AC_HELP_STRING([--with-fsprobe], [library to guess filesystems (blkid|volume_id), default is blkid]),
+  with_fsprobe=$withval, with_fsprobe=blkid
+)
+
+AM_CONDITIONAL(HAVE_BLKID, false)
+AM_CONDITIONAL(HAVE_VOLUME_ID, false)
+
+have_blkid=no
+have_volume_id=no
+if test x$with_fsprobe = xblkid; then
+  UTIL_CHECK_LIB(blkid, blkid_known_fstype)
+elif test x$with_fsprobe = xvolume_id; then
+  UTIL_CHECK_LIB(volume_id, volume_id_open_fd)
+fi
+
+if test $have_blkid = no && test $have_volume_id = no; then
+  AC_MSG_ERROR([Without blkid or volume_id you will not be able to build util-linux-ng.])
+fi
 
 AM_GNU_GETTEXT_VERSION([0.14.1])
 AM_GNU_GETTEXT([external])