summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure1601
1 files changed, 1093 insertions, 508 deletions
diff --git a/configure b/configure
index 2d286d7..1f8929e 100755
--- a/configure
+++ b/configure
@@ -195,8 +195,7 @@ test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
@@ -582,49 +581,15 @@ PACKAGE_STRING='simple-snake 0.1'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#ifdef HAVE_STRING_H
-# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#ifdef HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#ifdef HAVE_INTTYPES_H
-# include <inttypes.h>
-#endif
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
-
ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
-EGREP
-GREP
-CPP
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+CURSES_CFLAGS
+CURSES_LIBS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -713,6 +678,8 @@ ac_user_opts='
enable_option_checking
enable_silent_rules
enable_dependency_tracking
+with_ncurses
+with_ncursesw
'
ac_precious_vars='build_alias
host_alias
@@ -722,7 +689,11 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
-CPP'
+CURSES_LIBS
+CURSES_CFLAGS
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR'
# Initialize some variables set by options.
@@ -1355,6 +1326,12 @@ Optional Features:
--disable-dependency-tracking
speeds up one-time build
+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
@@ -1363,7 +1340,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>
- CPP C preprocessor
+ 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.
@@ -1483,20 +1467,21 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
+# 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
- if { { ac_try="$ac_cpp conftest.$ac_ext"
+ rm -f conftest.$ac_objext 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\""
$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ (eval "$ac_link") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
@@ -1504,181 +1489,29 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } > conftest.i && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ 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_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_retval=1
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
- yes:no: )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- 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\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
- { { 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\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=$ac_status
+ 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_run
-
-# 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
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- 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
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
+} # ac_fn_c_try_link
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -3676,417 +3509,1169 @@ fi
ac_config_files="$ac_config_files Makefile src/Makefile"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
- CPP=
-fi
-if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
+
+
+
+
+
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
- # Double quotes because CPP needs to be expanded
- for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
- do
- ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
+ 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
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ 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"
+ $as_echo "$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
else
- # Broken: fails on valid input.
-continue
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
+
+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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ 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
+ test -z "$as_dir" && as_dir=.
+ 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"
+ $as_echo "$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
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
- # Passes both tests.
-ac_preproc_ok=:
-break
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
- break
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$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
- done
- ac_cv_prog_CPP=$CPP
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+fi
+
+
+
+
+# Check whether --with-ncurses was given.
+if test "${with_ncurses+set}" = set; then :
+ withval=$with_ncurses;
+else
+ with_ncurses=check
fi
- CPP=$ac_cv_prog_CPP
+
+
+# Check whether --with-ncursesw was given.
+if test "${with_ncursesw+set}" = set; then :
+ withval=$with_ncursesw;
else
- ac_cv_prog_CPP=$CPP
+ with_ncursesw=check
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
- # Use a header file that comes with gcc, so configuring glibc
- # with a fresh cross-compiler works.
- # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> exists even on freestanding compilers.
- # On the NeXT, cc -E runs the code through the compiler's parser,
- # not just through cpp. "Syntax error" is here to catch this case.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+
+ 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
+ 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 :
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw via pkg-config" >&5
+$as_echo_n "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" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
+ ac_status=$?
+ $as_echo "$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" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncursesw\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncursesw") 2>&5
+ ac_status=$?
+ $as_echo "$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 :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ # No suitable .pc file found, have to find flags via fallback
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncursesw via fallback" >&5
+$as_echo_n "checking for ncursesw via fallback... " >&6; }
+if ${ax_cv_ncursesw+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ $as_echo
+ 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"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+$as_echo_n "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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char initscr ();
+int
+main ()
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.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. */
+#ifdef __cplusplus
+extern "C"
#endif
- Syntax error
+char nodelay ();
+int
+main ()
+{
+return nodelay ();
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
+
+ ax_cv_ncursesw=yes
else
- # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
- # OK, works on sane cases. Now check whether nonexistent headers
- # can be detected and how.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs" >&5
+$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncursesw_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ac_nonexistent.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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nodelay ();
+int
+main ()
+{
+return nodelay ();
+ ;
+ return 0;
+}
_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
+if ac_fn_c_try_link "$LINENO"; then :
+
+ ax_cv_ncursesw=yes
+
else
- # Passes both tests.
-ac_preproc_ok=:
-break
+
+ ax_cv_ncursesw=no
+
fi
-rm -f conftest.err conftest.i conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+
+ ax_cv_ncursesw=no
+
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncursesw" >&5
+$as_echo "$ax_cv_ncursesw" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; 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"
+
+$as_echo "#define HAVE_NCURSESW 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw/curses.h" >&5
+$as_echo_n "checking for working ncursesw/curses.h... " >&6; }
+if ${ax_cv_header_ncursesw_curses_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test -z "$GREP"; then
- ac_path_GREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in grep ggrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
- # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'GREP' >> "conftest.nl"
- "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_GREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_GREP="$ac_path_GREP"
- ac_path_GREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_GREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_GREP"; then
- as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncursesw/curses.h>
+
+int
+main ()
+{
+
+ 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
- ac_cv_path_GREP=$GREP
+ ax_cv_header_ncursesw_curses_h=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_curses_h" >&5
+$as_echo "$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
+
+$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
+$as_echo "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h
+
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw.h" >&5
+$as_echo_n "checking for working ncursesw.h... " >&6; }
+if ${ax_cv_header_ncursesw_h+:} false; then :
$as_echo_n "(cached) " >&6
else
- if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
- then ac_cv_path_EGREP="$GREP -E"
- else
- if test -z "$EGREP"; then
- ac_path_EGREP_found=false
- # Loop through the user's path and test for each of PROGNAME-LIST
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in egrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
- # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
- ac_count=0
- $as_echo_n 0123456789 >"conftest.in"
- while :
- do
- cat "conftest.in" "conftest.in" >"conftest.tmp"
- mv "conftest.tmp" "conftest.in"
- cp "conftest.in" "conftest.nl"
- $as_echo 'EGREP' >> "conftest.nl"
- "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_EGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_EGREP="$ac_path_EGREP"
- ac_path_EGREP_max=$ac_count
- fi
- # 10*(2^10) chars as input seems more than enough
- test $ac_count -gt 10 && break
- done
- rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
- $ac_path_EGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_EGREP"; then
- as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncursesw.h>
+
+int
+main ()
+{
+
+ 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
- ac_cv_path_EGREP=$EGREP
+ ax_cv_header_ncursesw_h=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
- fi
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_h" >&5
+$as_echo "$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
+
+$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_NCURSESW_H 1" >>confdefs.h
+
+
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
+$as_echo_n "checking for working ncurses.h... " >&6; }
+if ${ax_cv_header_ncurses_h_with_ncursesw+:} false; then :
$as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <ncurses.h>
int
main ()
{
+ 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_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_header_ncurses_h_with_ncursesw=yes
else
- ac_cv_header_stdc=no
+ ax_cv_header_ncurses_h_with_ncursesw=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-if test $ac_cv_header_stdc = yes; then
- # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h_with_ncursesw" >&5
+$as_echo "$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
+
+$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+$as_echo "#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 :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&5
+$as_echo "$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 :
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses via pkg-config" >&5
+$as_echo_n "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" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
+ ac_status=$?
+ $as_echo "$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" && \
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5
+ ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5
+ ac_status=$?
+ $as_echo "$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 :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ # No suitable .pc file found, have to find flags via fallback
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses via fallback" >&5
+$as_echo_n "checking for ncurses via fallback... " >&6; }
+if ${ax_cv_ncurses+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ $as_echo
+ 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"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr() with $pkg_cv__ax_cv_ncurses_libs" >&5
+$as_echo_n "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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char initscr ();
+int
+main ()
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
+$as_echo_n "checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <string.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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nodelay ();
+int
+main ()
+{
+return nodelay ();
+ ;
+ return 0;
+}
_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "memchr" >/dev/null 2>&1; then :
+if ac_fn_c_try_link "$LINENO"; then :
+
+ ax_cv_ncurses=yes
else
- ac_cv_header_stdc=no
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "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"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nodelay() with $pkg_cv__ax_cv_ncurses_libs" >&5
+$as_echo_n "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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nodelay ();
+int
+main ()
+{
+return nodelay ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+ ax_cv_ncurses=yes
+
+else
+
+ ax_cv_ncurses=no
+
fi
-rm -f conftest*
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
-if test $ac_cv_header_stdc = yes; then
- # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+else
+
+ ax_cv_ncurses=no
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncurses" >&5
+$as_echo "$ax_cv_ncurses" >&6; }
+
+else
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "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"
+
+$as_echo "#define HAVE_NCURSES 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses/curses.h" >&5
+$as_echo_n "checking for working ncurses/curses.h... " >&6; }
+if ${ax_cv_header_ncurses_curses_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdlib.h>
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "free" >/dev/null 2>&1; then :
+ #include <ncurses/curses.h>
+
+int
+main ()
+{
+ 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
- ac_cv_header_stdc=no
+ ax_cv_header_ncurses_curses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
fi
-rm -f conftest*
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_curses_h" >&5
+$as_echo "$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
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_NCURSES_CURSES_H 1" >>confdefs.h
+
fi
-if test $ac_cv_header_stdc = yes; then
- # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
- if test "$cross_compiling" = yes; then :
- :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
+$as_echo_n "checking for working ncurses.h... " >&6; }
+if ${ax_cv_header_ncurses_h+:} false; then :
+ $as_echo_n "(cached) " >&6
else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+ #include <ncurses.h>
+
int
main ()
{
- int i;
- for (i = 0; i < 256; i++)
- if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
- return 2;
+
+ 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_run "$LINENO"; then :
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_header_ncurses_h=yes
+else
+ ax_cv_header_ncurses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h" >&5
+$as_echo "$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
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
+
+
+$as_echo "#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 :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&5
+$as_echo "$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
- ac_cv_header_stdc=no
+
+ LIBS="$ax_saved_LIBS -lcurses"
+
fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses library" >&5
+$as_echo_n "checking for Curses library... " >&6; }
+if ${ax_cv_plaincurses+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ 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. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char initscr ();
+int
+main ()
+{
+return initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ax_cv_plaincurses=yes
+else
+ ax_cv_plaincurses=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses" >&5
+$as_echo "$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
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+$as_echo "#define HAVE_CURSES 1" >>confdefs.h
+
+
+ # Check for base conformance (and header file)
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working curses.h" >&5
+$as_echo_n "checking for working curses.h... " >&6; }
+if ${ax_cv_header_curses_h+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <curses.h>
+
+int
+main ()
+{
+
+ 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
+ ax_cv_header_curses_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_curses_h" >&5
+$as_echo "$ax_cv_header_curses_h" >&6; }
+ if test "x$ax_cv_header_curses_h" = xyes; then :
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+
+$as_echo "#define HAVE_CURSES_H 1" >>confdefs.h
+
+
+ # Check for X/Open Enhanced conformance
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X/Open Enhanced Curses conformance" >&5
+$as_echo_n "checking for X/Open Enhanced Curses conformance... " >&6; }
+if ${ax_cv_plaincurses_enhanced+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ 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 ()
+{
+
+ 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
+ ax_cv_plaincurses_enhanced=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_enhanced" >&5
+$as_echo "$ax_cv_plaincurses_enhanced" >&6; }
+ if test "x$ax_cv_plaincurses_enhanced" = xyes; then :
-done
+ ax_cv_curses_enhanced=yes
+ ax_cv_curses_color=yes
+$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
-for ac_header in ncurses.h
-do :
- ac_fn_c_check_header_mongrel "$LINENO" "ncurses.h" "ac_cv_header_ncurses_h" "$ac_includes_default"
-if test "x$ac_cv_header_ncurses_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_NCURSES_H 1
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+fi
+
+ # Check for color functions
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses color functions" >&5
+$as_echo_n "checking for Curses color functions... " >&6; }
+if ${ax_cv_plaincurses_color+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define _XOPEN_SOURCE_EXTENDED 1
+ #include <curses.h>
+
+int
+main ()
+{
+
+ 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
+ ax_cv_plaincurses_color=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_color" >&5
+$as_echo "$ax_cv_plaincurses_color" >&6; }
+ if test "x$ax_cv_plaincurses_color" = xyes; then :
+
+ ax_cv_curses_color=yes
+
+$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
+
+
+fi
+
+ # Check for obsolete functions
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete Curses functions" >&5
+$as_echo_n "checking for obsolete Curses functions... " >&6; }
+if ${ax_cv_plaincurses_obsolete+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <curses.h>
+
+int
+main ()
+{
+
+ 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_fn_error $? "missing ncurses.h" "$LINENO" 5
+ ax_cv_plaincurses_obsolete=no
fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_obsolete" >&5
+$as_echo "$ax_cv_plaincurses_obsolete" >&6; }
+ if test "x$ax_cv_plaincurses_obsolete" = xyes; then :
+
+ ax_cv_curses_obsolete=yes
+
+$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
-done
+fi
+
+fi
+
+ if test "x$ax_cv_header_curses_h" = xno; then :
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working curses.h" >&5
+$as_echo "$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 with color" "$LINENO" 5
+fi
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure