summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2013-01-25 13:34:21 -0500
committerAnthony G. Basile <blueness@gentoo.org>2013-01-28 17:42:47 -0500
commita9ef3ca7642ae67fc6859d2b5861f8b0f0ab3a68 (patch)
treedb8a07223c6d258e8f9dc860bc2fa137a661118c /configure.ac
parent34bcd6cd8c8f5dc7f01bef9a294a132cf856345e (diff)
Make blkid optional
Embedded systems may not want to include util-linux when they do not intend to use blkid functionality Modified from original author's commit to not install 60-persistent-storage.rules if blkid is disabled systemd commit f553b3b1074151200187df916427a1468186435e Original author: Anders Olofsson <Anders.Olofsson@axis.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
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