[svn-commits] tzafrir: branch 1.4 r3195 - /branches/1.4/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Oct 27 11:33:48 CDT 2007


Author: tzafrir
Date: Sat Oct 27 11:33:48 2007
New Revision: 3195

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3195
Log:
Detect SELinux support (for install target) in autoconf.
Can be manually overriden in configure or make. 

Modified:
    branches/1.4/Makefile
    branches/1.4/configure
    branches/1.4/configure.ac
    branches/1.4/makeopts.in

Modified: branches/1.4/Makefile
URL: http://svn.digium.com/view/zaptel/branches/1.4/Makefile?view=diff&rev=3195&r1=3194&r2=3195
==============================================================================
--- branches/1.4/Makefile (original)
+++ branches/1.4/Makefile Sat Oct 27 11:33:48 2007
@@ -162,8 +162,6 @@
     KFLAGS+=-mcmodel=kernel
   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 @@
 		$(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
 

Modified: branches/1.4/configure
URL: http://svn.digium.com/view/zaptel/branches/1.4/configure?view=diff&rev=3195&r1=3194&r2=3195
==============================================================================
--- branches/1.4/configure (original)
+++ branches/1.4/configure Sat Oct 27 11:33:48 2007
@@ -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 @@
 USB_LIB
 USB_INCLUDE
 PBX_LIBUSB
+USE_SELINUX
 ASCIIDOC
 PPPD_VERSION
 LIBOBJS
@@ -1272,6 +1273,7 @@
   --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:
@@ -5322,6 +5324,24 @@
 echo "$as_me: *** without explicity specifying --with-usb" >&6;}
       exit 1
    fi
+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
 
 
@@ -6076,13 +6096,14 @@
 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

Modified: branches/1.4/configure.ac
URL: http://svn.digium.com/view/zaptel/branches/1.4/configure.ac?view=diff&rev=3195&r1=3194&r2=3195
==============================================================================
--- branches/1.4/configure.ac (original)
+++ branches/1.4/configure.ac Sat Oct 27 11:33:48 2007
@@ -60,6 +60,21 @@
 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`

Modified: branches/1.4/makeopts.in
URL: http://svn.digium.com/view/zaptel/branches/1.4/makeopts.in?view=diff&rev=3195&r1=3194&r2=3195
==============================================================================
--- branches/1.4/makeopts.in (original)
+++ branches/1.4/makeopts.in Sat Oct 27 11:33:48 2007
@@ -39,6 +39,8 @@
 USB_LIB=@USB_LIB@
 USB_INCLUDE=@USB_INCLUDE@
 
+USE_SELINUX=@USE_SELINUX@
+
 PPPD_VERSION=@PPPD_VERSION@
 
 ASCIIDOC=@ASCIIDOC@




More information about the svn-commits mailing list