[v4,4/7] libpjsip: enable gsm codec

Message ID 20180312092953.24258-4-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   | 8 ++++++++
 package/libpjsip/libpjsip.mk | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

Patch

diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in
index 123eceae06..45b05cf2b2 100644
--- a/package/libpjsip/Config.in
+++ b/package/libpjsip/Config.in
@@ -41,6 +41,14 @@  config BR2_PACKAGE_LIBPJSIP_CODEC_BCG729
 	bool "BCG729"
 	select BR2_PACKAGE_BCG729
 
+config BR2_PACKAGE_LIBPJSIP_CODEC_GSM
+	bool "GSM"
+	depends on !BR2_STATIC_LIBS # libgsm
+	select BR2_PACKAGE_LIBGSM
+
+comment "GSM codec needs a toolchain w/ shared libraries"
+	depends on BR2_STATIC_LIBS
+
 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 67c8ad0dfd..64cdb08d01 100644
--- a/package/libpjsip/libpjsip.mk
+++ b/package/libpjsip/libpjsip.mk
@@ -25,7 +25,6 @@  LIBPJSIP_CONF_ENV = \
 	CFLAGS="$(LIBPJSIP_CFLAGS)"
 
 LIBPJSIP_CONF_OPTS = \
-	--disable-gsm-codec \
 	--disable-speex-codec \
 	--disable-speex-aec \
 	--disable-resample \
@@ -103,4 +102,11 @@  else
 LIBPJSIP_CONF_OPTS += --disable-bcg729
 endif
 
+ifeq ($(BR2_PACKAGE_LIBPJSIP_CODEC_GSM),y)
+LIBPJSIP_DEPENDENCIES += libgsm
+LIBPJSIP_CONF_OPTS += --with-external-gsm
+else
+LIBPJSIP_CONF_OPTS += --disable-gsm-codec
+endif
+
 $(eval $(autotools-package))