summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-webserver/recipes-httpd/apache2/apache2/configure-allow-to-disable-selinux-support.patch
blob: a6ccfb6a8743f0c87857750c0099615b28f9c804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
From 166cbc02f72d13d5e7bf08ac2351c0f07e1ff4b9 Mon Sep 17 00:00:00 2001
From: Wenzong Fan <wenzong.fan@windriver.com>
Date: Mon, 1 Dec 2014 02:08:27 -0500
Subject: [PATCH] apache2: allow to disable selinux support

Upstream-Status: Pending

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>

---
 configure.in | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/configure.in b/configure.in
index 54dfd0d..377e062 100644
--- a/configure.in
+++ b/configure.in
@@ -466,10 +466,16 @@ getloadavg
 dnl confirm that a void pointer is large enough to store a long integer
 APACHE_CHECK_VOID_PTR_LEN
 
-AC_CHECK_LIB(selinux, is_selinux_enabled, [
-   AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
-   APR_ADDTO(AP_LIBS, [-lselinux])
-])
+# SELinux support
+AC_ARG_ENABLE(selinux,APACHE_HELP_STRING(--enable-selinux,Enable SELinux support [default=auto]),
+    [],[enable_selinux=auto])
+
+if test x$enable_selinux != xno; then
+    AC_CHECK_LIB(selinux, is_selinux_enabled, [
+        AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported])
+        APR_ADDTO(AP_LIBS, [-lselinux])
+    ])
+fi
 
 AC_CACHE_CHECK([for gettid()], ac_cv_gettid,
 [AC_TRY_RUN(#define _GNU_SOURCE
OpenPOWER on IntegriCloud