mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
meson.build: rework systemd related options
One issues is that the `systemd-{system,user}-service` feature options
do not anything without the `systemd` option. This makes it more
complicated to arrive at the desired build configuration since there
are 3^3 = 27 possible ways to set each of them, but if `systemd=disabled`,
then the other two are just ignored.
Secondly, the `systemd` option also influences whether or not libsystemd
will be used or not. This is not strictly necessary, since the "systemd"
and "libsystemd" pkg-config files might be split, and one might wish to
disable any kind of service file generation, but use libsystemd.
Solve the first issues by using the `systemd-{system,user}-service` options
when looking up the "systemd" dependency for generating service files. This
means that the corresponding option is in full control, no secondary options
are necessary. This means that the "systemd" dependency is looked up potentially
twice, but that should not be a significant issue since meson caches dependecy
lookups.
And solve the second issue by renaming the now unused `systemd` option to
`libsystemd` and using it solely to control whether or not libsystemd will
be used.
Furthermore, the default value of `systemd-user-service` is set to "auto" to
prevent the dependency lookup from failing on non-systemd systemd out of
the box. And the journal tests in "test-support" are extended to return "skip"
if `sd_journal_open()` returns `ENOSYS`, which is needed because "elogind"
ships the systemd pkg-config files and headers.
This commit is contained in:
parent
97996a6e20
commit
f2c878a2c1
7 changed files with 25 additions and 17 deletions
|
|
@ -30,8 +30,8 @@ option('gstreamer-device-provider',
|
|||
description: 'Build GStreamer device provider plugin',
|
||||
type: 'feature',
|
||||
value: 'auto')
|
||||
option('systemd',
|
||||
description: 'Enable systemd integration',
|
||||
option('libsystemd',
|
||||
description: 'Enable code that depends on libsystemd',
|
||||
type: 'feature',
|
||||
value: 'auto')
|
||||
option('logind',
|
||||
|
|
@ -48,9 +48,9 @@ option('systemd-system-service',
|
|||
type: 'feature',
|
||||
value: 'disabled')
|
||||
option('systemd-user-service',
|
||||
description: 'Install systemd user service file (ignored without systemd)',
|
||||
description: 'Install systemd user service file',
|
||||
type: 'feature',
|
||||
value: 'enabled')
|
||||
value: 'auto')
|
||||
option('selinux',
|
||||
description: 'Enable SELinux integration',
|
||||
type: 'feature',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue