summaryrefslogtreecommitdiffstats
path: root/udev
diff options
context:
space:
mode:
authorGravatar Masatake Daimon2026-11-22 17:59:13 +0100
committerGravatar Nikias Bassen2026-11-22 17:59:13 +0100
commit493b41ba0028d1c7c8d718c75103187598013188 (patch)
tree9acda5d525c054d87e587e2ff967312459256006 /udev
parente0216f30e1d34812354ee0cd6e91711bbf704bbe (diff)
downloadusbmuxd-493b41ba0028d1c7c8d718c75103187598013188.tar.gz
usbmuxd-493b41ba0028d1c7c8d718c75103187598013188.tar.bz2
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 <nikias@gmx.li>
Diffstat (limited to 'udev')
-rw-r--r--udev/Makefile.am10
1 files changed, 7 insertions, 3 deletions
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