From: Jaroslav Kysela Date: Tue, 27 May 2014 13:35:27 +0000 (+0200) Subject: Try to autodetect the libiconv X-Git-Tag: v4.1~2037 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b75ff7e55d2d9f03f048e341c3fcff43f5a0a57;p=thirdparty%2Ftvheadend.git Try to autodetect the libiconv --- diff --git a/Makefile b/Makefile index bb3cb8d81..e86ee9c2e 100644 --- a/Makefile +++ b/Makefile @@ -33,10 +33,11 @@ CFLAGS += -g -funsigned-char -O2 CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR} LDFLAGS += -ldl -lpthread -lm +ifeq ($(LIBICONV),yes) +LDFLAGS += -liconv +endif ifneq ($(PLATFORM), darwin) LDFLAGS += -lrt -else -LDFLAGS += -liconv endif ifeq ($(COMPILER), clang) diff --git a/configure b/configure index 0fbe95d08..0072a53d5 100755 --- a/configure +++ b/configure @@ -134,6 +134,16 @@ int test(void) return 0; } ' + +check_cc_snippet libiconv ' +#include +int test(void) +{ + iconv_t ic = iconv_open("ASCII", "ASCII"); + return 0; +} +' -liconv + # # Python #