# Check Bluetooth SBC codec for RTP Player
# git://git.kernel.org/pub/scm/bluetooth/sbc.git
+AC_ARG_WITH([sbc],
+ AC_HELP_STRING( [--with-sbc=@<:@yes/no@:>@],
+ [use SBC codec to play Bluetooth A2DP stream @<:@default=yes@:>@]),
+ with_sbc="$withval", with_sbc="yes")
+
PKG_CHECK_MODULES(SBC, sbc >= 1.0, [have_sbc=yes], [have_sbc=no])
-if (test "${have_sbc}" = "yes"); then
- AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
- CFLAGS="$CFLAGS $(pkg-config sbc --cflags)"
- LIBS="$LIBS $(pkg-config sbc --libs)"
+if test "x$with_sbc" = "xyes"; then
+ if (test "${have_sbc}" = "yes"); then
+ AC_DEFINE(HAVE_SBC, 1, [Define to support playing SBC by standalone BlueZ SBC library])
+ CFLAGS="$CFLAGS $(pkg-config sbc --cflags)"
+ LIBS="$LIBS $(pkg-config sbc --libs)"
+ fi
+else
+ have_sbc=no
fi
dnl