summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1583
1 files changed, 1582 insertions, 1 deletions
diff --git a/configure b/configure
index e8e25e3..92f768e 100755
--- a/configure
+++ b/configure
@@ -616,10 +616,47 @@ PACKAGE_BUGREPORT='lshprung@tutanota.com'
PACKAGE_URL=''
ac_unique_file="src/group.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stddef.h>
+#ifdef HAVE_STDIO_H
+# include <stdio.h>
+#endif
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_c_list=
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+CURSES_CFLAGS
+CURSES_LIBS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -711,6 +748,8 @@ ac_user_opts='
enable_option_checking
enable_silent_rules
enable_dependency_tracking
+with_ncurses
+with_ncursesw
enable_custom_bufsize
'
ac_precious_vars='build_alias
@@ -720,7 +759,12 @@ CC
CFLAGS
LDFLAGS
LIBS
-CPPFLAGS'
+CPPFLAGS
+CURSES_LIBS
+CURSES_CFLAGS
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR'
# Initialize some variables set by options.
@@ -1353,6 +1397,12 @@ Optional Features:
speeds up one-time build
--enable-custom-bufsize set buffer size (default is 1024)
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-ncurses force the use of Ncurses or NcursesW
+ --without-ncursesw do not use NcursesW (wide character support)
+
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
@@ -1361,6 +1411,14 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
+ CURSES_LIBS linker library for Curses, e.g. -lcurses
+ CURSES_CFLAGS
+ preprocessor flags for Curses, e.g. -I/usr/include/ncursesw
+ PKG_CONFIG path to pkg-config utility
+ PKG_CONFIG_PATH
+ directories to add to pkg-config's search path
+ PKG_CONFIG_LIBDIR
+ path overriding pkg-config's built-in search path
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1481,6 +1539,143 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+printf "%s\n" "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ test -x conftest$ac_exeext
+ }
+then :
+ ac_retval=0
+else $as_nop
+ printf "%s\n" "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main (void)
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+
+else $as_nop
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+printf %s "checking for $2... " >&6; }
+if eval test \${$3+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ eval "$3=yes"
+else $as_nop
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+printf "%s\n" "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
ac_configure_args_raw=
for ac_arg
do
@@ -2084,6 +2279,15 @@ main (int argc, char **argv)
}
"
+as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H"
+as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H"
+as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H"
+as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H"
+as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H"
+as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H"
+as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H"
+as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H"
+as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H"
# Auxiliary files required by this configure script.
ac_aux_files="compile missing install-sh"
@@ -4127,9 +4331,1386 @@ fi
# Checks for libraries.
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+printf "%s\n" "$PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+printf %s "checking for $ac_word... " >&6; }
+if test ${ac_cv_path_ac_pt_PKG_CONFIG+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ case $as_dir in #(((
+ '') as_dir=./ ;;
+ */) ;;
+ *) as_dir=$as_dir/ ;;
+ esac
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext"
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ else
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+
+
+
+
+# Check whether --with-ncurses was given.
+if test ${with_ncurses+y}
+then :
+ withval=$with_ncurses;
+else $as_nop
+ with_ncurses=check
+fi
+
+
+# Check whether --with-ncursesw was given.
+if test ${with_ncursesw+y}
+then :
+ withval=$with_ncursesw;
+else $as_nop
+ with_ncursesw=check
+fi
+
+
+ ax_saved_LIBS=$LIBS
+ ax_saved_CPPFLAGS=$CPPFLAGS
+
+ if test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes
+then :
+ ax_with_plaincurses=no
+else $as_nop
+ ax_with_plaincurses=check
+fi
+
+ ax_cv_curses_which=no
+
+ # Test for NcursesW
+ if test "x$CURSES_LIBS" = x && test "x$with_ncursesw" != xno
+then :
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncursesw via pkg-config" >&5
+printf %s "checking for ncursesw via pkg-config... " >&6; }
+
+
+
+ if test -n "$_ax_cv_ncursesw_libs"; then
+ pkg_cv__ax_cv_ncursesw_libs="$_ax_cv_ncursesw_libs"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv__ax_cv_ncursesw_libs=`$PKG_CONFIG --libs "ncursesw" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$_ax_cv_ncursesw_cppflags"; then
+ pkg_cv__ax_cv_ncursesw_cppflags="$_ax_cv_ncursesw_cppflags"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv__ax_cv_ncursesw_cppflags=`$PKG_CONFIG --cflags "ncursesw" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+ if test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ # No suitable .pc file found, have to find flags via fallback
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncursesw via fallback" >&5
+printf %s "checking for ncursesw via fallback... " >&6; }
+if test ${ax_cv_ncursesw+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ printf "%s\n"
+ pkg_cv__ax_cv_ncursesw_libs="-lncursesw"
+ pkg_cv__ax_cv_ncursesw_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS"
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
+ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncursesw_cppflags"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+printf %s "checking for initscr() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main (void)
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+printf %s "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char nodelay ();
+int
+main (void)
+{
+return nodelay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ ax_cv_ncursesw=yes
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ pkg_cv__ax_cv_ncursesw_libs="$pkg_cv__ax_cv_ncursesw_libs -ltinfow"
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+printf %s "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char nodelay ();
+int
+main (void)
+{
+return nodelay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ ax_cv_ncursesw=yes
+
+else $as_nop
+
+ ax_cv_ncursesw=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+else $as_nop
+
+ ax_cv_ncursesw=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncursesw" >&5
+printf "%s\n" "$ax_cv_ncursesw" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ # Found .pc file, using its information
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncursesw_libs"
+ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncursesw_cppflags"
+ ax_cv_ncursesw=yes
+
+fi
+
+
+ if test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes
+then :
+
+ as_fn_error $? "--with-ncursesw specified but could not find NcursesW library" "$LINENO" 5
+
+fi
+
+ if test "x$ax_cv_ncursesw" = xyes
+then :
+
+ ax_cv_curses=yes
+ ax_cv_curses_which=ncursesw
+ CURSES_LIBS="$pkg_cv__ax_cv_ncursesw_libs"
+ CURSES_CFLAGS="$pkg_cv__ax_cv_ncursesw_cppflags"
+
+printf "%s\n" "#define HAVE_NCURSESW 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ncursesw/curses.h" >&5
+printf %s "checking for working ncursesw/curses.h... " >&6; }
+if test ${ax_cv_header_ncursesw_curses_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncursesw/curses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ attr_t d = WA_NORMAL;
+ cchar_t e;
+ wint_t f;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+ wattr_set(stdscr, d, 0, NULL);
+ wget_wch(stdscr, &f);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_ncursesw_curses_h=yes
+else $as_nop
+ ax_cv_header_ncursesw_curses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_curses_h" >&5
+printf "%s\n" "$ax_cv_header_ncursesw_curses_h" >&6; }
+ if test "x$ax_cv_header_ncursesw_curses_h" = xyes
+then :
+
+ ax_cv_curses_enhanced=yes
+ ax_cv_curses_color=yes
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ncursesw.h" >&5
+printf %s "checking for working ncursesw.h... " >&6; }
+if test ${ax_cv_header_ncursesw_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncursesw.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ attr_t d = WA_NORMAL;
+ cchar_t e;
+ wint_t f;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+ wattr_set(stdscr, d, 0, NULL);
+ wget_wch(stdscr, &f);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_ncursesw_h=yes
+else $as_nop
+ ax_cv_header_ncursesw_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_h" >&5
+printf "%s\n" "$ax_cv_header_ncursesw_h" >&6; }
+ if test "x$ax_cv_header_ncursesw_h" = xyes
+then :
+
+ ax_cv_curses_enhanced=yes
+ ax_cv_curses_color=yes
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_NCURSESW_H 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
+printf %s "checking for working ncurses.h... " >&6; }
+if test ${ax_cv_header_ncurses_h_with_ncursesw+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncurses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ attr_t d = WA_NORMAL;
+ cchar_t e;
+ wint_t f;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+ wattr_set(stdscr, d, 0, NULL);
+ wget_wch(stdscr, &f);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_ncurses_h_with_ncursesw=yes
+else $as_nop
+ ax_cv_header_ncurses_h_with_ncursesw=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h_with_ncursesw" >&5
+printf "%s\n" "$ax_cv_header_ncurses_h_with_ncursesw" >&6; }
+ if test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes
+then :
+
+ ax_cv_curses_enhanced=yes
+ ax_cv_curses_color=yes
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
+
+
+fi
+
+ if test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&5
+printf "%s\n" "$as_me: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&2;}
+
+fi
+
+fi
+
+fi
+ unset pkg_cv__ax_cv_ncursesw_libs
+ unset pkg_cv__ax_cv_ncursesw_cppflags
+
+ # Test for Ncurses
+ if test "x$CURSES_LIBS" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno
+then :
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncurses via pkg-config" >&5
+printf %s "checking for ncurses via pkg-config... " >&6; }
+
+
+
+ if test -n "$_ax_cv_ncurses_libs"; then
+ pkg_cv__ax_cv_ncurses_libs="$_ax_cv_ncurses_libs"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv__ax_cv_ncurses_libs=`$PKG_CONFIG --libs "ncurses" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+ if test -n "$_ax_cv_ncurses_cppflags"; then
+ pkg_cv__ax_cv_ncurses_cppflags="$_ax_cv_ncurses_cppflags"
+ elif test -n "$PKG_CONFIG"; then
+ if test -n "$PKG_CONFIG" && \
+ { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
+ ac_status=$?
+ printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ pkg_cv__ax_cv_ncurses_cppflags=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
+else
+ pkg_failed=yes
+fi
+ else
+ pkg_failed=untried
+fi
+
+ if test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ # No suitable .pc file found, have to find flags via fallback
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncurses via fallback" >&5
+printf %s "checking for ncurses via fallback... " >&6; }
+if test ${ax_cv_ncurses+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ printf "%s\n"
+ pkg_cv__ax_cv_ncurses_libs="-lncurses"
+ pkg_cv__ax_cv_ncurses_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS"
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
+ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncurses_cppflags"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncurses_libs" >&5
+printf %s "checking for initscr() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main (void)
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
+printf %s "checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char nodelay ();
+int
+main (void)
+{
+return nodelay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ ax_cv_ncurses=yes
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+ pkg_cv__ax_cv_ncurses_libs="$pkg_cv__ax_cv_ncurses_libs -ltinfo"
+
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
+printf %s "checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char nodelay ();
+int
+main (void)
+{
+return nodelay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+
+ ax_cv_ncurses=yes
+
+else $as_nop
+
+ ax_cv_ncurses=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+else $as_nop
+
+ ax_cv_ncurses=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncurses" >&5
+printf "%s\n" "$ax_cv_ncurses" >&6; }
+
+else $as_nop
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; }
+ # Found .pc file, using its information
+ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_ncurses_libs"
+ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_ncurses_cppflags"
+ ax_cv_ncurses=yes
+
+fi
+
+
+ if test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes
+then :
+
+ as_fn_error $? "--with-ncurses specified but could not find Ncurses library" "$LINENO" 5
+
+fi
+
+ if test "x$ax_cv_ncurses" = xyes
+then :
+
+ ax_cv_curses=yes
+ ax_cv_curses_which=ncurses
+ CURSES_LIBS="$pkg_cv__ax_cv_ncurses_libs"
+ CURSES_CFLAGS="$pkg_cv__ax_cv_ncurses_cppflags"
+
+printf "%s\n" "#define HAVE_NCURSES 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ncurses/curses.h" >&5
+printf %s "checking for working ncurses/curses.h... " >&6; }
+if test ${ax_cv_header_ncurses_curses_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <ncurses/curses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_ncurses_curses_h=yes
+else $as_nop
+ ax_cv_header_ncurses_curses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_curses_h" >&5
+printf "%s\n" "$ax_cv_header_ncurses_curses_h" >&6; }
+ if test "x$ax_cv_header_ncurses_curses_h" = xyes
+then :
+
+ ax_cv_curses_color=yes
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_NCURSES_CURSES_H 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
+printf %s "checking for working ncurses.h... " >&6; }
+if test ${ax_cv_header_ncurses_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <ncurses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_ncurses_h=yes
+else $as_nop
+ ax_cv_header_ncurses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h" >&5
+printf "%s\n" "$ax_cv_header_ncurses_h" >&6; }
+ if test "x$ax_cv_header_ncurses_h" = xyes
+then :
+
+ ax_cv_curses_color=yes
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_NCURSES_H 1" >>confdefs.h
+
+
+fi
+
+ if test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&5
+printf "%s\n" "$as_me: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&2;}
+
+fi
+
+fi
+
+fi
+ unset pkg_cv__ax_cv_ncurses_libs
+ unset pkg_cv__ax_cv_ncurses_cppflags
+
+ # Test for plain Curses (or if CURSES_LIBS was set by user)
+ if test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno
+then :
+
+ if test "x$CURSES_LIBS" != x
+then :
+
+ LIBS="$ax_saved_LIBS $CURSES_LIBS"
+
+else $as_nop
+
+ LIBS="$ax_saved_LIBS -lcurses"
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Curses library" >&5
+printf %s "checking for Curses library... " >&6; }
+if test ${ax_cv_plaincurses+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+char initscr ();
+int
+main (void)
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_plaincurses=yes
+else $as_nop
+ ax_cv_plaincurses=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses" >&5
+printf "%s\n" "$ax_cv_plaincurses" >&6; }
+
+ if test "x$ax_cv_plaincurses" = xyes
+then :
+
+ ax_cv_curses=yes
+ ax_cv_curses_which=plaincurses
+ if test "x$CURSES_LIBS" = x
+then :
+
+ CURSES_LIBS="-lcurses"
+
+fi
+
+printf "%s\n" "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ # Check for base conformance (and header file)
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working curses.h" >&5
+printf %s "checking for working curses.h... " >&6; }
+if test ${ax_cv_header_curses_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <curses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ initscr();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_header_curses_h=yes
+else $as_nop
+ ax_cv_header_curses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_curses_h" >&5
+printf "%s\n" "$ax_cv_header_curses_h" >&6; }
+ if test "x$ax_cv_header_curses_h" = xyes
+then :
+
+
+printf "%s\n" "#define HAVE_CURSES_H 1" >>confdefs.h
+
+
+ # Check for X/Open Enhanced conformance
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for X/Open Enhanced Curses conformance" >&5
+printf %s "checking for X/Open Enhanced Curses conformance... " >&6; }
+if test ${ax_cv_plaincurses_enhanced+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <curses.h>
+ #ifndef _XOPEN_CURSES
+ #error "this Curses library is not enhanced"
+ "this Curses library is not enhanced"
+ #endif
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ attr_t d = WA_NORMAL;
+ cchar_t e;
+ wint_t f;
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+ wattr_set(stdscr, d, 0, NULL);
+ wget_wch(stdscr, &f);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_plaincurses_enhanced=yes
+else $as_nop
+ ax_cv_plaincurses_enhanced=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_enhanced" >&5
+printf "%s\n" "$ax_cv_plaincurses_enhanced" >&6; }
+ if test "x$ax_cv_plaincurses_enhanced" = xyes
+then :
+
+ ax_cv_curses_enhanced=yes
+ ax_cv_curses_color=yes
+
+printf "%s\n" "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+fi
+
+ # Check for color functions
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Curses color functions" >&5
+printf %s "checking for Curses color functions... " >&6; }
+if test ${ax_cv_plaincurses_color+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <curses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ chtype c = COLOR_PAIR(1) & A_COLOR;
+ initscr();
+ init_pair(1, COLOR_WHITE, COLOR_RED);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_plaincurses_color=yes
+else $as_nop
+ ax_cv_plaincurses_color=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_color" >&5
+printf "%s\n" "$ax_cv_plaincurses_color" >&6; }
+ if test "x$ax_cv_plaincurses_color" = xyes
+then :
+
+ ax_cv_curses_color=yes
+
+printf "%s\n" "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+fi
+
+ # Check for obsolete functions
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for obsolete Curses functions" >&5
+printf %s "checking for obsolete Curses functions... " >&6; }
+if test ${ax_cv_plaincurses_obsolete+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <curses.h>
+
+int
+main (void)
+{
+
+ chtype a = A_BOLD;
+ int b = KEY_LEFT;
+ int g = getattrs(stdscr);
+ int h = getcurx(stdscr) + getmaxx(stdscr);
+ initscr();
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"
+then :
+ ax_cv_plaincurses_obsolete=yes
+else $as_nop
+ ax_cv_plaincurses_obsolete=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_obsolete" >&5
+printf "%s\n" "$ax_cv_plaincurses_obsolete" >&6; }
+ if test "x$ax_cv_plaincurses_obsolete" = xyes
+then :
+
+ ax_cv_curses_obsolete=yes
+
+printf "%s\n" "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+fi
+
+fi
+
+ if test "x$ax_cv_header_curses_h" = xno
+then :
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working curses.h" >&5
+printf "%s\n" "$as_me: WARNING: could not find a working curses.h" >&2;}
+
+fi
+
+fi
+
+fi
+
+ if test "x$ax_cv_curses" != xyes
+then :
+ ax_cv_curses=no
+fi
+ if test "x$ax_cv_curses_enhanced" != xyes
+then :
+ ax_cv_curses_enhanced=no
+fi
+ if test "x$ax_cv_curses_color" != xyes
+then :
+ ax_cv_curses_color=no
+fi
+ if test "x$ax_cv_curses_obsolete" != xyes
+then :
+ ax_cv_curses_obsolete=no
+fi
+
+ LIBS=$ax_saved_LIBS
+ CPPFLAGS=$ax_saved_CPPFLAGS
+
+ unset ax_saved_LIBS
+ unset ax_saved_CPPFLAGS
+
+if test "x$ax_cv_curses" != xyes; then
+ as_fn_error $? "requires an X/Open-compatible Curses library" "$LINENO" 5
+fi
+
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
+ac_header= ac_cache=
+for ac_item in $ac_header_c_list
+do
+ if test $ac_cache; then
+ ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default"
+ if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then
+ printf "%s\n" "#define $ac_item 1" >> confdefs.h
+ fi
+ ac_header= ac_cache=
+ elif test $ac_header; then
+ ac_cache=$ac_item
+ else
+ ac_header=$ac_item
+ fi
+done
+
+
+
+
+
+
+
+
+if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes
+then :
+
+printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = xyes
+then :
+
+printf "%s\n" "#define HAVE__BOOL 1" >>confdefs.h
+
+
+fi
+
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+printf %s "checking for stdbool.h that conforms to C99... " >&6; }
+if test ${ac_cv_header_stdbool_h+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdbool.h>
+
+ #ifndef __bool_true_false_are_defined
+ #error "__bool_true_false_are_defined is not defined"
+ #endif
+ char a[__bool_true_false_are_defined == 1 ? 1 : -1];
+
+ /* Regardless of whether this is C++ or "_Bool" is a
+ valid type name, "true" and "false" should be usable
+ in #if expressions and integer constant expressions,
+ and "bool" should be a valid type name. */
+
+ #if !true
+ #error "'true' is not true"
+ #endif
+ #if true != 1
+ #error "'true' is not equal to 1"
+ #endif
+ char b[true == 1 ? 1 : -1];
+ char c[true];
+
+ #if false
+ #error "'false' is not false"
+ #endif
+ #if false != 0
+ #error "'false' is not equal to 0"
+ #endif
+ char d[false == 0 ? 1 : -1];
+
+ enum { e = false, f = true, g = false * true, h = true * 256 };
+
+ char i[(bool) 0.5 == true ? 1 : -1];
+ char j[(bool) 0.0 == false ? 1 : -1];
+ char k[sizeof (bool) > 0 ? 1 : -1];
+
+ struct sb { bool s: 1; bool t; } s;
+ char l[sizeof s.t > 0 ? 1 : -1];
+
+ /* The following fails for
+ HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+ bool m[h];
+ char n[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char o[-1 - (bool) 0 < 0 ? 1 : -1];
+ /* Catch a bug in an HP-UX C compiler. See
+ https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ https://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ bool p = true;
+ bool *pp = &p;
+
+ /* C 1999 specifies that bool, true, and false are to be
+ macros, but C++ 2011 and later overrule this. */
+ #if __cplusplus < 201103
+ #ifndef bool
+ #error "bool is not defined"
+ #endif
+ #ifndef false
+ #error "false is not defined"
+ #endif
+ #ifndef true
+ #error "true is not defined"
+ #endif
+ #endif
+
+ /* If _Bool is available, repeat with it all the tests
+ above that used bool. */
+ #ifdef HAVE__BOOL
+ struct sB { _Bool s: 1; _Bool t; } t;
+
+ char q[(_Bool) 0.5 == true ? 1 : -1];
+ char r[(_Bool) 0.0 == false ? 1 : -1];
+ char u[sizeof (_Bool) > 0 ? 1 : -1];
+ char v[sizeof t.t > 0 ? 1 : -1];
+
+ _Bool w[h];
+ char x[sizeof m == h * sizeof m[0] ? 1 : -1];
+ char y[-1 - (_Bool) 0 < 0 ? 1 : -1];
+ _Bool z = true;
+ _Bool *pz = &p;
+ #endif
+
+int
+main (void)
+{
+
+ bool ps = &s;
+ *pp |= p;
+ *pp |= ! p;
+
+ #ifdef HAVE__BOOL
+ _Bool pt = &t;
+ *pz |= z;
+ *pz |= ! z;
+ #endif
+
+ /* Refer to every declared value, so they cannot be
+ discarded as unused. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !j + !k
+ + !l + !m + !n + !o + !p + !pp + !ps
+ #ifdef HAVE__BOOL
+ + !q + !r + !u + !v + !w + !x + !y + !z + !pt
+ #endif
+ );
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_header_stdbool_h=yes
+else $as_nop
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+printf "%s\n" "$ac_cv_header_stdbool_h" >&6; }
+
# Checks for library functions.