+CF_MAN_PAGES([ captoinfo clear infocmp infotocap tic toe tput ])
+
+###############################################################################
+CF_HELP_MESSAGE(Extensions:)
+
+### Note that some functions (such as const) are normally disabled anyway.
+AC_MSG_CHECKING(if you want to build with function extensions)
+AC_ARG_ENABLE(ext-funcs,
+ [ --disable-ext-funcs disable function-extensions],
+ [with_ext_funcs=$enableval],
+ [with_ext_funcs=yes])
+AC_MSG_RESULT($with_ext_funcs)
+if test "$with_ext_funcs" = yes ; then
+ NCURSES_EXT_FUNCS=1
+ AC_DEFINE(HAVE_CURSES_VERSION)
+ AC_DEFINE(HAVE_HAS_KEY)
+ AC_DEFINE(HAVE_RESIZETERM)
+ AC_DEFINE(HAVE_RESIZE_TERM)
+ AC_DEFINE(HAVE_USE_DEFAULT_COLORS)
+ AC_DEFINE(HAVE_WRESIZE)
+ AC_DEFINE(NCURSES_EXT_FUNCS)
+else
+ NCURSES_EXT_FUNCS=0
+fi
+AC_SUBST(NCURSES_EXT_FUNCS)
+
+### use option --enable-const to turn on use of const beyond that in XSI.
+AC_MSG_CHECKING(for extended use of const keyword)
+AC_ARG_ENABLE(const,
+ [ --enable-const compile with extra/non-standard const],
+ [with_ext_const=$enableval],
+ [with_ext_const=no])
+AC_MSG_RESULT($with_ext_const)
+NCURSES_CONST='/*nothing*/'
+if test "$with_ext_const" = yes ; then
+ NCURSES_CONST=const
+fi
+AC_SUBST(NCURSES_CONST)
+
+### use option --enable-ext-colors to turn on use of colors beyond 16.
+AC_MSG_CHECKING(if you want to use extended colors)
+AC_ARG_ENABLE(ext-colors,
+ [ --enable-ext-colors compile for 256-color support],
+ [with_ext_colors=$enableval],
+ [with_ext_colors=no])
+AC_MSG_RESULT($with_ext_colors)
+NCURSES_EXT_COLORS=0
+if test "$with_ext_colors" = yes ; then
+ if test "$with_widec" != yes ; then
+ AC_MSG_ERROR(This option applies only to wide-character library)
+ else
+ # cannot be ABI 5 since it changes sizeof(cchar_t)
+ CF_NCURSES_ABI_6
+ fi
+ NCURSES_EXT_COLORS=1
+ AC_DEFINE(NCURSES_EXT_COLORS)
+fi
+AC_SUBST(NCURSES_EXT_COLORS)
+
+### use option --enable-ext-mouse to modify coding to support 5-button mice
+AC_MSG_CHECKING(if you want to use extended mouse encoding)
+AC_ARG_ENABLE(ext-mouse,
+ [ --enable-ext-mouse compile for extended mouse-encoding],
+ [with_ext_mouse=$enableval],
+ [with_ext_mouse=no])
+AC_MSG_RESULT($with_ext_mouse)
+NCURSES_MOUSE_VERSION=1
+if test "$with_ext_mouse" = yes ; then
+ NCURSES_MOUSE_VERSION=2
+ CF_NCURSES_ABI_6
+fi
+AC_SUBST(NCURSES_MOUSE_VERSION)
+
+AC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code)
+AC_ARG_ENABLE(no-padding,
+ [ --enable-no-padding compile with $NCURSES_NO_PADDING code],
+ [with_no_padding=$enableval],
+ [with_no_padding=$with_ext_funcs])
+AC_MSG_RESULT($with_no_padding)
+test "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING)
+
+AC_CHECK_SIZEOF([signed char], 0)
+if test "$ac_cv_sizeof_signed_char" = 1 ; then
+ NCURSES_SBOOL="signed char"
+else
+ NCURSES_SBOOL="char"
+fi
+AC_MSG_CHECKING(if you want to use signed Boolean array in term.h)
+AC_ARG_ENABLE(signed-char,
+ [ --enable-signed-char compile using signed Boolean's in term.h],
+ [with_signed_char=$enableval],
+ [with_signed_char=no])
+AC_MSG_RESULT($with_signed_char)
+test "$with_signed_char" != yes && NCURSES_SBOOL="char"
+AC_SUBST(NCURSES_SBOOL)
+
+### use option --enable-sigwinch to turn on use of SIGWINCH logic
+AC_MSG_CHECKING(if you want SIGWINCH handler)
+AC_ARG_ENABLE(sigwinch,
+ [ --enable-sigwinch compile with SIGWINCH handler],
+ [with_sigwinch=$enableval],
+ [with_sigwinch=$with_ext_funcs])
+AC_MSG_RESULT($with_sigwinch)
+test "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH)
+
+### use option --enable-tcap-names to allow user to define new capabilities
+AC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap)
+AC_ARG_ENABLE(tcap-names,
+ [ --enable-tcap-names compile with user-definable terminal capabilities],
+ [with_tcap_names=$enableval],
+ [with_tcap_names=$with_ext_funcs])
+AC_MSG_RESULT($with_tcap_names)
+NCURSES_XNAMES=0
+test "$with_tcap_names" = yes && NCURSES_XNAMES=1
+AC_SUBST(NCURSES_XNAMES)
+
+###############################################################################
+# These options are relatively safe to experiment with.
+CF_HELP_MESSAGE(Development Code:)
+AC_MSG_CHECKING(if you want all development code)