Commit 1911ef16 authored by Lucas Stach's avatar Lucas Stach

meson: allow to build bluez support without libbluetooth

pulseaudio does not link against libbluetooth, as it's only talking to the
bluez daemon over dbus. So the build dependency on libbluetooth is overly
restrictive, as some embedded systems choose to ship without libbluetooth
but still have bluez daemon support.

This syncs the meson to the autotools configuration behavior by changing
the bluez option to a default on boolean.
parent eb70672c
...@@ -510,9 +510,8 @@ if avahi_dep.found() ...@@ -510,9 +510,8 @@ if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1) cdata.set('HAVE_AVAHI', 1)
endif endif
bluez_dep = dependency('bluez', version : '>= 5.0', required : get_option('bluez5'))
sbc_dep = dependency('sbc', version : '>= 1.0', required : false) sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
if bluez_dep.found() if get_option('bluez5')
assert(dbus_dep.found(), 'BlueZ requires D-Bus support') assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
assert(sbc_dep.found(), 'BlueZ requires SBC support') assert(sbc_dep.found(), 'BlueZ requires SBC support')
cdata.set('HAVE_SBC', 1) cdata.set('HAVE_SBC', 1)
...@@ -695,7 +694,7 @@ summary = [ ...@@ -695,7 +694,7 @@ summary = [
'Enable Async DNS: @0@'.format(asyncns_dep.found()), 'Enable Async DNS: @0@'.format(asyncns_dep.found()),
'Enable LIRC: @0@'.format(lirc_dep.found()), 'Enable LIRC: @0@'.format(lirc_dep.found()),
'Enable D-Bus: @0@'.format(dbus_dep.found()), 'Enable D-Bus: @0@'.format(dbus_dep.found()),
' Enable BlueZ 5: @0@'.format(bluez_dep.found()), ' Enable BlueZ 5: @0@'.format(get_option('bluez5')),
' Enable native headsets: @0@'.format(get_option('bluez5-native-headset')), ' Enable native headsets: @0@'.format(get_option('bluez5-native-headset')),
' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')), ' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')),
'Enable udev: @0@'.format(udev_dep.found()), 'Enable udev: @0@'.format(udev_dep.found()),
......
...@@ -67,7 +67,7 @@ option('avahi', ...@@ -67,7 +67,7 @@ option('avahi',
type : 'feature', value : 'auto', type : 'feature', value : 'auto',
description : 'Optional Avahi support') description : 'Optional Avahi support')
option('bluez5', option('bluez5',
type : 'feature', value : 'auto', type : 'boolean', value : 'true',
description : 'Optional BlueZ 5 support') description : 'Optional BlueZ 5 support')
option('bluez5-native-headset', option('bluez5-native-headset',
type : 'boolean', type : 'boolean',
......
...@@ -101,7 +101,7 @@ if avahi_dep.found() ...@@ -101,7 +101,7 @@ if avahi_dep.found()
] ]
endif endif
if bluez_dep.found() if get_option('bluez5')
subdir('bluetooth') subdir('bluetooth')
all_modules += [ all_modules += [
[ 'module-bluetooth-discover', 'bluetooth/module-bluetooth-discover.c' ], [ 'module-bluetooth-discover', 'bluetooth/module-bluetooth-discover.c' ],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment