1
From e572a26d29ddff883880ef7b1c295acaa62a8a2f Mon Sep 17 00:00:00 2001
2
From: wm4 <wm4@nowhere>
3
Date: Tue, 13 Oct 2015 22:18:30 +0200
4
Subject: [PATCH] configure: include -liconv if that is found
7
configure.ac | 9 +++++++--
8
1 file changed, 7 insertions(+), 2 deletions(-)
10
diff --git a/configure.ac b/configure.ac
11
index d6fbe34..6bd96b6 100644
14
@@ -22,8 +22,9 @@ AC_CHECK_HEADERS([stdint.h iconv.h])
15
AC_CHECK_FUNCS([strdup strndup])
17
# Checks for libraries.
18
-AC_SEARCH_LIBS([libiconv_open], [iconv], AC_DEFINE(CONFIG_ICONV, 1, [use iconv]))
19
-AC_SEARCH_LIBS([iconv_open], [iconv], AC_DEFINE(CONFIG_ICONV, 1, [use iconv]))
21
+AC_SEARCH_LIBS([libiconv_open], [iconv], use_libiconv=true)
22
+AC_SEARCH_LIBS([iconv_open], [iconv], use_libiconv=true)
23
AC_CHECK_LIB([m], [fabs])
25
# Check for libraries via pkg-config
26
@@ -220,6 +221,10 @@ AM_CONDITIONAL([ENABLE_PROFILE], [test x$enable_profile = xyes])
28
# add libraries/packages to pkg-config for static linking
30
+if test "$use_libiconv" = true; then
31
+ AC_DEFINE(CONFIG_ICONV, 1, [use iconv])
32
+ pkg_libs="${pkg_libs} -liconv"
34
pkg_requires="freetype2 >= 9.10.3"
35
pkg_requires="fribidi >= 0.19.0, ${pkg_requires}"
36
if test x$fontconfig = xtrue; then