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

Commit

Permalink
[configure.ac] Check FDK-AAC
Browse files Browse the repository at this point in the history
[Makefile.am] Add AAC support
  • Loading branch information
EHfive committed Dec 4, 2018
1 parent 5ef83ed commit 006543f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
12 changes: 9 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 FFmpeg, D-Bus and SBC) ####
#### BlueZ support (optional, dependent on FFmpeg, FDK-AAC, D-Bus and SBC) ####

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

## FDK-AAC ##
AS_IF([test "x$enable_bluez5" != "xno"],
[PKG_CHECK_MODULES(FDK_AAC, [ fdk-aac >= 0.1.5 ], HAVE_FDK_AAC=1, HAVE_FDK_AAC=0)],
HAVE_FDK_AAC=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)],
Expand All @@ -1079,10 +1085,10 @@ AS_IF([test "x$enable_bluez5" != "xno"],
HAVE_FF_AVUTIL=0)

## BlueZ 5 ##
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,
AS_IF([test "x$enable_bluez5" != "xno" && test "x$HAVE_DBUS" = "x1" && test "x$HAVE_SBC" = "x1" && test "x$HAVE_FDK_AAC" = "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 FFmpeg, sbc and D-Bus)])])
[AC_MSG_ERROR([*** BLUEZ 5 support not found (requires FFmpeg, FDK-AAC, 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,6 +2118,7 @@ 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_aac.c \
modules/bluetooth/a2dp/a2dp_aptx.c \
modules/bluetooth/a2dp/a2dp_ldac.c \
modules/bluetooth/a2dp-api.h \
Expand All @@ -2135,8 +2136,8 @@ libbluez5_util_la_SOURCES += \
endif

libbluez5_util_la_LDFLAGS = -avoid-version
libbluez5_util_la_LIBADD = $(MODULE_LIBADD) $(SBC_LIBS) $(DBUS_LIBS)
libbluez5_util_la_CFLAGS = $(AM_CFLAGS) $(SBC_CFLAGS) $(DBUS_CFLAGS) $(FF_AVCODEC_CFLAGS) $(FF_AVUTIL_CFLAGS)
libbluez5_util_la_LIBADD = $(MODULE_LIBADD) $(SBC_LIBS) $(DBUS_LIBS) $(FDK_AAC_LIBS)
libbluez5_util_la_CFLAGS = $(AM_CFLAGS) $(SBC_CFLAGS) $(DBUS_CFLAGS) $(FF_AVCODEC_CFLAGS) $(FF_AVUTIL_CFLAGS) $(FDK_AAC_CFLAGS)

module_bluez5_discover_la_SOURCES = modules/bluetooth/module-bluez5-discover.c
module_bluez5_discover_la_LDFLAGS = $(MODULE_LDFLAGS)
Expand Down

0 comments on commit 006543f

Please sign in to comment.