Skip to content

Commit 16272b6

Browse files
committed
configure, dist: rework systemd version discovery
With PKG_CHECK_MODULES we select the correct version during cross compilation. Signed-off-by: Moritz Buhl <moritz.buhl@infineon.com>
1 parent c47b818 commit 16272b6

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

configure.ac

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,11 +656,12 @@ AS_IF([test "x$enable_integration" = "xyes" && test "x$enable_self_generated_cer
656656
AC_CHECK_PROG(systemd_sysusers, systemd-sysusers, yes)
657657
AM_CONDITIONAL([SYSD_SYSUSERS], [test "x$systemd_sysusers" = "xyes" && test "x$sysusersdir" != "xno"])
658658

659-
have_systemd_ge_v257=no
659+
systemd_sysusers_fully_locked=no
660660
AS_IF([test "x$systemd_sysusers" = "xyes"],
661-
[systemd_version=$(systemd-sysusers --version 2>/dev/null | head -1 | cut -d' ' -f2)
662-
AS_IF([test -n "$systemd_version" && test "$systemd_version" -ge 257], [have_systemd_ge_v257=yes])])
663-
AM_CONDITIONAL([SYSD_SYSUSERS_FULLY_LOCKED], [test "x$have_systemd_ge_v257" = "xyes"])
661+
[PKG_CHECK_MODULES([LIBSYSTEMD], [libsystemd >= 257],
662+
[systemd_sysusers_fully_locked=yes],
663+
[systemd_sysusers_fully_locked=no])])
664+
AM_CONDITIONAL([SYSD_SYSUSERS_FULLY_LOCKED], [test "x$systemd_sysusers_fully_locked" = "xyes"])
664665

665666
AC_CHECK_PROG(systemd_tmpfiles, systemd-tmpfiles, yes)
666667
AM_CONDITIONAL([SYSD_TMPFILES], [test "x$systemd_tmpfiles" = "xyes" && test "x$tmpfilesdir" != "xno"])

0 commit comments

Comments
 (0)