From: Wilfried Göesgens Date: Mon, 14 Jan 2008 00:47:31 +0000 (+0000) Subject: * if we can't find iconv in the libc, try to find it in a separate library (like... X-Git-Tag: v7.86~2604 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=3327be471d9406447524e9f4f9de86c3d111ec5d;p=citadel.git * if we can't find iconv in the libc, try to find it in a separate library (like for *bsd) --- 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])