Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | From 166cbc02f72d13d5e7bf08ac2351c0f07e1ff4b9 Mon Sep 17 00:00:00 2001 |
| 2 | From: Wenzong Fan <wenzong.fan@windriver.com> |
| 3 | Date: Mon, 1 Dec 2014 02:08:27 -0500 |
| 4 | Subject: [PATCH] apache2: allow to disable selinux support |
| 5 | |
| 6 | Upstream-Status: Pending |
| 7 | |
| 8 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> |
| 9 | |
| 10 | --- |
| 11 | configure.in | 14 ++++++++++---- |
| 12 | 1 file changed, 10 insertions(+), 4 deletions(-) |
| 13 | |
| 14 | diff --git a/configure.in b/configure.in |
| 15 | index 54dfd0d..377e062 100644 |
| 16 | --- a/configure.in |
| 17 | +++ b/configure.in |
| 18 | @@ -466,10 +466,16 @@ getloadavg |
| 19 | dnl confirm that a void pointer is large enough to store a long integer |
| 20 | APACHE_CHECK_VOID_PTR_LEN |
| 21 | |
| 22 | -AC_CHECK_LIB(selinux, is_selinux_enabled, [ |
| 23 | - AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) |
| 24 | - APR_ADDTO(AP_LIBS, [-lselinux]) |
| 25 | -]) |
| 26 | +# SELinux support |
| 27 | +AC_ARG_ENABLE(selinux,APACHE_HELP_STRING(--enable-selinux,Enable SELinux support [default=auto]), |
| 28 | + [],[enable_selinux=auto]) |
| 29 | + |
| 30 | +if test x$enable_selinux != xno; then |
| 31 | + AC_CHECK_LIB(selinux, is_selinux_enabled, [ |
| 32 | + AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) |
| 33 | + APR_ADDTO(AP_LIBS, [-lselinux]) |
| 34 | + ]) |
| 35 | +fi |
| 36 | |
| 37 | AC_CACHE_CHECK([for gettid()], ac_cv_gettid, |
| 38 | [AC_TRY_RUN(#define _GNU_SOURCE |