From 3327be471d9406447524e9f4f9de86c3d111ec5d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Mon, 14 Jan 2008 00:47:31 +0000 Subject: [PATCH] * if we can't find iconv in the libc, try to find it in a separate library (like for *bsd) --- webcit/configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/webcit/configure.ac b/webcit/configure.ac index da9ebee75..578be2dee 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -318,6 +318,26 @@ if test "$ok_nls" != "no"; then ) fi +if test "$ok_iconv" = "no"; then + LD_FLAGS_BEFORE=$LDFLAGS + LDFLAGS="$LDFLAGS -liconv" + AC_TRY_RUN([ + #include + main() { + iconv_t ic = (iconv_t)(-1) ; + ic = iconv_open("UTF-8", "us-ascii"); + iconv_close(ic); + exit(0); + } + ], + ok_iconv=yes, + ok_iconv=no + ) + if test "$ok_iconv" != "no"; then + LDFLAGS=$LD_FLAGS_BEFORE + fi +fi + if test "$ok_iconv" != "no"; then AC_MSG_RESULT(WebCit will be built with character set conversion.) AC_DEFINE(HAVE_ICONV,[],[whether we have iconv for charset conversion]) -- 2.30.2