[v4,7/7] libpjsip: enable speex codec

Message ID 20180312092953.24258-7-aduskett@gmail.com
State Changes Requested
Headers show
Series
  • [v4,1/7] libpjsip: Add Alsa option
Related show

Commit Message

Adam Duskett March 12, 2018, 9:29 a.m.
Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
Changes v1 -> v4:
  - Add each codec with a dependency as a seperate patch.

 package/libpjsip/Config.in   | 4 ++++
 package/libpjsip/libpjsip.mk | 9 +++++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

Patch

diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
index 028339f319..3687d51824 100644
--- a/package/libpjsip/Config.in
+++ b/package/libpjsip/Config.in
@@ -57,6 +57,10 @@  config BR2_PACKAGE_LIBPJSIP_CODEC_OPUS
 	bool "Opus"
 	select BR2_PACKAGE_OPUS
 
+config BR2_PACKAGE_LIBPJSIP_CODEC_SPEEX
+	bool "Speex"
+	select BR2_PACKAGE_SPEEX
+
 endif #BR2_PACKAGE_LIBPJSIP
 
 comment "libpjsip needs a toolchain w/ C++, threads"
diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk
index 943a99bc5a..e4b859257b 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -25,8 +25,6 @@  LIBPJSIP_CONF_ENV = \
 	CFLAGS="$(LIBPJSIP_CFLAGS)"
 
 LIBPJSIP_CONF_OPTS = \
-	--disable-speex-codec \
-	--disable-speex-aec \
 	--disable-resample \
 	--disable-video \
 	--disable-libwebrtc \
@@ -120,4 +118,11 @@  else
 LIBPJSIP_CONF_OPTS += --disable-opus
 endif
 
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_SPEEX),y)
+LIBPJSIP_DEPENDENCIES += speex
+LIBPJSIP_CONF_OPTS += --with-external-speex
+else
+LIBPJSIP_CONF_OPTS += --disable-speex-codec --disable-speex-aec
+endif
+
 $(eval $(autotools-package))