-dnl ---------------------------------------------------------------------------
-dnl [CF_SYS_TIME_SELECT]
-AC_MSG_CHECKING(if sys/time.h conflicts with sys/select.h)
-AC_CACHE_VAL(cf_cv_sys_time_select,[
-AC_TRY_COMPILE([
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-],[],[cf_cv_sys_time_select=yes],
- [cf_cv_sys_time_select=no])
- ])
-AC_MSG_RESULT($cf_cv_sys_time_select)
-test $cf_cv_sys_time_select = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
+CF_NCURSES_EXT_FUNCS
+
+AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
+AC_TRY_LINK([
+#include <${cf_cv_ncurses_header:-curses.h}>],
+[
+ static wchar_t src_wchar[2];
+ static cchar_t dst_cchar;
+ setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
+ ],
+ [cf_cv_widechar_funcs=yes],
+ [cf_cv_widechar_funcs=no])
+])
+if test "$cf_cv_widechar_funcs" != no ; then
+ AC_DEFINE(USE_WIDEC_SUPPORT,1)
+else
+ AC_DEFINE(USE_WIDEC_SUPPORT,0)
+fi
+
+AC_FUNC_VFORK
+CF_SYS_TIME_SELECT
+CF_FUNC_CURSES_VERSION
+CF_CURSES_ACS_MAP
+CF_CURSES_WACS_MAP
+CF_CURSES_WACS_SYMBOLS
+
+CF_CURSES_CHECK_TYPE(attr_t,long)
+
+CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T, NCURSES_OK_MBSTATE_T)
+CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T)
+CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T)
+
+if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(mbstate_t,long)
+fi
+
+if test "$NCURSES_OK_WCHAR_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(wchar_t,long)
+fi
+
+if test "$NCURSES_OK_WINT_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(wint_t,long)
+fi
+
+CF_CURSES_CHECK_DATA(boolnames)
+CF_CURSES_CHECK_DATA(boolfnames)
+
+TEST_ARGS="$LIBS"
+LIBS=
+