summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Walsh <dwalsh@redhat.com>2016-03-17 18:03:02 -0400
committerColin Walters (automation) <walters+githubbot@verbum.org>2016-03-22 09:33:46 +0000
commit506fb1b1624358d57095b20408414ccef6fbc22c (patch)
tree60a7e6e77613e129334b80f31834dedb3fab13b5 /configure.ac
parentaedbc794d5cc3f5c479c7307054a761f388d2941 (diff)
downloadbubblewrap-506fb1b1624358d57095b20408414ccef6fbc22c.tar.gz
Add SELinux Support
Signed-off-by: Dan Walsh <dwalsh@redhat.com> Pull request: #25 Approved by: alexlarsson
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a380929..10c7789 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,21 @@ AS_IF([test "$enable_man" != no], [
])
AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
+# ------------------------------------------------------------------------------
+have_selinux=no
+AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
+if test "x$enable_selinux" != "xno"; then
+ PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
+ [AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available])
+ have_selinux=yes
+ M4_DEFINES="$M4_DEFINES -DHAVE_SELINUX"],
+ [have_selinux=no])
+ if test "x$have_selinux" = xno -a "x$enable_selinux" = xyes; then
+ AC_MSG_ERROR([*** SELinux support requested but libraries not found])
+ fi
+fi
+AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
+
changequote(,)dnl
if test "x$GCC" = "xyes"; then
WARN_CFLAGS="-Wall -Werror=missing-prototypes"