From ae8d4a90ece567f6cc73774d46df7fd29faf6011 Mon Sep 17 00:00:00 2001 From: matt335672 <30179339+matt335672@users.noreply.github.com> Date: Tue, 15 Apr 2025 11:43:18 +0100 Subject: [PATCH] Improve systemd support Later versions of Ubuntu (e.g. 24.10 and later) do not install the systemd-dev package by default. This breaks the systemd-detection mechanism. Add this package in for non-systemd-based Debian distributions. Also log what we are doing for systemd as part of the configure. --- configure.ac | 7 +++++++ scripts/install_xrdp_build_dependencies_with_apt.sh | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 7eb74864..970aa672 100644 --- a/configure.ac +++ b/configure.ac @@ -726,6 +726,13 @@ if test x$enable_utmp = xyes; then echo " utmpx.ut_host $ac_cv_utmpx_has_ut_host" echo " utmpx.ut_exit $ac_cv_utmpx_has_ut_exit" fi +if test -n "$with_systemdsystemunitdir" \ + -a "x$with_systemdsystemunitdir" != xno; then + echo " systemd support yes" + echo " unit file directory $with_systemdsystemunitdir" +else + echo " systemd support no" +fi echo echo " with imlib2 $use_imlib2" diff --git a/scripts/install_xrdp_build_dependencies_with_apt.sh b/scripts/install_xrdp_build_dependencies_with_apt.sh index 191a165e..c832bc2c 100755 --- a/scripts/install_xrdp_build_dependencies_with_apt.sh +++ b/scripts/install_xrdp_build_dependencies_with_apt.sh @@ -70,6 +70,11 @@ case `lsb_release -si`/`lsb_release -sr` in *) LIBFREETYPE_DEV=libfreetype-dev esac +# We need systemd-dev for Debian-based systems using systemd +if command -v systemctl >/dev/null; then + PACKAGES="$PACKAGES systemd-dev" +fi + case "$ARCH" in amd64)