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 --- udev/Makefile.am | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'udev/Makefile.am') diff --git a/udev/Makefile.am b/udev/Makefile.am index 95f565d..39e0cc5 100644 --- a/udev/Makefile.am +++ b/udev/Makefile.am @@ -1,3 +1,8 @@ +EXTRA_DIST = \ + 39-usbmuxd.rules.in + +if WANT_UDEV + edit = \ $(SED) -r \ -e 's|@udev_activation_rule[@]|$(udev_activation_rule)|g' \ @@ -10,11 +15,10 @@ udevrules_DATA = \ 39-usbmuxd.rules: 39-usbmuxd.rules.in $(edit) -EXTRA_DIST = \ - 39-usbmuxd.rules.in - MAINTAINERCLEANFILES = \ 39-usbmuxd.rules CLEANFILES = \ 39-usbmuxd.rules + +endif -- cgit v1.1-32-gdbae