]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
configure: Fix incorrect use of AM_CONDITIONAL
authorEvgeny Grin (Karlson2k) <k2k@drgrin.dev>
Sat, 12 Jul 2025 14:32:29 +0000 (16:32 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Sat, 19 Jul 2025 04:42:33 +0000 (06:42 +0200)
AM_CONDITIONAL() must not be used in shell's if branches.  Instead it
must be specified one time only (per conditional variable) with test
"something" as a second parameter.
See https://www.gnu.org/software/automake/manual/html_node/Usage-of-Conditionals.html#index-AM_005fCONDITIONAL-2

Signed-off-by: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Reviewed-by: Alejandro Colomar <alx@kernel.org>
configure.ac

index 05a0407fa4286aacda0137aeb558f11de8dc56fb..da4b702f08567282b258886bb28e4540650eca0f 100644 (file)
@@ -584,16 +584,15 @@ if test "$with_libpam" = "yes"; then
 
        AC_DEFINE(USE_PAM, 1, [Define to support Pluggable Authentication Modules])
        AC_DEFINE_UNQUOTED(SHADOW_PAM_CONVERSATION, [$pam_conv_function],[PAM conversation to use])
-       AM_CONDITIONAL(USE_PAM, [true])
 
        AC_MSG_CHECKING(use login and su access checking if PAM not used)
        AC_MSG_RESULT(no)
 else
        AC_DEFINE(SU_ACCESS, 1, [Define to support /etc/suauth su access control.])
-       AM_CONDITIONAL(USE_PAM, [false])
        AC_MSG_CHECKING(use login and su access checking if PAM not used)
        AC_MSG_RESULT(yes)
 fi
+AM_CONDITIONAL([USE_PAM], [test "X$with_libpam" = "Xyes"])
 
 if test "$enable_acct_tools_setuid" != "no"; then
        if test "$with_libpam" != "yes"; then