mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
build-sys: meson: Make module-console-kit optional
Default build configuration would fail to run on a system without systemd-logind (or elogind) and without ConsoleKit daemon responding on dbus interface. Here, module-console-kit would fail to initialize, preventing daemon from starting. Make module-console-kit an optional build feature to allow opt-out. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/719>
This commit is contained in:
parent
9f32b7d7ee
commit
823e46fba0
3 changed files with 14 additions and 1 deletions
|
|
@ -732,6 +732,10 @@ if get_option('daemon')
|
||||||
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
|
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if get_option('consolekit').enabled()
|
||||||
|
assert(dbus_dep.found(), 'ConsoleKit requires D-Bus support')
|
||||||
|
endif
|
||||||
|
|
||||||
tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
|
tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
|
||||||
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
|
if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
|
||||||
cdata.set('HAVE_LIBWRAP', 1)
|
cdata.set('HAVE_LIBWRAP', 1)
|
||||||
|
|
@ -1001,6 +1005,7 @@ summary += [
|
||||||
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
|
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
|
||||||
'Enable systemd units: @0@'.format(systemd_dep.found()),
|
'Enable systemd units: @0@'.format(systemd_dep.found()),
|
||||||
'Enable elogind: @0@'.format(libelogind_dep.found()),
|
'Enable elogind: @0@'.format(libelogind_dep.found()),
|
||||||
|
'Enable ConsoleKit: @0@'.format(not get_option('consolekit').disabled() and dbus_dep.found()),
|
||||||
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
|
'Enable TCP Wrappers: @0@'.format(tcpwrap_dep.found()),
|
||||||
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
|
||||||
'Database: @0@'.format(get_option('database')),
|
'Database: @0@'.format(get_option('database')),
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,9 @@ option('bluez5-native-headset',
|
||||||
option('bluez5-ofono-headset',
|
option('bluez5-ofono-headset',
|
||||||
type : 'boolean',
|
type : 'boolean',
|
||||||
description : 'Optional oFono headset backend support (BlueZ 5)')
|
description : 'Optional oFono headset backend support (BlueZ 5)')
|
||||||
|
option('consolekit',
|
||||||
|
type : 'feature', value : 'auto',
|
||||||
|
description : 'Optional ConsoleKit support')
|
||||||
option('dbus',
|
option('dbus',
|
||||||
type : 'feature', value : 'auto',
|
type : 'feature', value : 'auto',
|
||||||
description : 'Optional D-Bus support')
|
description : 'Optional D-Bus support')
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,6 @@ endif
|
||||||
|
|
||||||
if dbus_dep.found()
|
if dbus_dep.found()
|
||||||
all_modules += [
|
all_modules += [
|
||||||
[ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
|
|
||||||
[ 'module-dbus-protocol',
|
[ 'module-dbus-protocol',
|
||||||
[ 'dbus/iface-card.c', 'dbus/iface-card.h',
|
[ 'dbus/iface-card.c', 'dbus/iface-card.h',
|
||||||
'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
|
'dbus/iface-card-profile.c', 'dbus/iface-card-profile.h',
|
||||||
|
|
@ -147,6 +146,12 @@ if dbus_dep.found()
|
||||||
[], [], [dbus_dep] ],
|
[], [], [dbus_dep] ],
|
||||||
[ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
|
[ 'module-rygel-media-server', 'module-rygel-media-server.c', [], [], [dbus_dep], libprotocol_http ],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not get_option('consolekit').disabled()
|
||||||
|
all_modules += [
|
||||||
|
[ 'module-console-kit', 'module-console-kit.c', [], [], [dbus_dep] ],
|
||||||
|
]
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if fftw_dep.found()
|
if fftw_dep.found()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue