'make distcheck' runs ./configure (among other things). That command
should inherit the flags passed on the command line, as they are the
flags necessary to build in the current system.
This also allows testing different configurations in the same system.
Until now, we only tested the default automagic configuration. With
this change, one can test the same default automagic configuration, by
not passing any flags to ./configure, or they can test more specific
configurations, by passing flags.
This allows removing the hardcoded AM_DISTCHECK_CONFIGURE_FLAGS in the
"Makefile.am".
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Before this commit, if configured with --enable-logind, but libsystemd
is not found, configure silently succeed, however logind is efficiently
disabled.
With this commit, the configure fails if logind is not explicitly
disabled and libsystemd is not found.
--disable-logind is mandatory if logind integration should not be used.
Automatic detection is disabled by Alejandro Colomar's request.
Extra help in the error message is added by lslebodn's request.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Improve formatting and readability of single configure check.
Also remove unneeded overquoting of "LIBSYSTEMD=-lsystemd".
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
The code does not enabled logind unconditionally by default. Instead
configure checks for logind (libsystemd) availability and enables it
only if found.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
This is a workaround for broken shells, which incorrectly performs
'test "$var" = "value"' when variable is empty or not set.
Also this is a guard for variable values that may break "test", like
"!", "-z", "-n".
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
[[]] means "use literally, without expansion and substitution".
# symbol potentially could be interpreted as a comment.
Also fixed one check with indented " #include <security/pam_appl.h>"
which is not correct C syntax.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
AC_ARG_ENABLE() expands to nothing where it is used, but adds arguments
parsing, help message and other related things.
It does not make any sense to put this macro into if branch. It may
also confuse the reader.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Always quoting of all arguments is recommended by autoconf manual.
The commit is checked by autoreconf -v before and after commit.
Resulting configure is identical (excluding some newlines).
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Lines were incorrectly added by 5cd04d03f94622c12220d4a6352824af081b8531
The check is fully duplicated and does nothing except setting wrong
variable LIYESCRYPT. Such variable was never used in the project.
Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
This removes all yacc(1) code from this project. Add copyright and
license, since there remains nothing of the original code.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Both glibc and musl provide getusershell(3). It's an API from 4.3BSD,
according to the manual page, so let's assume it exists everywhere that
we would care, even if it's not in POSIX.
Reported-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
We didn't even have prototypes for these APIs since long ago, when the
prototypes were removed, but misteriously the implementations remained.
Both glibc and musl provide getspnam(3), so this file was effectively
being ignored by the compiler. Just remove it.
Also remove the check for getspnam, which isn't used elsewhere.
Fixes: 0ee095abd8db (2007-10-07; "[svn-upgrade] Integrating new upstream version, shadow (4.0.7)")
Closes: <https://github.com/shadow-maint/shadow/issues/1228>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Statically set PASSWD_PROGRAM depending on exec_prefix, and not by where
the passwd program was at configure time.
Depending on the specific build situation before, this may or may not
change the embedded passwd program path. Also configure.ac sets
exec_prefix=/ for prefix=/usr, so this might be a bit confusing, but
at least deterministic.
Closes: #1224
Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Autoconf's NEWS file says
*** AC_FUNC_GETGROUPS and AC_TYPE_GETGROUPS no longer run test programs.
These macros were testing for OS bugs that we believe are at least
twenty years in the past. Most operating systems are now trusted to
provide an accurate prototype for getgroups in unistd.h, and to
implement it as specified in POSIX.
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This check was testing a specific bug in a prehistoric libc version.
Red Hat 3 is long dead, and it doesn't make sense to test for that
specific bug.
Reviewed-by: Serge Hallyn <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
The "quick hack" finally disappeared. Probably nobody noticed. ;)
(See the changes in <configure.ac> for the context of this pun.)
Probably everybody uses SSH these days for remote login. Let's remove
this insecure method.
Closes: <https://github.com/shadow-maint/shadow/issues/992>
Reviewed-by: dkwo <nicolopiazzalunga@gmail.com>
Reviewed-by: Iker Pedrosa <ipedrosa@redhat.com>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Michael Vetter <jubalh@iodoru.org>
Cc: Sam James <sam@gentoo.org>
Cc: Benedikt Brinkmann <datacobra@thinkbot.de>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
`PKG_CONFIG` variable needs to be set for `PKG_CHECK_MODULES` to
succeed, but this wasn't happening in Fedora because the first
appearance of `PKG_CHECK_MODULES` was conditionally skipped because this
distribution is compiled without `libbsd` support. Thus, moving the
cmocka library detection before libbsd fixes the problem.
Suggested-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>