asterisk-chan-dongle: remove iconv hack

Remove the hack for iconv on uclibc. Instead include nls.mk which will
sort out the iconv depends.

This changes the iconv patch. AC_SEARCH_LIB doesn't work properly for
openwrt/lede. Instead use AC_CHECK_LIB.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2018-07-18 22:07:48 +02:00
parent c479fe35e4
commit d5f36f5394
2 changed files with 15 additions and 9 deletions

View file

@ -29,13 +29,15 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSI
MODULES_DIR:=/usr/lib/asterisk/modules MODULES_DIR:=/usr/lib/asterisk/modules
include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/package.mk
# asterisk-chan-dongle needs iconv
include $(INCLUDE_DIR)/nls.mk
define Package/asterisk-chan-dongle/Default define Package/asterisk-chan-dongle/Default
SUBMENU:=Telephony SUBMENU:=Telephony
SECTION:=net SECTION:=net
CATEGORY:=Network CATEGORY:=Network
URL:=https://github.com/wdoekes/asterisk-chan-dongle URL:=https://github.com/wdoekes/asterisk-chan-dongle
DEPENDS:=+USE_UCLIBC:libiconv-full +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch DEPENDS:=$(ICONV_DEPENDS) +kmod-usb-acm +kmod-usb-serial +kmod-usb-serial-option +libusb-1.0 +usb-modeswitch
TITLE:=Huawei UMTS 3G dongle support TITLE:=Huawei UMTS 3G dongle support
endef endef
@ -78,13 +80,7 @@ TARGET_CFLAGS+= \
MAKE_FLAGS+=LD="$(TARGET_CC)" MAKE_FLAGS+=LD="$(TARGET_CC)"
# musl and glibc include their own iconv, but uclibc does not
TARGET_CPPFLAGS+=$(if $(CONFIG_USE_UCLIBC),-I$(STAGING_DIR)/usr/lib/libiconv-full/include)
TARGET_LDFLAGS+=$(if $(CONFIG_USE_UCLIBC),-L$(STAGING_DIR)/usr/lib/libiconv-full/lib -liconv)
# $CHAN_DONGLE_ICONV_INC used by 200-fix-iconv-detection.patch
CONFIGURE_VARS += \ CONFIGURE_VARS += \
CHAN_DONGLE_ICONV_INC="$(TOOLCHAIN_DIR)/include $(STAGING_DIR)/usr/lib/libiconv-full/include" \
DESTDIR="$(MODULES_DIR)" \ DESTDIR="$(MODULES_DIR)" \
ac_cv_type_size_t=yes \ ac_cv_type_size_t=yes \
ac_cv_type_ssize_t=yes ac_cv_type_ssize_t=yes

View file

@ -1,11 +1,21 @@
--- a/configure.ac --- a/configure.ac
+++ b/configure.ac +++ b/configure.ac
@@ -102,7 +102,7 @@ AC_DEFUN([AC_HEADER_FIND], [ @@ -77,7 +77,8 @@ fi
dnl Checks for libraries.
dnl AC_CHECK_LIB([pthread], [pthread_create])
dnl AC_CHECK_LIB([iconv], [iconv])
-AC_SEARCH_LIBS([iconv], [c iconv])
+dnl AC_SEARCH_LIBS([iconv], [c iconv])
+AC_CHECK_LIB([iconv], [libiconv])
dnl Checks for header files.
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h sys/time.h termios.h])
@@ -102,7 +103,7 @@ AC_DEFUN([AC_HEADER_FIND], [
) )
AC_HEADER_FIND([asterisk.h], $with_asterisk) AC_HEADER_FIND([asterisk.h], $with_asterisk)
-AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include) -AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include)
+AC_HEADER_FIND([iconv.h], ${CHAN_DONGLE_ICONV_INC}) +dnl AC_HEADER_FIND([iconv.h], /usr/include /usr/local/include /opt/local/include)
AC_DEFINE([ICONV_CONST],[], [Define to const if you has iconv() const declaration of input buffer]) AC_DEFINE([ICONV_CONST],[], [Define to const if you has iconv() const declaration of input buffer])
AC_MSG_CHECKING([for iconv use const inbuf]) AC_MSG_CHECKING([for iconv use const inbuf])