From 60514309c0a2edc2bbb9bca527e10ceeef0c5691 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sat, 27 Oct 2007 16:33:48 +0000 Subject: 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 --- configure.ac | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'configure.ac') 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` -- cgit v1.2.3