summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKarol Lewandowski <k.lewandowsk@samsung.com>2013-05-16 10:40:03 +0200
committerAuke Kok <auke-jan.h.kok@intel.com>2013-05-17 09:58:28 -0700
commit2b3e18de74ca89b374dd4f7a2c30e5731d347841 (patch)
tree305669069e73f82fd838117c93709dce7d0b0b3f /configure.ac
parent264ad849a4a0acf1ca392da62b7018d4fe7b66b3 (diff)
Make it possible to disable smack separately from xattr support
Additionally, compile out rule loading if feature is disabled.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 65186a45ab..14a90c56d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,6 +445,31 @@ AC_SUBST(XATTR_LIBS)
AM_CONDITIONAL([HAVE_XATTR], [test "x$have_xattr" != xno])
# ------------------------------------------------------------------------------
+AC_ARG_ENABLE([smack], AS_HELP_STRING([--disable-smack],[Disable optional SMACK support]),
+ [case "${enableval}" in
+ yes) have_smack=yes ;;
+ no) have_smack=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-smack) ;;
+ esac],
+ [have_smack=auto])
+
+if test "x${have_xattr}" = xno; then
+ if test "x${have_smack}" = xyes; then
+ AC_MSG_ERROR(SMACK requires xattr support)
+ else
+ have_smack=no
+ fi
+else
+ if test "x${have_smack}" = xauto; then
+ have_smack=yes
+ fi
+fi
+
+if test "x${have_smack}" = xyes ; then
+ AC_DEFINE(HAVE_SMACK, 1, [Define if SMACK is available])
+fi
+
+# ------------------------------------------------------------------------------
AC_ARG_ENABLE([gcrypt],
AS_HELP_STRING([--disable-gcrypt],[Disable optional GCRYPT support]),
[case "${enableval}" in
@@ -915,6 +940,7 @@ AC_MSG_RESULT([
AUDIT: ${have_audit}
IMA: ${have_ima}
SELinux: ${have_selinux}
+ SMACK: ${have_smack}
XZ: ${have_xz}
ACL: ${have_acl}
XATTR: ${have_xattr}