]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Try to autodetect the libiconv
authorJaroslav Kysela <perex@perex.cz>
Tue, 27 May 2014 13:35:27 +0000 (15:35 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 27 May 2014 13:36:44 +0000 (15:36 +0200)
Makefile
configure

index bb3cb8d812899c38a4e23fa28b020b86f7e5f68b..e86ee9c2e96633cfd49e168e8f129ad6d96ff6d2 100644 (file)
--- 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)
index 0fbe95d08a262453a4c8929fd9be5d2a81c8e1c1..0072a53d5a51de7fdbff3ceb439045eb554cd4d8 100755 (executable)
--- a/configure
+++ b/configure
@@ -134,6 +134,16 @@ int test(void)
   return 0;
 }
 '
+
+check_cc_snippet libiconv '
+#include <iconv.h>
+int test(void)
+{
+  iconv_t ic = iconv_open("ASCII", "ASCII");
+  return 0;
+}
+' -liconv
+
 #
 # Python
 #