Distros such as Debian or Ubuntu need to have both native and oFono support - e g, native for desktops and oFono for phones. With the current scheme, that would require compiling PulseAudio twice, once for each backend. Since the dependencies for the backends are runtime only, we can compile both at the same time, and include both in the same library. At runtime we detect if oFono is running, if it is, use the oFono backend, otherwise, load the native backend. This also removes the null backend. People wanting zero or one backend(s) can use the configure switches "disable-bluez5-ofono-headset" and "disable-bluez5-native-headset". David Henningsson (4): bluez 5: Build both headset backends, if available bluez 5: Load the native headset backend if the oFono one is unavailable bluez 5: Fix a debug message bluez 5: remove null headset backend configure.ac | 30 +++++++++++++++------------ src/Makefile.am | 12 +++++++++-- src/modules/bluetooth/backend-native.c | 6 +++--- src/modules/bluetooth/backend-null.c | 37 ---------------------------------- src/modules/bluetooth/backend-ofono.c | 30 +++++++++++++++------------ src/modules/bluetooth/bluez5-util.c | 36 +++++++++++++++++++++++++-------- src/modules/bluetooth/bluez5-util.h | 22 ++++++++++++++++++-- 7 files changed, 95 insertions(+), 78 deletions(-) delete mode 100644 src/modules/bluetooth/backend-null.c -- 1.9.1