-### We need iconv for unicode support (Qt4 frontend requires it too)
-AM_ICONV
-if test "$am_cv_func_iconv" = no; then
- AC_MSG_ERROR([cannot find required library iconv.])
+# Taken from gettext, needed for libiconv
+AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+ [AC_TRY_COMPILE([#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+ HAVE_WCHAR_T=1