+fi
+
+if test "$NCURSES_OK_WCHAR_T" = 0 ; then
+
+echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
+echo "configure:8672: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8674 "configure"
+#include "confdefs.h"
+
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+#include <${cf_cv_ncurses_header-curses.h}>
+int main() {
+
+wchar_t foo
+
+; return 0; }
+EOF
+if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+echo "$ac_t""$cf_result" 1>&6
+if test $cf_result = yes ; then
+
+cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+else
+ cat >> confdefs.h <<EOF
+#define wchar_t long
+EOF
+
+fi
+
+fi
+
+if test "$NCURSES_OK_WINT_T" = 0 ; then
+
+echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
+echo "configure:8718: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8720 "configure"
+#include "confdefs.h"
+
+#ifndef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED
+#endif
+#include <${cf_cv_ncurses_header-curses.h}>
+int main() {
+
+wint_t foo
+
+; return 0; }
+EOF
+if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+echo "$ac_t""$cf_result" 1>&6
+if test $cf_result = yes ; then
+
+cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+else
+ cat >> confdefs.h <<EOF
+#define wint_t long
+EOF
+
+fi
+
+fi
+
+
+echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
+echo "configure:8763: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8765 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+int main() {
+
+void *foo = &(boolnames)
+
+; return 0; }
+EOF
+if { (eval echo configure:8788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+echo "$ac_t""$cf_result" 1>&6
+if test $cf_result = yes ; then
+
+cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+else
+ echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
+echo "configure:8809: checking for data boolnames in library" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 8811 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+extern char boolnames;
+int main() {
+
+ do {
+ void *foo = &(boolnames);
+ ${cf_cv_main_return-return}(foo == 0);
+ } while (0)
+
+; return 0; }
+EOF
+if { (eval echo configure:8838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+ echo "$ac_t""$cf_result" 1>&6
+ if test $cf_result = yes ; then
+
+cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+ fi
+fi
+
+
+echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
+echo "configure:8862: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8864 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+int main() {
+
+void *foo = &(boolfnames)
+
+; return 0; }
+EOF
+if { (eval echo configure:8887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+echo "$ac_t""$cf_result" 1>&6
+if test $cf_result = yes ; then
+
+cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+else
+ echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
+echo "configure:8908: checking for data boolfnames in library" >&5
+ cat > conftest.$ac_ext <<EOF
+#line 8910 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+extern char boolfnames;
+int main() {
+
+ do {
+ void *foo = &(boolfnames);
+ ${cf_cv_main_return-return}(foo == 0);
+ } while (0)
+
+; return 0; }
+EOF
+if { (eval echo configure:8937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ cf_result=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ cf_result=no
+fi
+rm -f conftest*
+ echo "$ac_t""$cf_result" 1>&6
+ if test $cf_result = yes ; then
+
+cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >> confdefs.h <<EOF
+#define $cf_result 1
+EOF
+
+ fi
+fi
+