From 493b41ba0028d1c7c8d718c75103187598013188 Mon Sep 17 00:00:00 2001 From: Masatake Daimon Date: Sun, 22 Nov 2026 17:59:13 +0100 Subject: build: improve portability and auto-detect udev/systemd - Use POSIX `=` instead of `==` in test expressions - Always recurse into udev/ and systemd/ via SUBDIRS and guard their contents with the WANT_UDEV/WANT_SYSTEMD automake conditionals, so that make dist keeps shipping the .in files (EXTRA_DIST is kept outside the guards) - Add --with-udev[=yes|no|auto] (default: auto). Auto enables udev on non-Windows/non-macOS hosts if udev.pc is found, a udev rules directory exists (native builds), or when cross-compiling for Linux - Disable systemd support if no systemd unit directory can be found, so the udev rule and HAVE_SYSTEMD no longer claim systemd activation when no unit is installed - Do not call pkg-config for udevdir/systemdsystemunitdir if it is unavailable - Report the actual activation method (systemd, udev or manual) in the configure summary Co-authored-by: Nikias Bassen --- systemd/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'systemd/Makefile.am') diff --git a/systemd/Makefile.am b/systemd/Makefile.am index 1d40c25..14d4e3b 100644 --- a/systemd/Makefile.am +++ b/systemd/Makefile.am @@ -1,20 +1,20 @@ +EXTRA_DIST = \ + usbmuxd.service.in + +if WANT_SYSTEMD + edit = \ $(SED) -r \ -e 's|@sbindir[@]|$(sbindir)|g' \ -e 's|@runstatedir[@]|$(runstatedir)|g' \ < $< > $@ || rm $@ -if WANT_SYSTEMD - systemdsystemunit_DATA = \ usbmuxd.service usbmuxd.service: usbmuxd.service.in $(edit) -EXTRA_DIST = \ - usbmuxd.service.in - CLEANFILES = \ usbmuxd.service -- cgit v1.1-32-gdbae