diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2014-12-30 11:18:35 +0100 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-01-08 14:07:37 +0000 |
commit | 202184572ed5b986bc2dc572d6e60334f1125add (patch) | |
tree | 1c37404e5d76ea53bcc0e887c428dfd7eaeddcd2 /configure.ac | |
parent | 0078211c84b1e0bb669f421cddc057e8b0cae178 (diff) |
autotools: Add possibility to build without optional codec SBC
SBC is optional but build any time if configure script detect it,
so let user choose if it really want it. Default to build with SBC.
Bug: 10794
Change-Id: I1b936c628c9de0179aa3d5da5ac547bd910af8ba
Reviewed-on: https://code.wireshark.org/review/6399
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 13ac6beb18..a13c9de831 100644 --- a/configure.ac +++ b/configure.ac @@ -2793,11 +2793,20 @@ AC_SUBST(wireshark_SUBDIRS) # 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 |