summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-10-27 16:33:48 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-10-27 16:33:48 +0000
commit60514309c0a2edc2bbb9bca527e10ceeef0c5691 (patch)
treee07dac4188c7492565f7484b30897ad60827761c /configure.ac
parenta6a75f6442743fb7c21ba649a068d764d961d6f3 (diff)
Detect SELinux support (for install target) in autoconf.
Can be manually overriden in configure or make. git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3195 5390a7c7-147a-4af0-8ec9-7488f05a26cb
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 7f05619..6ee7523 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,21 @@ AST_EXT_LIB([ncurses], [initscr], [curses.h], [NCURSES], [ncurses], [])
AST_EXT_LIB([newt], [newtBell], [newt.h], [NEWT], [newt])
AST_EXT_LIB([usb], [usb_init], [usb.h], [USB], [libusb])
+AC_ARG_WITH(selinux,
+ [AS_HELP_STRING([--with-selinux],
+ [enable (with) / disable (without) SELinux])],
+ [USE_SELINUX=$withval],
+ [ if test ! -x /usr/sbin/sestatus; then
+ USE_SELINUX=no;
+ elif /usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled"; then
+ USE_SELINUX=yes
+ fi
+ ]
+)
+
+
+AC_SUBST(USE_SELINUX)
+
# for asciidoc before ver. 7, the backend must be stated explicitly:
ASCIIDOC='asciidoc'
asciidoc_ver=`asciidoc --version 2>&1 | awk '/^asciidoc /{print $2}' | cut -d. -f 1 | head -n 1`