GNOME Bugzilla – Bug 770758
Can no longer be built on non-systemd systems
Last modified: 2016-09-05 14:19:55 UTC
The addition of systemd user service files is a welcome change.
PKG_CHECK_EXISTS (systemd,, AC_MSG_ERROR ([systemd development headers not found]))
makes the package non-buildable on non-systemd systems.
There are two ways to solve this:
We add a fallback in case the systemd.pc file is not found (like e.g. dbus  does), or we add a
AM_CONDITIONAL(HAVE_SYSTEMD,...) and install the user unit files only if systemduserunitdir is not empty.
Let me know which approach you prefer and I'll prep a patch accordingly.
As an additional not, the addition of
PKG_CHECK_EXISTS([systemd],, [AC_MSG_ERROR([systemd development headers not found])])
doesn't actually ensure that systemduserunitdir will always be set, as the user can just run --without-systemduserunitdir.
Created attachment 334655 [details] [review]
build: Don't install systemd user unit files if target directory is not set
I've decided to conditionally install the systemd user units as this seems the proper fix.
gnome-user-share is only ever started by gnome-settings-daemon's "sharing" plugin. Said plugin now uses "systemd --user" to start the daemons it handles. Therefore, gnome-user-share will need systemd. Whether it's at build time or run time is academic.
As a side note: The nautilus extension should be probably be guarded with a AM_CONDITIONAL as well.
Atm, if libnautilus-extension.pc is missing, we build the extension but install it into the wrong path.
(In reply to Michael Biebl from comment #4)
> As a side note: The nautilus extension should be probably be guarded with a
> AM_CONDITIONAL as well.
> Atm, if libnautilus-extension.pc is missing, we build the extension but
> install it into the wrong path.
No, because the PKG_CHECK_MODULES() call will fail if libnautilus-extension isn't present.