+### 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)
+