sharedir=$mutt_cv_sharedir
AC_SUBST(sharedir)
-AC_ARG_WITH(iconv, [ --with-iconv Use system's iconv], [
+LIBICONV=
+LIBICONVDEPS=
+need_iconv=no
+AC_ARG_WITH(included-iconv,
+ [ --with-included-iconv Use the iconv implementation included here],
+ need_iconv=yes,
AC_CACHE_CHECK(for iconv, mutt_cv_func_iconv,
[ mutt_cv_func_iconv=no
mutt_cv_lib_iconv=no
fi
])
if test "$mutt_cv_func_iconv" = no; then
- AC_MSG_ERROR(No iconv)
+ need_iconv=yes
fi
- LIBICONV=
if test "$mutt_cv_lib_iconv" = yes; then
LIBICONV="-liconv"
fi
- need_iconv=no
-],
-[ LIBICONV="-Liconv -liconv"
+)
+
+if test "$need_iconv" = yes ; then
+ LIBICONV="-Liconv -liconv"
LIBICONVDEPS="\$(top_srcdir)/iconv/iconv.h iconv/libiconv.a"
- need_iconv=yes
-])
+fi
+
AM_CONDITIONAL(BUILD_ICONV, test "$need_iconv" = yes)
AC_SUBST(LIBICONV)
AC_SUBST(LIBICONVDEPS)
int wctomb (char *s, wchar_t wc)
{
+ if (!s)
+ return 0;
if (Charset_is_utf8)
return mutt_wctoutf8 (s, wc);
else if (wc < 0x100)
{
- if (s)
- *s = wc;
+ *s = wc;
return 1;
}
else