Re: Info: prepare for release 4.0.13
Mike Frysinger <[email protected]> Mon, 26 Sep 2005 23:41:32 -0400
| Newsgroups | gmane.linux.pld.shadow.general |
|---|---|
| Organization | wh0rd.org |
| Message-ID | <[email protected]> |
On Monday 26 September 2005 03:16 pm, Tomasz Kłoczko wrote:
> As usual last week before release is only for critical bugs and update/new
> translations.
seems the new configure.in defaults prevent disabling of features ?
configure.in:
with_selinux="yes"
...
AC_ARG_WITH(selinux,
[AC_HELP_STRING([--with-selinux], [use SELinux support (default=yes if
found)])])
...
if test "$with_selinux" = "yes"; then
AC_CHECK_LIB(selinux, is_selinux_enabled,
[LIBSELINUX="-lselinux"],
[AC_MSG_ERROR([libselinux not found])])
sample runs of configure:
$ ./configure
checking for is_selinux_enabled in -lselinux... no
configure: error: libselinux not found
$ ./configure --without-selinux
checking for is_selinux_enabled in -lselinux... no
configure: error: libselinux not found
how about the proposed patch ? this just fixes the selinux case but can be
applied to the other withvals as well ...
-mike
shadow-selinux-defaults.patch
(text/x-diff, 1.9 KB)
Index: configure.in =================================================================== RCS file: /cvsroot/shadow/configure.in,v retrieving revision 1.126 diff -u -p -r1.126 configure.in --- configure.in 5 Sep 2005 17:16:57 -0000 1.126 +++ configure.in 27 Sep 2005 03:40:20 -0000 @@ -7,12 +7,11 @@ dnl Some hacks... test "$prefix" = "NONE" && prefix="/usr" test "$prefix" = "/usr" && exec_prefix="" -dnl try find and use feactures: +dnl try find and use features: with_audit="yes" with_libcrack="no" with_libpam="yes" with_libskey="no" -with_selinux="yes" AC_GNU_SOURCE @@ -230,7 +229,8 @@ AC_ARG_WITH(audit, AC_ARG_WITH(libpam, [AC_HELP_STRING([--with-libpam], [use libpam for PAM support (default=yes if found)])]) AC_ARG_WITH(selinux, - [AC_HELP_STRING([--with-selinux], [use SELinux support (default=yes if found)])]) + [AC_HELP_STRING([--with-selinux], [use SELinux support @<:@default=autodetect@:>@])], + [with_selinux=$withval],[with_selinux="maybe"]) AC_ARG_WITH(skey, [AC_HELP_STRING([--with-skey], [use S/Key support(default=no)])]) AC_ARG_WITH(libcrack, @@ -290,13 +290,23 @@ if test "$with_libcrack" = "yes"; then AC_DEFINE(HAVE_LIBCRACK_PW, 1, [Defined if it includes *Pw functions.])) fi -if test "$with_selinux" = "yes"; then +if test "$with_selinux" != "no"; then AC_CHECK_LIB(selinux, is_selinux_enabled, - [LIBSELINUX="-lselinux"], - [AC_MSG_ERROR([libselinux not found])]) - AC_SUBST(LIBSELINUX) - AC_CHECK_HEADERS(selinux/selinux.h, [], [selinux/selinux.h is missing]) - AC_DEFINE(WITH_SELINUX, 1, [Build shadow with SELinux support]) + [ + with_selinux=yes + LIBSELINUX="-lselinux" + AC_SUBST(LIBSELINUX) + AC_CHECK_HEADERS(selinux/selinux.h, [], [selinux/selinux.h is missing]) + AC_DEFINE(WITH_SELINUX, 1, [Build shadow with SELinux support]) + ], + [ + if test "$with_selinux" = "yes"; then + AC_MSG_ERROR([libselinux not found]) + else + with_selinux=no + fi + ] + ) fi AC_SUBST(LIBPAM)