meson: Enable bluetooth modules, add bluez_util lib, add bluez and sbc dependencies

Please notice that the bluez5 version seems wrong in the dependency
declaration: `>= 4.x`, while we're talking about version 5.

The ofono part will need to be made optional when we start to work on
the meson_options file.

I follow the current configure.ac to define 'HAVE_BLUEZ', but it looks
like this part would benefit from a bit of rework. Setting HAVE_BLUEZ
when we have dbus+sbc sounds weird, there's probably a better name for
this variable.

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
This commit is contained in:
Arnaud Rebillout 2018-09-22 17:37:19 +07:00 committed by Arun Raghavan
parent 147462b276
commit 0d6ea15eea
3 changed files with 54 additions and 4 deletions

View file

@ -238,6 +238,12 @@ if avahi_dep.found()
cdata.set('HAVE_AVAHI', 1)
endif
bluez_dep = dependency('bluez', version : '>= 4.101', required : false)
if bluez_dep.found()
cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1) # TODO This should be optional
endif
jack_dep = dependency('jack', version : '>= 0.117.0', required : false)
if jack_dep.found()
cdata.set('HAVE_JACK', 1)
@ -258,6 +264,15 @@ if openssl_dep.found()
cdata.set('HAVE_OPENSSL', 1)
endif
sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
if sbc_dep.found()
cdata.set('HAVE_SBC', 1)
endif
if sbc_dep.found() and dbus_dep.found()
cdata.set('HAVE_BLUEZ', 1)
cdata.set('HAVE_BLUEZ_5', 1)
endif
udev_dep = dependency('libudev', version : '>= 143', required : false)
if udev_dep.found()
cdata.set('HAVE_UDEV', 1)