Skip to content
This repository has been archived by the owner on Jan 25, 2021. It is now read-only.

Commit

Permalink
Add APTX sources to Makefile.am; Add ffmpeg libs condition to configu…
Browse files Browse the repository at this point in the history
…re.ac
  • Loading branch information
EHfive committed Oct 13, 2018
1 parent 2c4f21c commit a228264
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 11 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,7 @@ PA_MACHINE_ID_FALLBACK="${localstatedir}/lib/dbus/machine-id"
AX_DEFINE_DIR(PA_MACHINE_ID_FALLBACK, PA_MACHINE_ID_FALLBACK,
[Fallback machine-id file])

#### BlueZ support (optional, dependent on D-Bus and SBC) ####
#### BlueZ support (optional, dependent on FFmpeg, D-Bus and SBC) ####

AC_ARG_ENABLE([bluez5],
AS_HELP_STRING([--disable-bluez5],[Disable optional BlueZ 5 support]))
Expand All @@ -1070,11 +1070,19 @@ AS_IF([test "x$enable_bluez5" != "xno"],
[PKG_CHECK_MODULES(SBC, [ sbc >= 1.0 ], HAVE_SBC=1, HAVE_SBC=0)],
HAVE_SBC=0)

## FFmpeg libavcodec ##
AS_IF([test "x$enable_bluez5" != "xno"],
[PKG_CHECK_MODULES(FF_AVCODEC, [ libavcodec >= 58.18.100 ], HAVE_FF_AVCODEC=1, HAVE_FF_AVCODEC=0)],
HAVE_SBC=0)
AS_IF([test "x$enable_bluez5" != "xno"],
[PKG_CHECK_MODULES(FF_AVUTIL, [ libavcodec >= 56.14.100 ], HAVE_FF_AVUTIL=1, HAVE_FF_AVUTIL=0)],
HAVE_SBC=0)

## BlueZ 5 ##
AS_IF([test "x$enable_bluez5" != "xno" && test "x$HAVE_DBUS" = "x1" && test "x$HAVE_SBC" = "x1"], HAVE_BLUEZ_5=1,
AS_IF([test "x$enable_bluez5" != "xno" && test "x$HAVE_DBUS" = "x1" && test "x$HAVE_SBC" = "x1" && test "x$HAVE_FF_AVCODEC" = "x1" && test "x$HAVE_FF_AVUTIL" = "x1"], HAVE_BLUEZ_5=1,
HAVE_BLUEZ_5=0)
AS_IF([test "x$enable_bluez5" = "xyes" && test "x$HAVE_BLUEZ_5" != "x1"],
[AC_MSG_ERROR([*** BLUEZ 5 support not found (requires sbc and D-Bus)])])
[AC_MSG_ERROR([*** BLUEZ 5 support not found (requires FFmpeg, sbc and D-Bus)])])
AC_SUBST(HAVE_BLUEZ_5)
AM_CONDITIONAL([HAVE_BLUEZ_5], [test "x$HAVE_BLUEZ_5" = x1])

Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2118,12 +2118,13 @@ libbluez5_util_la_SOURCES = \
modules/bluetooth/bluez5-util.c \
modules/bluetooth/a2dp/a2dp_util.c \
modules/bluetooth/a2dp/a2dp_sbc.c \
modules/bluetooth/a2dp/a2dp_aptx.c \
modules/bluetooth/a2dp/a2dp_ldac.c \
modules/bluetooth/a2dp-api.h \
modules/bluetooth/a2dp/ldacBT.h \
modules/bluetooth/a2dp/ldacBT_abr.h \
modules/bluetooth/bluez5-util.h \
modules/bluetooth/a2dp-codecs.h \
modules/bluetooth/a2dp-api.h
modules/bluetooth/a2dp-codecs.h
if HAVE_BLUEZ_5_OFONO_HEADSET
libbluez5_util_la_SOURCES += \
modules/bluetooth/backend-ofono.c
Expand Down

0 comments on commit a228264

Please sign in to comment.