+
+ # Compile in iconv support?
+ # We only check for it when IRC+ is enabled, because the IRC+ command
+ # CHARCONV is the only function depending on it.
+ x_iconv_on=no
+ AC_ARG_WITH(iconv,
+ [ --with-iconv enable character conversation using libiconv],
+ [ if test "$withval" != "no"; then
+ if test "$withval" != "yes"; then
+ CFLAGS="-I$withval/include $CFLAGS"
+ CPPFLAGS="-I$withval/include $CPPFLAGS"
+ LDFLAGS="-L$withval/lib $LDFLAGS"
+ fi
+ AC_CHECK_LIB(iconv, iconv_open)
+ AC_CHECK_FUNCS(iconv_open, x_iconv_on=yes,
+ AC_MSG_ERROR([Can't enable libiconv support!])
+ )
+ fi
+ ]
+ )
+ if test "$x_iconv_on" = "yes"; then
+ AC_DEFINE(ICONV, 1)
+ fi