[46/49,v2] package/asterisk: add optional iconv support

Message ID 472b9073cf5c4c6873d84b01f6c570a07ea0a0a3.1504993178.git.yann.morin.1998@free.fr
State Changes Requested
Headers show
Series
  • [01/49,v2] package/asterisk: new package
Related show

Commit Message

Yann E. MORIN Sept. 9, 2017, 9:39 p.m.
iconv support is available if iether the toolchain has iconv built-in
(glibc, musl, or uclibc-with-iconv) or if the libiconv package is
enabled. Both are exclusive one to the other, so we need only test one.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/asterisk/asterisk.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Patch

diff --git a/package/asterisk/asterisk.mk b/package/asterisk/asterisk.mk
index cd3325ce9e..cd8bf9fab6 100644
--- a/package/asterisk/asterisk.mk
+++ b/package/asterisk/asterisk.mk
@@ -47,7 +47,6 @@  ASTERISK_CONF_OPTS = \
 	--without-gmime \
 	--without-h323 \
 	--without-hoard \
-	--without-iconv \
 	--without-iksemel \
 	--without-imap \
 	--without-inotify \
@@ -149,6 +148,13 @@  else
 ASTERISK_CONF_OPTS += --without-ilbc
 endif
 
+ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y)
+ASTERISK_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
+ASTERISK_CONF_OPTS += --with-iconv
+else
+ASTERISK_CONF_OPTS += --without-iconv
+endif
+
 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
 ASTERISK_DEPENDENCIES += openldap
 ASTERISK_CONF_OPTS += --without-ldap