Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 1 | From 0686564f64130f230870db8b4846973e3edbd646 Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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 | configure.in | 14 ++++++++++---- |
| 11 | 1 file changed, 10 insertions(+), 4 deletions(-) |
| 12 | |
| 13 | diff --git a/configure.in b/configure.in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 14 | index 76811e7..4df3ff3 100644 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 15 | --- a/configure.in |
| 16 | +++ b/configure.in |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 17 | @@ -491,10 +491,16 @@ getloadavg |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | dnl confirm that a void pointer is large enough to store a long integer |
| 19 | APACHE_CHECK_VOID_PTR_LEN |
| 20 | |
| 21 | -AC_CHECK_LIB(selinux, is_selinux_enabled, [ |
| 22 | - AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) |
| 23 | - APR_ADDTO(AP_LIBS, [-lselinux]) |
| 24 | -]) |
| 25 | +# SELinux support |
| 26 | +AC_ARG_ENABLE(selinux,APACHE_HELP_STRING(--enable-selinux,Enable SELinux support [default=auto]), |
| 27 | + [],[enable_selinux=auto]) |
| 28 | + |
| 29 | +if test x$enable_selinux != xno; then |
| 30 | + AC_CHECK_LIB(selinux, is_selinux_enabled, [ |
| 31 | + AC_DEFINE(HAVE_SELINUX, 1, [Defined if SELinux is supported]) |
| 32 | + APR_ADDTO(AP_LIBS, [-lselinux]) |
| 33 | + ]) |
| 34 | +fi |
| 35 | |
| 36 | AC_CACHE_CHECK([for gettid()], ac_cv_gettid, |
| 37 | [AC_TRY_RUN(#define _GNU_SOURCE |
| 38 | -- |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame^] | 39 | 2.25.1 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 40 | |