dnl Check for headers
dnl ------------------------------------------------------------------------
-dnl defines HAVE_STDLIB_H
-AC_CHECK_HEADERS(stdlib.h)
-dnl defines HAVE_MALLOC_H
-AC_CHECK_HEADERS(malloc.h)
-dnl defines HAVE_UNISTD_H
-AC_CHECK_HEADERS(unistd.h)
-dnl defines HAVE_WCHAR_H
-AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(stdlib.h fnmatch.h langinfo.h malloc.h unistd.h wchar.h)
dnl maybe wchar_t is in wcstr.h if we don't have wchar.h?
if test "$ac_cv_header_wchar_h" != "yes"; then
- dnl defines HAVE_WCSTR_H
AC_CHECK_HEADERS(wcstr.h)
fi
-dnl defines HAVE_FNMATCH_H
-AC_CHECK_HEADERS(fnmatch.h)
-
-dnl defines HAVE_LANGINFO_H (GNU libc locale parameters)
-AC_CHECK_HEADERS(langinfo.h)
-
case "${host}" in
*-pc-os2_emx | *-pc-os2-emx )
dnl Explicitly link -lintl if langinfo.h is available
fi
fi
- WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf)
+ dnl also look if we have wide char IO functions, notice that [f]putws are
+ dnl declared in special widec.h under Solaris
+ wchar_headers="#include <stdio.h>
+#include <wchar.h>"
+ case "${host}" in
+ *-*-solaris2* )
+ AC_CHECK_HEADERS(widec.h)
+ if test "$ac_cv_header_widec_h" = "yes"; then
+ wchar_headers="$wchar_headers
+#include <widec.h>"
+ fi
+ esac
+
+ WX_CHECK_FUNCS(wputc wputchar putws fputws wprintf vswprintf,,,
+ [$wchar_headers])
dnl MinGW has a vswprintf with a different prototype, and
dnl a _vsnwprintf with the correct prototype, but AC_CHECK_FUNCS