summaryrefslogtreecommitdiffstats
path: root/systemd
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 /systemd
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 'systemd')
-rw-r--r--systemd/Makefile.am10
1 files changed, 5 insertions, 5 deletions
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