If a project uses the autoconf sample from daemon(7) and it is passed a plain '--with-systemsystemunitdir', the generated Makefile tries to install systemd unit files in $(DESTDIR)yes which doesn't seem like a good location. I guess the best solution here would be to decide how it should behave and update the code sample so that no more projects will repeat the same mistake. As I see it, the most correct solution would be to use pkg-config path then, and fail if it is unavailable.
The linked ml thread also appoints a few other issues: - using CLEANFILES instead of MOSTLYCLEANFILES so that the file will be removed/recreated on configure opt changes, - default value in the help string.
Here's the equivalent bug and patch in dbus: https://bugs.freedesktop.org/show_bug.cgi?id=37847#c5
I've also improved the sample for xdm [1], and considering that upstream isn't interested in sharing macros, I created a small macro (and potentially code) bundle called systemd-sdk [2]. It's intended to provide code which can be reused by projects supporting systemd without the need for complete systemd install. [1]:http://cgit.freedesktop.org/xorg/app/xdm/commit/?id=0782f1c24c65 [2]:https://github.com/mgorny/systemd-sdk/
I added the macro from xdm to daemon(7) in http://cgit.freedesktop.org/systemd/systemd/commit/?id=5486855.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.