1
Goal: detect that SE Linux is not present without failing if
2
--without-selinux or --with-selinux is not specified.
4
Fix: FTBFS on kfreebsd (and probably The Hurd)
6
Author: Mike Frysinger <vapier@gentoo.org>
8
Status wrt upstream: Fixed upstream.
10
Index: shadow-4.1.0/configure.in
11
===================================================================
12
--- shadow-4.1.0.orig/configure.in
13
+++ shadow-4.1.0/configure.in
15
[with_libpam=$withval], [with_libpam=yes])
17
[AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=autodetect@:>@])],
18
- [with_selinux=$withval], [with_selinux=yes])
19
+ [with_selinux=$withval], [with_selinux=maybe])
21
[AC_HELP_STRING([--with-skey], [use S/Key support @<:@default=no@:>@])],
22
[with_skey=$withval], [with_skey=no])
24
AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.]))
27
-if test "$with_selinux" = "yes"; then
28
+if test "$with_selinux" != "no"; then
30
AC_CHECK_LIB(selinux, is_selinux_enabled,
31
[LIBSELINUX="-lselinux"
33
+ [have_selinux="no"])
34
+ if test "x$have_selinux$with_selinux" = "xnoyes" ; then
35
+ AC_MSG_ERROR([libselinux not found])
36
+ elif test "x$have_selinux" = "xyes" ; then
38
- AC_CHECK_HEADERS(selinux/selinux.h, [],
39
- [AC_MSG_ERROR([selinux/selinux.h is missing])])
41
+ AC_CHECK_HEADERS(selinux/selinux.h, [], [selinux/selinux.h is missing])
42
AC_DEFINE(WITH_SELINUX, 1, [Build shadow with SELinux support])
44
- [AC_MSG_ERROR([libselinux not found])])