[v4,5/7] libpjsip: enable opencore-amr codec

Message ID 20180312092953.24258-5-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 | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

Patch

diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
index 45b05cf2b2..a7bbd866ea 100644
--- a/package/libpjsip/Config.in
+++ b/package/libpjsip/Config.in
@@ -49,6 +49,10 @@  config BR2_PACKAGE_LIBPJSIP_CODEC_GSM
 comment "GSM codec needs a toolchain w/ shared libraries"
 	depends on BR2_STATIC_LIBS
 
+config BR2_PACKAGE_LIBPJSIP_CODEC_OPENCORE_AMR
+	bool "Opencore-amr"
+	select BR2_PACKAGE_OPENCORE_AMR
+
 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 64cdb08d01..2ea0da3f77 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -29,7 +29,6 @@  LIBPJSIP_CONF_OPTS = \
 	--disable-speex-aec \
 	--disable-resample \
 	--disable-video \
-	--disable-opencore-amr \
 	--disable-libwebrtc \
 	--disable-opus \
 	--disable-oss \
@@ -109,4 +108,11 @@  else
 LIBPJSIP_CONF_OPTS += --disable-gsm-codec
 endif
 
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_OPENCORE_AMR),y)
+LIBPJSIP_DEPENDENCIES += opencore-amr
+LIBPJSIP_CONF_OPTS += --with-opencore-amr
+else
+LIBPJSIP_CONF_OPTS += --disable-opencore-amr
+endif
+
 $(eval $(autotools-package))