dnl CF_CURSES_CCHAR_T version: 4 updated: 2010/10/23 15:54:49
dnl -----------------
dnl Test if curses defines 'cchar_t' (usually a 'long' type for SysV curses).
AC_DEFUN([CF_CURSES_CCHAR_T],
[
AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
AC_CACHE_CHECK(for cchar_t typedef,cf_cv_cchar_t_decl,[
	AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
		[cchar_t foo],
		[cf_cv_cchar_t_decl=yes],
		[cf_cv_cchar_t_decl=no])])
if test $cf_cv_cchar_t_decl = yes ; then
	AC_DEFINE(HAVE_TYPE_CCHAR_T)
	AC_CACHE_CHECK(if cchar_t is scalar or struct,cf_cv_cchar_t_type,[
		AC_TRY_COMPILE([#include <${cf_cv_ncurses_header:-curses.h}>],
			[cchar_t foo; long x = foo],
			[cf_cv_cchar_t_type=scalar],
			[cf_cv_cchar_t_type=struct])])
	if test $cf_cv_cchar_t_type = scalar ; then
		AC_DEFINE(TYPE_CCHAR_T_IS_SCALAR)
	fi
fi
])dnl
