Skip to content
  • Simon McVittie's avatar
    Make the systemd user unit conditional · 3e76c45a
    Simon McVittie authored and Simon McVittie's avatar Simon McVittie committed
    
    
    I've implemented this by adding a --with[out]-systemduserunitdir
    configure option, because that seems to be what's conventional
    in projects where user units are configurable at all. If a user or
    distribution wants to disable these units, it's easier if they can
    pass --without-systemduserunitdir to everything, rather than checking
    whether it's spelled --disable-systemd-user-units in this particular
    project. Also, a binary enable/disable option wouldn't be noticeably
    less code.
    
    If the systemd user unit is disabled at configure time, the
    SystemdService line in the installed D-Bus service file is commented
    out. This addresses the corner-case situation where a user configures
    Evince --without-systemduserunitdir, but enables systemd activation
    for their session dbus-daemon (perhaps later). In that situation,
    we presumably want Evince to continue to use traditional activation,
    rather than trying to launch a nonexistent systemd unit.
    
    Signed-off-by: default avatarSimon McVittie <simon.mcvittie@collabora.co.uk>
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=755897
    Reviewed-by: Carlos Garcia Campos
    3e76c45a