diff options
-rw-r--r-- | Makefile | 8 | ||||
-rwxr-xr-x | configure | 25 | ||||
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | makeopts.in | 2 |
4 files changed, 44 insertions, 6 deletions
@@ -163,8 +163,6 @@ ifeq ($(KVERS_MAJ),2.4) endif endif -SELINUX_COND=[ -x /usr/sbin/sestatus ] && (/usr/sbin/sestatus | grep "SELinux status:" | grep -q "enabled") - # # Features are now configured in zconfig.h # @@ -482,8 +480,10 @@ endif $(DESTDIR)$(LIB_DIR)/$(LTZ_SO).$(LTZ_SO_MAJOR_VER) $(LN) -sf $(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) \ $(DESTDIR)$(LIB_DIR)/$(LTZ_SO) -ifeq (,$(DESTDIR)) - if $(SELINUX_COND); then /sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO); fi +ifneq (no,$(USE_SELINUX)) + ifeq (,$(DESTDIR)) + /sbin/restorecon -v $(DESTDIR)$(LIB_DIR)/$(LTZ_SO) + endif endif $(INSTALL) -D -m 644 tonezone.h $(DESTDIR)$(INC_DIR)/tonezone.h @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Revision: 2990 . +# From configure.ac Revision: 2999 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # @@ -686,6 +686,7 @@ PBX_LIBNEWT USB_LIB USB_INCLUDE PBX_LIBUSB +USE_SELINUX ASCIIDOC PPPD_VERSION LIBOBJS @@ -1272,6 +1273,7 @@ Optional Packages: --with-ncurses=PATH use ncurses files in PATH --with-newt=PATH use newt files in PATH --with-usb=PATH use libusb files in PATH + --with-selinux enable (with) / disable (without) SELinux --with-ppp=PATH Use ppp support from PATH Some influential environment variables: @@ -5328,6 +5330,24 @@ fi + +# Check whether --with-selinux was given. +if test "${with_selinux+set}" = set; then + withval=$with_selinux; USE_SELINUX=$withval +else + 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 + + +fi + + + + + # 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` @@ -6076,13 +6096,14 @@ PBX_LIBNEWT!$PBX_LIBNEWT$ac_delim USB_LIB!$USB_LIB$ac_delim USB_INCLUDE!$USB_INCLUDE$ac_delim PBX_LIBUSB!$PBX_LIBUSB$ac_delim +USE_SELINUX!$USE_SELINUX$ac_delim ASCIIDOC!$ASCIIDOC$ac_delim PPPD_VERSION!$PPPD_VERSION$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 73; then + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 74; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 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` diff --git a/makeopts.in b/makeopts.in index 8d0ff11..6af94be 100644 --- a/makeopts.in +++ b/makeopts.in @@ -39,6 +39,8 @@ PBX_LIBUSB=@PBX_LIBUSB@ USB_LIB=@USB_LIB@ USB_INCLUDE=@USB_INCLUDE@ +USE_SELINUX=@USE_SELINUX@ + PPPD_VERSION=@PPPD_VERSION@ ASCIIDOC=@ASCIIDOC@ |