-AC_OUTPUT([Makefile doc/Makefile lib/Makefile \
-m4/Makefile po/Makefile.in \
-scripts/Makefile src/Makefile tests/Makefile tests/preset])
+# Iconv
+AM_ICONV
+AC_CHECK_HEADERS(iconv.h)
+AC_CHECK_TYPE(iconv_t,:,
+ AC_DEFINE(iconv_t, int,
+ [Conversion descriptor type]),
+ [
+#ifdef HAVE_ICONV_H
+# include <iconv.h>
+#endif
+])
+
+AC_OUTPUT([Makefile\
+ doc/Makefile\
+ lib/Makefile\
+ po/Makefile.in\
+ scripts/Makefile\
+ src/Makefile\
+ tests/Makefile\
+ tests/preset])