summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2013-07-29 09:52:43 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2013-07-29 09:52:55 +0200
commit85fd7b0e72e30f7bc415a1082761771afd2dd62d (patch)
tree0c7b15a07899296107f3fbb810bd260826dd2d40
parent68c4fb586b94fa05b522acec944cc94043f213e3 (diff)
downloadgnutls-85fd7b0e72e30f7bc415a1082761771afd2dd62d.tar.gz
link with libiconv when needed.
-rw-r--r--configure.ac6
-rw-r--r--lib/Makefile.am3
-rw-r--r--lib/system.c2
3 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1de4474fd6..613e32ed6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -219,6 +219,11 @@ fi
if test "$ac_cv_func_iconv" != "yes";then
AC_LIB_HAVE_LINKFLAGS(iconv,, [#include <iconv.h>], [iconv (0, 0, 0, 0, 0);])
+ if test "$HAVE_LIBICONV" = "yes";then
+ ac_have_unicode=yes
+ fi
+else
+ ac_have_unicode=yes
fi
AC_MSG_CHECKING([whether to build libdane])
@@ -671,6 +676,7 @@ if features are disabled)
Anon auth support: $ac_enable_anon
Heartbeat support: $ac_enable_heartbeat
RSA-EXPORT compat: $ac_enable_rsa_export
+ Unicode support: $ac_have_unicode
])
AC_MSG_NOTICE([Optional applications:
diff --git a/lib/Makefile.am b/lib/Makefile.am
index d6f36f4b2c..9bfb68033d 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -120,7 +120,8 @@ libgnutls_la_LIBADD = ../gl/libgnu.la x509/libgnutls_x509.la \
auth/libgnutls_auth.la algorithms/libgnutls_alg.la \
extras/libgnutls_extras.la
thirdparty_libadd = $(LTLIBZ) $(LTLIBINTL) $(LIBSOCKET) $(LIBRT) \
- $(LTLIBPTHREAD) $(LTLIBICONV) $(P11_KIT_LIBS) $(LIB_SELECT) $(TSS_LIBS)
+ $(LTLIBPTHREAD) $(LTLIBICONV) $(P11_KIT_LIBS) $(LIB_SELECT) $(TSS_LIBS) \
+ $(LTLIBICONV)
if ENABLE_OPENPGP
libgnutls_la_LIBADD += openpgp/libgnutls_openpgp.la
diff --git a/lib/system.c b/lib/system.c
index 42eb156c92..6dc604e404 100644
--- a/lib/system.c
+++ b/lib/system.c
@@ -577,7 +577,7 @@ gnutls_x509_trust_list_add_system_trust(gnutls_x509_trust_list_t list,
return add_system_trust(list, tl_flags, tl_vflags);
}
-#if defined(HAVE_ICONV)
+#if defined(HAVE_ICONV) || defined(HAVE_LIBICONV)
# include <iconv.h>