From: Karel Zak Date: Mon, 27 Apr 2026 10:19:30 +0000 (+0200) Subject: autotools: fix AM_CONDITIONAL for HAVE_UDEV and HAVE_AUDIT X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=2e7edc63157db4761999bf310696b288cdec6d44;p=thirdparty%2Futil-linux.git autotools: fix AM_CONDITIONAL for HAVE_UDEV and HAVE_AUDIT Ensure AM_CONDITIONAL is always defined when entering the else-branch, even when the library is not found. Previously, when with_udev=auto (default) and libudev was not available, the conditional was never defined, causing a configure error. --- diff --git a/configure.ac b/configure.ac index c9b9b38a6..34d6a2cd3 100644 --- a/configure.ac +++ b/configure.ac @@ -1103,8 +1103,8 @@ AS_IF([test "x$with_audit" = xno], [ ) AS_IF([test "x$have_audit" = xyes], [ AC_DEFINE([HAVE_LIBAUDIT], [1], [Define if audit is available]) - AM_CONDITIONAL([HAVE_AUDIT], [true]) ]) + AM_CONDITIONAL([HAVE_AUDIT], [test "x$have_audit" = xyes]) ]) AC_SUBST([AUDIT_LIBS]) @@ -1123,8 +1123,8 @@ AS_IF([test "x$with_udev" = xno], [ ) AS_IF([test "x$have_udev" = xyes], [ AC_DEFINE([HAVE_LIBUDEV], [1], [Define if udev is available]) - AM_CONDITIONAL([HAVE_UDEV], [true]) ]) + AM_CONDITIONAL([HAVE_UDEV], [test "x$have_udev" = xyes]) ]) AC_SUBST([UDEV_LIBS])