summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac14
1 files changed, 12 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 5de88126d2..2f83e0538f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,8 +41,6 @@ if test -z "$GPERF" ; then
AC_MSG_ERROR([*** gperf not found])
fi
-PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
-
# Checks for header files.
AC_CHECK_HEADERS(
[arpa/inet.h fcntl.h inttypes.h langinfo.h limits.h locale.h \
@@ -161,6 +159,18 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
AM_CONDITIONAL([HAVE_INTROSPECTION], [test "$enable_introspection" = "yes"])
# ------------------------------------------------------------------------------
+have_blkid=no
+AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [Disable optional blkid support]))
+if test "x$enable_blkid" != "xno"; then
+ PKG_CHECK_MODULES([BLKID], [blkid >= 2.20],
+ [AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
+ if test "x$have_blkid" = xno -a "x$enable_blkd" = xyes; then
+ AC_MSG_ERROR([*** blkid support requested but not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_SELINUX, [test "x$have_blkid" = "xyes"])
+
+# ------------------------------------------------------------------------------
have_selinux=no
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
if test "x$enable_selinux" != "xno"; then