+dnl where to put the locale files
+AC_ARG_WITH(localedir,
+ [ --with-localedir directory to put the locale files to],
+ [ if test "x$withval" != "xno" ; then
+ localedir=$withval
+ fi
+ ]
+)
+AC_DEFINE_UNQUOTED(LOCALEDIR, "$localedir",[where to find our pot files])
+LOCALEDIR=$localedir
+AC_SUBST(LOCALEDIR)
+
+
+
+dnl Checks for the zlib compression library.
+if test "x$with_zlib" != xno ; then
+ AC_CHECK_HEADERS(zlib.h,
+ [AC_CHECK_LIB(z, zlibVersion,
+ [ok_zlib=yes],,
+ )])
+fi
+
+if test "x$ok_zlib" = xyes ; then
+ LDFLAGS="-lz $LDFLAGS"
+ AC_DEFINE(HAVE_ZLIB, [], [define this if you have zlib compression available])
+fi
+
+
+
+
+dnl Here is the check for a libc integrated iconv
+AC_ARG_ENABLE(iconv,
+ [ --disable-iconv do not use iconv charset conversion],
+ ok_iconv=no, ok_iconv=yes)
+
+AC_MSG_CHECKING(Checking to see if your system supports iconv)
+AC_TRY_RUN([
+ #include <iconv.h>
+ main() {
+ iconv_t ic = (iconv_t)(-1) ;
+ ic = iconv_open("UTF-8", "us-ascii");
+ iconv_close(ic);
+ exit(0);
+ }
+ ],
+ [
+ ok_iconv=yes
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ ok_iconv=no
+ AC_MSG_RESULT([no])
+ ]
+)
+
+dnl Check for iconv in external libiconv
+if test "$ok_iconv" = no; then
+ AC_MSG_CHECKING(Checking for an external libiconv)
+ OLD_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -liconv"
+ AC_TRY_RUN([
+ #include <iconv.h>
+ main() {
+ iconv_t ic = (iconv_t)(-1) ;
+ ic = iconv_open("UTF-8", "us-ascii");
+ iconv_close(ic);
+ }
+ ],
+ [
+ ok_iconv=yes
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ ok_iconv=no
+ LDFLAGS="$OLD_LDFLAGS"
+ AC_MSG_RESULT([no])
+ ]
+ )
+fi
+if test "$ok_iconv" != "no"; then
+ AC_MSG_RESULT(Citadel will be built with character set conversion.)
+ AC_DEFINE(HAVE_ICONV,[],[whether we have iconv for charset conversion])
+else
+ AC_MSG_RESULT(Citadel will be built without character set conversion.)
+fi
+
+AC_CHECK_LIB(intl, libintl_bindtextdomain, [LDFLAGS="$LDFLAGS -lintl"])
+