summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorManoj Srivastava <srivasta@golden-gryphon.com>2010-01-05 16:40:21 +0000
committerJulien Cristau <jcristau@debian.org>2010-01-12 18:13:23 +0000
commit6d393844dca10823f85d1ac797879fc6e00eae59 (patch)
tree86f957dd41971a9329595d6f33bba4f686f15e99 /configure.ac
parent90c2cc57cdf911cec2eec185f357868209212c79 (diff)
xdm: add SELinux support
Initial patch submitted in Debian bug#233551. Forward-ported to modular X by Eugene Konev (changes: remove Imakefile hunks, add --with-selinux flag to configure.ac). Updated to latest SE Linux code by Russell Coker 3rd Aug 2008, with bugfix from Julien Cristau (Debian bug#493524). Signed-off-by: Julien Cristau <jcristau@debian.org> Reviewed-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 17 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 09c6019..aaf6730 100644
--- a/configure.ac
+++ b/configure.ac
@@ -130,6 +130,23 @@ if test "x$USE_PAM" != "xno" ; then
fi])
fi
+use_selinux_default=no
+# Check for selinux support
+AC_ARG_WITH(selinux, AC_HELP_STRING([--with-selinux],[Add support for selinux]),
+ [USE_SELINUX=$withval], [USE_SELINUX=$use_selinux_default])
+if test "x$USE_SELINUX" != "xno" ; then
+ old_LIBS="$LIBS"
+ LIBS=""
+ AC_SEARCH_LIBS(is_selinux_enabled,[selinux])
+ AC_CHECK_FUNC(is_selinux_enabled,
+ [AC_DEFINE(HAVE_SELINUX,1,[Add support for selinux])],
+ [if test "x$USE_SELINUX" != "xtry" ; then
+ AC_MSG_ERROR(["selinux support requested, but is_selinux_enabled not found."])
+ fi])
+ XDM_LIBS="$XDM_LIBS $LIBS"
+ LIBS="$old_LIBS"
+fi
+
# FIXME: Find better test for which OS'es use su -m - for now, just try to
# mirror the Imakefile setting of:
# if defined(OpenBSDArchitecture) || defined(NetBSDArchitecture) || defined(FreeBSDArchitecture) || defined(DarwinArchitecture)