[pulseaudio-discuss] [PATCH] build-sys: Check for bluez package

Arun Raghavan arun at accosted.net
Sun Nov 2 21:44:22 PST 2014


On 3 November 2014 00:23, Tanu Kaskinen <tanu.kaskinen at linux.intel.com> wrote:
> On Sun, 2014-11-02 at 23:52 +0530, Arun Raghavan wrote:
>> On 2 November 2014 23:30, Tanu Kaskinen <tanu.kaskinen at linux.intel.com> wrote:
>> > On Fri, 2014-10-31 at 23:28 +0100, Peter Meerwald wrote:
>> >> if bluez development files are not installed, compilation of the
>> >> recently added native headset backend fails:
>> >>
>> >>   CC       modules/bluetooth/libbluez5_util_la-backend-native.lo
>> >> modules/bluetooth/backend-native.c:36:33: fatal error: bluetooth/bluetooth.h: No such file or directory
>> >>  #include <bluetooth/bluetooth.h>
>> >>
>> >> this patch adds a check for bluez >= 4.101
>> >>
>> >> Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>
>> >> ---
>> >>  configure.ac | 4 ++++
>> >>  1 file changed, 4 insertions(+)
>> >>
>> >> diff --git a/configure.ac b/configure.ac
>> >> index f165eb4..6e45dc6 100644
>> >> --- a/configure.ac
>> >> +++ b/configure.ac
>> >> @@ -1046,6 +1046,10 @@ fi
>> >>  AS_IF([test "x$BLUETOOTH_HEADSET_BACKEND" != "xofono" && test "x$BLUETOOTH_HEADSET_BACKEND" != "xnull" && test "x$BLUETOOTH_HEADSET_BACKEND" != "xnative"],
>> >>      [AC_MSG_ERROR([*** Invalid Bluetooth Headset backend])])
>> >>
>> >> +AS_IF([test "x$BLUETOOTH_HEADSET_BACKEND" = "xnative"],
>> >> +    [PKG_CHECK_MODULES(BLUEZ, [ bluez >= 4.101 ], [],
>> >> +        [AC_MSG_ERROR([*** BLUEZ library not found (required by native headset backend)])])])
>> >> +
>> >
>> > I think we shouldn't fail if the backend wasn't explicitly set by the
>> > user. I'm not sure what the fallback should be... should we select the
>> > ofono backend instead? Or null? I'd probably vote falling back to ofono.
>>
>> I thought we had native as the default already -- any reason that should change?
>
> The fallback would be used in case native is not available due to
> missing deps. Native would still be default if all dependencies are
> available.

I prefer the current mechanism: if no backend is specified, we pick
'native' and ask for the bluez headers to be there (basically just
saying that bluez is a compile-time in addition to the fact that it is
already a run-time dependency). The first error condition above
catches an explicitly specified backend that is not in the list.

One condition that is missing, though - the entire backend check
should only be done if we have --enable-bluez5 (an should error out
with --enable-bluez4).

-- Arun


More information about the pulseaudio-discuss mailing list