systemd: fall back to default system-sleep dir without systemd-devel

Keep the pkg-config lookup for SYSTEMD_SLEEP_DIR, but fall back to
"$(prefix)/lib/systemd/system-sleep/" if the variable remains unset.
This avoids reintroducing a build-time dependency on systemd-devel while
still honoring the path provided by pkg-config when present.

Fixes: e54a6cd6a1 ("systemd: Add hooks to stop/start xen-watchdog on suspend/resume")
Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Mykola Kvach <mykola_kvach@epam.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Mykola Kvach authored and Andrew Cooper committed 2025-12-05 18:06:19 +00:00
1 parent 5bbe1fe413
commit b34bde262c
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -81,7 +81,7 @@ AC_DEFUN([AX_CHECK_SYSTEMD_LIBS], [
], []) ], [])
AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [ AS_IF([test "x$SYSTEMD_SLEEP_DIR" = x], [
AC_MSG_ERROR([SYSTEMD_SLEEP_DIR is unset]) SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/"
], []) ], [])
]) ])
+1 -1
View File
@@ -10360,7 +10360,7 @@ fi
if test "x$SYSTEMD_SLEEP_DIR" = x if test "x$SYSTEMD_SLEEP_DIR" = x
then : then :
as_fn_error $? "SYSTEMD_SLEEP_DIR is unset" "$LINENO" 5 SYSTEMD_SLEEP_DIR="\$(prefix)/lib/systemd/system-sleep/"
fi fi
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.