aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2014-03-01 00:40:26 +0000
committerXin LI <delphij@FreeBSD.org>2014-03-01 00:40:26 +0000
commitcea297eb34d2361e79529034397465068ae34ecd (patch)
treefbc3775582ebd1e6f026931751cfab6c588b643c /test
parent6826a395a618014c4541ff6a654be0d3afb392a1 (diff)
downloadsrc-cea297eb34d2361e79529034397465068ae34ecd.tar.gz
src-cea297eb34d2361e79529034397465068ae34ecd.zip
Vendor import of ncurses 5.9 20140222 snapshot.vendor/ncurses/5.9-20140222
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=262639 svn path=/vendor/ncurses/5.9-20140222/; revision=262640; tag=vendor/ncurses/5.9-20140222
Diffstat (limited to 'test')
-rw-r--r--test/Makefile.in15
-rw-r--r--test/README52
-rw-r--r--test/aclocal.m41187
-rw-r--r--test/background.c228
-rw-r--r--test/blue.c12
-rw-r--r--test/bs.c62
-rw-r--r--test/cardfile.c28
-rw-r--r--test/chgat.c6
-rw-r--r--test/clip_printw.c11
-rw-r--r--test/color_name.h103
-rw-r--r--test/color_set.c10
-rwxr-xr-xtest/configure7858
-rw-r--r--test/configure.in186
-rw-r--r--test/demo_defkey.c12
-rw-r--r--test/demo_forms.c221
-rw-r--r--test/demo_forms.txt20
-rw-r--r--test/demo_menus.c316
-rw-r--r--test/demo_termcap.c300
-rw-r--r--test/demo_terminfo.c254
-rw-r--r--test/ditto.c10
-rw-r--r--test/dots.c24
-rw-r--r--test/dots_mvcur.c25
-rw-r--r--test/dots_termcap.c254
-rw-r--r--test/echochar.c6
-rw-r--r--test/edit_field.c62
-rw-r--r--test/edit_field.h8
-rw-r--r--test/filter.c8
-rw-r--r--test/firework.c16
-rw-r--r--test/form_driver_w.c150
-rw-r--r--test/gdc.c147
-rw-r--r--test/hanoi.c33
-rw-r--r--test/hashtest.c6
-rw-r--r--test/inchs.c16
-rw-r--r--test/ins_wide.c34
-rw-r--r--test/insdelln.c8
-rw-r--r--test/inserts.c29
-rw-r--r--test/knight.c70
-rw-r--r--test/linedata.h6
-rwxr-xr-xtest/make-tar.sh13
-rw-r--r--test/modules10
-rw-r--r--test/movewindow.c227
-rw-r--r--test/ncurses.c846
-rw-r--r--test/newdemo.c23
-rw-r--r--test/package/mingw-ncurses-examples.spec109
-rw-r--r--test/package/ncurses-examples.spec4
-rw-r--r--test/programs8
-rw-r--r--test/railroad.c12
-rw-r--r--test/rain.c8
-rw-r--r--test/redraw.c6
-rw-r--r--test/tclock.c12
-rw-r--r--test/test.priv.h144
-rw-r--r--test/test_add_wchstr.c31
-rw-r--r--test/test_addchstr.c31
-rw-r--r--test/test_addstr.c29
-rw-r--r--test/test_addwstr.c34
-rw-r--r--test/test_getstr.c15
-rw-r--r--test/test_vid_puts.c148
-rw-r--r--test/test_vidputs.c148
-rw-r--r--test/testaddch.c12
-rw-r--r--test/testcurs.c64
-rw-r--r--test/view.c88
-rw-r--r--test/widechars.h71
-rw-r--r--test/worm.c31
-rw-r--r--test/xmas.c6
64 files changed, 8943 insertions, 4980 deletions
diff --git a/test/Makefile.in b/test/Makefile.in
index 9fde0adbe8b1..6600cd788254 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1,6 +1,6 @@
-# $Id: Makefile.in,v 1.108 2010/11/28 16:39:40 tom Exp $
+# $Id: Makefile.in,v 1.111 2013/10/05 23:46:10 tom Exp $
##############################################################################
-# Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -47,13 +47,16 @@ MODEL = ../@DFT_OBJ_SUBDIR@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
+includesubdir = @includesubdir@
BINDIR = $(DESTDIR)$(bindir)
LIBDIR = $(DESTDIR)$(libdir)
-INCLUDEDIR = $(DESTDIR)$(includedir)
+INCLUDEDIR = $(DESTDIR)$(includedir)$(includesubdir)
LIBTOOL = @LIBTOOL@
LIBTOOL_CLEAN = @LIB_CLEAN@
@@ -102,7 +105,7 @@ LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG)
LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE)
LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) @LD_SHARED_OPTS@
-TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
+TEST_ARGS = @LDFLAGS_STATIC@ @TEST_ARGS@ @LDFLAGS_SHARED@
# use these for linking with all of the libraries
LIBS_DEFAULT = $(TEST_ARGS) @LIBS@ $(TEST_LIBS) $(MATH_LIB)
@@ -117,8 +120,8 @@ LIBS_CURSES = `echo "$(TEST_ARGS) @LIBS@" | sed -e 's/-lform.*-lpanel[^ ]*//'` $
LDFLAGS_CURSES = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_CURSES)
# use these for linking with the tinfo library if we have it, or curses library if not
-LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_ARGS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS) $(MATH_LIB)
-LDFLAGS_TINFO = $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
+LIBS_TINFO = @LDFLAGS_STATIC@ @TINFO_LIBS@ @LDFLAGS_SHARED@ @LIBS@ $(TEST_LIBS) $(MATH_LIB)
+LDFLAGS_TINFO = @TINFO_LDFLAGS@ $(LDFLAGS_@DFT_UPR_MODEL@) $(LIBS_TINFO)
LINT = @LINT@
LINT_OPTS = @LINT_OPTS@
diff --git a/test/README b/test/README
index 8a016ec824d3..62b6dff3e683 100644
--- a/test/README
+++ b/test/README
@@ -1,5 +1,5 @@
-------------------------------------------------------------------------------
--- Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. --
+-- Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
@@ -25,7 +25,7 @@
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: README,v 1.44 2011/02/26 00:09:25 tom Exp $
+-- $Id: README,v 1.48 2013/01/19 21:30:38 tom Exp $
-------------------------------------------------------------------------------
The programs in this directory are designed to test your newest toy :-)
@@ -223,18 +223,18 @@ PC lib: ncurses
SP lib: form
TABSIZE test: test_opaque
UP -
-acs_map test: gdc ins_wide inserts knight movewindow ncurses newdemo test_add_wchstr test_addchstr test_addstr test_addwstr testcurs
+acs_map test: background gdc ins_wide inserts knight movewindow ncurses newdemo test_add_wchstr test_addchstr test_addstr test_addwstr testcurs
add_wch test: demo_panels ncurses test_add_wchstr test_addwstr
add_wchnstr test: test_add_wchstr
add_wchstr test: test_add_wchstr view
-addch test: blue bs echochar hashtest ncurses savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
+addch test: background blue bs echochar hashtest ncurses savescreen test_add_wchstr test_addchstr test_addstr test_addwstr test_opaque testaddch view worm
addchnstr test: test_addchstr
addchstr test: test_addchstr
addnstr test: test_addstr
addnwstr test: ncurses test_addwstr
addstr test: blue bs cardfile gdc hanoi lrtest ncurses savescreen test_addstr
addwstr test: ncurses test_addwstr
-assume_default_colors test: ncurses
+assume_default_colors test: background ncurses
assume_default_colors_sp -
attr_get test: ncurses
attr_off test: ncurses
@@ -271,7 +271,7 @@ color_content test: ncurses
color_content_sp -
color_set test: color_set ncurses
copywin test: ncurses testcurs
-cur_term test: demo_terminfo dots dots_mvcur lrtest progs: clear tabs tput tset
+cur_term test: demo_terminfo dots dots_mvcur lrtest test_vid_puts test_vidputs progs: clear tabs tput tset
curs_set test: echochar firework gdc hanoi lrtest ncurses newdemo rain savescreen tclock testcurs worm xmas
curs_set_sp lib: ncurses
curscr test: demo_panels edit_field knight lrtest ncurses savescreen tclock view
@@ -306,7 +306,7 @@ erasechar_sp lib: ncurses
erasewchar -
filter test: filter
filter_sp -
-flash test: cardfile lrtest ncurses tclock testcurs
+flash test: cardfile lrtest movewindow ncurses tclock testcurs
flash_sp -
flushinp test: ncurses newdemo testcurs
flushinp_sp lib: ncurses
@@ -399,7 +399,7 @@ key_defined_sp lib: ncurses
key_name test: key_names ncurses
keybound test: demo_altkeys demo_defkey
keybound_sp lib: ncurses
-keyname test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw testcurs view progs: tic
+keyname test: demo_altkeys demo_defkey demo_keyok demo_menus edit_field foldkeys keynames movewindow ncurses redraw test_getstr testcurs view progs: tic
keyname_sp lib: ncurses
keyok test: demo_keyok foldkeys
keyok_sp lib: ncurses
@@ -430,7 +430,7 @@ mvaddstr test: bs demo_forms gdc hanoi knight ncurses rain tclock test_addstr
mvaddwstr test: test_addwstr
mvchgat test: chgat
mvcur test: dots_mvcur redraw
-mvcur_sp lib: ncurses
+mvcur_sp -
mvdelch -
mvderwin test: movewindow
mvget_wch -
@@ -457,7 +457,7 @@ mvinsnstr test: inserts
mvinsstr test: inserts
mvinstr test: test_instr
mvinwstr test: test_inwstr
-mvprintw test: bs demo_menus firework hanoi ncurses tclock view
+mvprintw test: background bs demo_menus firework hanoi ncurses tclock view
mvscanw -
mvvline test: ncurses
mvvline_set test: ncurses
@@ -542,13 +542,13 @@ pnoutrefresh test: edit_field ncurses
prefresh test: testcurs
printw test: background blue bs color_set demo_altkeys demo_defkey demo_keyok demo_menus filter foldkeys ncurses savescreen testcurs testscanw view
putp progs: tput
-putp_sp lib: ncurses
+putp_sp -
putwin test: ncurses
qiflush -
qiflush_sp -
raw test: demo_forms ncurses redraw testcurs
raw_sp lib: ncurses
-redrawwin test: redraw
+redrawwin test: redraw view
refresh test: blue bs demo_defkey demo_forms demo_keyok demo_menus demo_panels echochar filter firstlast gdc hanoi hashtest lrtest movewindow ncurses savescreen tclock testcurs view xmas
reset_prog_mode test: filter ncurses
reset_prog_mode_sp lib: ncurses
@@ -586,7 +586,7 @@ set_tabsize_sp -
set_term lib: ncurses
setcchar test: demo_panels ins_wide ncurses test_add_wchstr test_addwstr view
setscrreg test: view
-setupterm test: demo_termcap demo_terminfo dots progs: clear tabs tput tset
+setupterm test: demo_termcap demo_terminfo dots test_vid_puts test_vidputs progs: clear tabs tput tset
slk_attr -
slk_attr_off -
slk_attr_on -
@@ -644,20 +644,20 @@ tgetnum_sp -
tgetstr test: demo_termcap railroad
tgetstr_sp -
tgoto test: railroad
-tigetflag test: demo_terminfo progs: tput
+tigetflag test: demo_terminfo progs: tic tput
tigetflag_sp -
tigetnum test: demo_terminfo ncurses progs: tput
tigetnum_sp -
-tigetstr test: blue demo_defkey demo_terminfo foldkeys testcurs progs: tput
+tigetstr test: demo_defkey demo_terminfo foldkeys testcurs progs: tput
tigetstr_sp -
timeout test: rain savescreen
tiparm -
touchline test: chgat clip_printw insdelln
touchwin test: chgat clip_printw demo_menus edit_field filter firstlast inch_wide inchs ins_wide insdelln inserts movewindow ncurses redraw test_add_wchstr test_addchstr test_addstr test_addwstr test_get_wstr test_getstr test_instr test_inwstr test_opaque xmas
tparm test: dots dots_mvcur progs: tabs tic tput
-tputs test: dots dots_mvcur railroad progs: clear tabs tset
+tputs test: dots dots_mvcur railroad test_vid_puts test_vidputs progs: clear tabs tset
tputs_sp lib: ncurses
-trace test: demo_menus hanoi hashtest lrtest ncurses testcurs view worm
+trace test: demo_menus hashtest lrtest ncurses testcurs view worm
ttytype lib: ncurses
typeahead test: testcurs
typeahead_sp lib: ncurses
@@ -670,22 +670,24 @@ ungetch_sp lib: ncurses
ungetmouse -
ungetmouse_sp -
untouchwin lib: form
-use_default_colors test: filter firework gdc hanoi knight ncurses rain tclock worm xmas
+use_default_colors test: background filter firework gdc hanoi knight ncurses rain tclock worm xmas
use_default_colors_sp -
-use_env progs: tput
+use_env test: ncurses progs: tput
use_env_sp -
-use_extended_names test: demo_terminfo progs: infocmp tic
+use_extended_names test: demo_termcap demo_terminfo progs: infocmp tic
use_legacy_coding -
use_legacy_coding_sp -
use_screen test: ditto
+use_tioctl test: ncurses
+use_tioctl_sp -
use_window test: rain worm
-vid_attr -
+vid_attr test: test_vid_puts
vid_attr_sp -
-vid_puts -
+vid_puts test: test_vid_puts
vid_puts_sp -
-vidattr -
-vidattr_sp lib: ncurses
-vidputs -
+vidattr test: test_vidputs
+vidattr_sp -
+vidputs test: test_vidputs
vidputs_sp lib: ncurses
vline test: gdc ncurses
vline_set -
diff --git a/test/aclocal.m4 b/test/aclocal.m4
index 4e3343144a43..86d3ee45d712 100644
--- a/test/aclocal.m4
+++ b/test/aclocal.m4
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 2003-2010,2011 Free Software Foundation, Inc. *
+dnl Copyright (c) 2003-2013,2014 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@ dnl sale, use or other dealings in this Software without prior written *
dnl authorization. *
dnl***************************************************************************
dnl
-dnl $Id: aclocal.m4,v 1.50 2011/03/24 08:28:07 tom Exp $
+dnl $Id: aclocal.m4,v 1.94 2014/02/10 00:43:27 tom Exp $
dnl
dnl Author: Thomas E. Dickey
dnl
@@ -40,6 +40,32 @@ dnl See http://invisible-island.net/autoconf/ for additional information.
dnl
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
+dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
+dnl ------------------
+dnl Conditionally generate script according to whether we're using a given autoconf.
+dnl
+dnl $1 = version to compare against
+dnl $2 = code to use if AC_ACVERSION is at least as high as $1.
+dnl $3 = code to use if AC_ACVERSION is older than $1.
+define([CF_ACVERSION_CHECK],
+[
+ifdef([AC_ACVERSION], ,[m4_copy([m4_PACKAGE_VERSION],[AC_ACVERSION])])dnl
+ifdef([m4_version_compare],
+[m4_if(m4_version_compare(m4_defn([AC_ACVERSION]), [$1]), -1, [$3], [$2])],
+[CF_ACVERSION_COMPARE(
+AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])),
+AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)), AC_ACVERSION, [$2], [$3])])])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_ACVERSION_COMPARE version: 3 updated: 2012/10/03 18:39:53
+dnl --------------------
+dnl CF_ACVERSION_COMPARE(MAJOR1, MINOR1, TERNARY1,
+dnl MAJOR2, MINOR2, TERNARY2,
+dnl PRINTABLE2, not FOUND, FOUND)
+define([CF_ACVERSION_COMPARE],
+[ifelse(builtin([eval], [$2 < $5]), 1,
+[ifelse([$8], , ,[$8])],
+[ifelse([$9], , ,[$9])])])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
@@ -237,7 +263,7 @@ dnl $1 = libraries to add, with the "-l", etc.
dnl $2 = variable to update (default $LIBS)
AC_DEFUN([CF_ADD_LIBS],[ifelse($2,,LIBS,[$2])="$1 [$]ifelse($2,,LIBS,[$2])"])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_LIB_AFTER version: 2 updated: 2010/11/08 20:33:46
+dnl CF_ADD_LIB_AFTER version: 3 updated: 2013/07/09 21:27:22
dnl ----------------
dnl Add a given library after another, e.g., following the one it satisfies a
dnl dependency for.
@@ -246,11 +272,11 @@ dnl $1 = the first library
dnl $2 = its dependency
AC_DEFUN([CF_ADD_LIB_AFTER],[
CF_VERBOSE(...before $LIBS)
-LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s,$1 ,$1 $2 ," -e 's/ / /g'`
+LIBS=`echo "$LIBS" | sed -e "s/[[ ]][[ ]]*/ /g" -e "s%$1 %$1 $2 %" -e 's% % %g'`
CF_VERBOSE(...after $LIBS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_SUBDIR_PATH version: 3 updated: 2010/07/03 20:58:12
+dnl CF_ADD_SUBDIR_PATH version: 4 updated: 2013/10/08 17:47:05
dnl ------------------
dnl Append to a search-list for a nonstandard header/lib-file
dnl $1 = the variable to return as result
@@ -260,9 +286,9 @@ dnl $4 = the directory under which we will test for subdirectories
dnl $5 = a directory that we do not want $4 to match
AC_DEFUN([CF_ADD_SUBDIR_PATH],
[
-test "$4" != "$5" && \
+test "x$4" != "x$5" && \
test -d "$4" && \
-ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
+ifelse([$5],NONE,,[(test -z "$5" || test x$5 = xNONE || test "x$4" != "x$5") &&]) {
test -n "$verbose" && echo " ... testing for $3-directories under $4"
test -d $4/$3 && $1="[$]$1 $4/$3"
test -d $4/$3/$2 && $1="[$]$1 $4/$3/$2"
@@ -272,76 +298,6 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
}
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ANSI_CC_CHECK version: 10 updated: 2010/10/23 15:52:32
-dnl ----------------
-dnl This is adapted from the macros 'fp_PROG_CC_STDC' and 'fp_C_PROTOTYPES'
-dnl in the sharutils 4.2 distribution.
-AC_DEFUN([CF_ANSI_CC_CHECK],
-[
-AC_CACHE_CHECK(for ${CC:-cc} option to accept ANSI C, cf_cv_ansi_cc,[
-cf_cv_ansi_cc=no
-cf_save_CFLAGS="$CFLAGS"
-cf_save_CPPFLAGS="$CPPFLAGS"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc
-# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
-for cf_arg in "-DCC_HAS_PROTOS" \
- "" \
- -qlanglvl=ansi \
- -std1 \
- -Ae \
- "-Aa -D_HPUX_SOURCE" \
- -Xc
-do
- CF_ADD_CFLAGS($cf_arg)
- AC_TRY_COMPILE(
-[
-#ifndef CC_HAS_PROTOS
-#if !defined(__STDC__) || (__STDC__ != 1)
-choke me
-#endif
-#endif
-],[
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};],
- [cf_cv_ansi_cc="$cf_arg"; break])
-done
-CFLAGS="$cf_save_CFLAGS"
-CPPFLAGS="$cf_save_CPPFLAGS"
-])
-
-if test "$cf_cv_ansi_cc" != "no"; then
-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
- CF_ADD_CFLAGS($cf_cv_ansi_cc)
-else
- AC_DEFINE(CC_HAS_PROTOS)
-fi
-fi
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_ANSI_CC_REQD version: 4 updated: 2008/03/23 14:48:54
-dnl ---------------
-dnl For programs that must use an ANSI compiler, obtain compiler options that
-dnl will make it recognize prototypes. We'll do preprocessor checks in other
-dnl macros, since tools such as unproto can fake prototypes, but only part of
-dnl the preprocessor.
-AC_DEFUN([CF_ANSI_CC_REQD],
-[AC_REQUIRE([CF_ANSI_CC_CHECK])
-if test "$cf_cv_ansi_cc" = "no"; then
- AC_MSG_ERROR(
-[Your compiler does not appear to recognize prototypes.
-You have the following choices:
- a. adjust your compiler options
- b. get an up-to-date compiler
- c. use a wrapper such as unproto])
-fi
-])dnl
-dnl ---------------------------------------------------------------------------
dnl CF_ARG_DISABLE version: 3 updated: 1999/03/30 17:24:31
dnl --------------
dnl Allow user to disable a normally-on option.
@@ -377,7 +333,33 @@ ifelse([$3],,[ :]dnl
])dnl
])])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CHECK_CACHE version: 11 updated: 2008/03/23 14:45:59
+dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49
+dnl ---------------
+dnl Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
+dnl into CC. This will not help with broken scripts that wrap the compiler with
+dnl options, but eliminates a more common category of user confusion.
+AC_DEFUN([CF_CC_ENV_FLAGS],
+[
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+AC_MSG_CHECKING(\$CC variable)
+case "$CC" in #(vi
+*[[\ \ ]]-[[IUD]]*)
+ AC_MSG_RESULT(broken)
+ AC_MSG_WARN(your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options)
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[[^ ]]*[[ ]]//'`
+ CC=`echo "$CC" | sed -e 's/[[ ]].*//'`
+ CF_ADD_CFLAGS($cf_flags)
+ ;;
+*)
+ AC_MSG_RESULT(ok)
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CACHE version: 12 updated: 2012/10/02 20:55:03
dnl --------------
dnl Check if we're accidentally using a cache from a different machine.
dnl Derive the system name, as a check for reusing the autoconf cache.
@@ -400,7 +382,7 @@ else
system_name="`(hostname) 2>/dev/null`"
fi
fi
-test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name")
+test -n "$system_name" && AC_DEFINE_UNQUOTED(SYSTEM_NAME,"$system_name",[Define to the system name.])
AC_CACHE_VAL(cf_cv_system_name,[cf_cv_system_name="$system_name"])
test -z "$system_name" && system_name="$cf_cv_system_name"
@@ -434,7 +416,40 @@ AC_TRY_LINK([#include <stdio.h>],[printf("Hello world");],,
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_ACS_MAP version: 6 updated: 2010/10/23 15:54:49
+dnl CF_CLANG_COMPILER version: 2 updated: 2013/11/19 19:23:35
+dnl -----------------
+dnl Check if the given compiler is really clang. clang's C driver defines
+dnl __GNUC__ (fooling the configure script into setting $GCC to yes) but does
+dnl not ignore some gcc options.
+dnl
+dnl This macro should be run "soon" after AC_PROG_CC or AC_PROG_CPLUSPLUS, to
+dnl ensure that it is not mistaken for gcc/g++. It is normally invoked from
+dnl the wrappers for gcc and g++ warnings.
+dnl
+dnl $1 = GCC (default) or GXX
+dnl $2 = CLANG_COMPILER (default)
+dnl $3 = CFLAGS (default) or CXXFLAGS
+AC_DEFUN([CF_CLANG_COMPILER],[
+ifelse([$2],,CLANG_COMPILER,[$2])=no
+
+if test "$ifelse([$1],,[$1],GCC)" = yes ; then
+ AC_MSG_CHECKING(if this is really Clang ifelse([$1],GXX,C++,C) compiler)
+ cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
+ ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -Qunused-arguments"
+ AC_TRY_COMPILE([],[
+#ifdef __clang__
+#else
+make an error
+#endif
+],[ifelse([$2],,CLANG_COMPILER,[$2])=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+],[])
+ ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
+ AC_MSG_RESULT($ifelse([$2],,CLANG_COMPILER,[$2]))
+fi
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_CURSES_ACS_MAP version: 7 updated: 2012/10/06 16:39:58
dnl -----------------
dnl Check for likely values of acs_map[]:
AC_DEFUN([CF_CURSES_ACS_MAP],
@@ -452,7 +467,7 @@ $name['k'] = ACS_PLUS
done
])
-test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map)
+test "$cf_cv_curses_acs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_ACS_ARRAY,$cf_cv_curses_acs_map,[Define as needed to override ncurses prefix _nc_])
])
dnl ---------------------------------------------------------------------------
dnl CF_CURSES_CHECK_DATA version: 4 updated: 2011/01/15 16:39:24
@@ -499,7 +514,7 @@ int main(void)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CHECK_TYPE version: 3 updated: 2010/10/23 15:54:49
+dnl CF_CURSES_CHECK_TYPE version: 4 updated: 2012/10/06 16:39:58
dnl --------------------
dnl Check if curses.h defines the given type
AC_DEFUN([CF_CURSES_CHECK_TYPE],
@@ -515,9 +530,9 @@ $1 foo
AC_MSG_RESULT($cf_result)
if test $cf_result = yes ; then
CF_UPPER(cf_result,have_type_$1)
- AC_DEFINE_UNQUOTED($cf_result)
+ AC_DEFINE_UNQUOTED($cf_result,1,[Define to 1 if we have type $1])
else
- AC_DEFINE_UNQUOTED($1,$2)
+ AC_DEFINE_UNQUOTED($1,$2,[Define to appropriate type if $1 is not declared])
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -533,7 +548,7 @@ CF_NCURSES_VERSION
CF_CURSES_LIBS
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CPPFLAGS version: 10 updated: 2009/01/06 19:34:11
+dnl CF_CURSES_CPPFLAGS version: 11 updated: 2011/04/09 14:51:08
dnl ------------------
dnl Look for the curses headers.
AC_DEFUN([CF_CURSES_CPPFLAGS],[
@@ -542,13 +557,19 @@ AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[
cf_cv_curses_incdir=no
case $host_os in #(vi
hpux10.*) #(vi
- test -d /usr/include/curses_colr && \
- cf_cv_curses_incdir="-I/usr/include/curses_colr"
+ if test "x$cf_cv_screen" = "xcurses_colr"
+ then
+ test -d /usr/include/curses_colr && \
+ cf_cv_curses_incdir="-I/usr/include/curses_colr"
+ fi
;;
sunos3*|sunos4*)
- test -d /usr/5lib && \
- test -d /usr/5include && \
- cf_cv_curses_incdir="-I/usr/5include"
+ if test "x$cf_cv_screen" = "xcurses_5lib"
+ then
+ test -d /usr/5lib && \
+ test -d /usr/5include && \
+ cf_cv_curses_incdir="-I/usr/5include"
+ fi
;;
esac
])
@@ -558,7 +579,7 @@ CF_CURSES_HEADER
CF_TERM_HEADER
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_FUNCS version: 15 updated: 2010/10/23 15:52:32
+dnl CF_CURSES_FUNCS version: 17 updated: 2011/05/14 16:07:29
dnl ---------------
dnl Curses-functions are a little complicated, since a lot of them are macros.
AC_DEFUN([CF_CURSES_FUNCS],
@@ -566,6 +587,7 @@ AC_DEFUN([CF_CURSES_FUNCS],
AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
AC_REQUIRE([CF_XOPEN_CURSES])
AC_REQUIRE([CF_CURSES_TERM_H])
+AC_REQUIRE([CF_CURSES_UNCTRL_H])
for cf_func in $1
do
CF_UPPER(cf_tr_func,$cf_func)
@@ -578,7 +600,8 @@ do
[
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
-${cf_cv_main_return:-return}(foo == 0);
+if (foo + 1234 > 5678)
+ ${cf_cv_main_return:-return}(foo);
#endif
],
[cf_result=yes],
@@ -595,7 +618,7 @@ ${cf_cv_main_return:-return}(foo == 0);
done
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_HEADER version: 2 updated: 2010/04/28 06:02:16
+dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45
dnl ----------------
dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
dnl variations of ncurses' installs.
@@ -605,10 +628,10 @@ AC_DEFUN([CF_CURSES_HEADER],[
AC_CACHE_CHECK(if we have identified curses headers,cf_cv_ncurses_header,[
cf_cv_ncurses_header=none
for cf_header in ifelse($1,,,[ \
- $1/curses.h \
- $1/ncurses.h]) \
- curses.h \
- ncurses.h ifelse($1,,[ncurses/curses.h ncurses/ncurses.h])
+ $1/ncurses.h \
+ $1/curses.h]) \
+ ncurses.h \
+ curses.h ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
do
AC_TRY_COMPILE([#include <${cf_header}>],
[initscr(); tgoto("?", 0,0)],
@@ -624,7 +647,7 @@ fi
AC_CHECK_HEADERS($cf_cv_ncurses_header)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 33 updated: 2011/03/06 12:37:18
+dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50
dnl --------------
dnl Look for the curses libraries. Older curses implementations may require
dnl termcap/termlib to be linked as well. Call CF_CURSES_CPPFLAGS first.
@@ -644,17 +667,24 @@ freebsd*) #(vi
AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)])
;;
hpux10.*) #(vi
- AC_CHECK_LIB(cur_colr,initscr,[
- CF_ADD_LIBS(-lcur_colr)
- ac_cv_func_initscr=yes
- ],[
- AC_CHECK_LIB(Hcurses,initscr,[
- # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
- CF_ADD_LIBS(-lHcurses)
- CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
- ac_cv_func_initscr=yes
- ])])
- ;;
+ # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
+ # next (1998), and xcurses "newer" (2000). There is no header file for
+ # Hcurses; the subdirectory curses_colr has the headers (curses.h and
+ # term.h) for cur_colr
+ if test "x$cf_cv_screen" = "xcurses_colr"
+ then
+ AC_CHECK_LIB(cur_colr,initscr,[
+ CF_ADD_LIBS(-lcur_colr)
+ ac_cv_func_initscr=yes
+ ],[
+ AC_CHECK_LIB(Hcurses,initscr,[
+ # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
+ CF_ADD_LIBS(-lHcurses)
+ CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
+ ac_cv_func_initscr=yes
+ ])])
+ fi
+ ;;
linux*)
case `arch 2>/dev/null` in
x86_64)
@@ -669,76 +699,83 @@ linux*)
CF_ADD_LIBDIR(/lib)
;;
esac
- ;;
+ ;;
sunos3*|sunos4*)
- if test -d /usr/5lib ; then
- CF_ADD_LIBDIR(/usr/5lib)
- CF_ADD_LIBS(-lcurses -ltermcap)
+ if test "x$cf_cv_screen" = "xcurses_5lib"
+ then
+ if test -d /usr/5lib ; then
+ CF_ADD_LIBDIR(/usr/5lib)
+ CF_ADD_LIBS(-lcurses -ltermcap)
+ fi
fi
ac_cv_func_initscr=yes
;;
esac
if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
- cf_term_lib=""
- cf_curs_lib=""
+ cf_save_LIBS="$LIBS"
- if test ".${cf_cv_ncurses_version:-no}" != .no
- then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
- fi
+ if test ".${cf_cv_ncurses_version:-no}" != .no
+ then
+ cf_check_list="ncurses curses cursesX"
+ else
+ cf_check_list="cursesX curses ncurses"
+ fi
- # Check for library containing tgoto. Do this before curses library
- # because it may be needed to link the test-case for initscr.
- AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
- for cf_term_lib in $cf_check_list termcap termlib unknown
- do
- AC_CHECK_LIB($cf_term_lib,tgoto,[break])
- done
- ])
+ # Check for library containing tgoto. Do this before curses library
+ # because it may be needed to link the test-case for initscr.
+ if test "x$cf_term_lib" = x
+ then
+ AC_CHECK_FUNC(tgoto,[cf_term_lib=predefined],[
+ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
+ do
+ AC_CHECK_LIB($cf_term_lib,tgoto,[break])
+ done
+ ])
+ fi
- # Check for library containing initscr
- test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
- for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
- do
- AC_CHECK_LIB($cf_curs_lib,initscr,[break])
- done
- test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
-
- LIBS="-l$cf_curs_lib $cf_save_LIBS"
- if test "$cf_term_lib" = unknown ; then
- AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr()],
- [cf_result=yes],
- [cf_result=no])
- AC_MSG_RESULT($cf_result)
- test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
- elif test "$cf_curs_lib" = "$cf_term_lib" ; then
- :
- elif test "$cf_term_lib" != predefined ; then
- AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr(); tgoto((char *)0, 0, 0);],
- [cf_result=no],
- [
- LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
- AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr()],
- [cf_result=yes],
- [cf_result=error])
- ])
- AC_MSG_RESULT($cf_result)
- fi
+ # Check for library containing initscr
+ test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
+ if test "x$cf_curs_lib" = x
+ then
+ for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
+ do
+ AC_CHECK_LIB($cf_curs_lib,initscr,[break])
+ done
+ fi
+ test $cf_curs_lib = unknown && AC_MSG_ERROR(no curses library found)
+
+ LIBS="-l$cf_curs_lib $cf_save_LIBS"
+ if test "$cf_term_lib" = unknown ; then
+ AC_MSG_CHECKING(if we can link with $cf_curs_lib library)
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr()],
+ [cf_result=yes],
+ [cf_result=no])
+ AC_MSG_RESULT($cf_result)
+ test $cf_result = no && AC_MSG_ERROR(Cannot link curses library)
+ elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+ :
+ elif test "$cf_term_lib" != predefined ; then
+ AC_MSG_CHECKING(if we need both $cf_curs_lib and $cf_term_lib libraries)
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr(); tgoto((char *)0, 0, 0);],
+ [cf_result=no],
+ [
+ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr()],
+ [cf_result=yes],
+ [cf_result=error])
+ ])
+ AC_MSG_RESULT($cf_result)
+ fi
fi
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_TERM_H version: 8 updated: 2010/10/23 15:54:49
+dnl CF_CURSES_TERM_H version: 10 updated: 2012/10/06 08:57:51
dnl ----------------
dnl SVr4 curses should have term.h as well (where it puts the definitions of
dnl the low-level interface). This may not be true in old/broken implementations,
@@ -752,9 +789,17 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_header,[
# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
# for <term.h> if we do not find the variant.
-for cf_header in \
- `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \
- term.h
+
+cf_header_list="term.h ncurses/term.h ncursesw/term.h"
+
+case ${cf_cv_ncurses_header:-curses.h} in #(vi
+*/*)
+ cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
+ cf_header_list="$cf_header_item $cf_header_list"
+ ;;
+esac
+
+for cf_header in $cf_header_list
do
AC_TRY_COMPILE([
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -789,18 +834,73 @@ esac
case $cf_cv_term_header in #(vi
term.h) #(vi
- AC_DEFINE(HAVE_TERM_H)
+ AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
;;
ncurses/term.h) #(vi
- AC_DEFINE(HAVE_NCURSES_TERM_H)
+ AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
ncursesw/term.h)
- AC_DEFINE(HAVE_NCURSESW_TERM_H)
+ AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_WACS_MAP version: 5 updated: 2011/01/15 11:28:59
+dnl CF_CURSES_UNCTRL_H version: 3 updated: 2013/11/03 06:26:10
+dnl ------------------
+dnl Any X/Open curses implementation must have unctrl.h, but ncurses packages
+dnl may put it in a subdirectory (along with ncurses' other headers, of
+dnl course). Packages which put the headers in inconsistent locations are
+dnl broken).
+AC_DEFUN([CF_CURSES_UNCTRL_H],
+[
+AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
+
+AC_CACHE_CHECK(for unctrl.h, cf_cv_unctrl_header,[
+
+# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
+# for <unctrl.h> if we do not find the variant.
+
+cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
+
+case ${cf_cv_ncurses_header:-curses.h} in #(vi
+*/*)
+ cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
+ cf_header_list="$cf_header_item $cf_header_list"
+ ;;
+esac
+
+for cf_header in $cf_header_list
+do
+ AC_TRY_COMPILE([
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <${cf_header}>],
+ [WINDOW *x],
+ [cf_cv_unctrl_header=$cf_header
+ break],
+ [cf_cv_unctrl_header=no])
+done
+])
+
+case $cf_cv_unctrl_header in #(vi
+no)
+ AC_MSG_WARN(unctrl.h header not found)
+ ;;
+esac
+
+case $cf_cv_unctrl_header in #(vi
+unctrl.h) #(vi
+ AC_DEFINE(HAVE_UNCTRL_H,1,[Define to 1 if we have unctrl.h])
+ ;;
+ncurses/unctrl.h) #(vi
+ AC_DEFINE(HAVE_NCURSES_UNCTRL_H,1,[Define to 1 if we have ncurses/unctrl.h])
+ ;;
+ncursesw/unctrl.h)
+ AC_DEFINE(HAVE_NCURSESW_UNCTRL_H,1,[Define to 1 if we have ncursesw/unctrl.h])
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_CURSES_WACS_MAP version: 6 updated: 2012/10/06 08:57:51
dnl ------------------
dnl Check for likely values of wacs_map[].
AC_DEFUN([CF_CURSES_WACS_MAP],
@@ -819,10 +919,10 @@ AC_CACHE_CHECK(for wide alternate character set array, cf_cv_curses_wacs_map,[
break])
done])
-test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map)
+test "$cf_cv_curses_wacs_map" != unknown && AC_DEFINE_UNQUOTED(CURSES_WACS_ARRAY,$cf_cv_curses_wacs_map,[Define to name of (n)curses wide-character array])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_WACS_SYMBOLS version: 1 updated: 2011/01/15 11:28:59
+dnl CF_CURSES_WACS_SYMBOLS version: 2 updated: 2012/10/06 08:57:51
dnl ----------------------
dnl Do a check to see if the WACS_xxx constants are defined compatibly with
dnl X/Open Curses. In particular, NetBSD's implementation of the WACS_xxx
@@ -854,7 +954,7 @@ else
fi
])
-test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS)
+test "$cf_cv_curses_wacs_symbols" != no && AC_DEFINE(CURSES_WACS_SYMBOLS,1,[Define to 1 if (n)curses supports wide-character WACS_ symbols])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_DIRNAME version: 4 updated: 2002/12/21 19:25:52
@@ -862,7 +962,7 @@ dnl ----------
dnl "dirname" is not portable, so we fake it with a shell script.
AC_DEFUN([CF_DIRNAME],[$1=`echo $2 | sed -e 's%/[[^/]]*$%%'`])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_DISABLE_ECHO version: 11 updated: 2009/12/13 13:16:57
+dnl CF_DISABLE_ECHO version: 12 updated: 2012/10/06 16:30:28
dnl ---------------
dnl You can always use "make -n" to see the actual options, but it's hard to
dnl pick out/analyze warning messages when the compile-line is long.
@@ -877,7 +977,7 @@ dnl
AC_DEFUN([CF_DISABLE_ECHO],[
AC_MSG_CHECKING(if you want to see long compiling messages)
CF_ARG_DISABLE(echo,
- [ --disable-echo display "compiling" commands],
+ [ --disable-echo do not display "compiling" commands],
[
ECHO_LT='--silent'
ECHO_LD='@echo linking [$]@;'
@@ -899,7 +999,7 @@ AC_SUBST(SHOW_CC)
AC_SUBST(ECHO_CC)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_DISABLE_LEAKS version: 6 updated: 2010/07/23 04:14:32
+dnl CF_DISABLE_LEAKS version: 7 updated: 2012/10/02 20:55:03
dnl ----------------
dnl Combine no-leak checks with the libraries or tools that are used for the
dnl checks.
@@ -917,11 +1017,30 @@ AC_ARG_ENABLE(leaks,
AC_MSG_RESULT($with_no_leaks)
if test "$with_no_leaks" = yes ; then
- AC_DEFINE(NO_LEAKS)
- AC_DEFINE(YY_NO_LEAKS)
+ AC_DEFINE(NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
+ AC_DEFINE(YY_NO_LEAKS,1,[Define to 1 if you want to perform memory-leak testing.])
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_DISABLE_RPATH_HACK version: 2 updated: 2011/02/13 13:31:33
+dnl ---------------------
+dnl The rpath-hack makes it simpler to build programs, particularly with the
+dnl *BSD ports which may have essential libraries in unusual places. But it
+dnl can interfere with building an executable for the base system. Use this
+dnl option in that case.
+AC_DEFUN([CF_DISABLE_RPATH_HACK],
+[
+AC_MSG_CHECKING(if rpath-hack should be disabled)
+CF_ARG_DISABLE(rpath-hack,
+ [ --disable-rpath-hack don't add rpath options for additional libraries],
+ [cf_disable_rpath_hack=yes],
+ [cf_disable_rpath_hack=no])
+AC_MSG_RESULT($cf_disable_rpath_hack)
+if test "$cf_disable_rpath_hack" = no ; then
+ CF_RPATH_HACK
+fi
+])
+dnl ---------------------------------------------------------------------------
dnl CF_ENABLE_WARNINGS version: 4 updated: 2009/07/26 17:53:03
dnl ------------------
dnl Configure-option to enable gcc warnings
@@ -1122,7 +1241,7 @@ ifelse([$5],,AC_MSG_WARN(Cannot find $3 library),[$5])
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_FUNC_CURSES_VERSION version: 5 updated: 2010/10/23 15:54:49
+dnl CF_FUNC_CURSES_VERSION version: 6 updated: 2012/10/06 16:39:58
dnl ----------------------
dnl Solaris has a data item 'curses_version', which confuses AC_CHECK_FUNCS.
dnl It's a character string "SVR4", not documented.
@@ -1141,10 +1260,10 @@ int main()
,[cf_cv_func_curses_version=no]
,[cf_cv_func_curses_version=unknown])
rm -f core])
-test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION)
+test "$cf_cv_func_curses_version" = yes && AC_DEFINE(HAVE_CURSES_VERSION,1,[Define to 1 if we have curses_version function])
])
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_ATTRIBUTES version: 14 updated: 2010/10/23 15:52:32
+dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@@ -1222,27 +1341,27 @@ EOF
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
+ noreturn) #(vi
+ AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
+ ;;
printf) #(vi
- if test "$cf_printf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-EOF
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+ AC_DEFINE(GCC_PRINTF,1,[Define to 1 if the compiler supports gcc-like printf attribute.])
fi
+ AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
;;
scanf) #(vi
- if test "$cf_scanf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
-EOF
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+ AC_DEFINE(GCC_SCANF,1,[Define to 1 if the compiler supports gcc-like scanf attribute.])
fi
+ AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
+ ;;
+ unused) #(vi
+ AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
;;
esac
fi
@@ -1254,7 +1373,7 @@ rm -rf conftest*
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_VERSION version: 5 updated: 2010/04/24 11:02:31
+dnl CF_GCC_VERSION version: 7 updated: 2012/10/18 06:46:33
dnl --------------
dnl Find version of gcc
AC_DEFUN([CF_GCC_VERSION],[
@@ -1262,13 +1381,13 @@ AC_REQUIRE([AC_PROG_CC])
GCC_VERSION=none
if test "$GCC" = yes ; then
AC_MSG_CHECKING(version of $CC)
- GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[[^)]]*) //' -e 's/^.*(Debian[[^)]]*) //' -e 's/^[[^0-9.]]*//' -e 's/[[^0-9.]].*//'`"
test -z "$GCC_VERSION" && GCC_VERSION=unknown
AC_MSG_RESULT($GCC_VERSION)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 27 updated: 2010/10/23 15:52:32
+dnl CF_GCC_WARNINGS version: 31 updated: 2013/11/19 19:23:35
dnl ---------------
dnl Check if the compiler supports useful warning options. There's a few that
dnl we don't use, simply because they're too noisy:
@@ -1291,6 +1410,7 @@ AC_DEFUN([CF_GCC_WARNINGS],
[
AC_REQUIRE([CF_GCC_VERSION])
CF_INTEL_COMPILER(GCC,INTEL_COMPILER,CFLAGS)
+CF_CLANG_COMPILER(GCC,CLANG_COMPILER,CFLAGS)
cat > conftest.$ac_ext <<EOF
#line __oline__ "${as_me:-configure}"
@@ -1339,10 +1459,14 @@ then
EXTRA_CFLAGS=
cf_warn_CONST=""
test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+ test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
for cf_opt in W Wall \
Wbad-function-cast \
Wcast-align \
Wcast-qual \
+ Wdeclaration-after-statement \
+ Wextra \
Winline \
Wmissing-declarations \
Wmissing-prototypes \
@@ -1350,7 +1474,7 @@ then
Wpointer-arith \
Wshadow \
Wstrict-prototypes \
- Wundef $cf_warn_CONST $1
+ Wundef $cf_gcc_warnings $cf_warn_CONST $1
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
if AC_TRY_EVAL(ac_compile); then
@@ -1366,6 +1490,13 @@ then
continue;;
esac
;;
+ Wpointer-arith) #(vi
+ case $GCC_VERSION in
+ [[12]].*)
+ CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
+ continue;;
+ esac
+ ;;
esac
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -1377,6 +1508,29 @@ rm -rf conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_GETOPT_HEADER version: 5 updated: 2012/10/06 16:39:58
+dnl ----------------
+dnl Check for getopt's variables which are commonly defined in stdlib.h,
+dnl unistd.h or (nonstandard) in getopt.h
+AC_DEFUN([CF_GETOPT_HEADER],
+[
+AC_HAVE_HEADERS(unistd.h getopt.h)
+AC_CACHE_CHECK(for header declaring getopt variables,cf_cv_getopt_header,[
+cf_cv_getopt_header=none
+for cf_header in stdio.h stdlib.h unistd.h getopt.h
+do
+AC_TRY_COMPILE([
+#include <$cf_header>],
+[int x = optind; char *y = optarg],
+[cf_cv_getopt_header=$cf_header
+ break])
+done
+])
+if test $cf_cv_getopt_header != none ; then
+ AC_DEFINE(HAVE_GETOPT_HEADER,1,[Define to 1 if we need to include getopt.h])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
dnl -------------
dnl Check if we must define _GNU_SOURCE to get a reasonable value for
@@ -1453,6 +1607,13 @@ test -d "$oldincludedir" && {
$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_HELP_MESSAGE version: 3 updated: 1998/01/14 10:56:23
+dnl ---------------
+dnl Insert text into the help-message, for readability, from AC_ARG_WITH.
+AC_DEFUN([CF_HELP_MESSAGE],
+[AC_DIVERT_HELP([$1])dnl
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_INHERIT_SCRIPT version: 2 updated: 2003/03/01 23:50:42
dnl -----------------
dnl If we do not have a given script, look for it in the parent directory.
@@ -1461,7 +1622,7 @@ AC_DEFUN([CF_INHERIT_SCRIPT],
test -f $1 || ( test -f ../$1 && cp ../$1 ./ )
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 4 updated: 2010/05/26 05:38:42
+dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
dnl -----------------
dnl Check if the given compiler is really the Intel compiler for Linux. It
dnl tries to imitate gcc, but does not return an error when it finds a mismatch
@@ -1475,6 +1636,7 @@ dnl $1 = GCC (default) or GXX
dnl $2 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
dnl $3 = CFLAGS (default) or CXXFLAGS
AC_DEFUN([CF_INTEL_COMPILER],[
+AC_REQUIRE([AC_CANONICAL_HOST])
ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
@@ -1498,6 +1660,60 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
+dnl ---------------
+dnl For the given system and compiler, find the compiler flags to pass to the
+dnl loader to use the "rpath" feature.
+AC_DEFUN([CF_LD_RPATH_OPT],
+[
+AC_REQUIRE([CF_CHECK_CACHE])
+
+LD_RPATH_OPT=
+AC_MSG_CHECKING(for an rpath option)
+case $cf_cv_system_name in #(vi
+irix*) #(vi
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+linux*|gnu*|k*bsd*-gnu) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+openbsd[[2-9]].*|mirbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+dragonfly*|freebsd*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+netbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+osf*|mls+*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+solaris2*) #(vi
+ LD_RPATH_OPT="-R"
+ ;;
+*)
+ ;;
+esac
+AC_MSG_RESULT($LD_RPATH_OPT)
+
+case "x$LD_RPATH_OPT" in #(vi
+x-R*)
+ AC_MSG_CHECKING(if we need a space after rpath option)
+ cf_save_LIBS="$LIBS"
+ CF_ADD_LIBS(${LD_RPATH_OPT}$libdir)
+ AC_TRY_LINK(, , cf_rpath_space=no, cf_rpath_space=yes)
+ LIBS="$cf_save_LIBS"
+ AC_MSG_RESULT($cf_rpath_space)
+ test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_LIBRARY_PATH version: 9 updated: 2010/03/28 12:52:50
dnl ---------------
dnl Construct a search-list of directories for a nonstandard library-file
@@ -1588,38 +1804,7 @@ ifelse($1,,[
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_MIN_GETCCHAR version: 3 updated: 2010/10/23 15:54:49
-dnl ---------------
-dnl CF_MIN_GETCCHAR
-dnl Check whether getcchar's return value counts the trailing null in a wchar_t
-dnl string, or not. X/Open says it does, but Tru64 and Solaris do not do this.
-AC_DEFUN([CF_MIN_GETCCHAR],[
-AC_CACHE_CHECK(if getcchar counts trailing null,cf_cv_min_getcchar,[
-AC_TRY_RUN([
-#include <stdlib.h>
-#include <stdarg.h>
-#include <${cf_cv_ncurses_header:-curses.h}>
-
-int main()
-{
- wchar_t data[2];
- cchar_t temp[2];
- int count;
- data[0] = L'\0';
- setcchar(temp, data, 0, 0, (void *)0);
- count = getcchar(temp, (wchar_t *)0, (attr_t *)0, (short *)0, (void *)0);
- ${cf_cv_main_return:-return}(count != 0);
-}],
- [cf_cv_min_getcchar=no],
- [cf_cv_min_getcchar=yes],
- [cf_cv_min_getcchar=yes])
-])
-if test "$cf_cv_min_getcchar" = yes ; then
- AC_DEFINE(MIN_GETCCHAR,1)
-fi
-])dnl
-dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 3 updated: 2003/09/20 17:07:55
+dnl CF_MIXEDCASE_FILENAMES version: 6 updated: 2013/10/08 17:47:05
dnl ----------------------
dnl Check if the file-system supports mixed-case filenames. If we're able to
dnl create a lowercase name and see it as uppercase, it doesn't support that.
@@ -1628,7 +1813,7 @@ AC_DEFUN([CF_MIXEDCASE_FILENAMES],
AC_CACHE_CHECK(if filesystem supports mixed-case filenames,cf_cv_mixedcase,[
if test "$cross_compiling" = yes ; then
case $target_alias in #(vi
- *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
cf_cv_mixedcase=no
;;
*)
@@ -1646,7 +1831,7 @@ else
rm -f conftest CONFTEST
fi
])
-test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES)
+test "$cf_cv_mixedcase" = yes && AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if filesystem supports mixed-case filenames.])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_MSG_LOG version: 5 updated: 2010/10/23 15:52:32
@@ -1690,7 +1875,7 @@ printf("old\n");
,[$1=no])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CONFIG version: 8 updated: 2010/07/08 05:17:30
+dnl CF_NCURSES_CONFIG version: 10 updated: 2012/10/06 08:57:51
dnl -----------------
dnl Tie together the configure-script macros for ncurses.
dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
@@ -1702,7 +1887,10 @@ AC_DEFUN([CF_NCURSES_CONFIG],
cf_ncuconfig_root=ifelse($1,,ncurses,$1)
echo "Looking for ${cf_ncuconfig_root}-config"
-AC_PATH_PROGS(NCURSES_CONFIG,${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config,none)
+
+CF_ACVERSION_CHECK(2.52,
+ [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
+ [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
if test "$NCURSES_CONFIG" != none ; then
@@ -1713,7 +1901,7 @@ CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
dnl like CF_NCURSES_CPPFLAGS
-AC_DEFINE(NCURSES)
+AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
dnl like CF_NCURSES_LIBS
CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
@@ -1730,7 +1918,7 @@ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CPPFLAGS version: 20 updated: 2010/11/20 17:02:38
+dnl CF_NCURSES_CPPFLAGS version: 21 updated: 2012/10/06 08:57:51
dnl -------------------
dnl Look for the SVr4 curses clone 'ncurses' in the standard places, adjusting
dnl the CPPFLAGS variable so we can include its header.
@@ -1776,12 +1964,12 @@ CF_NCURSES_HEADER
CF_TERM_HEADER
# some applications need this, but should check for NCURSES_VERSION
-AC_DEFINE(NCURSES)
+AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
CF_NCURSES_VERSION
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_EXT_FUNCS version: 3 updated: 2010/11/13 19:43:23
+dnl CF_NCURSES_EXT_FUNCS version: 4 updated: 2012/10/06 16:39:58
dnl --------------------
dnl Since 2007/11/17, ncurses has defined NCURSES_EXT_FUNCS; earlier versions
dnl may provide these functions. Define the symbol if it is not defined, and
@@ -1813,10 +2001,10 @@ AC_TRY_LINK([
[cf_cv_ncurses_ext_funcs=no])
])
])
-test "$cf_cv_ncurses_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS)
+test "$cf_cv_ncurses_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 if we have ncurses extensions])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_HEADER version: 2 updated: 2008/03/23 14:48:54
+dnl CF_NCURSES_HEADER version: 3 updated: 2012/10/06 08:57:51
dnl -----------------
dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
dnl variations of ncurses' installs.
@@ -1867,16 +2055,16 @@ fi
case $cf_cv_ncurses_header in # (vi
*ncurses.h)
- AC_DEFINE(HAVE_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSES_H,1,[Define to 1 if we have ncurses.h])
;;
esac
case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
- AC_DEFINE(HAVE_NCURSES_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSES_NCURSES_H,1,[Define to 1 if we have ncurses/ncurses.h])
;;
ncursesw/curses.h|ncursesw/ncurses.h)
- AC_DEFINE(HAVE_NCURSESW_NCURSES_H)
+ AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h])
;;
esac
@@ -1950,7 +2138,7 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_VERSION version: 13 updated: 2010/10/23 15:54:49
+dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
dnl ------------------
dnl Check for the version of ncurses, to aid in reporting bugs, etc.
dnl Call CF_CURSES_CPPFLAGS first, or CF_NCURSES_CPPFLAGS. We don't use
@@ -2009,7 +2197,7 @@ EOF
])
rm -f $cf_tempfile
])
-test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES)
+test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_NCURSES_WRAP_PREFIX version: 1 updated: 2009/03/28 16:08:10
@@ -2028,7 +2216,7 @@ AC_MSG_RESULT($NCURSES_WRAP_PREFIX)
AC_SUBST(NCURSES_WRAP_PREFIX)
])
dnl ---------------------------------------------------------------------------
-dnl CF_NETBSD_FORM_H version: 1 updated: 2011/01/15 14:59:18
+dnl CF_NETBSD_FORM_H version: 2 updated: 2012/10/06 16:39:58
dnl ----------------
dnl Check for NetBSD's form.h, which is incompatible with SVr4 and ncurses.
dnl Some workarounds are needed in client programs to allow them to compile.
@@ -2045,10 +2233,10 @@ AC_TRY_COMPILE([
],[cf_cv_netbsd_form_h=no])
])
-test "$cf_cv_netbsd_form_h" = yes && AC_DEFINE(HAVE_NETBSD_FORM_H)
+test "$cf_cv_netbsd_form_h" = yes && AC_DEFINE(HAVE_NETBSD_FORM_H,1,[Define to 1 if we appear to be using NetBSD form.h])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NETBSD_MENU_H version: 1 updated: 2011/01/15 14:59:18
+dnl CF_NETBSD_MENU_H version: 2 updated: 2012/10/06 16:39:58
dnl ----------------
dnl Check for NetBSD's menu.h, which is incompatible with SVr4 and ncurses.
dnl Some workarounds are needed in client programs to allow them to compile.
@@ -2064,17 +2252,17 @@ AC_TRY_COMPILE([
],[cf_cv_netbsd_menu_h=no])
])
-test "$cf_cv_netbsd_menu_h" = yes && AC_DEFINE(HAVE_NETBSD_MENU_H)
+test "$cf_cv_netbsd_menu_h" = yes && AC_DEFINE(HAVE_NETBSD_MENU_H,1,[Define to 1 if we appear to be using NetBSD menu.h])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NO_LEAKS_OPTION version: 4 updated: 2006/12/16 14:24:05
+dnl CF_NO_LEAKS_OPTION version: 5 updated: 2012/10/02 20:55:03
dnl ------------------
dnl see CF_WITH_NO_LEAKS
AC_DEFUN([CF_NO_LEAKS_OPTION],[
AC_MSG_CHECKING(if you want to use $1 for testing)
AC_ARG_WITH($1,
[$2],
- [AC_DEFINE($3)ifelse([$4],,[
+ [AC_DEFINE_UNQUOTED($3,1,"Define to 1 if you want to use $1 for testing.")ifelse([$4],,[
$4
])
: ${with_cflags:=-g}
@@ -2096,7 +2284,7 @@ case .$with_cflags in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATH_SYNTAX version: 13 updated: 2010/05/26 05:38:42
+dnl CF_PATH_SYNTAX version: 14 updated: 2012/06/19 20:58:54
dnl --------------
dnl Check the argument to see that it looks like a pathname. Rewrite it if it
dnl begins with one of the prefix/exec_prefix variables, and then again if the
@@ -2116,7 +2304,7 @@ case ".[$]$1" in #(vi
;;
.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
;;
-.\[$]{*prefix}*) #(vi
+.\[$]{*prefix}*|.\[$]{*dir}*) #(vi
eval $1="[$]$1"
case ".[$]$1" in #(vi
.NONE/*)
@@ -2133,13 +2321,15 @@ case ".[$]$1" in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PDCURSES_X11 version: 11 updated: 2011/01/15 18:45:38
+dnl CF_PDCURSES_X11 version: 13 updated: 2012/10/06 16:39:58
dnl ---------------
dnl Configure for PDCurses' X11 library
AC_DEFUN([CF_PDCURSES_X11],[
AC_REQUIRE([CF_X_ATHENA])
-AC_PATH_PROGS(XCURSES_CONFIG,xcurses-config,none)
+CF_ACVERSION_CHECK(2.52,
+ [AC_CHECK_TOOLS(XCURSES_CONFIG, xcurses-config, none)],
+ [AC_PATH_PROGS(XCURSES_CONFIG, xcurses-config, none)])
if test "$XCURSES_CONFIG" != none ; then
@@ -2168,15 +2358,15 @@ char *XCursesProgramName = "test";
fi
if test $cf_cv_lib_XCurses = yes ; then
- AC_DEFINE(UNIX)
- AC_DEFINE(XCURSES)
- AC_CHECK_HEADER(xcurses.h, AC_DEFINE(HAVE_XCURSES))
+ AC_DEFINE(UNIX,1,[Define to 1 if using PDCurses on Unix])
+ AC_DEFINE(XCURSES,1,[Define to 1 if using PDCurses on Unix])
+ AC_CHECK_HEADER(xcurses.h, AC_DEFINE(HAVE_XCURSES,1,[Define to 1 if using PDCurses on Unix]))
else
AC_MSG_ERROR(Cannot link with XCurses)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 4 updated: 2011/02/18 20:26:24
+dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
dnl -------------
dnl Check for the package-config program, unless disabled by command-line.
AC_DEFUN([CF_PKG_CONFIG],
@@ -2193,7 +2383,9 @@ no) #(vi
PKG_CONFIG=none
;;
yes) #(vi
- AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)
+ CF_ACVERSION_CHECK(2.52,
+ [AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
+ [AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
;;
*)
PKG_CONFIG=$withval
@@ -2305,29 +2497,17 @@ done
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_CC_U_D version: 1 updated: 2005/07/14 16:59:30
-dnl --------------
-dnl Check if C (preprocessor) -U and -D options are processed in the order
-dnl given rather than by type of option. Some compilers insist on apply all
-dnl of the -U options after all of the -D options. Others allow mixing them,
-dnl and may predefine symbols that conflict with those we define.
-AC_DEFUN([CF_PROG_CC_U_D],
-[
-AC_CACHE_CHECK(if $CC -U and -D options work together,cf_cv_cc_u_d_options,[
- cf_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
- AC_TRY_COMPILE([],[
-#ifndef U_D_OPTIONS
-make an undefined-error
-#endif
-#ifdef D_U_OPTIONS
-make a defined-error
-#endif
- ],[
- cf_cv_cc_u_d_options=yes],[
- cf_cv_cc_u_d_options=no])
- CPPFLAGS="$cf_save_CPPFLAGS"
-])
+dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55
+dnl ----------
+dnl standard check for CC, plus followup sanity checks
+dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
+AC_DEFUN([CF_PROG_CC],[
+ifelse($1,,[AC_PROG_CC],[AC_PROG_CC($1)])
+CF_GCC_VERSION
+CF_ACVERSION_CHECK(2.52,
+ [AC_PROG_CC_STDC],
+ [CF_ANSI_CC_REQD])
+CF_CC_ENV_FLAGS
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_PROG_INSTALL version: 5 updated: 2002/12/21 22:46:07
@@ -2373,7 +2553,124 @@ $1=`echo "$2" | \
-e 's/-[[UD]]'"$3"'\(=[[^ ]]*\)\?[$]//g'`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SIG_ATOMIC_T version: 2 updated: 2005/09/18 17:27:12
+dnl CF_RPATH_HACK version: 11 updated: 2013/09/01 13:02:00
+dnl -------------
+AC_DEFUN([CF_RPATH_HACK],
+[
+AC_REQUIRE([CF_LD_RPATH_OPT])
+AC_MSG_CHECKING(for updated LDFLAGS)
+if test -n "$LD_RPATH_OPT" ; then
+ AC_MSG_RESULT(maybe)
+
+ AC_CHECK_PROGS(cf_ldd_prog,ldd,no)
+ cf_rpath_list="/usr/lib /lib"
+ if test "$cf_ldd_prog" != no
+ then
+ cf_rpath_oops=
+
+AC_TRY_LINK([#include <stdio.h>],
+ [printf("Hello");],
+ [cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[[ ]]/%/%' -e 's%/[[^/]][[^/]]*$%%' |sort | uniq`])
+
+ # If we passed the link-test, but get a "not found" on a given library,
+ # this could be due to inept reconfiguration of gcc to make it only
+ # partly honor /usr/local/lib (or whatever). Sometimes this behavior
+ # is intentional, e.g., installing gcc in /usr/bin and suppressing the
+ # /usr/local libraries.
+ if test -n "$cf_rpath_oops"
+ then
+ for cf_rpath_src in $cf_rpath_oops
+ do
+ for cf_rpath_dir in \
+ /usr/local \
+ /usr/pkg \
+ /opt/sfw
+ do
+ if test -f $cf_rpath_dir/lib/$cf_rpath_src
+ then
+ CF_VERBOSE(...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src)
+ LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
+ break
+ fi
+ done
+ done
+ fi
+ fi
+
+ CF_VERBOSE(...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS)
+
+ CF_RPATH_HACK_2(LDFLAGS)
+ CF_RPATH_HACK_2(LIBS)
+
+ CF_VERBOSE(...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST(EXTRA_LDFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24
+dnl ---------------
+dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to
+dnl EXTRA_LDFLAGS for each -L option found.
+dnl
+dnl $cf_rpath_list contains a list of directories to ignore.
+dnl
+dnl $1 = variable name to update. The LDFLAGS variable should be the only one,
+dnl but LIBS often has misplaced -L options.
+AC_DEFUN([CF_RPATH_HACK_2],
+[
+CF_VERBOSE(...checking $1 [$]$1)
+
+cf_rpath_dst=
+for cf_rpath_src in [$]$1
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
+ fi
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ CF_VERBOSE(...Filter $cf_rpath_src ->$cf_rpath_tmp)
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+$1=$cf_rpath_dst
+
+CF_VERBOSE(...checked $1 [$]$1)
+AC_SUBST(EXTRA_LDFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SIG_ATOMIC_T version: 3 updated: 2012/10/04 20:12:20
dnl ---------------
dnl signal handler, but there are some gcc depedencies in that recommendation.
dnl Try anyway.
@@ -2405,7 +2702,7 @@ static void handler(int sig)
done
])
AC_MSG_RESULT($cf_cv_sig_atomic_t)
-test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t)
+test "$cf_cv_sig_atomic_t" != no && AC_DEFINE_UNQUOTED(SIG_ATOMIC_T, $cf_cv_sig_atomic_t,[Define to signal global datatype])
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
@@ -2425,7 +2722,7 @@ CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SYS_TIME_SELECT version: 4 updated: 2000/10/04 09:18:40
+dnl CF_SYS_TIME_SELECT version: 5 updated: 2012/10/04 05:24:07
dnl ------------------
dnl Check if we can include <sys/time.h> with <sys/select.h>; this breaks on
dnl older SCO configurations.
@@ -2445,10 +2742,10 @@ AC_TRY_COMPILE([
[cf_cv_sys_time_select=no])
])
AC_MSG_RESULT($cf_cv_sys_time_select)
-test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT)
+test "$cf_cv_sys_time_select" = yes && AC_DEFINE(HAVE_SYS_TIME_SELECT,1,[Define to 1 if we can include <sys/time.h> with <sys/select.h>])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_TERM_HEADER version: 2 updated: 2010/10/23 15:54:49
+dnl CF_TERM_HEADER version: 3 updated: 2012/10/06 08:57:51
dnl --------------
dnl Look for term.h, which is part of X/Open curses. It defines the interface
dnl to terminfo database. Usually it is in the same include-path as curses.h,
@@ -2481,21 +2778,90 @@ done
case $cf_cv_term_header in # (vi
*term.h)
- AC_DEFINE(HAVE_TERM_H)
+ AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
;;
esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- AC_DEFINE(HAVE_NCURSES_TERM_H)
+ AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
ncursesw/term.h)
- AC_DEFINE(HAVE_NCURSESW_TERM_H)
+ AC_DEFINE(HAVE_NCURSESW_TERM_H,1,[Define to 1 if we have ncursesw/term.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_TRY_PKG_CONFIG version: 4 updated: 2010/06/14 17:42:30
+dnl CF_TOP_BUILDDIR version: 2 updated: 2013/07/27 17:38:32
+dnl ---------------
+dnl Define a top_builddir symbol, for applications that need an absolute path.
+AC_DEFUN([CF_TOP_BUILDDIR],
+[
+top_builddir=ifelse($1,,`pwd`,$1)
+AC_SUBST(top_builddir)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TPUTS_PROTO version: 2 updated: 2011/04/23 19:25:50
+dnl --------------
+dnl Check for type of function-pointer passed to tputs. Some old
+dnl implementations used functions that had different prototypes, making it
+dnl hard to compile portable programs using tputs.
+AC_DEFUN([CF_TPUTS_PROTO],[
+CF_CURSES_FUNCS(tputs)
+if test x$cf_cv_func_tputs = xyes
+then
+ cf_done=no
+ for cf_arg in int char
+ do
+ for cf_ret in int void
+ do
+ if test $cf_ret = void
+ then
+ cf_return="/* nothing */"
+ else
+ cf_return="return value"
+ fi
+ AC_TRY_COMPILE([
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_cv_term_header>
+
+static $cf_ret outc($cf_arg value) { $cf_return; }
+],[
+ tputs("hello", 0, outc);
+ ${cf_cv_main_return:-return}(0);
+],[
+ CF_VERBOSE([prototype $cf_ret func($cf_arg value)])
+ cat >>confdefs.h <<EOF
+#define TPUTS_ARG $cf_arg
+#define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
+#define TPUTS_RETURN(value) $cf_return
+EOF
+ cf_done=yes
+ break
+])
+ done
+ test $cf_done = yes && break
+ done
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_TRIM_X_LIBS version: 2 updated: 2013/07/09 21:27:22
+dnl --------------
+dnl Trim extra base X libraries added as a workaround for inconsistent library
+dnl dependencies returned by "new" pkg-config files.
+AC_DEFUN([CF_TRIM_X_LIBS],[
+ for cf_trim_lib in Xmu Xt X11
+ do
+ case "$LIBS" in
+ *-l$cf_trim_lib\ *-l$cf_trim_lib*)
+ LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
+ CF_VERBOSE(..trimmed $LIBS)
+ ;;
+ esac
+ done
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_TRY_PKG_CONFIG version: 5 updated: 2013/07/06 21:27:06
dnl -----------------
dnl This is a simple wrapper to use for pkg-config, for libraries which may be
dnl available in that form.
@@ -2516,10 +2882,51 @@ if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $1; then
CF_ADD_LIBS($cf_pkgconfig_libs)
ifelse([$2],,:,[$2])
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
ifelse([$3],,:,[$3])
fi
])
dnl ---------------------------------------------------------------------------
+dnl CF_TRY_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
+dnl -------------------
+dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
+dnl can define it successfully.
+AC_DEFUN([CF_TRY_XOPEN_SOURCE],[
+AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+],[
+#ifdef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_cv_xopen_source=no],
+ [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
+ CPPFLAGS="$cf_save"
+ ])
+])
+
+if test "$cf_cv_xopen_source" != no ; then
+ CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
+ CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ CF_ADD_CFLAGS($cf_temp_xopen_source)
+fi
+])
+dnl ---------------------------------------------------------------------------
dnl CF_UPPER version: 5 updated: 2001/01/29 23:40:59
dnl --------
dnl Make an uppercase version of a variable
@@ -2529,7 +2936,7 @@ AC_DEFUN([CF_UPPER],
$1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
+dnl CF_UTF8_LIB version: 8 updated: 2012/10/06 08:57:51
dnl -----------
dnl Check for multibyte support, and if not found, utf8 compatibility library
AC_DEFUN([CF_UTF8_LIB],
@@ -2548,7 +2955,7 @@ AC_CACHE_CHECK(for multibyte character support,cf_cv_utf8_lib,[
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
# ncurses/ncursesw:
if test "$cf_cv_utf8_lib" = "add-on" ; then
- AC_DEFINE(HAVE_LIBUTF8_H)
+ AC_DEFINE(HAVE_LIBUTF8_H,1,[Define to 1 if we should include libutf8.h])
CF_ADD_INCDIR($cf_cv_header_path_utf8)
CF_ADD_LIBDIR($cf_cv_library_path_utf8)
CF_ADD_LIBS($cf_cv_library_file_utf8)
@@ -2563,7 +2970,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WCHAR_TYPE version: 3 updated: 2010/05/26 16:44:57
+dnl CF_WCHAR_TYPE version: 4 updated: 2012/10/06 16:39:58
dnl -------------
dnl Check if type wide-character type $1 is declared, and if so, which header
dnl file is needed. The second parameter is used to set a shell variable when
@@ -2595,7 +3002,7 @@ AC_TRY_COMPILE([
[cf_cv_$1=unknown])])])
if test "$cf_cv_$1" = yes ; then
- AC_DEFINE(NEED_WCHAR_H)
+ AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h])
NEED_WCHAR_H=1
fi
@@ -2667,6 +3074,60 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_NCURSES_ETC version: 2 updated: 2012/01/13 10:49:00
+dnl -------------------
+dnl Use this macro for programs which use any variant of "curses", e.g.,
+dnl "ncurses", and "PDCurses". Programs that can use curses and some unrelated
+dnl library (such as slang) should use a "--with-screen=XXX" option.
+dnl
+dnl This does not use AC_DEFUN, because that would tell autoconf to run each
+dnl of the macros inside this one - before this macro.
+define([CF_WITH_NCURSES_ETC],[
+CF_WITH_CURSES_DIR
+
+cf_cv_screen=curses
+
+AC_MSG_CHECKING(for specified curses library type)
+AC_ARG_WITH(ncursesw,
+ [ --with-ncursesw use wide ncurses-libraries],
+ [cf_cv_screen=ncursesw],[
+
+AC_ARG_WITH(ncurses,
+ [ --with-ncurses use ncurses-libraries],
+ [cf_cv_screen=ncurses],[
+
+AC_ARG_WITH(pdcurses,
+ [ --with-pdcurses compile/link with pdcurses X11 library],
+ [cf_cv_screen=pdcurses],[
+
+AC_ARG_WITH(curses-colr,
+ [ --with-curses-colr compile/link with HPUX 10.x color-curses],
+ [cf_cv_screen=curses_colr],[
+
+AC_ARG_WITH(curses-5lib,
+ [ --with-curses-5lib compile/link with SunOS 5lib curses],
+ [cf_cv_screen=curses_5lib])])])])])
+
+AC_MSG_RESULT($cf_cv_screen)
+
+case $cf_cv_screen in #(vi
+curses|curses_*) #(vi
+ CF_CURSES_CONFIG
+ ;;
+ncurses) #(vi
+ CF_NCURSES_CONFIG
+ ;;
+ncursesw) #(vi
+ CF_UTF8_LIB
+ CF_NCURSES_CONFIG(ncursesw)
+ ;;
+pdcurses)
+ CF_PDCURSES_X11
+ ;;
+esac
+
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_VALGRIND version: 1 updated: 2006/12/14 18:00:21
dnl ----------------
AC_DEFUN([CF_WITH_VALGRIND],[
@@ -2714,7 +3175,7 @@ AC_TRY_LINK([
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 35 updated: 2011/02/20 20:37:37
+dnl CF_XOPEN_SOURCE version: 46 updated: 2014/02/09 19:30:15
dnl ---------------
dnl Try to get _XOPEN_SOURCE defined properly that we can use POSIX functions,
dnl or adapt to the vendor's definitions to get equivalent functionality,
@@ -2724,16 +3185,17 @@ dnl Parameters:
dnl $1 is the nominal value for _XOPEN_SOURCE
dnl $2 is the nominal value for _POSIX_C_SOURCE
AC_DEFUN([CF_XOPEN_SOURCE],[
+AC_REQUIRE([AC_CANONICAL_HOST])
cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
cf_xopen_source=
case $host_os in #(vi
-aix[[456]]*) #(vi
+aix[[4-7]]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin) #(vi
+cygwin|msys) #(vi
cf_XOPEN_SOURCE=600
;;
darwin[[0-8]].*) #(vi
@@ -2741,6 +3203,7 @@ darwin[[0-8]].*) #(vi
;;
darwin*) #(vi
cf_xopen_source="-D_DARWIN_C_SOURCE"
+ cf_XOPEN_SOURCE=
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -2758,15 +3221,23 @@ hpux*) #(vi
;;
irix[[56]].*) #(vi
cf_xopen_source="-D_SGI_SOURCE"
+ cf_XOPEN_SOURCE=
;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
CF_GNU_SOURCE
;;
mirbsd*) #(vi
- # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
+ cf_XOPEN_SOURCE=
+ CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;;
netbsd*) #(vi
- # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+openbsd[[4-9]]*) #(vi
+ # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+ cf_xopen_source="-D_BSD_SOURCE"
+ cf_XOPEN_SOURCE=600
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
@@ -2780,36 +3251,12 @@ nto-qnx*) #(vi
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.1[[0-9]]) #(vi
- cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- ;;
-solaris2.[[1-9]]) #(vi
+solaris2.*) #(vi
cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
;;
*)
- AC_CACHE_CHECK(if we should define _XOPEN_SOURCE,cf_cv_xopen_source,[
- AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifndef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_xopen_source=no],
- [cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifdef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_xopen_source=no],
- [cf_cv_xopen_source=$cf_XOPEN_SOURCE])
- CPPFLAGS="$cf_save"
- ])
-])
- if test "$cf_cv_xopen_source" != no ; then
- CF_REMOVE_DEFINE(CFLAGS,$CFLAGS,_XOPEN_SOURCE)
- CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,_XOPEN_SOURCE)
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
- CF_ADD_CFLAGS($cf_temp_xopen_source)
- fi
+ CF_TRY_XOPEN_SOURCE
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;;
esac
@@ -2817,9 +3264,38 @@ esac
if test -n "$cf_xopen_source" ; then
CF_ADD_CFLAGS($cf_xopen_source)
fi
+
+dnl In anything but the default case, we may have system-specific setting
+dnl which is still not guaranteed to provide all of the entrypoints that
+dnl _XOPEN_SOURCE would yield.
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+ AC_MSG_CHECKING(if _XOPEN_SOURCE really is set)
+ AC_TRY_COMPILE([#include <stdlib.h>],[
+#ifndef _XOPEN_SOURCE
+make an error
+#endif],
+ [cf_XOPEN_SOURCE_set=yes],
+ [cf_XOPEN_SOURCE_set=no])
+ AC_MSG_RESULT($cf_XOPEN_SOURCE_set)
+ if test $cf_XOPEN_SOURCE_set = yes
+ then
+ AC_TRY_COMPILE([#include <stdlib.h>],[
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif],
+ [cf_XOPEN_SOURCE_set_ok=yes],
+ [cf_XOPEN_SOURCE_set_ok=no])
+ if test $cf_XOPEN_SOURCE_set_ok = no
+ then
+ AC_MSG_WARN(_XOPEN_SOURCE is lower than requested)
+ fi
+ else
+ CF_TRY_XOPEN_SOURCE
+ fi
+fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_X_ATHENA version: 20 updated: 2010/11/09 05:18:02
+dnl CF_X_ATHENA version: 21 updated: 2013/07/06 21:27:06
dnl -----------
dnl Check for Xaw (Athena) libraries
dnl
@@ -2878,6 +3354,8 @@ if test "$PKG_CONFIG" != none ; then
CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena)
AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
+ CF_TRIM_X_LIBS
+
AC_CACHE_CHECK(for usable $cf_x_athena/Xmu package,cf_cv_xaw_compat,[
AC_TRY_LINK([
#include <X11/Xmu/CharSet.h>
@@ -2893,7 +3371,15 @@ int check = XmuCompareISOLatin1("big", "small")
;;
*)
CF_VERBOSE(work around broken package)
- CF_TRY_PKG_CONFIG(xmu,,[CF_ADD_LIB_AFTER(-lXt,-lXmu)])
+ cf_save_xmu="$LIBS"
+ cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^[ ][ ]*//' -e 's/ .*//'`
+ CF_TRY_PKG_CONFIG(xmu,[
+ LIBS="$cf_save_xmu"
+ CF_ADD_LIB_AFTER($cf_first_lib,$cf_pkgconfig_libs)
+ ],[
+ CF_ADD_LIB_AFTER($cf_first_lib,-lXmu)
+ ])
+ CF_TRIM_X_LIBS
;;
esac
fi
@@ -2957,7 +3443,7 @@ elif test "$cf_x_athena_inc" != default ; then
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_X_ATHENA_LIBS version: 10 updated: 2011/02/13 13:31:33
+dnl CF_X_ATHENA_LIBS version: 12 updated: 2011/07/17 19:55:02
dnl ----------------
dnl Normally invoked by CF_X_ATHENA, with $1 set to the appropriate flavor of
dnl the Athena widgets, e.g., Xaw, Xaw3d, neXtaw.
@@ -2973,19 +3459,24 @@ for cf_path in default \
/usr/local
do
for cf_lib in \
- "-l$cf_x_athena_root -lXmu" \
- "-l$cf_x_athena_root -lXpm -lXmu" \
- "-l${cf_x_athena_root}_s -lXmu_s"
+ ${cf_x_athena_root} \
+ ${cf_x_athena_root}7 \
+ ${cf_x_athena_root}6
+ do
+ for cf_libs in \
+ "-l$cf_lib -lXmu" \
+ "-l$cf_lib -lXpm -lXmu" \
+ "-l${cf_lib}_s -lXmu_s"
do
if test -z "$cf_x_athena_lib" ; then
cf_save="$LIBS"
cf_test=XawSimpleMenuAddGlobalActions
if test $cf_path != default ; then
- CF_ADD_LIBS(-L$cf_path/lib $cf_lib)
- AC_MSG_CHECKING(for $cf_lib in $cf_path)
+ CF_ADD_LIBS(-L$cf_path/lib $cf_libs)
+ AC_MSG_CHECKING(for $cf_libs in $cf_path)
else
- CF_ADD_LIBS($cf_lib)
- AC_MSG_CHECKING(for $cf_test in $cf_lib)
+ CF_ADD_LIBS($cf_libs)
+ AC_MSG_CHECKING(for $cf_test in $cf_libs)
fi
AC_TRY_LINK([
#include <X11/Intrinsic.h>
@@ -2996,12 +3487,14 @@ $cf_test((XtAppContext) 0)],
[cf_result=no])
AC_MSG_RESULT($cf_result)
if test "$cf_result" = yes ; then
- cf_x_athena_lib="$cf_lib"
+ cf_x_athena_lib="$cf_libs"
break
fi
LIBS="$cf_save"
fi
- done
+ done # cf_libs
+ test -n "$cf_x_athena_lib" && break
+ done # cf_lib
done
if test -z "$cf_x_athena_lib" ; then
@@ -3021,7 +3514,7 @@ CF_TRY_PKG_CONFIG(Xext,,[
[CF_ADD_LIB(Xext)])])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_X_TOOLKIT version: 20 updated: 2010/11/19 05:43:04
+dnl CF_X_TOOLKIT version: 21 updated: 2012/10/04 06:57:36
dnl ------------
dnl Check for X Toolkit libraries
dnl
@@ -3095,7 +3588,7 @@ AC_TRY_LINK([
AC_CHECK_FUNC(XtAppInitialize,,[
AC_CHECK_LIB(Xt, XtAppInitialize,
- [AC_DEFINE(HAVE_LIBXT)
+ [AC_DEFINE(HAVE_LIBXT,1,[Define to 1 if we can compile with the Xt library])
cf_have_X_LIBS=Xt
LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"],,
[$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])])
diff --git a/test/background.c b/test/background.c
index afbe5f536032..6c5ad996c5ba 100644
--- a/test/background.c
+++ b/test/background.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003,2006 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2012,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,64 +26,204 @@
* authorization. *
****************************************************************************/
/*
- * $Id: background.c,v 1.3 2006/06/03 16:43:08 tom Exp $
+ * $Id: background.c,v 1.14 2014/02/01 22:10:42 tom Exp $
*/
-#include <test.priv.h>
+#define NEED_COLOR_CODE 1
+#define NEED_COLOR_NAME 1
+#include <color_name.h>
-int
-main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+static int default_bg = COLOR_BLACK;
+static int default_fg = COLOR_WHITE;
+
+static void
+test_background(void)
{
- short f, b;
+ NCURSES_COLOR_T f, b;
+ int row;
+ int chr;
- initscr();
- cbreak();
- noecho();
+ if (pair_content(0, &f, &b) == ERR) {
+ printw("pair 0 contains no data\n");
+ } else {
+ printw("pair 0 contains (%d,%d)\n", (int) f, (int) b);
+ }
+ getch();
- if (has_colors()) {
- start_color();
+ printw("Initializing pair 1 to red/%s\n", color_name(default_bg));
+ init_pair(1, COLOR_RED, (NCURSES_COLOR_T) default_bg);
+ bkgdset((chtype) (' ' | COLOR_PAIR(1)));
+ printw("RED/BLACK\n");
+ getch();
- pair_content(0, &f, &b);
- printw("pair 0 contains (%d,%d)\n", f, b);
- getch();
+ printw("Initializing pair 2 to %s/blue\n", color_name(default_fg));
+ init_pair(2, (NCURSES_COLOR_T) default_fg, COLOR_BLUE);
+ bkgdset((chtype) (' ' | COLOR_PAIR(2)));
+ printw("This line should be %s/blue\n", color_name(default_fg));
+ getch();
- printw("Initializing pair 1 to red/black\n");
- init_pair(1, COLOR_RED, COLOR_BLACK);
- bkgdset(' ' | COLOR_PAIR(1));
- printw("RED/BLACK\n");
- getch();
+ printw("Initializing pair 3 to %s/cyan (ACS_HLINE)\n", color_name(default_fg));
+ init_pair(3, (NCURSES_COLOR_T) default_fg, COLOR_CYAN);
+ printw("...and drawing a box which should be followed by lines\n");
+ bkgdset(ACS_HLINE | COLOR_PAIR(3));
+ /*
+ * Characters from vt100 line-drawing should be mapped to line-drawing,
+ * since A_ALTCHARSET is set in the background, and the character part
+ * of the background is replaced by the nonblank characters written.
+ *
+ * Characters not in the line-drawing range are usually sent as-is.
+ *
+ * With SVr4 curses it is possible to rely on this to mix uppercase text
+ * with the (lowercase) line-drawing characters. ncurses uses some of
+ * the uppercase characters for encoding thick- and double-lines.
+ */
+ row = 7;
+ mvprintw(row++, 10, "l");
+ for (chr = 0; chr < 32; ++chr)
+ addch(' ');
+ printw("x\n");
+ chr = 32;
+ while (chr < 128) {
+ if ((chr % 32) == 0)
+ mvprintw(row++, 10, "x");
+ addch((chtype) ((chr == 127) ? ' ' : chr));
+ if ((++chr % 32) == 0)
+ printw("x\n");
+ }
+ mvprintw(row++, 10, "m");
+ for (chr = 0; chr < 32; ++chr)
+ addch(' ');
+ printw("j\n");
+ getch();
- printw("Initializing pair 2 to white/blue\n");
- init_pair(2, COLOR_WHITE, COLOR_BLUE);
- bkgdset(' ' | COLOR_PAIR(2));
- printw("WHITE/BLUE\n");
- getch();
+ bkgdset((chtype) (' ' | COLOR_PAIR(0)));
+ printw("Default Colors\n");
+ getch();
- printw("Resetting colors to pair 0\n");
- bkgdset(' ' | COLOR_PAIR(0));
- printw("Default Colors\n");
- getch();
+ printw("Resetting colors to pair 1\n");
+ bkgdset((chtype) (' ' | COLOR_PAIR(1)));
+ printw("This line should be red/%s\n", color_name(default_bg));
+ getch();
- printw("Resetting colors to pair 1\n");
- bkgdset(' ' | COLOR_PAIR(1));
- printw("RED/BLACK\n");
- getch();
+ printw("Setting screen to pair 0\n");
+ bkgd((chtype) (' ' | COLOR_PAIR(0)));
+ getch();
- printw("Setting screen to pair 0\n");
- bkgd(' ' | COLOR_PAIR(0));
- getch();
+ printw("Setting screen to pair 1\n");
+ bkgd((chtype) (' ' | COLOR_PAIR(1)));
+ getch();
- printw("Setting screen to pair 1\n");
- bkgd(' ' | COLOR_PAIR(1));
- getch();
+ printw("Setting screen to pair 2\n");
+ bkgd((chtype) (' ' | COLOR_PAIR(2)));
+ getch();
- printw("Setting screen to pair 2\n");
- bkgd(' ' | COLOR_PAIR(2));
- getch();
+ printw("Setting screen to pair 3\n");
+ bkgd((chtype) (' ' | COLOR_PAIR(3)));
+ getch();
- printw("Setting screen to pair 0\n");
- bkgd(' ' | COLOR_PAIR(0));
- getch();
+ printw("Setting screen to pair 0\n");
+ bkgd((chtype) (' ' | COLOR_PAIR(0)));
+ getch();
+}
+
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: background [options]"
+ ,""
+ ,"Options:"
+#if HAVE_ASSUME_DEFAULT_COLORS
+ ," -a invoke assume_default_colors, repeat to use in init_pair"
+#endif
+ ," -b XXX specify background color"
+#if HAVE_USE_DEFAULT_COLORS
+ ," -d invoke use_default_colors, repeat to use in init_pair"
+#endif
+ ," -f XXX specify foreground color"
+ };
+ size_t n;
+
+ for (n = 0; n < SIZEOF(msg); n++)
+ fprintf(stderr, "%s\n", msg[n]);
+
+ ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+#if HAVE_ASSUME_DEFAULT_COLORS
+ int a_option = 0;
+#endif
+#if HAVE_USE_DEFAULT_COLORS
+ int d_option = 0;
+#endif
+ int n;
+
+ setlocale(LC_ALL, "");
+
+ while ((n = getopt(argc, argv, "ab:df:")) != -1) {
+ switch (n) {
+#if HAVE_ASSUME_DEFAULT_COLORS
+ case 'a':
+ ++a_option;
+ break;
+#endif
+ case 'b':
+ default_bg = color_code(optarg);
+ break;
+#if HAVE_USE_DEFAULT_COLORS
+ case 'd':
+ ++d_option;
+ break;
+#endif
+ case 'f':
+ default_fg = color_code(optarg);
+ break;
+ default:
+ usage();
+ }
+ }
+#if HAVE_USE_DEFAULT_COLORS && HAVE_ASSUME_DEFAULT_COLORS
+ if (a_option && d_option) {
+ fprintf(stderr, "Use either -a or -d option, but not both\n");
+ ExitProgram(EXIT_FAILURE);
+ }
+#endif
+
+ initscr();
+ cbreak();
+ noecho();
+
+ if (has_colors()) {
+ start_color();
+
+#if HAVE_USE_DEFAULT_COLORS
+ if (d_option) {
+ printw("Using default colors...\n");
+ use_default_colors();
+ if (d_option > 1) {
+ default_fg = -1;
+ default_bg = -1;
+ }
+ }
+#endif
+#if HAVE_ASSUME_DEFAULT_COLORS
+ if (a_option) {
+ printw("Using assumed colors %s/%s...\n",
+ color_name(default_fg),
+ color_name(default_bg));
+ assume_default_colors(default_fg, default_bg);
+ if (a_option > 1) {
+ default_fg = -1;
+ default_bg = -1;
+ }
+ }
+#endif
+
+ test_background();
} else {
printw("This demo requires a color terminal");
diff --git a/test/blue.c b/test/blue.c
index dfe6abf1b426..50d48b1d5b84 100644
--- a/test/blue.c
+++ b/test/blue.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2009,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,7 +40,7 @@
* results, use the ncurses(3) library. On non-Intel machines, SVr4 curses is
* just as good.
*
- * $Id: blue.c,v 1.33 2009/10/24 21:03:35 tom Exp $
+ * $Id: blue.c,v 1.35 2013/04/27 19:46:53 tom Exp $
*/
#include <test.priv.h>
@@ -70,7 +70,7 @@
#define BLACK_ON_WHITE 2
#define BLUE_ON_WHITE 3
-static RETSIGTYPE die(int onsig) GCC_NORETURN;
+static void die(int onsig) GCC_NORETURN;
static int deck_size = PACK_SIZE; /* initial deck */
static int deck[PACK_SIZE];
@@ -132,7 +132,7 @@ static chtype glyphs[] =
static chtype *suits = letters; /* this may change to glyphs below */
-static RETSIGTYPE
+static void
die(int onsig)
{
(void) signal(onsig, SIG_IGN);
@@ -202,8 +202,8 @@ printcard(int value)
if (value == NOCARD)
(void) addstr(" ");
else {
- addch(ranks[value % SUIT_LENGTH][0] | COLOR_PAIR(BLUE_ON_WHITE));
- addch(ranks[value % SUIT_LENGTH][1] | COLOR_PAIR(BLUE_ON_WHITE));
+ addch(ranks[value % SUIT_LENGTH][0] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
+ addch(ranks[value % SUIT_LENGTH][1] | (chtype) COLOR_PAIR(BLUE_ON_WHITE));
addch(suits[value / SUIT_LENGTH]);
}
(void) addch(' ');
diff --git a/test/bs.c b/test/bs.c
index ee7f2271d6bd..c158cbb07251 100644
--- a/test/bs.c
+++ b/test/bs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -34,7 +34,7 @@
* v2.0 featuring strict ANSI/POSIX conformance, November 1993.
* v2.1 with ncurses mouse support, September 1995
*
- * $Id: bs.c,v 1.52 2010/11/13 20:07:52 tom Exp $
+ * $Id: bs.c,v 1.62 2013/11/16 19:57:56 tom Exp $
*/
#include <test.priv.h>
@@ -110,7 +110,7 @@ static char sub[] = "Submarine";
static char destroy[] = "Destroyer";
static char ptboat[] = "PT Boat";
-static char name[40];
+static char *your_name;
static char dftname[] = "stranger";
/* direction constants */
@@ -174,9 +174,9 @@ static int salvo, blitz, closepack;
#define PR (void)addstr
-static RETSIGTYPE uninitgame(int sig) GCC_NORETURN;
+static void uninitgame(int sig) GCC_NORETURN;
-static RETSIGTYPE
+static void
uninitgame(int sig GCC_UNUSED)
/* end the game, either normally or due to signal */
{
@@ -220,11 +220,12 @@ intro(void)
CATCHALL(uninitgame);
- if ((tmpname = getlogin()) != 0) {
- (void) strcpy(name, tmpname);
- name[0] = (char) toupper(UChar(name[0]));
- } else
- (void) strcpy(name, dftname);
+ if ((tmpname = getlogin()) != 0 &&
+ (your_name = strdup(tmpname)) != 0) {
+ your_name[0] = (char) toupper(UChar(your_name[0]));
+ } else {
+ your_name = dftname;
+ }
(void) initscr();
keypad(stdscr, TRUE);
@@ -368,7 +369,7 @@ initgame(void)
MvAddCh(PYBASE + i, PXBASE - 3, (chtype) (i + 'A'));
#ifdef A_COLOR
if (has_colors())
- attron(COLOR_PAIR(COLOR_BLUE));
+ attron((attr_t) COLOR_PAIR(COLOR_BLUE));
#endif /* A_COLOR */
(void) addch(' ');
for (j = 0; j < BWIDTH; j++)
@@ -386,7 +387,7 @@ initgame(void)
MvAddCh(CYBASE + i, CXBASE - 3, (chtype) (i + 'A'));
#ifdef A_COLOR
if (has_colors())
- attron(COLOR_PAIR(COLOR_BLUE));
+ attron((attr_t) COLOR_PAIR(COLOR_BLUE));
#endif /* A_COLOR */
(void) addch(' ');
for (j = 0; j < BWIDTH; j++)
@@ -426,10 +427,11 @@ initgame(void)
placeship(COMPUTER, ss, FALSE);
}
- ss = (ship_t *) NULL;
do {
char c, docked[SHIPTYPES + 2], *cp = docked;
+ ss = (ship_t *) NULL;
+
/* figure which ships still wait to be placed */
*cp++ = 'R';
for (i = 0; i < SHIPTYPES; i++)
@@ -442,7 +444,7 @@ initgame(void)
do {
c = (char) getcoord(PLAYER);
} while
- (!strchr(docked, c));
+ (!(strchr) (docked, c));
if (c == 'R')
(void) ungetch('R');
@@ -459,13 +461,14 @@ initgame(void)
do {
c = (char) getch();
} while
- (!(strchr("hjklrR", c) || c == FF));
+ (!(strchr("hjkl8462rR", c) || c == FF));
if (c == FF) {
(void) clearok(stdscr, TRUE);
(void) refresh();
+ } else if (ss == 0) {
+ beep(); /* simple to verify, unlikely to happen */
} else if (c == 'r') {
- assert(ss != 0);
prompt(1, "Random-placing your %s", ss->name);
randomplace(PLAYER, ss);
placeship(PLAYER, ss, TRUE);
@@ -481,7 +484,6 @@ initgame(void)
}
error((char *) NULL);
} else if (strchr("hjkl8462", c)) {
- assert(ss != 0);
ss->x = curx;
ss->y = cury;
@@ -769,7 +771,7 @@ hitship(int x, int y)
cgoto(y1, x1);
#ifdef A_COLOR
if (has_colors())
- attron(COLOR_PAIR(COLOR_GREEN));
+ attron((attr_t) COLOR_PAIR(COLOR_GREEN));
#endif /* A_COLOR */
(void) addch(MARK_MISS);
#ifdef A_COLOR
@@ -795,7 +797,7 @@ hitship(int x, int y)
pgoto(y1, x1);
#ifdef A_COLOR
if (has_colors())
- attron(COLOR_PAIR(COLOR_RED));
+ attron((attr_t) COLOR_PAIR(COLOR_RED));
#endif /* A_COLOR */
(void) addch(SHOWHIT);
#ifdef A_COLOR
@@ -834,9 +836,9 @@ plyturn(void)
#ifdef A_COLOR
if (has_colors()) {
if (hit)
- attron(COLOR_PAIR(COLOR_RED));
+ attron((attr_t) COLOR_PAIR(COLOR_RED));
else
- attron(COLOR_PAIR(COLOR_GREEN));
+ attron((attr_t) COLOR_PAIR(COLOR_GREEN));
}
#endif /* A_COLOR */
(void) addch((chtype) hits[PLAYER][curx][cury]);
@@ -863,7 +865,9 @@ plyturn(void)
m = " You'll pick up survivors from my %s, I hope...!";
break;
}
- (void) printw(m, ss->name);
+ if (m != 0) {
+ (void) printw(m, ss->name);
+ }
(void) beep();
}
return (hit);
@@ -952,8 +956,8 @@ cpufire(int x, int y)
bool hit, sunk;
ship_t *ss = NULL;
- hit = board[PLAYER][x][y] ? MARK_HIT : MARK_MISS;
- hits[COMPUTER][x][y] = (char) hit;
+ hit = (bool) board[PLAYER][x][y];
+ hits[COMPUTER][x][y] = (hit ? MARK_HIT : MARK_MISS);
MvPrintw(PROMPTLINE, 0,
"I shoot at %c%d. I %s!", y + 'A', x, hit ? "hit" :
"miss");
@@ -965,9 +969,9 @@ cpufire(int x, int y)
#ifdef A_COLOR
if (has_colors()) {
if (hit)
- attron(COLOR_PAIR(COLOR_RED));
+ attron((attr_t) COLOR_PAIR(COLOR_RED));
else
- attron(COLOR_PAIR(COLOR_GREEN));
+ attron((attr_t) COLOR_PAIR(COLOR_GREEN));
}
#endif /* A_COLOR */
(void) addch((chtype) (hit ? SHOWHIT : SHOWSPLASH));
@@ -1130,16 +1134,16 @@ playagain(void)
++cpuwon;
else
++plywon;
- j = 18 + (int) strlen(name);
+ j = 18 + (int) strlen(your_name);
if (plywon >= 10)
++j;
if (cpuwon >= 10)
++j;
MvPrintw(1, (COLWIDTH - j) / 2,
- "%s: %d Computer: %d", name, plywon, cpuwon);
+ "%s: %d Computer: %d", your_name, plywon, cpuwon);
prompt(2, (awinna())? "Want to be humiliated again, %s [yn]? "
- : "Going to give me a chance for revenge, %s [yn]? ", name);
+ : "Going to give me a chance for revenge, %s [yn]? ", your_name);
return (sgetc("YN") == 'Y');
}
diff --git a/test/cardfile.c b/test/cardfile.c
index f9557bd64c7b..b75024143c6e 100644
--- a/test/cardfile.c
+++ b/test/cardfile.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey
*
- * $Id: cardfile.c,v 1.38 2010/11/14 00:58:45 tom Exp $
+ * $Id: cardfile.c,v 1.42 2013/09/28 22:02:17 tom Exp $
*
* File format: text beginning in column 1 is a title; other text is content.
*/
@@ -68,17 +68,13 @@ static CARD *all_cards;
static bool try_color = FALSE;
static char default_name[] = "cardfile.dat";
-#if !HAVE_STRDUP
-#define strdup my_strdup
-static char *
-strdup(const char *s)
+static void
+failed(const char *s)
{
- char *p = typeMalloc(char, strlen(s) + 1);
- if (p)
- strcpy(p, s);
- return (p);
+ perror(s);
+ endwin();
+ ExitProgram(EXIT_FAILURE);
}
-#endif /* not HAVE_STRDUP */
static const char *
skip(const char *buffer)
@@ -111,7 +107,7 @@ add_title(const char *title)
break;
}
- card = typeCalloc(CARD, 1);
+ card = typeCalloc(CARD, (size_t) 1);
card->title = strdup(title);
card->content = strdup("");
@@ -146,6 +142,8 @@ add_content(CARD * card, const char *content)
}
if (card->content)
strcpy(card->content + offset, content);
+ else
+ failed("add_content");
}
}
@@ -337,7 +335,7 @@ form_virtualize(WINDOW *w)
static FIELD **
make_fields(CARD * p, int form_high, int form_wide)
{
- FIELD **f = typeCalloc(FIELD *, 3);
+ FIELD **f = typeCalloc(FIELD *, (size_t) 3);
f[0] = new_field(1, form_wide, 0, 0, 0, 0);
set_field_back(f[0], A_REVERSE);
@@ -414,7 +412,7 @@ cardfile(char *fname)
if ((win = newwin(panel_high, panel_wide, y, x)) == 0)
break;
- wbkgd(win, COLOR_PAIR(pair_2));
+ wbkgd(win, (chtype) COLOR_PAIR(pair_2));
keypad(win, TRUE);
p->panel = new_panel(win);
box(win, 0, 0);
@@ -588,7 +586,7 @@ main(int argc, char *argv[])
start_color();
init_pair(pair_1, COLOR_WHITE, COLOR_BLUE);
init_pair(pair_2, COLOR_WHITE, COLOR_CYAN);
- bkgd(COLOR_PAIR(pair_1));
+ bkgd((chtype) COLOR_PAIR(pair_1));
} else {
try_color = FALSE;
}
diff --git a/test/chgat.c b/test/chgat.c
index 53ecfd7cedf4..919b5c9e3b98 100644
--- a/test/chgat.c
+++ b/test/chgat.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: chgat.c,v 1.11 2010/05/01 19:12:26 tom Exp $
+ * $Id: chgat.c,v 1.12 2012/11/18 01:55:35 tom Exp $
*
* test-driver for chgat/wchgat/mvchgat/mvwchgat
*/
@@ -176,6 +176,8 @@ do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *))
delwin(win1);
touchwin(win);
} else {
+ if (win1 != 0)
+ delwin(win1);
beep();
}
}
diff --git a/test/clip_printw.c b/test/clip_printw.c
index 5b279e9eb31a..6d6d590241ae 100644
--- a/test/clip_printw.c
+++ b/test/clip_printw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: clip_printw.c,v 1.7 2010/11/13 20:48:48 tom Exp $
+ * $Id: clip_printw.c,v 1.9 2012/11/18 00:39:48 tom Exp $
*
* demonstrate how to use printw without wrapping.
*/
@@ -207,6 +207,8 @@ do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *))
delwin(win1);
touchwin(win);
} else {
+ if (win1)
+ delwin(win1);
beep();
}
}
@@ -329,7 +331,7 @@ test_clipping(WINDOW *win)
do {
switch (st.ch) {
case '.': /* change from current position */
- (void) wattrset(win, st.attr | (chtype) COLOR_PAIR(st.pair));
+ (void) wattrset(win, (int) (st.attr | (chtype) COLOR_PAIR(st.pair)));
if (st.count > 0) {
need = (unsigned) st.count + 1;
sprintf(fmt, "%%c%%%ds%%c", st.count);
@@ -337,12 +339,13 @@ test_clipping(WINDOW *win)
need = (unsigned) getmaxx(win) - 1;
strcpy(fmt, "%c%s%c");
}
- if ((buffer = typeMalloc(char, need)) != 0) {
+ if ((buffer = typeMalloc(char, need + 1)) != 0) {
for (j = 0; j < need; ++j) {
buffer[j] = (char) ('A' + (j % 26));
}
buffer[need - 1] = '\0';
st.status = clip_wprintw(win, fmt, '[', buffer, ']');
+ free(buffer);
}
break;
case 'w':
diff --git a/test/color_name.h b/test/color_name.h
new file mode 100644
index 000000000000..81a3b3125759
--- /dev/null
+++ b/test/color_name.h
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * Copyright (c) 2011,2012 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+/*
+ * $Id: color_name.h,v 1.4 2012/11/18 01:59:32 tom Exp $
+ */
+
+#ifndef __COLORNAME_H
+#define __COLORNAME_H 1
+
+#ifndef __TEST_PRIV_H
+#include <test.priv.h>
+#endif
+
+static NCURSES_CONST char *the_color_names[] =
+{
+ "black",
+ "red",
+ "green",
+ "yellow",
+ "blue",
+ "magenta",
+ "cyan",
+ "white",
+ "BLACK",
+ "RED",
+ "GREEN",
+ "YELLOW",
+ "BLUE",
+ "MAGENTA",
+ "CYAN",
+ "WHITE"
+};
+
+#ifdef NEED_COLOR_CODE
+static int
+color_code(const char *color)
+{
+ int result = 0;
+ char *endp = 0;
+ size_t n;
+
+ if ((result = (int) strtol(color, &endp, 0)) >= 0
+ && (endp == 0 || *endp == 0)) {
+ ;
+ } else if (!strcmp(color, "default")) {
+ result = -1;
+ } else {
+ for (n = 0; n < SIZEOF(the_color_names); ++n) {
+ if (!strcmp(the_color_names[n], color)) {
+ result = (int) n;
+ break;
+ }
+ }
+ }
+ return result;
+}
+#endif /* NEED_COLOR_NAME */
+
+#ifdef NEED_COLOR_NAME
+static const char *
+color_name(int color)
+{
+ static char temp[20];
+ const char *result = 0;
+
+ if (color >= (int) SIZEOF(the_color_names)) {
+ sprintf(temp, "%d", color);
+ result = temp;
+ } else if (color < 0) {
+ result = "default";
+ } else {
+ result = the_color_names[color];
+ }
+ return result;
+}
+#endif /* NEED_COLOR_NAME */
+
+#endif /* __COLORNAME_H */
diff --git a/test/color_set.c b/test/color_set.c
index 2e981cba9f11..477d049c8b5e 100644
--- a/test/color_set.c
+++ b/test/color_set.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2012,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: color_set.c,v 1.6 2008/02/10 00:18:01 tom Exp $
+ * $Id: color_set.c,v 1.8 2014/02/01 22:10:42 tom Exp $
*/
#include <test.priv.h>
@@ -38,7 +38,7 @@
int
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
- short f, b;
+ NCURSES_COLOR_T f, b;
int i;
initscr();
@@ -48,8 +48,8 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
if (has_colors()) {
start_color();
- pair_content(0, &f, &b);
- printw("pair 0 contains (%d,%d)\n", f, b);
+ (void) pair_content(0, &f, &b);
+ printw("pair 0 contains (%d,%d)\n", (int) f, (int) b);
getch();
printw("Initializing pair 1 to red/black\n");
diff --git a/test/configure b/test/configure
index 2937235eab62..3fb46e8f8c84 100755
--- a/test/configure
+++ b/test/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20101002.
+# Generated by Autoconf 2.52.20121002.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -105,42 +105,6 @@ SHELL=${CONFIG_SHELL-/bin/sh}
: ${ac_max_here_lines=38}
ac_unique_file="ncurses.c"
-# Factoring default headers for most tests.
-ac_includes_default="\
-#include <stdio.h>
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-#if STDC_HEADERS
-# include <stdlib.h>
-# include <stddef.h>
-#else
-# if HAVE_STDLIB_H
-# include <stdlib.h>
-# endif
-#endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
-# include <memory.h>
-# endif
-# include <string.h>
-#endif
-#if HAVE_STRINGS_H
-# include <strings.h>
-#endif
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
-#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif"
# Initialize some variables set by options.
ac_init_help=
@@ -170,15 +134,16 @@ x_libraries=NONE
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+infodir='${datarootdir}/info'
+mandir='${datarootdir}/man'
# Identity of this package.
PACKAGE_NAME=
@@ -229,6 +194,13 @@ do
| --da=*)
datadir=$ac_optarg ;;
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
@@ -504,7 +476,7 @@ do
done
# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
@@ -641,15 +613,16 @@ Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
- --infodir=DIR info documentation [PREFIX/info]
- --mandir=DIR man documentation [PREFIX/man]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
EOF
cat <<\EOF
@@ -673,31 +646,37 @@ if test -n "$ac_init_help"; then
cat <<\EOF
-Optional Features:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
-
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --disable-echo display "compiling" commands
- --enable-warnings test: turn on gcc compiler warnings
- --with-dmalloc test: use Gray Watson's dmalloc library
- --with-dbmalloc test: use Conor Cahill's dbmalloc library
- --with-valgrind test: use valgrind
- --disable-leaks test: free permanent memory, analyze leaks
+Optional Features:
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+
+General Options:
+ --with-pkg-config{=path} enable/disable use of pkg-config
+ --disable-echo do not display "compiling" commands
+Curses Version-dependent Options:
+ --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
+ --disable-widec disable checks for wide-character functions
--with-curses-dir=DIR directory in which (n)curses is installed
- --with-5lib use SunOS sysv-libraries
- --with-ncursesw use wide ncurses-libraries (installed)
- --with-ncurses use ncurses-libraries (installed)
+ --with-ncursesw use wide ncurses-libraries
+ --with-ncurses use ncurses-libraries
--with-pdcurses compile/link with pdcurses X11 library
+ --with-curses-colr compile/link with HPUX 10.x color-curses
+ --with-curses-5lib compile/link with SunOS 5lib curses
--with-Xaw3d link with Xaw 3d library
--with-neXtaw link with neXT Athena library
--with-XawPlus link with Athena-Plus library
- --with-pkg-config{=path} enable/disable use of pkg-config
--with-x use the X Window System
- --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
+Testing/development Options:
+ --enable-warnings test: turn on gcc compiler warnings
+ --with-dmalloc test: use Gray Watson's dmalloc library
+ --with-dbmalloc test: use Conor Cahill's dbmalloc library
+ --with-valgrind test: use valgrind
+ --disable-leaks test: free permanent memory, analyze leaks
+ --disable-rpath-hack don't add rpath options for additional libraries
Some influential environment variables:
CC C compiler command
@@ -767,7 +746,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.52.20101002. Invocation command line was
+generated by GNU Autoconf 2.52.20121002. Invocation command line was
$ $0 $@
@@ -891,7 +870,7 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- { echo "$as_me:894: loading site script $ac_site_file" >&5
+ { echo "$as_me:873: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
cat "$ac_site_file" >&5
. "$ac_site_file"
@@ -902,7 +881,7 @@ if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
- { echo "$as_me:905: loading cache $cache_file" >&5
+ { echo "$as_me:884: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -910,7 +889,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:913: creating cache $cache_file" >&5
+ { echo "$as_me:892: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -926,21 +905,21 @@ for ac_var in `(set) 2>&1 |
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
- { echo "$as_me:929: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+ { echo "$as_me:908: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
- { echo "$as_me:933: error: \`$ac_var' was not set in the previous run" >&5
+ { echo "$as_me:912: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:939: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:918: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:941: former value: $ac_old_val" >&5
+ { echo "$as_me:920: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:943: current value: $ac_new_val" >&5
+ { echo "$as_me:922: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
@@ -959,9 +938,9 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:962: error: changes in the environment can compromise the build" >&5
+ { echo "$as_me:941: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- { { echo "$as_me:964: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+ { { echo "$as_me:943: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -982,10 +961,10 @@ esac
echo "#! $SHELL" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
-if { (echo "$as_me:985: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:964: PATH=\".;.\"; conftest.sh") >&5
(PATH=".;."; conftest.sh) 2>&5
ac_status=$?
- echo "$as_me:988: \$? = $ac_status" >&5
+ echo "$as_me:967: \$? = $ac_status" >&5
(exit $ac_status); }; then
ac_path_separator=';'
else
@@ -1017,7 +996,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:1020: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+ { { echo "$as_me:999: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1027,11 +1006,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:1030: error: cannot run $ac_config_sub" >&5
+ { { echo "$as_me:1009: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:1034: checking build system type" >&5
+echo "$as_me:1013: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1040,16 +1019,16 @@ else
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:1043: error: cannot guess build type; you must specify one" >&5
+ { { echo "$as_me:1022: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
- { { echo "$as_me:1047: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+ { { echo "$as_me:1026: error: $ac_config_sub $ac_cv_build_alias failed." >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:1052: result: $ac_cv_build" >&5
+echo "$as_me:1031: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1057,7 +1036,7 @@ build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
- echo "$as_me:1060: checking host system type" >&5
+ echo "$as_me:1039: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1066,12 +1045,12 @@ else
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
- { { echo "$as_me:1069: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { echo "$as_me:1048: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:1074: result: $ac_cv_host" >&5
+echo "$as_me:1053: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
@@ -1085,7 +1064,8 @@ else
system_name="`(hostname) 2>/dev/null`"
fi
fi
-test -n "$system_name" && cat >>confdefs.h <<EOF
+test -n "$system_name" &&
+cat >>confdefs.h <<EOF
#define SYSTEM_NAME "$system_name"
EOF
@@ -1096,13 +1076,13 @@ else
fi
test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:1099: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:1079: result: Configuring for $cf_cv_system_name" >&5
echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
if test ".$system_name" != ".$cf_cv_system_name" ; then
- echo "$as_me:1103: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+ echo "$as_me:1083: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
- { { echo "$as_me:1105: error: \"Please remove config.cache and try again.\"" >&5
+ { { echo "$as_me:1085: error: \"Please remove config.cache and try again.\"" >&5
echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1120,7 +1100,7 @@ _ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
-echo "$as_me:1123: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:1103: checking whether ${MAKE-make} sets \${MAKE}" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
@@ -1140,11 +1120,11 @@ fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:1143: result: yes" >&5
+ echo "$as_me:1123: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$as_me:1147: result: no" >&5
+ echo "$as_me:1127: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -1158,7 +1138,7 @@ ac_main_return=return
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:1161: checking for $ac_word" >&5
+echo "$as_me:1141: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1173,7 +1153,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}gcc"
-echo "$as_me:1176: found $ac_dir/$ac_word" >&5
+echo "$as_me:1156: found $ac_dir/$ac_word" >&5
break
done
@@ -1181,10 +1161,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1184: result: $CC" >&5
+ echo "$as_me:1164: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1187: result: no" >&5
+ echo "$as_me:1167: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1193,7 +1173,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
-echo "$as_me:1196: checking for $ac_word" >&5
+echo "$as_me:1176: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1208,7 +1188,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="gcc"
-echo "$as_me:1211: found $ac_dir/$ac_word" >&5
+echo "$as_me:1191: found $ac_dir/$ac_word" >&5
break
done
@@ -1216,10 +1196,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1219: result: $ac_ct_CC" >&5
+ echo "$as_me:1199: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1222: result: no" >&5
+ echo "$as_me:1202: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1232,7 +1212,7 @@ if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:1235: checking for $ac_word" >&5
+echo "$as_me:1215: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1247,7 +1227,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="${ac_tool_prefix}cc"
-echo "$as_me:1250: found $ac_dir/$ac_word" >&5
+echo "$as_me:1230: found $ac_dir/$ac_word" >&5
break
done
@@ -1255,10 +1235,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1258: result: $CC" >&5
+ echo "$as_me:1238: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1261: result: no" >&5
+ echo "$as_me:1241: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1267,7 +1247,7 @@ if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1270: checking for $ac_word" >&5
+echo "$as_me:1250: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1282,7 +1262,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="cc"
-echo "$as_me:1285: found $ac_dir/$ac_word" >&5
+echo "$as_me:1265: found $ac_dir/$ac_word" >&5
break
done
@@ -1290,10 +1270,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1293: result: $ac_ct_CC" >&5
+ echo "$as_me:1273: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1296: result: no" >&5
+ echo "$as_me:1276: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1306,7 +1286,7 @@ fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo "$as_me:1309: checking for $ac_word" >&5
+echo "$as_me:1289: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1326,7 +1306,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
continue
fi
ac_cv_prog_CC="cc"
-echo "$as_me:1329: found $ac_dir/$ac_word" >&5
+echo "$as_me:1309: found $ac_dir/$ac_word" >&5
break
done
@@ -1348,10 +1328,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1351: result: $CC" >&5
+ echo "$as_me:1331: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1354: result: no" >&5
+ echo "$as_me:1334: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1362,7 +1342,7 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:1365: checking for $ac_word" >&5
+echo "$as_me:1345: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1377,7 +1357,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-echo "$as_me:1380: found $ac_dir/$ac_word" >&5
+echo "$as_me:1360: found $ac_dir/$ac_word" >&5
break
done
@@ -1385,10 +1365,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1388: result: $CC" >&5
+ echo "$as_me:1368: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1391: result: no" >&5
+ echo "$as_me:1371: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1401,7 +1381,7 @@ if test -z "$CC"; then
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:1404: checking for $ac_word" >&5
+echo "$as_me:1384: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -1416,7 +1396,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ac_ct_CC="$ac_prog"
-echo "$as_me:1419: found $ac_dir/$ac_word" >&5
+echo "$as_me:1399: found $ac_dir/$ac_word" >&5
break
done
@@ -1424,10 +1404,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1427: result: $ac_ct_CC" >&5
+ echo "$as_me:1407: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1430: result: no" >&5
+ echo "$as_me:1410: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1439,32 +1419,32 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:1442: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1422: error: no acceptable cc found in \$PATH" >&5
echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
-echo "$as_me:1447:" \
+echo "$as_me:1427:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1450: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1430: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1453: \$? = $ac_status" >&5
+ echo "$as_me:1433: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1455: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1435: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1458: \$? = $ac_status" >&5
+ echo "$as_me:1438: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1460: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1440: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1463: \$? = $ac_status" >&5
+ echo "$as_me:1443: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1467 "configure"
+#line 1447 "configure"
#include "confdefs.h"
int
@@ -1480,13 +1460,13 @@ ac_clean_files="$ac_clean_files a.out a.exe"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-echo "$as_me:1483: checking for C compiler default output" >&5
+echo "$as_me:1463: checking for C compiler default output" >&5
echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:1486: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1466: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1489: \$? = $ac_status" >&5
+ echo "$as_me:1469: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
@@ -1509,34 +1489,34 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1512: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1492: error: C compiler cannot create executables" >&5
echo "$as_me: error: C compiler cannot create executables" >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
-echo "$as_me:1518: result: $ac_file" >&5
+echo "$as_me:1498: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:1523: checking whether the C compiler works" >&5
+echo "$as_me:1503: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
- { (eval echo "$as_me:1529: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1509: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1532: \$? = $ac_status" >&5
+ echo "$as_me:1512: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:1539: error: cannot run C compiled programs.
+ { { echo "$as_me:1519: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'." >&2;}
@@ -1544,24 +1524,24 @@ If you meant to cross compile, use \`--host'." >&2;}
fi
fi
fi
-echo "$as_me:1547: result: yes" >&5
+echo "$as_me:1527: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm -f a.out a.exe conftest$ac_cv_exeext
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
-echo "$as_me:1554: checking whether we are cross compiling" >&5
+echo "$as_me:1534: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1556: result: $cross_compiling" >&5
+echo "$as_me:1536: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
-echo "$as_me:1559: checking for executable suffix" >&5
+echo "$as_me:1539: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1561: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1541: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:1564: \$? = $ac_status" >&5
+ echo "$as_me:1544: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
@@ -1577,25 +1557,25 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:1580: error: cannot compute EXEEXT: cannot compile and link" >&5
+ { { echo "$as_me:1560: error: cannot compute EXEEXT: cannot compile and link" >&5
echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
-echo "$as_me:1586: result: $ac_cv_exeext" >&5
+echo "$as_me:1566: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
-echo "$as_me:1592: checking for object suffix" >&5
+echo "$as_me:1572: checking for object suffix" >&5
echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1598 "configure"
+#line 1578 "configure"
#include "confdefs.h"
int
@@ -1607,10 +1587,10 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1590: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1613: \$? = $ac_status" >&5
+ echo "$as_me:1593: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
@@ -1622,24 +1602,24 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1625: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1605: error: cannot compute OBJEXT: cannot compile" >&5
echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
-echo "$as_me:1632: result: $ac_cv_objext" >&5
+echo "$as_me:1612: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:1636: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1616: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1642 "configure"
+#line 1622 "configure"
#include "confdefs.h"
int
@@ -1654,16 +1634,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1657: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1637: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1660: \$? = $ac_status" >&5
+ echo "$as_me:1640: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1663: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1643: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1666: \$? = $ac_status" >&5
+ echo "$as_me:1646: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -1675,19 +1655,19 @@ rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:1678: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1658: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
-echo "$as_me:1684: checking whether $CC accepts -g" >&5
+echo "$as_me:1664: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 1690 "configure"
+#line 1670 "configure"
#include "confdefs.h"
int
@@ -1699,16 +1679,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1702: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1682: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1705: \$? = $ac_status" >&5
+ echo "$as_me:1685: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1708: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1688: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1711: \$? = $ac_status" >&5
+ echo "$as_me:1691: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
@@ -1718,7 +1698,7 @@ ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:1721: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1701: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
@@ -1745,16 +1725,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1751: \$? = $ac_status" >&5
+ echo "$as_me:1731: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1754: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1734: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1757: \$? = $ac_status" >&5
+ echo "$as_me:1737: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -1766,7 +1746,7 @@ if { (eval echo "$as_me:1748: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 1769 "configure"
+#line 1749 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
@@ -1779,16 +1759,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1782: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1762: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1785: \$? = $ac_status" >&5
+ echo "$as_me:1765: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1788: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1768: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1791: \$? = $ac_status" >&5
+ echo "$as_me:1771: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -1798,7 +1778,7 @@ continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 1801 "configure"
+#line 1781 "configure"
#include "confdefs.h"
$ac_declaration
int
@@ -1810,16 +1790,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1813: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1793: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1816: \$? = $ac_status" >&5
+ echo "$as_me:1796: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1819: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1799: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1822: \$? = $ac_status" >&5
+ echo "$as_me:1802: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -1847,13 +1827,214 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_main_return=return
+GCC_VERSION=none
+if test "$GCC" = yes ; then
+ echo "$as_me:1832: checking version of $CC" >&5
+echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
+ GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
+ test -z "$GCC_VERSION" && GCC_VERSION=unknown
+ echo "$as_me:1836: result: $GCC_VERSION" >&5
+echo "${ECHO_T}$GCC_VERSION" >&6
+fi
+
+echo "$as_me:1840: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line 1848 "configure"
+#include "confdefs.h"
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:1897: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:1900: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:1903: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:1906: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:1923: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:1926: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# This should have been defined by AC_PROG_CC
+: ${CC:=cc}
+
+echo "$as_me:1934: checking \$CC variable" >&5
+echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
+case "$CC" in #(vi
+*[\ \ ]-[IUD]*)
+ echo "$as_me:1938: result: broken" >&5
+echo "${ECHO_T}broken" >&6
+ { echo "$as_me:1940: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
+echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
+ # humor him...
+ cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
+ CC=`echo "$CC" | sed -e 's/[ ].*//'`
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_flags
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+*)
+ echo "$as_me:2026: result: ok" >&5
+echo "${ECHO_T}ok" >&6
+ ;;
+esac
+
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
ac_main_return=return
-echo "$as_me:1856: checking how to run the C preprocessor" >&5
+echo "$as_me:2037: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
@@ -1874,18 +2055,18 @@ do
# 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 >conftest.$ac_ext <<_ACEOF
-#line 1877 "configure"
+#line 2058 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:1882: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2063: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1888: \$? = $ac_status" >&5
+ echo "$as_me:2069: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1908,17 +2089,17 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 1911 "configure"
+#line 2092 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:1915: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2096: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1921: \$? = $ac_status" >&5
+ echo "$as_me:2102: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1955,7 +2136,7 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:1958: result: $CPP" >&5
+echo "$as_me:2139: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
@@ -1965,18 +2146,18 @@ do
# 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 >conftest.$ac_ext <<_ACEOF
-#line 1968 "configure"
+#line 2149 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:1973: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2154: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:1979: \$? = $ac_status" >&5
+ echo "$as_me:2160: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -1999,17 +2180,17 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line 2002 "configure"
+#line 2183 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2006: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2187: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:2012: \$? = $ac_status" >&5
+ echo "$as_me:2193: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2037,7 +2218,7 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:2040: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ { { echo "$as_me:2221: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2053,7 +2234,7 @@ for ac_prog in mawk gawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2056: checking for $ac_word" >&5
+echo "$as_me:2237: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2068,7 +2249,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_AWK="$ac_prog"
-echo "$as_me:2071: found $ac_dir/$ac_word" >&5
+echo "$as_me:2252: found $ac_dir/$ac_word" >&5
break
done
@@ -2076,10 +2257,10 @@ fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
- echo "$as_me:2079: result: $AWK" >&5
+ echo "$as_me:2260: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
- echo "$as_me:2082: result: no" >&5
+ echo "$as_me:2263: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2098,7 +2279,7 @@ done
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:2101: checking for a BSD compatible install" >&5
+echo "$as_me:2282: checking for a BSD compatible install" >&5
echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
@@ -2147,7 +2328,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:2150: result: $INSTALL" >&5
+echo "$as_me:2331: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2172,7 +2353,7 @@ for ac_prog in tdlint lint alint splint lclint
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2175: checking for $ac_word" >&5
+echo "$as_me:2356: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LINT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2187,7 +2368,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_LINT="$ac_prog"
-echo "$as_me:2190: found $ac_dir/$ac_word" >&5
+echo "$as_me:2371: found $ac_dir/$ac_word" >&5
break
done
@@ -2195,17 +2376,17 @@ fi
fi
LINT=$ac_cv_prog_LINT
if test -n "$LINT"; then
- echo "$as_me:2198: result: $LINT" >&5
+ echo "$as_me:2379: result: $LINT" >&5
echo "${ECHO_T}$LINT" >&6
else
- echo "$as_me:2201: result: no" >&5
+ echo "$as_me:2382: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$LINT" && break
done
-echo "$as_me:2208: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:2389: checking if filesystem supports mixed-case filenames" >&5
echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
if test "${cf_cv_mixedcase+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2213,7 +2394,7 @@ else
if test "$cross_compiling" = yes ; then
case $target_alias in #(vi
- *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
+ *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*) #(vi
cf_cv_mixedcase=no
;;
*)
@@ -2232,9 +2413,10 @@ else
fi
fi
-echo "$as_me:2235: result: $cf_cv_mixedcase" >&5
+echo "$as_me:2416: result: $cf_cv_mixedcase" >&5
echo "${ECHO_T}$cf_cv_mixedcase" >&6
-test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
+test "$cf_cv_mixedcase" = yes &&
+cat >>confdefs.h <<\EOF
#define MIXEDCASE_FILENAMES 1
EOF
@@ -2242,7 +2424,7 @@ for ac_prog in exctags ctags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2245: checking for $ac_word" >&5
+echo "$as_me:2427: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CTAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2257,7 +2439,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_CTAGS="$ac_prog"
-echo "$as_me:2260: found $ac_dir/$ac_word" >&5
+echo "$as_me:2442: found $ac_dir/$ac_word" >&5
break
done
@@ -2265,10 +2447,10 @@ fi
fi
CTAGS=$ac_cv_prog_CTAGS
if test -n "$CTAGS"; then
- echo "$as_me:2268: result: $CTAGS" >&5
+ echo "$as_me:2450: result: $CTAGS" >&5
echo "${ECHO_T}$CTAGS" >&6
else
- echo "$as_me:2271: result: no" >&5
+ echo "$as_me:2453: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2279,7 +2461,7 @@ for ac_prog in exetags etags
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:2282: checking for $ac_word" >&5
+echo "$as_me:2464: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ETAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2294,7 +2476,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_ETAGS="$ac_prog"
-echo "$as_me:2297: found $ac_dir/$ac_word" >&5
+echo "$as_me:2479: found $ac_dir/$ac_word" >&5
break
done
@@ -2302,10 +2484,10 @@ fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
- echo "$as_me:2305: result: $ETAGS" >&5
+ echo "$as_me:2487: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
- echo "$as_me:2308: result: no" >&5
+ echo "$as_me:2490: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2314,7 +2496,7 @@ done
# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
set dummy ${CTAGS:-ctags}; ac_word=$2
-echo "$as_me:2317: checking for $ac_word" >&5
+echo "$as_me:2499: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2329,7 +2511,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_LOWER_TAGS="yes"
-echo "$as_me:2332: found $ac_dir/$ac_word" >&5
+echo "$as_me:2514: found $ac_dir/$ac_word" >&5
break
done
@@ -2338,17 +2520,17 @@ fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
- echo "$as_me:2341: result: $MAKE_LOWER_TAGS" >&5
+ echo "$as_me:2523: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
- echo "$as_me:2344: result: no" >&5
+ echo "$as_me:2526: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test "$cf_cv_mixedcase" = yes ; then
# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
set dummy ${ETAGS:-etags}; ac_word=$2
-echo "$as_me:2351: checking for $ac_word" >&5
+echo "$as_me:2533: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2363,7 +2545,7 @@ for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
$as_executable_p "$ac_dir/$ac_word" || continue
ac_cv_prog_MAKE_UPPER_TAGS="yes"
-echo "$as_me:2366: found $ac_dir/$ac_word" >&5
+echo "$as_me:2548: found $ac_dir/$ac_word" >&5
break
done
@@ -2372,10 +2554,10 @@ fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
- echo "$as_me:2375: result: $MAKE_UPPER_TAGS" >&5
+ echo "$as_me:2557: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
- echo "$as_me:2378: result: no" >&5
+ echo "$as_me:2560: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2395,14 +2577,14 @@ else
MAKE_LOWER_TAGS="#"
fi
-echo "$as_me:2398: checking if -lm needed for math functions" >&5
+echo "$as_me:2580: checking if -lm needed for math functions" >&5
echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
if test "${cf_cv_need_libm+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2405 "configure"
+#line 2587 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -2411,22 +2593,22 @@ else
int
main ()
{
-double x = rand(); printf("result = %g\n", sin(x))
+double x = rand(); printf("result = %g\n", pow(sin(x),x))
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:2420: \"$ac_link\"") >&5
+if { (eval echo "$as_me:2602: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:2423: \$? = $ac_status" >&5
+ echo "$as_me:2605: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:2426: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2608: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2429: \$? = $ac_status" >&5
+ echo "$as_me:2611: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_libm=no
else
@@ -2436,13 +2618,15 @@ cf_cv_need_libm=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:2439: result: $cf_cv_need_libm" >&5
+echo "$as_me:2621: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6
if test "$cf_cv_need_libm" = yes
then
MATH_LIB=-lm
fi
+top_builddir=`pwd`
+
CC_G_OPT="-g"
CC_SHARED_OPTS=unknown
CPPFLAGS="$CPPFLAGS"
@@ -2464,266 +2648,15 @@ PTHREAD="-lm"
TEST_ARGS=""
TEST_DEPS=""
TEST_LIBS=""
-TINFO_ARGS='$(LIBS_CURSES)'
+TINFO_LDFLAGS=''
+TINFO_LIBS='$(LIBS_CURSES)'
cf_cv_abi_version=""
cf_cv_rel_version=""
+includesubdir=""
cf_cv_screen=curses
cf_cv_libtype=
-echo "$as_me:2474: checking for ${CC:-cc} option to accept ANSI C" >&5
-echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
-if test "${cf_cv_ansi_cc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cf_cv_ansi_cc=no
-cf_save_CFLAGS="$CFLAGS"
-cf_save_CPPFLAGS="$CPPFLAGS"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX -Aa -D_HPUX_SOURCE
-# SVR4 -Xc
-# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
-for cf_arg in "-DCC_HAS_PROTOS" \
- "" \
- -qlanglvl=ansi \
- -std1 \
- -Ae \
- "-Aa -D_HPUX_SOURCE" \
- -Xc
-do
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in $cf_arg
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
-
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
-esac
-done
-
-if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
-
-if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
-
-if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-fi
-
- cat >conftest.$ac_ext <<_ACEOF
-#line 2578 "configure"
-#include "confdefs.h"
-
-#ifndef CC_HAS_PROTOS
-#if !defined(__STDC__) || (__STDC__ != 1)
-choke me
-#endif
-#endif
-
-int
-main ()
-{
-
- int test (int i, double x);
- struct s1 {int (*f) (int a);};
- struct s2 {int (*f) (double a);};
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2599: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:2602: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2605: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:2608: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_ansi_cc="$cf_arg"; break
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-done
-CFLAGS="$cf_save_CFLAGS"
-CPPFLAGS="$cf_save_CPPFLAGS"
-
-fi
-echo "$as_me:2621: result: $cf_cv_ansi_cc" >&5
-echo "${ECHO_T}$cf_cv_ansi_cc" >&6
-
-if test "$cf_cv_ansi_cc" != "no"; then
-if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in $cf_cv_ansi_cc
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
-
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
-esac
-done
-
-if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
-
-if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
-
-if test -n "$cf_new_extra_cppflags" ; then
-
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-fi
-
-else
- cat >>confdefs.h <<\EOF
-#define CC_HAS_PROTOS 1
-EOF
-
-fi
-fi
-
-if test "$cf_cv_ansi_cc" = "no"; then
- { { echo "$as_me:2714: error: Your compiler does not appear to recognize prototypes.
-You have the following choices:
- a. adjust your compiler options
- b. get an up-to-date compiler
- c. use a wrapper such as unproto" >&5
-echo "$as_me: error: Your compiler does not appear to recognize prototypes.
-You have the following choices:
- a. adjust your compiler options
- b. get an up-to-date compiler
- c. use a wrapper such as unproto" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
if test "$GCC" = yes
then
cat > conftest.i <<EOF
@@ -2742,10 +2675,10 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
- { echo "$as_me:2745: checking for $CC __attribute__ directives..." >&5
+ { echo "$as_me:2678: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
-#line 2748 "${as_me:-configure}"
+#line 2681 "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -2794,36 +2727,60 @@ EOF
;;
esac
- if { (eval echo "$as_me:2797: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:2730: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2800: \$? = $ac_status" >&5
+ echo "$as_me:2733: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:2802: result: ... $cf_attribute" >&5
+ test -n "$verbose" && echo "$as_me:2735: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
cat conftest.h >>confdefs.h
case $cf_attribute in #(vi
- printf) #(vi
- if test "$cf_printf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
+ noreturn) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_NORETURN $cf_directive
EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+
+ ;;
+ printf) #(vi
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_PRINTF 1
EOF
+
fi
+
+cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) $cf_value
+EOF
+
;;
scanf) #(vi
- if test "$cf_scanf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_SCANF 1
EOF
+
fi
+
+cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ unused) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_UNUSED $cf_directive
+EOF
+
;;
esac
fi
@@ -2839,10 +2796,10 @@ cf_POSIX_C_SOURCE=199506L
cf_xopen_source=
case $host_os in #(vi
-aix[456]*) #(vi
+aix[4-7]*) #(vi
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin) #(vi
+cygwin|msys) #(vi
cf_XOPEN_SOURCE=600
;;
darwin[0-8].*) #(vi
@@ -2850,6 +2807,7 @@ darwin[0-8].*) #(vi
;;
darwin*) #(vi
cf_xopen_source="-D_DARWIN_C_SOURCE"
+ cf_XOPEN_SOURCE=
;;
freebsd*|dragonfly*) #(vi
# 5.x headers associate
@@ -2867,17 +2825,18 @@ hpux*) #(vi
;;
irix[56].*) #(vi
cf_xopen_source="-D_SGI_SOURCE"
+ cf_XOPEN_SOURCE=
;;
linux*|gnu*|mint*|k*bsd*-gnu) #(vi
-echo "$as_me:2873: checking if we must define _GNU_SOURCE" >&5
+echo "$as_me:2832: checking if we must define _GNU_SOURCE" >&5
echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
if test "${cf_cv_gnu_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2880 "configure"
+#line 2839 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2892,16 +2851,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2895: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2854: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2898: \$? = $ac_status" >&5
+ echo "$as_me:2857: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2901: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2860: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2904: \$? = $ac_status" >&5
+ echo "$as_me:2863: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2910,7 +2869,7 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 2913 "configure"
+#line 2872 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -2925,16 +2884,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2928: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:2887: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2931: \$? = $ac_status" >&5
+ echo "$as_me:2890: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2934: \"$ac_try\"") >&5
+ { (eval echo "$as_me:2893: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2937: \$? = $ac_status" >&5
+ echo "$as_me:2896: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2949,16 +2908,260 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2952: result: $cf_cv_gnu_source" >&5
+echo "$as_me:2911: result: $cf_cv_gnu_source" >&5
echo "${ECHO_T}$cf_cv_gnu_source" >&6
test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
;;
mirbsd*) #(vi
- # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
+ # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
+ cf_XOPEN_SOURCE=
+
+cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
+
+cf_save_CFLAGS="$CFLAGS"
+cf_save_CPPFLAGS="$CPPFLAGS"
+
+cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
+ sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
+
+echo "$as_me:2933: checking if we should define _POSIX_C_SOURCE" >&5
+echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_posix_c_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+echo "${as_me:-configure}:2939: testing if the symbol is already defined go no further ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2942 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:2957: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2960: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:2963: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:2966: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_posix_c_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_want_posix_source=no
+ case .$cf_POSIX_C_SOURCE in #(vi
+ .[12]??*) #(vi
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ ;;
+ .2) #(vi
+ cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
+ cf_want_posix_source=yes
+ ;;
+ .*)
+ cf_want_posix_source=yes
+ ;;
+ esac
+ if test "$cf_want_posix_source" = yes ; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 2987 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifdef _POSIX_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3002: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3005: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3008: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3011: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ fi
+
+echo "${as_me:-configure}:3022: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+
+echo "${as_me:-configure}:3027: testing if the second compile does not leave our definition intact error ..." 1>&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3030 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main ()
+{
+
+#ifndef _POSIX_C_SOURCE
+make an error
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3045: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3048: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3051: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3054: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_posix_c_source=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3070: result: $cf_cv_posix_c_source" >&5
+echo "${ECHO_T}$cf_cv_posix_c_source" >&6
+
+if test "$cf_cv_posix_c_source" != no ; then
+ CFLAGS="$cf_trim_CFLAGS"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_cv_posix_c_source
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+fi
+
;;
netbsd*) #(vi
- # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
+ ;;
+openbsd[4-9]*) #(vi
+ # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
+ cf_xopen_source="-D_BSD_SOURCE"
+ cf_XOPEN_SOURCE=600
;;
openbsd*) #(vi
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
@@ -2972,23 +3175,26 @@ nto-qnx*) #(vi
sco*) #(vi
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.1[0-9]) #(vi
- cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
- ;;
-solaris2.[1-9]) #(vi
+solaris2.*) #(vi
cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
;;
*)
- echo "$as_me:2982: checking if we should define _XOPEN_SOURCE" >&5
+
+echo "$as_me:3184: checking if we should define _XOPEN_SOURCE" >&5
echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
if test "${cf_cv_xopen_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 2989 "configure"
+#line 3191 "configure"
#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
+
int
main ()
{
@@ -3001,16 +3207,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3004: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3210: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3007: \$? = $ac_status" >&5
+ echo "$as_me:3213: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3010: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3216: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3013: \$? = $ac_status" >&5
+ echo "$as_me:3219: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3019,9 +3225,13 @@ cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
cat >conftest.$ac_ext <<_ACEOF
-#line 3022 "configure"
+#line 3228 "configure"
#include "confdefs.h"
+
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
+
int
main ()
{
@@ -3034,16 +3244,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3247: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3040: \$? = $ac_status" >&5
+ echo "$as_me:3250: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3043: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3253: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3046: \$? = $ac_status" >&5
+ echo "$as_me:3256: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3058,9 +3268,10 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3061: result: $cf_cv_xopen_source" >&5
+echo "$as_me:3271: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
- if test "$cf_cv_xopen_source" != no ; then
+
+if test "$cf_cv_xopen_source" != no ; then
CFLAGS=`echo "$CFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
@@ -3070,7 +3281,7 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
- cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
cf_fix_cppflags=no
cf_new_cflags=
@@ -3150,7 +3361,7 @@ if test -n "$cf_new_extra_cppflags" ; then
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
- fi
+fi
cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
@@ -3165,16 +3376,16 @@ cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
-echo "$as_me:3168: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:3379: checking if we should define _POSIX_C_SOURCE" >&5
echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
if test "${cf_cv_posix_c_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-echo "${as_me:-configure}:3174: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:3385: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3177 "configure"
+#line 3388 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3189,16 +3400,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3192: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3403: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3195: \$? = $ac_status" >&5
+ echo "$as_me:3406: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3198: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3409: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3201: \$? = $ac_status" >&5
+ echo "$as_me:3412: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_posix_c_source=no
else
@@ -3219,7 +3430,7 @@ cf_want_posix_source=no
esac
if test "$cf_want_posix_source" = yes ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 3222 "configure"
+#line 3433 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3234,16 +3445,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3237: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3448: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3240: \$? = $ac_status" >&5
+ echo "$as_me:3451: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3243: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3454: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3246: \$? = $ac_status" >&5
+ echo "$as_me:3457: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3254,15 +3465,15 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me:-configure}:3257: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3468: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
-echo "${as_me:-configure}:3262: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:3473: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3265 "configure"
+#line 3476 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
@@ -3277,16 +3488,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3280: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3491: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3283: \$? = $ac_status" >&5
+ echo "$as_me:3494: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3286: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3497: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3289: \$? = $ac_status" >&5
+ echo "$as_me:3500: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3302,7 +3513,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3305: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3516: result: $cf_cv_posix_c_source" >&5
echo "${ECHO_T}$cf_cv_posix_c_source" >&6
if test "$cf_cv_posix_c_source" != no ; then
@@ -3474,620 +3685,196 @@ fi
fi
-echo "$as_me:3477: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_cv_prog_cc_stdc=no
-ac_save_CC=$CC
-cat >conftest.$ac_ext <<_ACEOF
-#line 3485 "configure"
+if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
+ echo "$as_me:3689: checking if _XOPEN_SOURCE really is set" >&5
+echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3692 "configure"
#include "confdefs.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
-{
- return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
- char *s;
- va_list v;
- va_start (v,p);
- s = g (p, va_arg (v,int));
- va_end (v);
- return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
+#include <stdlib.h>
int
main ()
{
-return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
;
return 0;
}
_ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
-# HP-UX 10.20 and later -Ae
-# HP-UX older versions -Aa -D_HPUX_SOURCE
-# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
- CC="$ac_save_CC $ac_arg"
- rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3534: \"$ac_compile\"") >&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3707: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3537: \$? = $ac_status" >&5
+ echo "$as_me:3710: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3540: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3713: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3543: \$? = $ac_status" >&5
+ echo "$as_me:3716: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_prog_cc_stdc=$ac_arg
-break
+ cf_XOPEN_SOURCE_set=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+cf_XOPEN_SOURCE_set=no
fi
-rm -f conftest.$ac_objext
-done
-rm -f conftest.$ac_ext conftest.$ac_objext
-CC=$ac_save_CC
-
-fi
-
-case "x$ac_cv_prog_cc_stdc" in
- x|xno)
- echo "$as_me:3560: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
- *)
- echo "$as_me:3563: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
- CC="$CC $ac_cv_prog_cc_stdc" ;;
-esac
-
-echo "$as_me:3568: checking for an ANSI C-conforming const" >&5
-echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
-if test "${ac_cv_c_const+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 3574 "configure"
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:3725: result: $cf_XOPEN_SOURCE_set" >&5
+echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
+ if test $cf_XOPEN_SOURCE_set = yes
+ then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3730 "configure"
#include "confdefs.h"
-
+#include <stdlib.h>
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
-#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
- typedef int charset[2];
- const charset x;
- /* SunOS 4.1.1 cc rejects this. */
- char const *const *ccp;
- char **p;
- /* NEC SVR4.0.2 mips cc rejects this. */
- struct point {int x, y;};
- static struct point const zero = {0,0};
- /* AIX XL C 1.02.0.0 rejects this.
- It does not let you subtract one const X* pointer from another in
- an arm of an if-expression whose if-part is not a constant
- expression */
- const char *g = "string";
- ccp = &g + (g ? g-g : 0);
- /* HPUX 7.0 cc rejects these. */
- ++ccp;
- p = (char**) ccp;
- ccp = (char const *const *) p;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
- char const *s = 0 ? (char *) 0 : (char const *) 0;
-
- *t++ = 0;
- }
- { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
- int x[] = {25, 17};
- const int *foo = &x[0];
- ++foo;
- }
- { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
- typedef const int *iptr;
- iptr p = 0;
- ++p;
- }
- { /* AIX XL C 1.02.0.0 rejects this saying
- "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
- }
- { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
- const int foo = 10;
- }
-#endif
+#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
+make an error
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3632: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3745: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3635: \$? = $ac_status" >&5
+ echo "$as_me:3748: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3638: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3751: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3641: \$? = $ac_status" >&5
+ echo "$as_me:3754: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_c_const=yes
+ cf_XOPEN_SOURCE_set_ok=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_c_const=no
+cf_XOPEN_SOURCE_set_ok=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:3651: result: $ac_cv_c_const" >&5
-echo "${ECHO_T}$ac_cv_c_const" >&6
-if test $ac_cv_c_const = no; then
-
-cat >>confdefs.h <<\EOF
-#define const
-EOF
-
-fi
+ if test $cf_XOPEN_SOURCE_set_ok = no
+ then
+ { echo "$as_me:3765: WARNING: _XOPEN_SOURCE is lower than requested" >&5
+echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
+ fi
+ else
-echo "$as_me:3661: checking for signal global datatype" >&5
-echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
-if test "${cf_cv_sig_atomic_t+set}" = set; then
+echo "$as_me:3770: checking if we should define _XOPEN_SOURCE" >&5
+echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_xopen_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- for cf_type in \
- "volatile sig_atomic_t" \
- "sig_atomic_t" \
- "int"
- do
cat >conftest.$ac_ext <<_ACEOF
-#line 3673 "configure"
+#line 3777 "configure"
#include "confdefs.h"
+#include <stdlib.h>
+#include <string.h>
#include <sys/types.h>
-#include <signal.h>
-#include <stdio.h>
-extern $cf_type x;
-$cf_type x;
-static void handler(int sig)
-{
- x = 5;
-}
int
main ()
{
-signal(SIGINT, handler);
- x = 1
+
+#ifndef _XOPEN_SOURCE
+make an error
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3696: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3796: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3699: \$? = $ac_status" >&5
+ echo "$as_me:3799: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3702: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3802: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3705: \$? = $ac_status" >&5
+ echo "$as_me:3805: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_sig_atomic_t=$cf_type
+ cf_cv_xopen_source=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-cf_cv_sig_atomic_t=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- test "$cf_cv_sig_atomic_t" != no && break
- done
-
-fi
-
-echo "$as_me:3719: result: $cf_cv_sig_atomic_t" >&5
-echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
-test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
-#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
-EOF
-
-echo "$as_me:3725: checking if you want to see long compiling messages" >&5
-echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
-
-# Check whether --enable-echo or --disable-echo was given.
-if test "${enable_echo+set}" = set; then
- enableval="$enable_echo"
- test "$enableval" != no && enableval=yes
- if test "$enableval" != "yes" ; then
-
- ECHO_LT='--silent'
- ECHO_LD='@echo linking $@;'
- RULE_CC='@echo compiling $<'
- SHOW_CC='@echo compiling $@'
- ECHO_CC='@'
-
- else
-
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC=''
- SHOW_CC=''
- ECHO_CC=''
-
- fi
-else
- enableval=yes
-
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC=''
- SHOW_CC=''
- ECHO_CC=''
-
-fi;
-echo "$as_me:3759: result: $enableval" >&5
-echo "${ECHO_T}$enableval" >&6
-
-GCC_VERSION=none
-if test "$GCC" = yes ; then
- echo "$as_me:3764: checking version of $CC" >&5
-echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
- GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
- test -z "$GCC_VERSION" && GCC_VERSION=unknown
- echo "$as_me:3768: result: $GCC_VERSION" >&5
-echo "${ECHO_T}$GCC_VERSION" >&6
-fi
-
-if ( test "$GCC" = yes || test "$GXX" = yes )
-then
-echo "$as_me:3774: checking if you want to turn on gcc warnings" >&5
-echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
-
-# Check whether --enable-warnings or --disable-warnings was given.
-if test "${enable_warnings+set}" = set; then
- enableval="$enable_warnings"
- test "$enableval" != yes && enableval=no
- if test "$enableval" != "no" ; then
- with_warnings=yes
- else
- with_warnings=no
- fi
-else
- enableval=no
- with_warnings=no
-
-fi;
-echo "$as_me:3791: result: $with_warnings" >&5
-echo "${ECHO_T}$with_warnings" >&6
-if test "$with_warnings" = "yes"
-then
-
-if test "$GCC" = yes
-then
-cat > conftest.i <<EOF
-#ifndef GCC_PRINTF
-#define GCC_PRINTF 0
-#endif
-#ifndef GCC_SCANF
-#define GCC_SCANF 0
-#endif
-#ifndef GCC_NORETURN
-#define GCC_NORETURN /* nothing */
-#endif
-#ifndef GCC_UNUSED
-#define GCC_UNUSED /* nothing */
-#endif
-EOF
-if test "$GCC" = yes
-then
- { echo "$as_me:3814: checking for $CC __attribute__ directives..." >&5
-echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
-cat > conftest.$ac_ext <<EOF
-#line 3817 "${as_me:-configure}"
+cf_save="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3814 "configure"
#include "confdefs.h"
-#include "conftest.h"
-#include "conftest.i"
-#if GCC_PRINTF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-#else
-#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
-#endif
-#if GCC_SCANF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
-#else
-#define GCC_SCANFLIKE(fmt,var) /*nothing*/
-#endif
-extern void wow(char *,...) GCC_SCANFLIKE(1,2);
-extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
-extern void foo(void) GCC_NORETURN;
-int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
-EOF
- cf_printf_attribute=no
- cf_scanf_attribute=no
- for cf_attribute in scanf printf unused noreturn
- do
-cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-
- cf_directive="__attribute__(($cf_attribute))"
- echo "checking for $CC $cf_directive" 1>&5
-
- case $cf_attribute in #(vi
- printf) #(vi
- cf_printf_attribute=yes
- cat >conftest.h <<EOF
-#define GCC_$cf_ATTRIBUTE 1
-EOF
- ;;
- scanf) #(vi
- cf_scanf_attribute=yes
- cat >conftest.h <<EOF
-#define GCC_$cf_ATTRIBUTE 1
-EOF
- ;;
- *) #(vi
- cat >conftest.h <<EOF
-#define GCC_$cf_ATTRIBUTE $cf_directive
-EOF
- ;;
- esac
-
- if { (eval echo "$as_me:3866: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3869: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:3871: result: ... $cf_attribute" >&5
-echo "${ECHO_T}... $cf_attribute" >&6
- cat conftest.h >>confdefs.h
- case $cf_attribute in #(vi
- printf) #(vi
- if test "$cf_printf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
-EOF
- fi
- ;;
- scanf) #(vi
- if test "$cf_scanf_attribute" = no ; then
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) /* nothing */
-EOF
- else
- cat >>confdefs.h <<EOF
-#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
-EOF
- fi
- ;;
- esac
- fi
- done
-else
- fgrep define conftest.i >>confdefs.h
-fi
-rm -rf conftest*
-fi
-
-INTEL_COMPILER=no
-
-if test "$GCC" = yes ; then
- case $host_os in
- linux*|gnu*)
- echo "$as_me:3911: checking if this is really Intel C compiler" >&5
-echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
- cf_save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -no-gcc"
- cat >conftest.$ac_ext <<_ACEOF
-#line 3916 "configure"
-#include "confdefs.h"
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
int
main ()
{
-#ifdef __INTEL_COMPILER
-#else
+#ifdef _XOPEN_SOURCE
make an error
#endif
-
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3933: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3833: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3936: \$? = $ac_status" >&5
+ echo "$as_me:3836: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3939: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3839: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3942: \$? = $ac_status" >&5
+ echo "$as_me:3842: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- INTEL_COMPILER=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
-
+ cf_cv_xopen_source=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+cf_cv_xopen_source=$cf_XOPEN_SOURCE
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:3953: result: $INTEL_COMPILER" >&5
-echo "${ECHO_T}$INTEL_COMPILER" >&6
- ;;
- esac
-fi
-
-cat > conftest.$ac_ext <<EOF
-#line 3960 "${as_me:-configure}"
-int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
-EOF
-
-if test "$INTEL_COMPILER" = yes
-then
-# The "-wdXXX" options suppress warnings:
-# remark #1419: external declaration in primary source file
-# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
-# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
-# remark #193: zero used for undefined preprocessing identifier
-# remark #593: variable "curs_sb_left_arrow" was set but never used
-# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
-# remark #869: parameter "tw" was never referenced
-# remark #981: operands are evaluated in unspecified order
-# warning #279: controlling expression is constant
-
- { echo "$as_me:3977: checking for $CC warning options..." >&5
-echo "$as_me: checking for $CC warning options..." >&6;}
- cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS="-Wall"
- for cf_opt in \
- wd1419 \
- wd1683 \
- wd1684 \
- wd193 \
- wd593 \
- wd279 \
- wd810 \
- wd869 \
- wd981
- do
- CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:3996: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:3998: result: ... -$cf_opt" >&5
-echo "${ECHO_T}... -$cf_opt" >&6
- EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- fi
- done
- CFLAGS="$cf_save_CFLAGS"
-
-elif test "$GCC" = yes
-then
- { echo "$as_me:4007: checking for $CC warning options..." >&5
-echo "$as_me: checking for $CC warning options..." >&6;}
- cf_save_CFLAGS="$CFLAGS"
- EXTRA_CFLAGS=
- cf_warn_CONST=""
- test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
- for cf_opt in W Wall \
- Wbad-function-cast \
- Wcast-align \
- Wcast-qual \
- Winline \
- Wmissing-declarations \
- Wmissing-prototypes \
- Wnested-externs \
- Wpointer-arith \
- Wshadow \
- Wstrict-prototypes \
- Wundef $cf_warn_CONST
- do
- CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4027: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:4030: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4032: result: ... -$cf_opt" >&5
-echo "${ECHO_T}... -$cf_opt" >&6
- case $cf_opt in #(vi
- Wcast-qual) #(vi
- CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
- ;;
- Winline) #(vi
- case $GCC_VERSION in
- [34].*)
- test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-
-echo "${as_me:-configure}:4043: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+ CPPFLAGS="$cf_save"
- continue;;
- esac
- ;;
- esac
- EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
- fi
- done
- CFLAGS="$cf_save_CFLAGS"
fi
-rm -rf conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-fi
+echo "$as_me:3857: result: $cf_cv_xopen_source" >&5
+echo "${ECHO_T}$cf_cv_xopen_source" >&6
-echo "$as_me:4059: checking if you want to use dmalloc for testing" >&5
-echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
+if test "$cf_cv_xopen_source" != no ; then
-# Check whether --with-dmalloc or --without-dmalloc was given.
-if test "${with_dmalloc+set}" = set; then
- withval="$with_dmalloc"
- cat >>confdefs.h <<\EOF
-#define USE_DMALLOC 1
-EOF
+CFLAGS=`echo "$CFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
- : ${with_cflags:=-g}
- : ${with_no_leaks:=yes}
- with_dmalloc=yes
-else
- with_dmalloc=
-fi;
-echo "$as_me:4075: result: ${with_dmalloc:-no}" >&5
-echo "${ECHO_T}${with_dmalloc:-no}" >&6
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
- ;;
- *)
+ cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=
-for cf_add_cflags in -g
+for cf_add_cflags in $cf_temp_xopen_source
do
case $cf_fix_cppflags in
no)
@@ -4160,458 +3947,292 @@ if test -n "$cf_new_extra_cppflags" ; then
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
- ;;
- esac
- ;;
-esac
-
-if test "$with_dmalloc" = yes ; then
- echo "$as_me:4169: checking for dmalloc.h" >&5
-echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
-if test "${ac_cv_header_dmalloc_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4175 "configure"
-#include "confdefs.h"
-#include <dmalloc.h>
-_ACEOF
-if { (eval echo "$as_me:4179: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:4185: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- ac_cv_header_dmalloc_h=yes
-else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_dmalloc_h=no
fi
-rm -f conftest.err conftest.$ac_ext
+
+ fi
fi
-echo "$as_me:4204: result: $ac_cv_header_dmalloc_h" >&5
-echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
-if test $ac_cv_header_dmalloc_h = yes; then
-echo "$as_me:4208: checking for dmalloc_debug in -ldmalloc" >&5
-echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
-if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
+echo "$as_me:3955: checking for signal global datatype" >&5
+echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
+if test "${cf_cv_sig_atomic_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldmalloc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 4216 "configure"
+
+ for cf_type in \
+ "volatile sig_atomic_t" \
+ "sig_atomic_t" \
+ "int"
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3967 "configure"
#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char dmalloc_debug ();
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+
+extern $cf_type x;
+$cf_type x;
+static void handler(int sig)
+{
+ x = 5;
+}
int
main ()
{
-dmalloc_debug ();
+signal(SIGINT, handler);
+ x = 1
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4235: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3990: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4238: \$? = $ac_status" >&5
+ echo "$as_me:3993: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4241: \"$ac_try\"") >&5
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3996: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4244: \$? = $ac_status" >&5
+ echo "$as_me:3999: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_dmalloc_dmalloc_debug=yes
+ cf_cv_sig_atomic_t=$cf_type
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_lib_dmalloc_dmalloc_debug=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:4255: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
-echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
-if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
- cat >>confdefs.h <<EOF
-#define HAVE_LIBDMALLOC 1
-EOF
-
- LIBS="-ldmalloc $LIBS"
-
-fi
-
+cf_cv_sig_atomic_t=no
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_sig_atomic_t" != no && break
+ done
fi
-echo "$as_me:4270: checking if you want to use dbmalloc for testing" >&5
-echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
-
-# Check whether --with-dbmalloc or --without-dbmalloc was given.
-if test "${with_dbmalloc+set}" = set; then
- withval="$with_dbmalloc"
- cat >>confdefs.h <<\EOF
-#define USE_DBMALLOC 1
+echo "$as_me:4013: result: $cf_cv_sig_atomic_t" >&5
+echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
+test "$cf_cv_sig_atomic_t" != no &&
+cat >>confdefs.h <<EOF
+#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
EOF
- : ${with_cflags:=-g}
- : ${with_no_leaks:=yes}
- with_dbmalloc=yes
+echo "$as_me:4020: checking if you want to use pkg-config" >&5
+echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
+
+# Check whether --with-pkg-config or --without-pkg-config was given.
+if test "${with_pkg_config+set}" = set; then
+ withval="$with_pkg_config"
+ cf_pkg_config=$withval
else
- with_dbmalloc=
+ cf_pkg_config=yes
fi;
-echo "$as_me:4286: result: ${with_dbmalloc:-no}" >&5
-echo "${ECHO_T}${with_dbmalloc:-no}" >&6
-
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
- ;;
- *)
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in -g
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
-
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
-
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+echo "$as_me:4030: result: $cf_pkg_config" >&5
+echo "${ECHO_T}$cf_pkg_config" >&6
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
+case $cf_pkg_config in #(vi
+no) #(vi
+ PKG_CONFIG=none
;;
-esac
-done
-
-if test -n "$cf_new_cflags" ; then
-
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
-
-if test -n "$cf_new_cppflags" ; then
-
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
-
-if test -n "$cf_new_extra_cppflags" ; then
+yes) #(vi
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+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
+echo "$as_me:4042: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:4059: found $ac_dir/$ac_word" >&5
+ break
fi
+done
- ;;
- esac
- ;;
+ ;;
esac
-
-if test "$with_dbmalloc" = yes ; then
- echo "$as_me:4380: checking for dbmalloc.h" >&5
-echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
-if test "${ac_cv_header_dbmalloc_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 4386 "configure"
-#include "confdefs.h"
-#include <dbmalloc.h>
-_ACEOF
-if { (eval echo "$as_me:4390: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:4396: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
fi
-if test -z "$ac_cpp_err"; then
- ac_cv_header_dbmalloc_h=yes
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+
+if test -n "$PKG_CONFIG"; then
+ echo "$as_me:4070: result: $PKG_CONFIG" >&5
+echo "${ECHO_T}$PKG_CONFIG" >&6
else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_dbmalloc_h=no
-fi
-rm -f conftest.err conftest.$ac_ext
+ echo "$as_me:4073: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-echo "$as_me:4415: result: $ac_cv_header_dbmalloc_h" >&5
-echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
-if test $ac_cv_header_dbmalloc_h = yes; then
-echo "$as_me:4419: checking for debug_malloc in -ldbmalloc" >&5
-echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
-if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
+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
+echo "$as_me:4082: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldbmalloc $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-#line 4427 "configure"
-#include "confdefs.h"
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char debug_malloc ();
-int
-main ()
-{
-debug_malloc ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4446: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:4449: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4452: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:4455: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_dbmalloc_debug_malloc=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_lib_dbmalloc_debug_malloc=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ 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.
+ ;;
+ *)
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ if $as_executable_p "$ac_dir/$ac_word"; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
+ echo "$as_me:4099: found $ac_dir/$ac_word" >&5
+ break
fi
-echo "$as_me:4466: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
-echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
-if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
- cat >>confdefs.h <<EOF
-#define HAVE_LIBDBMALLOC 1
-EOF
-
- LIBS="-ldbmalloc $LIBS"
+done
+ test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
+ ;;
+esac
fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ echo "$as_me:4111: result: $ac_pt_PKG_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
+else
+ echo "$as_me:4114: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
-echo "$as_me:4481: checking if you want to use valgrind for testing" >&5
-echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
+ ;;
+*)
+ PKG_CONFIG=$withval
+ ;;
+esac
-# Check whether --with-valgrind or --without-valgrind was given.
-if test "${with_valgrind+set}" = set; then
- withval="$with_valgrind"
- cat >>confdefs.h <<\EOF
-#define USE_VALGRIND 1
-EOF
+test -z "$PKG_CONFIG" && PKG_CONFIG=none
+if test "$PKG_CONFIG" != none ; then
- : ${with_cflags:=-g}
- : ${with_no_leaks:=yes}
- with_valgrind=yes
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
else
- with_valgrind=
-fi;
-echo "$as_me:4497: result: ${with_valgrind:-no}" >&5
-echo "${ECHO_T}${with_valgrind:-no}" >&6
-
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
- ;;
- *)
-
-cf_fix_cppflags=no
-cf_new_cflags=
-cf_new_cppflags=
-cf_new_extra_cppflags=
-
-for cf_add_cflags in -g
-do
-case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
- case $cf_add_cflags in
- -D*)
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=yes
-
- if test $cf_fix_cppflags = yes ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- elif test "${cf_tst_cflags}" = "\"'" ; then
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
- continue
- fi
- ;;
- esac
- case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
- ;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
- cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
-
-CPPFLAGS=`echo "$CPPFLAGS" | \
- sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
- -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+ cf_path_syntax="$ac_default_prefix"
+fi
- ;;
- esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
- ;;
- esac
- ;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
- ;;
- esac
- ;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+case ".$PKG_CONFIG" in #(vi
+.\$\(*\)*|.\'*\'*) #(vi
+ ;;
+..|./*|.\\*) #(vi
+ ;;
+.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
+ ;;
+.\${*prefix}*|.\${*dir}*) #(vi
+ eval PKG_CONFIG="$PKG_CONFIG"
+ case ".$PKG_CONFIG" in #(vi
+ .NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;; #(vi
+.no|.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+*)
+ { { echo "$as_me:4157: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
- cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+fi
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
- && test -z "${cf_tst_cflags}" \
- && cf_fix_cppflags=no
- ;;
-esac
-done
+echo "$as_me:4165: checking if you want to see long compiling messages" >&5
+echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
-if test -n "$cf_new_cflags" ; then
+# Check whether --enable-echo or --disable-echo was given.
+if test "${enable_echo+set}" = set; then
+ enableval="$enable_echo"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
-fi
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking $@;'
+ RULE_CC='@echo compiling $<'
+ SHOW_CC='@echo compiling $@'
+ ECHO_CC='@'
-if test -n "$cf_new_cppflags" ; then
+ else
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
-fi
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
-if test -n "$cf_new_extra_cppflags" ; then
+ fi
+else
+ enableval=yes
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
-fi
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
- ;;
- esac
- ;;
-esac
+fi;
+echo "$as_me:4199: result: $enableval" >&5
+echo "${ECHO_T}$enableval" >&6
-echo "$as_me:4590: checking if you want to perform memory-leak testing" >&5
-echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
+echo "$as_me:4202: checking for ncurses wrap-prefix" >&5
+echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
-# Check whether --enable-leaks or --disable-leaks was given.
-if test "${enable_leaks+set}" = set; then
- enableval="$enable_leaks"
- if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
+# Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
+if test "${with_ncurses_wrap_prefix+set}" = set; then
+ withval="$with_ncurses_wrap_prefix"
+ NCURSES_WRAP_PREFIX=$withval
else
- : ${with_no_leaks:=no}
+ NCURSES_WRAP_PREFIX=_nc_
fi;
-echo "$as_me:4600: result: $with_no_leaks" >&5
-echo "${ECHO_T}$with_no_leaks" >&6
+echo "$as_me:4212: result: $NCURSES_WRAP_PREFIX" >&5
+echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
-if test "$with_no_leaks" = yes ; then
- cat >>confdefs.h <<\EOF
-#define NO_LEAKS 1
-EOF
+echo "$as_me:4215: checking if you want to check for wide-character functions" >&5
+echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
- cat >>confdefs.h <<\EOF
-#define YY_NO_LEAKS 1
-EOF
+# Check whether --enable-widec or --disable-widec was given.
+if test "${enable_widec+set}" = set; then
+ enableval="$enable_widec"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+ cf_enable_widec=no
+ else
+ cf_enable_widec=yes
+ fi
+else
+ enableval=yes
+ cf_enable_widec=yes
-fi
+fi;
+echo "$as_me:4232: result: $cf_enable_widec" >&5
+echo "${ECHO_T}$cf_enable_widec" >&6
-echo "$as_me:4614: checking for specific curses-directory" >&5
+echo "$as_me:4235: checking for specific curses-directory" >&5
echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
# Check whether --with-curses-dir or --without-curses-dir was given.
@@ -4621,7 +4242,7 @@ if test "${with_curses_dir+set}" = set; then
else
cf_cv_curses_dir=no
fi;
-echo "$as_me:4624: result: $cf_cv_curses_dir" >&5
+echo "$as_me:4245: result: $cf_cv_curses_dir" >&5
echo "${ECHO_T}$cf_cv_curses_dir" >&6
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
@@ -4640,7 +4261,7 @@ case ".$withval" in #(vi
;;
.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
;;
-.\${*prefix}*) #(vi
+.\${*prefix}*|.\${*dir}*) #(vi
eval withval="$withval"
case ".$withval" in #(vi
.NONE/*)
@@ -4652,7 +4273,7 @@ case ".$withval" in #(vi
withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
;;
*)
- { { echo "$as_me:4655: error: expected a pathname, not \"$withval\"" >&5
+ { { echo "$as_me:4276: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
;;
@@ -4685,7 +4306,7 @@ if test -n "$cf_cv_curses_dir/include" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 4688 "configure"
+#line 4309 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -4697,16 +4318,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4700: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4321: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4703: \$? = $ac_status" >&5
+ echo "$as_me:4324: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4706: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4327: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4709: \$? = $ac_status" >&5
+ echo "$as_me:4330: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -4723,7 +4344,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:4726: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:4347: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -4757,7 +4378,7 @@ if test -n "$cf_cv_curses_dir/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:4760: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:4381: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -4768,12 +4389,10 @@ fi
fi
fi
-# Check whether --with-5lib or --without-5lib was given.
-if test "${with_5lib+set}" = set; then
- withval="$with_5lib"
- LIBS="-L/usr/5lib $LIBS"
- CPPFLAGS="$CPPFLAGS -I/usr/5include"
-fi;
+cf_cv_screen=curses
+
+echo "$as_me:4394: checking for specified curses library type" >&5
+echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
# Check whether --with-ncursesw or --without-ncursesw was given.
if test "${with_ncursesw+set}" = set; then
@@ -4791,14 +4410,31 @@ else
if test "${with_pdcurses+set}" = set; then
withval="$with_pdcurses"
cf_cv_screen=pdcurses
+else
+
+# Check whether --with-curses-colr or --without-curses-colr was given.
+if test "${with_curses_colr+set}" = set; then
+ withval="$with_curses_colr"
+ cf_cv_screen=curses_colr
+else
+
+# Check whether --with-curses-5lib or --without-curses-5lib was given.
+if test "${with_curses_5lib+set}" = set; then
+ withval="$with_curses_5lib"
+ cf_cv_screen=curses_5lib
+fi;
+fi;
fi;
fi;
fi;
-case $cf_cv_screen in
-curses)
+echo "$as_me:4431: result: $cf_cv_screen" >&5
+echo "${ECHO_T}$cf_cv_screen" >&6
+
+case $cf_cv_screen in #(vi
+curses|curses_*) #(vi
-echo "$as_me:4801: checking for extra include directories" >&5
+echo "$as_me:4437: checking for extra include directories" >&5
echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
if test "${cf_cv_curses_incdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4807,22 +4443,28 @@ else
cf_cv_curses_incdir=no
case $host_os in #(vi
hpux10.*) #(vi
- test -d /usr/include/curses_colr && \
- cf_cv_curses_incdir="-I/usr/include/curses_colr"
+ if test "x$cf_cv_screen" = "xcurses_colr"
+ then
+ test -d /usr/include/curses_colr && \
+ cf_cv_curses_incdir="-I/usr/include/curses_colr"
+ fi
;;
sunos3*|sunos4*)
- test -d /usr/5lib && \
- test -d /usr/5include && \
- cf_cv_curses_incdir="-I/usr/5include"
+ if test "x$cf_cv_screen" = "xcurses_5lib"
+ then
+ test -d /usr/5lib && \
+ test -d /usr/5include && \
+ cf_cv_curses_incdir="-I/usr/5include"
+ fi
;;
esac
fi
-echo "$as_me:4821: result: $cf_cv_curses_incdir" >&5
+echo "$as_me:4463: result: $cf_cv_curses_incdir" >&5
echo "${ECHO_T}$cf_cv_curses_incdir" >&6
test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
-echo "$as_me:4825: checking if we have identified curses headers" >&5
+echo "$as_me:4467: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4830,11 +4472,11 @@ else
cf_cv_ncurses_header=none
for cf_header in \
- curses.h \
- ncurses.h ncurses/curses.h ncurses/ncurses.h
+ ncurses.h \
+ curses.h ncurses/ncurses.h ncurses/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 4837 "configure"
+#line 4479 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -4846,16 +4488,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4849: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4491: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4852: \$? = $ac_status" >&5
+ echo "$as_me:4494: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4855: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4497: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4858: \$? = $ac_status" >&5
+ echo "$as_me:4500: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -4866,11 +4508,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:4869: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:4511: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:4873: error: No curses header-files found" >&5
+ { { echo "$as_me:4515: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -4880,23 +4522,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:4883: checking for $ac_header" >&5
+echo "$as_me:4525: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4889 "configure"
+#line 4531 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:4893: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:4535: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:4899: \$? = $ac_status" >&5
+ echo "$as_me:4541: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -4915,7 +4557,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:4918: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:4560: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -4925,7 +4567,7 @@ EOF
fi
done
-echo "$as_me:4928: checking for terminfo header" >&5
+echo "$as_me:4570: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4943,7 +4585,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 4946 "configure"
+#line 4588 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -4958,16 +4600,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4961: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4964: \$? = $ac_status" >&5
+ echo "$as_me:4606: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4967: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4609: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4970: \$? = $ac_status" >&5
+ echo "$as_me:4612: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -4983,14 +4625,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:4986: result: $cf_cv_term_header" >&5
+echo "$as_me:4628: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
case $cf_cv_term_header in # (vi
*term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
@@ -4999,20 +4642,22 @@ esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
;;
esac
-echo "$as_me:5015: checking for ncurses version" >&5
+echo "$as_me:4660: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5038,10 +4683,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:5041: \"$cf_try\"") >&5
+ { (eval echo "$as_me:4686: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:5044: \$? = $ac_status" >&5
+ echo "$as_me:4689: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -5051,7 +4696,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5054 "configure"
+#line 4699 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -5076,15 +4721,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5079: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4724: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5082: \$? = $ac_status" >&5
+ echo "$as_me:4727: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5084: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4729: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5087: \$? = $ac_status" >&5
+ echo "$as_me:4732: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -5098,16 +4743,17 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:5101: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:4746: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:5107: checking if we have identified curses libraries" >&5
+echo "$as_me:4753: checking if we have identified curses libraries" >&5
echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 5110 "configure"
+#line 4756 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -5119,16 +4765,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5122: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4768: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5125: \$? = $ac_status" >&5
+ echo "$as_me:4771: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5128: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4774: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5131: \$? = $ac_status" >&5
+ echo "$as_me:4777: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -5137,13 +4783,13 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:5140: result: $cf_result" >&5
+echo "$as_me:4786: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = no ; then
case $host_os in #(vi
freebsd*) #(vi
- echo "$as_me:5146: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:4792: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5151,7 +4797,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5154 "configure"
+#line 4800 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -5170,16 +4816,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5173: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4819: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5176: \$? = $ac_status" >&5
+ echo "$as_me:4822: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5179: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4825: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5182: \$? = $ac_status" >&5
+ echo "$as_me:4828: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -5190,7 +4836,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:5193: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:4839: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
LIBS="-lmytinfo $LIBS"
@@ -5198,7 +4844,13 @@ fi
;;
hpux10.*) #(vi
- echo "$as_me:5201: checking for initscr in -lcur_colr" >&5
+ # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
+ # next (1998), and xcurses "newer" (2000). There is no header file for
+ # Hcurses; the subdirectory curses_colr has the headers (curses.h and
+ # term.h) for cur_colr
+ if test "x$cf_cv_screen" = "xcurses_colr"
+ then
+ echo "$as_me:4853: checking for initscr in -lcur_colr" >&5
echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5206,7 +4858,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcur_colr $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5209 "configure"
+#line 4861 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -5225,16 +4877,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5228: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4880: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5231: \$? = $ac_status" >&5
+ echo "$as_me:4883: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5234: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4886: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5237: \$? = $ac_status" >&5
+ echo "$as_me:4889: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_cur_colr_initscr=yes
else
@@ -5245,16 +4897,16 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:5248: result: $ac_cv_lib_cur_colr_initscr" >&5
+echo "$as_me:4900: result: $ac_cv_lib_cur_colr_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
if test $ac_cv_lib_cur_colr_initscr = yes; then
- LIBS="-lcur_colr $LIBS"
- ac_cv_func_initscr=yes
+ LIBS="-lcur_colr $LIBS"
+ ac_cv_func_initscr=yes
else
- echo "$as_me:5257: checking for initscr in -lHcurses" >&5
+ echo "$as_me:4909: checking for initscr in -lHcurses" >&5
echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5262,7 +4914,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lHcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5265 "configure"
+#line 4917 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -5281,16 +4933,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5284: \"$ac_link\"") >&5
+if { (eval echo "$as_me:4936: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5287: \$? = $ac_status" >&5
+ echo "$as_me:4939: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5290: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4942: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5293: \$? = $ac_status" >&5
+ echo "$as_me:4945: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Hcurses_initscr=yes
else
@@ -5301,20 +4953,21 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:5304: result: $ac_cv_lib_Hcurses_initscr" >&5
+echo "$as_me:4956: result: $ac_cv_lib_Hcurses_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
if test $ac_cv_lib_Hcurses_initscr = yes; then
- # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
- LIBS="-lHcurses $LIBS"
- CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
- ac_cv_func_initscr=yes
+ # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
+ LIBS="-lHcurses $LIBS"
+ CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
+ ac_cv_func_initscr=yes
fi
fi
- ;;
+ fi
+ ;;
linux*)
case `arch 2>/dev/null` in
x86_64)
@@ -5340,7 +4993,7 @@ if test -n "/lib64" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5343: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:4996: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5369,7 +5022,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5372: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5025: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5400,7 +5053,7 @@ if test -n "/lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5403: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5056: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5410,9 +5063,11 @@ fi
;;
esac
- ;;
+ ;;
sunos3*|sunos4*)
- if test -d /usr/5lib ; then
+ if test "x$cf_cv_screen" = "xcurses_5lib"
+ then
+ if test -d /usr/5lib ; then
if test -n "/usr/5lib" ; then
for cf_add_libdir in /usr/5lib
@@ -5433,7 +5088,7 @@ if test -n "/usr/5lib" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:5436: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:5091: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -5441,33 +5096,34 @@ echo "${as_me:-configure}:5436: testing adding $cf_add_libdir to library-path ..
done
fi
- LIBS="-lcurses -ltermcap $LIBS"
+ LIBS="-lcurses -ltermcap $LIBS"
+ fi
fi
ac_cv_func_initscr=yes
;;
esac
if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
- cf_term_lib=""
- cf_curs_lib=""
+ cf_save_LIBS="$LIBS"
- if test ".${cf_cv_ncurses_version:-no}" != .no
- then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
- fi
+ if test ".${cf_cv_ncurses_version:-no}" != .no
+ then
+ cf_check_list="ncurses curses cursesX"
+ else
+ cf_check_list="cursesX curses ncurses"
+ fi
- # Check for library containing tgoto. Do this before curses library
- # because it may be needed to link the test-case for initscr.
- echo "$as_me:5464: checking for tgoto" >&5
+ # Check for library containing tgoto. Do this before curses library
+ # because it may be needed to link the test-case for initscr.
+ if test "x$cf_term_lib" = x
+ then
+ echo "$as_me:5120: checking for tgoto" >&5
echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
if test "${ac_cv_func_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5470 "configure"
+#line 5126 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char tgoto (); below. */
@@ -5490,7 +5146,7 @@ main ()
#if defined (__stub_tgoto) || defined (__stub___tgoto)
choke me
#else
-f = tgoto;
+f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -5498,16 +5154,16 @@ f = tgoto;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5501: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5157: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5504: \$? = $ac_status" >&5
+ echo "$as_me:5160: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5507: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5163: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5510: \$? = $ac_status" >&5
+ echo "$as_me:5166: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_tgoto=yes
else
@@ -5517,16 +5173,16 @@ ac_cv_func_tgoto=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5520: result: $ac_cv_func_tgoto" >&5
+echo "$as_me:5176: result: $ac_cv_func_tgoto" >&5
echo "${ECHO_T}$ac_cv_func_tgoto" >&6
if test $ac_cv_func_tgoto = yes; then
cf_term_lib=predefined
else
- for cf_term_lib in $cf_check_list termcap termlib unknown
- do
- as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
-echo "$as_me:5529: checking for tgoto in -l$cf_term_lib" >&5
+ for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
+ do
+ as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
+echo "$as_me:5185: checking for tgoto in -l$cf_term_lib" >&5
echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5534,7 +5190,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_term_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5537 "configure"
+#line 5193 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -5553,16 +5209,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5556: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5212: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5559: \$? = $ac_status" >&5
+ echo "$as_me:5215: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5562: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5218: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5565: \$? = $ac_status" >&5
+ echo "$as_me:5221: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -5573,22 +5229,26 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:5576: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:5232: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
fi
- done
+ done
fi
- # Check for library containing initscr
- test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
- for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
- do
- as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
-echo "$as_me:5591: checking for initscr in -l$cf_curs_lib" >&5
+ fi
+
+ # Check for library containing initscr
+ test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
+ if test "x$cf_curs_lib" = x
+ then
+ for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
+ do
+ as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
+echo "$as_me:5251: checking for initscr in -l$cf_curs_lib" >&5
echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5596,7 +5256,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-l$cf_curs_lib $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 5599 "configure"
+#line 5259 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -5615,16 +5275,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5618: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5621: \$? = $ac_status" >&5
+ echo "$as_me:5281: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5624: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5284: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5627: \$? = $ac_status" >&5
+ echo "$as_me:5287: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -5635,23 +5295,24 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:5638: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:5298: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
break
fi
- done
- test $cf_curs_lib = unknown && { { echo "$as_me:5645: error: no curses library found" >&5
+ done
+ fi
+ test $cf_curs_lib = unknown && { { echo "$as_me:5306: error: no curses library found" >&5
echo "$as_me: error: no curses library found" >&2;}
{ (exit 1); exit 1; }; }
- LIBS="-l$cf_curs_lib $cf_save_LIBS"
- if test "$cf_term_lib" = unknown ; then
- echo "$as_me:5651: checking if we can link with $cf_curs_lib library" >&5
+ LIBS="-l$cf_curs_lib $cf_save_LIBS"
+ if test "$cf_term_lib" = unknown ; then
+ echo "$as_me:5312: checking if we can link with $cf_curs_lib library" >&5
echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-#line 5654 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5315 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -5663,16 +5324,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5666: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5327: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5669: \$? = $ac_status" >&5
+ echo "$as_me:5330: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5672: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5333: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5675: \$? = $ac_status" >&5
+ echo "$as_me:5336: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -5681,18 +5342,18 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:5684: result: $cf_result" >&5
+ echo "$as_me:5345: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
- test $cf_result = no && { { echo "$as_me:5686: error: Cannot link curses library" >&5
+ test $cf_result = no && { { echo "$as_me:5347: error: Cannot link curses library" >&5
echo "$as_me: error: Cannot link curses library" >&2;}
{ (exit 1); exit 1; }; }
- elif test "$cf_curs_lib" = "$cf_term_lib" ; then
- :
- elif test "$cf_term_lib" != predefined ; then
- echo "$as_me:5692: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
+ elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+ :
+ elif test "$cf_term_lib" != predefined ; then
+ echo "$as_me:5353: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
- cat >conftest.$ac_ext <<_ACEOF
-#line 5695 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5356 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -5704,25 +5365,25 @@ initscr(); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5707: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5368: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5710: \$? = $ac_status" >&5
+ echo "$as_me:5371: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5713: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5374: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5716: \$? = $ac_status" >&5
+ echo "$as_me:5377: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-#line 5725 "configure"
+ LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 5386 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -5734,16 +5395,16 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5737: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5398: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5740: \$? = $ac_status" >&5
+ echo "$as_me:5401: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5743: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5404: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5746: \$? = $ac_status" >&5
+ echo "$as_me:5407: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -5755,167 +5416,99 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:5758: result: $cf_result" >&5
+ echo "$as_me:5419: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
- fi
+ fi
fi
fi
-echo "$as_me:5764: checking for NetBSD form.h" >&5
-echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
-if test "${cf_cv_netbsd_form_h+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-cat >conftest.$ac_ext <<_ACEOF
-#line 5771 "configure"
-#include "confdefs.h"
-
-#include <${cf_cv_ncurses_header:-curses.h}>
-#include <form.h>
-
-int
-main ()
-{
-
- FORM *form;
- int y = current_field(form)->cursor_ypos;
- int x = current_field(form)->cursor_xpos;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5790: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:5793: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5796: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:5799: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_netbsd_form_h=yes
-
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_netbsd_form_h=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+ ;;
+ncurses) #(vi
-fi
-echo "$as_me:5811: result: $cf_cv_netbsd_form_h" >&5
-echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
+cf_ncuconfig_root=ncurses
-test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
-#define HAVE_NETBSD_FORM_H 1
-EOF
+echo "Looking for ${cf_ncuconfig_root}-config"
-echo "$as_me:5818: checking for NetBSD menu.h" >&5
-echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
-if test "${cf_cv_netbsd_menu_h+set}" = set; then
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:5437: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:5452: found $ac_dir/$ac_word" >&5
+break
+done
-cat >conftest.$ac_ext <<_ACEOF
-#line 5825 "configure"
-#include "confdefs.h"
-
-#include <${cf_cv_ncurses_header:-curses.h}>
-#include <menu.h>
-
-int
-main ()
-{
-
- MENU *menu;
- int y = menu->max_item_width;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5843: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:5846: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5849: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:5852: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_netbsd_menu_h=yes
-
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:5460: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_netbsd_menu_h=no
+ echo "$as_me:5463: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+ test -n "$NCURSES_CONFIG" && break
+ done
fi
-echo "$as_me:5864: result: $cf_cv_netbsd_menu_h" >&5
-echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
-
-test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
-#define HAVE_NETBSD_MENU_H 1
-EOF
-
- ;;
-ncurses)
-
-cf_ncuconfig_root=ncurses
-
-echo "Looking for ${cf_ncuconfig_root}-config"
-for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:5881: checking for $ac_word" >&5
+echo "$as_me:5476: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $NCURSES_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
- ;;
- *)
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
IFS=$ac_save_IFS
test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:5898: found $ac_dir/$ac_word" >&5
- break
-fi
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:5491: found $ac_dir/$ac_word" >&5
+break
done
- ;;
-esac
fi
-NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
-
-if test -n "$NCURSES_CONFIG"; then
- echo "$as_me:5909: result: $NCURSES_CONFIG" >&5
-echo "${ECHO_T}$NCURSES_CONFIG" >&6
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:5499: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
- echo "$as_me:5912: result: no" >&5
+ echo "$as_me:5502: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$NCURSES_CONFIG" && break
+ test -n "$ac_ct_NCURSES_CONFIG" && break
done
-test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
if test "$NCURSES_CONFIG" != none ; then
@@ -5924,7 +5517,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
# even with config script, some packages use no-override for curses.h
-echo "$as_me:5927: checking if we have identified curses headers" >&5
+echo "$as_me:5520: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5932,13 +5525,13 @@ else
cf_cv_ncurses_header=none
for cf_header in \
- ncurses/curses.h \
- ncurses/ncurses.h \
- curses.h \
- ncurses.h
+ ncurses/ncurses.h \
+ ncurses/curses.h \
+ ncurses.h \
+ curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 5941 "configure"
+#line 5534 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -5950,16 +5543,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5546: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5956: \$? = $ac_status" >&5
+ echo "$as_me:5549: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5959: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5552: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5962: \$? = $ac_status" >&5
+ echo "$as_me:5555: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -5970,11 +5563,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:5973: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:5566: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:5977: error: No curses header-files found" >&5
+ { { echo "$as_me:5570: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5984,23 +5577,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5987: checking for $ac_header" >&5
+echo "$as_me:5580: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5993 "configure"
+#line 5586 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:5997: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:5590: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:6003: \$? = $ac_status" >&5
+ echo "$as_me:5596: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6019,7 +5612,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:6022: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:5615: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -6072,7 +5665,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6075 "configure"
+#line 5668 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6084,16 +5677,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6087: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5680: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6090: \$? = $ac_status" >&5
+ echo "$as_me:5683: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6093: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5686: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6096: \$? = $ac_status" >&5
+ echo "$as_me:5689: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6110,7 +5703,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6113: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:5706: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6127,7 +5720,7 @@ fi
}
-echo "$as_me:6130: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:5723: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6139,7 +5732,7 @@ else
do
cat >conftest.$ac_ext <<_ACEOF
-#line 6142 "configure"
+#line 5735 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -6163,16 +5756,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6166: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5759: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6169: \$? = $ac_status" >&5
+ echo "$as_me:5762: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6172: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5765: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6175: \$? = $ac_status" >&5
+ echo "$as_me:5768: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h=$cf_header
@@ -6187,14 +5780,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:6190: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:5783: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6
if test "$cf_cv_ncurses_h" != no ; then
cf_cv_ncurses_header=$cf_cv_ncurses_h
else
-echo "$as_me:6197: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:5790: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6213,7 +5806,7 @@ if test -n "${CFLAGS}${CPPFLAGS}" ; then
-I*)
cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-test "$cf_header_path" != "NONE" && \
+test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
@@ -6234,9 +5827,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr"
test -d /usr/include && cf_search="$cf_search /usr/include"
test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
@@ -6245,7 +5838,7 @@ test -d "/usr" && \
test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $prefix"
@@ -6256,9 +5849,9 @@ test -d "$prefix" && \
test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
@@ -6267,9 +5860,9 @@ test -d "/usr/local" && \
test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /opt"
test -d /opt/include && cf_search="$cf_search /opt/include"
test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
@@ -6278,9 +5871,9 @@ test -d "/opt" && \
test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under $HOME"
test -d $HOME/include && cf_search="$cf_search $HOME/include"
test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
@@ -6334,7 +5927,7 @@ if test -n "$cf_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6337 "configure"
+#line 5930 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6346,16 +5939,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6349: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5942: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6352: \$? = $ac_status" >&5
+ echo "$as_me:5945: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6355: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5948: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6358: \$? = $ac_status" >&5
+ echo "$as_me:5951: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6372,7 +5965,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6375: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:5968: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6393,7 +5986,7 @@ fi
do
cat >conftest.$ac_ext <<_ACEOF
-#line 6396 "configure"
+#line 5989 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -6417,16 +6010,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6420: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6013: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6423: \$? = $ac_status" >&5
+ echo "$as_me:6016: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6426: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6019: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6429: \$? = $ac_status" >&5
+ echo "$as_me:6022: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h2=$cf_header
@@ -6447,12 +6040,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$cf_save2_CPPFLAGS"
test "$cf_cv_ncurses_h2" != no && break
done
- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6450: error: not found" >&5
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6043: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:6455: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:6048: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -6485,7 +6078,7 @@ if test -n "$cf_1st_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 6488 "configure"
+#line 6081 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -6497,16 +6090,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6500: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6093: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6503: \$? = $ac_status" >&5
+ echo "$as_me:6096: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6506: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6099: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6509: \$? = $ac_status" >&5
+ echo "$as_me:6102: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6523,7 +6116,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:6526: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:6119: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6544,7 +6137,8 @@ fi
case $cf_cv_ncurses_header in # (vi
*ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_H 1
EOF
@@ -6553,20 +6147,22 @@ esac
case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_NCURSES_H 1
EOF
;;
ncursesw/curses.h|ncursesw/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_NCURSES_H 1
EOF
;;
esac
-echo "$as_me:6569: checking for terminfo header" >&5
+echo "$as_me:6165: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6584,7 +6180,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 6587 "configure"
+#line 6183 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -6599,16 +6195,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6602: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6198: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6605: \$? = $ac_status" >&5
+ echo "$as_me:6201: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6608: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6204: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6611: \$? = $ac_status" >&5
+ echo "$as_me:6207: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -6624,14 +6220,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:6627: result: $cf_cv_term_header" >&5
+echo "$as_me:6223: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
case $cf_cv_term_header in # (vi
*term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
@@ -6640,13 +6237,15 @@ esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
@@ -6654,11 +6253,12 @@ EOF
esac
# some applications need this, but should check for NCURSES_VERSION
+
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:6661: checking for ncurses version" >&5
+echo "$as_me:6261: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6684,10 +6284,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:6687: \"$cf_try\"") >&5
+ { (eval echo "$as_me:6287: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:6690: \$? = $ac_status" >&5
+ echo "$as_me:6290: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -6697,7 +6297,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6700 "configure"
+#line 6300 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -6722,15 +6322,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6725: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6325: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6728: \$? = $ac_status" >&5
+ echo "$as_me:6328: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:6730: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6330: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6733: \$? = $ac_status" >&5
+ echo "$as_me:6333: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -6744,9 +6344,10 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:6747: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:6347: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
@@ -6756,7 +6357,7 @@ cf_nculib_root=ncurses
# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
-echo "$as_me:6759: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:6360: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6764,7 +6365,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6767 "configure"
+#line 6368 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -6783,16 +6384,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6786: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6387: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6789: \$? = $ac_status" >&5
+ echo "$as_me:6390: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6792: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6393: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6795: \$? = $ac_status" >&5
+ echo "$as_me:6396: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -6803,10 +6404,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:6806: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:6407: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
- echo "$as_me:6809: checking for initscr in -lgpm" >&5
+ echo "$as_me:6410: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6814,7 +6415,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6817 "configure"
+#line 6418 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -6833,16 +6434,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6836: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6437: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6839: \$? = $ac_status" >&5
+ echo "$as_me:6440: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6842: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6443: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6845: \$? = $ac_status" >&5
+ echo "$as_me:6446: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_initscr=yes
else
@@ -6853,7 +6454,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:6856: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:6457: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
LIBS="$cf_ncurses_SAVE"
@@ -6868,7 +6469,7 @@ freebsd*)
# This is only necessary if you are linking against an obsolete
# version of ncurses (but it should do no harm, since it's static).
if test "$cf_nculib_root" = ncurses ; then
- echo "$as_me:6871: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:6472: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6876,7 +6477,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6879 "configure"
+#line 6480 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -6895,16 +6496,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6898: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6499: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6901: \$? = $ac_status" >&5
+ echo "$as_me:6502: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6904: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6505: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6907: \$? = $ac_status" >&5
+ echo "$as_me:6508: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -6915,7 +6516,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:6918: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:6519: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -6934,13 +6535,13 @@ else
eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
cf_libdir=""
- echo "$as_me:6937: checking for initscr" >&5
+ echo "$as_me:6538: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6943 "configure"
+#line 6544 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr (); below. */
@@ -6963,7 +6564,7 @@ main ()
#if defined (__stub_initscr) || defined (__stub___initscr)
choke me
#else
-f = initscr;
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -6971,16 +6572,16 @@ f = initscr;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6974: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6575: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6977: \$? = $ac_status" >&5
+ echo "$as_me:6578: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6980: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6581: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6983: \$? = $ac_status" >&5
+ echo "$as_me:6584: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_initscr=yes
else
@@ -6990,18 +6591,18 @@ ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6993: result: $ac_cv_func_initscr" >&5
+echo "$as_me:6594: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
cf_save_LIBS="$LIBS"
- echo "$as_me:7000: checking for initscr in -l$cf_nculib_root" >&5
+ echo "$as_me:6601: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
LIBS="-l$cf_nculib_root $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7004 "configure"
+#line 6605 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -7013,25 +6614,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7016: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6617: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7019: \$? = $ac_status" >&5
+ echo "$as_me:6620: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7022: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6623: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7025: \$? = $ac_status" >&5
+ echo "$as_me:6626: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:7027: result: yes" >&5
+ echo "$as_me:6628: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:7034: result: no" >&5
+echo "$as_me:6635: result: no" >&5
echo "${ECHO_T}no" >&6
cf_search=
@@ -7043,7 +6644,7 @@ if test -n "${LDFLAGS}${LIBS}" ; then
-L*)
cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-test "$cf_library_path" != "NONE" && \
+test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
@@ -7062,9 +6663,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr"
test -d /usr/lib && cf_search="$cf_search /usr/lib"
test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
@@ -7073,7 +6674,7 @@ test -d "/usr" && \
test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
@@ -7084,9 +6685,9 @@ test -d "$prefix" && \
test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
@@ -7095,9 +6696,9 @@ test -d "/usr/local" && \
test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /opt"
test -d /opt/lib && cf_search="$cf_search /opt/lib"
test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
@@ -7106,9 +6707,9 @@ test -d "/opt" && \
test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
@@ -7121,11 +6722,11 @@ cf_search="$cf_library_path_list $cf_search"
for cf_libdir in $cf_search
do
- echo "$as_me:7124: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo "$as_me:6725: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7128 "configure"
+#line 6729 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -7137,25 +6738,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7140: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6741: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7143: \$? = $ac_status" >&5
+ echo "$as_me:6744: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7146: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6747: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7149: \$? = $ac_status" >&5
+ echo "$as_me:6750: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:7151: result: yes" >&5
+ echo "$as_me:6752: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:7158: result: no" >&5
+echo "$as_me:6759: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_save_LIBS"
fi
@@ -7170,7 +6771,7 @@ fi
eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
if test $cf_found_library = no ; then
- { { echo "$as_me:7173: error: Cannot link $cf_nculib_root library" >&5
+ { { echo "$as_me:6774: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -7178,7 +6779,7 @@ fi
fi
if test -n "$cf_ncurses_LIBS" ; then
- echo "$as_me:7181: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo "$as_me:6782: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
cf_ncurses_SAVE="$LIBS"
for p in $cf_ncurses_LIBS ; do
@@ -7188,7 +6789,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
fi
done
cat >conftest.$ac_ext <<_ACEOF
-#line 7191 "configure"
+#line 6792 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -7200,23 +6801,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7203: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6804: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7206: \$? = $ac_status" >&5
+ echo "$as_me:6807: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7209: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6810: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7212: \$? = $ac_status" >&5
+ echo "$as_me:6813: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:7214: result: yes" >&5
+ echo "$as_me:6815: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:7219: result: no" >&5
+echo "$as_me:6820: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_ncurses_SAVE"
fi
@@ -7232,10 +6833,9 @@ EOF
fi
;;
-ncursesw)
- cf_cv_libtype=w
+ncursesw) #(vi
-echo "$as_me:7238: checking for multibyte character support" >&5
+echo "$as_me:6838: checking for multibyte character support" >&5
echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
if test "${cf_cv_utf8_lib+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7243,7 +6843,7 @@ else
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7246 "configure"
+#line 6846 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -7256,16 +6856,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7259: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6859: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7262: \$? = $ac_status" >&5
+ echo "$as_me:6862: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7265: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6865: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7268: \$? = $ac_status" >&5
+ echo "$as_me:6868: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_utf8_lib=yes
else
@@ -7277,12 +6877,12 @@ cat conftest.$ac_ext >&5
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=
-echo "${as_me:-configure}:7280: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:6880: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7285 "configure"
+#line 6885 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7295,16 +6895,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7298: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6898: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7301: \$? = $ac_status" >&5
+ echo "$as_me:6901: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7304: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6904: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7307: \$? = $ac_status" >&5
+ echo "$as_me:6907: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -7318,7 +6918,7 @@ cat conftest.$ac_ext >&5
LIBS="-lutf8 $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7321 "configure"
+#line 6921 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7331,16 +6931,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7334: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6934: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7337: \$? = $ac_status" >&5
+ echo "$as_me:6937: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7340: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6940: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7343: \$? = $ac_status" >&5
+ echo "$as_me:6943: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -7357,9 +6957,9 @@ cat conftest.$ac_ext >&5
test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
-echo "${as_me:-configure}:7360: testing find linkage for utf8 library ..." 1>&5
+echo "${as_me:-configure}:6960: testing find linkage for utf8 library ..." 1>&5
-echo "${as_me:-configure}:7362: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:6962: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_CPPFLAGS="$CPPFLAGS"
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7375,7 +6975,7 @@ if test -n "${CFLAGS}${CPPFLAGS}" ; then
-I*)
cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-test "$cf_header_path" != "NONE" && \
+test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
@@ -7396,9 +6996,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr"
test -d /usr/include && cf_search="$cf_search /usr/include"
test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
@@ -7407,7 +7007,7 @@ test -d "/usr" && \
test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $prefix"
@@ -7418,9 +7018,9 @@ test -d "$prefix" && \
test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
@@ -7429,9 +7029,9 @@ test -d "/usr/local" && \
test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /opt"
test -d /opt/include && cf_search="$cf_search /opt/include"
test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
@@ -7440,9 +7040,9 @@ test -d "/opt" && \
test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under $HOME"
test -d $HOME/include && cf_search="$cf_search $HOME/include"
test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
@@ -7472,11 +7072,11 @@ cf_search="$cf_search $cf_header_path_list"
if test -d $cf_cv_header_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:7475: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7075: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 7479 "configure"
+#line 7079 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7489,21 +7089,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7492: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7092: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7495: \$? = $ac_status" >&5
+ echo "$as_me:7095: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7498: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7098: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7501: \$? = $ac_status" >&5
+ echo "$as_me:7101: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:7506: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7106: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=maybe
cf_test_CPPFLAGS="$CPPFLAGS"
@@ -7521,7 +7121,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_cv_find_linkage_utf8" = maybe ; then
-echo "${as_me:-configure}:7524: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:7124: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cf_save_LDFLAGS="$LDFLAGS"
@@ -7537,7 +7137,7 @@ if test -n "${LDFLAGS}${LIBS}" ; then
-L*)
cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-test "$cf_library_path" != "NONE" && \
+test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
@@ -7556,9 +7156,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr"
test -d /usr/lib && cf_search="$cf_search /usr/lib"
test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
@@ -7567,7 +7167,7 @@ test -d "/usr" && \
test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
@@ -7578,9 +7178,9 @@ test -d "$prefix" && \
test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
@@ -7589,9 +7189,9 @@ test -d "/usr/local" && \
test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /opt"
test -d /opt/lib && cf_search="$cf_search /opt/lib"
test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
@@ -7600,9 +7200,9 @@ test -d "/opt" && \
test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
@@ -7618,13 +7218,13 @@ cf_search="$cf_library_path_list $cf_search"
if test -d $cf_cv_library_path_utf8 ; then
test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:7621: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7221: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
CPPFLAGS="$cf_test_CPPFLAGS"
LIBS="-lutf8 $cf_save_LIBS"
LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
cat >conftest.$ac_ext <<_ACEOF
-#line 7627 "configure"
+#line 7227 "configure"
#include "confdefs.h"
#include <libutf8.h>
@@ -7637,21 +7237,21 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7640: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7240: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7643: \$? = $ac_status" >&5
+ echo "$as_me:7243: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7646: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7246: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7649: \$? = $ac_status" >&5
+ echo "$as_me:7249: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:7654: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:7254: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
cf_cv_find_linkage_utf8=yes
cf_cv_library_file_utf8="-lutf8"
@@ -7693,13 +7293,14 @@ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7696: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:7296: result: $cf_cv_utf8_lib" >&5
echo "${ECHO_T}$cf_cv_utf8_lib" >&6
# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
# ncurses/ncursesw:
if test "$cf_cv_utf8_lib" = "add-on" ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBUTF8_H 1
EOF
@@ -7727,7 +7328,7 @@ if test -n "$cf_cv_header_path_utf8" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 7730 "configure"
+#line 7331 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -7739,16 +7340,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7742: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7343: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7745: \$? = $ac_status" >&5
+ echo "$as_me:7346: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7748: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7349: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7751: \$? = $ac_status" >&5
+ echo "$as_me:7352: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -7765,7 +7366,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:7768: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7369: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -7799,7 +7400,7 @@ if test -n "$cf_cv_library_path_utf8" ; then
if test "$cf_have_libdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:7802: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7403: testing adding $cf_add_libdir to library-path ..." 1>&5
LDFLAGS="-L$cf_add_libdir $LDFLAGS"
fi
@@ -7813,48 +7414,87 @@ fi
cf_ncuconfig_root=ncursesw
echo "Looking for ${cf_ncuconfig_root}-config"
-for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:7423: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$NCURSES_CONFIG"; then
+ ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:7438: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
+if test -n "$NCURSES_CONFIG"; then
+ echo "$as_me:7446: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:7449: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NCURSES_CONFIG" && break
+ done
+fi
+if test -z "$NCURSES_CONFIG"; then
+ ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
+ for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:7820: checking for $ac_word" >&5
+echo "$as_me:7462: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $NCURSES_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
- ;;
- *)
+ if test -n "$ac_ct_NCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
+else
ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
IFS=$ac_save_IFS
test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:7837: found $ac_dir/$ac_word" >&5
- break
-fi
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:7477: found $ac_dir/$ac_word" >&5
+break
done
- ;;
-esac
fi
-NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
-
-if test -n "$NCURSES_CONFIG"; then
- echo "$as_me:7848: result: $NCURSES_CONFIG" >&5
-echo "${ECHO_T}$NCURSES_CONFIG" >&6
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:7485: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
- echo "$as_me:7851: result: no" >&5
+ echo "$as_me:7488: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$NCURSES_CONFIG" && break
+ test -n "$ac_ct_NCURSES_CONFIG" && break
done
-test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
if test "$NCURSES_CONFIG" != none ; then
@@ -7863,7 +7503,7 @@ LIBS="`$NCURSES_CONFIG --libs` $LIBS"
# even with config script, some packages use no-override for curses.h
-echo "$as_me:7866: checking if we have identified curses headers" >&5
+echo "$as_me:7506: checking if we have identified curses headers" >&5
echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
if test "${cf_cv_ncurses_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -7871,13 +7511,13 @@ else
cf_cv_ncurses_header=none
for cf_header in \
- ncursesw/curses.h \
- ncursesw/ncurses.h \
- curses.h \
- ncurses.h
+ ncursesw/ncurses.h \
+ ncursesw/curses.h \
+ ncurses.h \
+ curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 7880 "configure"
+#line 7520 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
@@ -7889,16 +7529,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7892: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7532: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7895: \$? = $ac_status" >&5
+ echo "$as_me:7535: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7898: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7538: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7901: \$? = $ac_status" >&5
+ echo "$as_me:7541: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -7909,11 +7549,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:7912: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:7552: result: $cf_cv_ncurses_header" >&5
echo "${ECHO_T}$cf_cv_ncurses_header" >&6
if test "$cf_cv_ncurses_header" = none ; then
- { { echo "$as_me:7916: error: No curses header-files found" >&5
+ { { echo "$as_me:7556: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -7923,23 +7563,23 @@ fi
for ac_header in $cf_cv_ncurses_header
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:7926: checking for $ac_header" >&5
+echo "$as_me:7566: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7932 "configure"
+#line 7572 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:7936: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7576: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:7942: \$? = $ac_status" >&5
+ echo "$as_me:7582: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -7958,7 +7598,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:7961: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:7601: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -8011,7 +7651,7 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 8014 "configure"
+#line 7654 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8023,16 +7663,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8026: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7666: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8029: \$? = $ac_status" >&5
+ echo "$as_me:7669: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8032: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7672: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8035: \$? = $ac_status" >&5
+ echo "$as_me:7675: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -8049,7 +7689,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:8052: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7692: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -8066,7 +7706,7 @@ fi
}
-echo "$as_me:8069: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:7709: checking for $cf_ncuhdr_root header in include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8078,7 +7718,7 @@ else
do
cat >conftest.$ac_ext <<_ACEOF
-#line 8081 "configure"
+#line 7721 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE_EXTENDED
@@ -8110,16 +7750,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8113: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7753: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8116: \$? = $ac_status" >&5
+ echo "$as_me:7756: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8119: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7759: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8122: \$? = $ac_status" >&5
+ echo "$as_me:7762: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h=$cf_header
@@ -8134,14 +7774,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:8137: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:7777: result: $cf_cv_ncurses_h" >&5
echo "${ECHO_T}$cf_cv_ncurses_h" >&6
if test "$cf_cv_ncurses_h" != no ; then
cf_cv_ncurses_header=$cf_cv_ncurses_h
else
-echo "$as_me:8144: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:7784: checking for $cf_ncuhdr_root include-path" >&5
echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
if test "${cf_cv_ncurses_h2+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8160,7 +7800,7 @@ if test -n "${CFLAGS}${CPPFLAGS}" ; then
-I*)
cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
-test "$cf_header_path" != "NONE" && \
+test "x$cf_header_path" != "xNONE" && \
test -d "$cf_header_path" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
@@ -8181,9 +7821,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr"
test -d /usr/include && cf_search="$cf_search /usr/include"
test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
@@ -8192,7 +7832,7 @@ test -d "/usr" && \
test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $prefix"
@@ -8203,9 +7843,9 @@ test -d "$prefix" && \
test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
@@ -8214,9 +7854,9 @@ test -d "/usr/local" && \
test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under /opt"
test -d /opt/include && cf_search="$cf_search /opt/include"
test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
@@ -8225,9 +7865,9 @@ test -d "/opt" && \
test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for include-directories under $HOME"
test -d $HOME/include && cf_search="$cf_search $HOME/include"
test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
@@ -8281,7 +7921,7 @@ if test -n "$cf_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 8284 "configure"
+#line 7924 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8293,16 +7933,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8296: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7936: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8299: \$? = $ac_status" >&5
+ echo "$as_me:7939: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8302: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7942: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8305: \$? = $ac_status" >&5
+ echo "$as_me:7945: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -8319,7 +7959,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:8322: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7962: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -8340,7 +7980,7 @@ fi
do
cat >conftest.$ac_ext <<_ACEOF
-#line 8343 "configure"
+#line 7983 "configure"
#include "confdefs.h"
#include <$cf_header>
@@ -8364,16 +8004,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8367: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8007: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8370: \$? = $ac_status" >&5
+ echo "$as_me:8010: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8373: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8013: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8376: \$? = $ac_status" >&5
+ echo "$as_me:8016: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h2=$cf_header
@@ -8394,12 +8034,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$cf_save2_CPPFLAGS"
test "$cf_cv_ncurses_h2" != no && break
done
- test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8397: error: not found" >&5
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8037: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:8402: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:8042: result: $cf_cv_ncurses_h2" >&5
echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
@@ -8432,7 +8072,7 @@ if test -n "$cf_1st_incdir" ; then
cf_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
cat >conftest.$ac_ext <<_ACEOF
-#line 8435 "configure"
+#line 8075 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -8444,16 +8084,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8447: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8087: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8450: \$? = $ac_status" >&5
+ echo "$as_me:8090: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8453: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8093: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8456: \$? = $ac_status" >&5
+ echo "$as_me:8096: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -8470,7 +8110,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
if test "$cf_have_incdir" = no ; then
test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
-echo "${as_me:-configure}:8473: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8113: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -8491,7 +8131,8 @@ fi
case $cf_cv_ncurses_header in # (vi
*ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_H 1
EOF
@@ -8500,20 +8141,22 @@ esac
case $cf_cv_ncurses_header in # (vi
ncurses/curses.h|ncurses/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_NCURSES_H 1
EOF
;;
ncursesw/curses.h|ncursesw/ncurses.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_NCURSES_H 1
EOF
;;
esac
-echo "$as_me:8516: checking for terminfo header" >&5
+echo "$as_me:8159: checking for terminfo header" >&5
echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8531,7 +8174,7 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 8534 "configure"
+#line 8177 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -8546,16 +8189,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:8549: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8192: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:8552: \$? = $ac_status" >&5
+ echo "$as_me:8195: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:8555: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8198: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8558: \$? = $ac_status" >&5
+ echo "$as_me:8201: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -8571,14 +8214,15 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:8574: result: $cf_cv_term_header" >&5
+echo "$as_me:8217: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
# Set definitions to allow ifdef'ing to accommodate subdirectories
case $cf_cv_term_header in # (vi
*term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
@@ -8587,13 +8231,15 @@ esac
case $cf_cv_term_header in # (vi
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
@@ -8601,11 +8247,12 @@ EOF
esac
# some applications need this, but should check for NCURSES_VERSION
+
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:8608: checking for ncurses version" >&5
+echo "$as_me:8255: checking for ncurses version" >&5
echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
if test "${cf_cv_ncurses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8631,10 +8278,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:8634: \"$cf_try\"") >&5
+ { (eval echo "$as_me:8281: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:8637: \$? = $ac_status" >&5
+ echo "$as_me:8284: \$? = $ac_status" >&5
(exit $ac_status); }
if test -f conftest.out ; then
cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
@@ -8644,7 +8291,7 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8647 "configure"
+#line 8294 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -8669,15 +8316,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:8672: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8319: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8675: \$? = $ac_status" >&5
+ echo "$as_me:8322: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:8677: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8324: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8680: \$? = $ac_status" >&5
+ echo "$as_me:8327: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -8691,9 +8338,10 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:8694: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:8341: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
-test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
@@ -8703,7 +8351,7 @@ cf_nculib_root=ncursesw
# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
-echo "$as_me:8706: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:8354: checking for Gpm_Open in -lgpm" >&5
echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8711,7 +8359,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8714 "configure"
+#line 8362 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8730,16 +8378,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8733: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8381: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8736: \$? = $ac_status" >&5
+ echo "$as_me:8384: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8739: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8387: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8742: \$? = $ac_status" >&5
+ echo "$as_me:8390: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -8750,10 +8398,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8753: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:8401: result: $ac_cv_lib_gpm_Gpm_Open" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
if test $ac_cv_lib_gpm_Gpm_Open = yes; then
- echo "$as_me:8756: checking for initscr in -lgpm" >&5
+ echo "$as_me:8404: checking for initscr in -lgpm" >&5
echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
if test "${ac_cv_lib_gpm_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8761,7 +8409,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8764 "configure"
+#line 8412 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8780,16 +8428,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8783: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8431: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8786: \$? = $ac_status" >&5
+ echo "$as_me:8434: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8789: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8437: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8792: \$? = $ac_status" >&5
+ echo "$as_me:8440: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_initscr=yes
else
@@ -8800,7 +8448,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8803: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:8451: result: $ac_cv_lib_gpm_initscr" >&5
echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
if test $ac_cv_lib_gpm_initscr = yes; then
LIBS="$cf_ncurses_SAVE"
@@ -8815,7 +8463,7 @@ freebsd*)
# This is only necessary if you are linking against an obsolete
# version of ncurses (but it should do no harm, since it's static).
if test "$cf_nculib_root" = ncurses ; then
- echo "$as_me:8818: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:8466: checking for tgoto in -lmytinfo" >&5
echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8823,7 +8471,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8826 "configure"
+#line 8474 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8842,16 +8490,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8845: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8493: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8848: \$? = $ac_status" >&5
+ echo "$as_me:8496: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8851: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8499: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8854: \$? = $ac_status" >&5
+ echo "$as_me:8502: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -8862,7 +8510,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8865: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:8513: result: $ac_cv_lib_mytinfo_tgoto" >&5
echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
if test $ac_cv_lib_mytinfo_tgoto = yes; then
cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
@@ -8881,13 +8529,13 @@ else
eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
cf_libdir=""
- echo "$as_me:8884: checking for initscr" >&5
+ echo "$as_me:8532: checking for initscr" >&5
echo $ECHO_N "checking for initscr... $ECHO_C" >&6
if test "${ac_cv_func_initscr+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 8890 "configure"
+#line 8538 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr (); below. */
@@ -8910,7 +8558,7 @@ main ()
#if defined (__stub_initscr) || defined (__stub___initscr)
choke me
#else
-f = initscr;
+f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -8918,16 +8566,16 @@ f = initscr;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8921: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8569: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8924: \$? = $ac_status" >&5
+ echo "$as_me:8572: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8927: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8575: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8930: \$? = $ac_status" >&5
+ echo "$as_me:8578: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_initscr=yes
else
@@ -8937,18 +8585,18 @@ ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:8940: result: $ac_cv_func_initscr" >&5
+echo "$as_me:8588: result: $ac_cv_func_initscr" >&5
echo "${ECHO_T}$ac_cv_func_initscr" >&6
if test $ac_cv_func_initscr = yes; then
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
cf_save_LIBS="$LIBS"
- echo "$as_me:8947: checking for initscr in -l$cf_nculib_root" >&5
+ echo "$as_me:8595: checking for initscr in -l$cf_nculib_root" >&5
echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
LIBS="-l$cf_nculib_root $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8951 "configure"
+#line 8599 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -8960,25 +8608,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8611: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8966: \$? = $ac_status" >&5
+ echo "$as_me:8614: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8969: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8617: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8972: \$? = $ac_status" >&5
+ echo "$as_me:8620: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:8974: result: yes" >&5
+ echo "$as_me:8622: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:8981: result: no" >&5
+echo "$as_me:8629: result: no" >&5
echo "${ECHO_T}no" >&6
cf_search=
@@ -8990,7 +8638,7 @@ if test -n "${LDFLAGS}${LIBS}" ; then
-L*)
cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
-test "$cf_library_path" != "NONE" && \
+test "x$cf_library_path" != "xNONE" && \
test -d "$cf_library_path" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
@@ -9009,9 +8657,9 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
+test "x/usr" != "x$prefix" && \
test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr"
test -d /usr/lib && cf_search="$cf_search /usr/lib"
test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
@@ -9020,7 +8668,7 @@ test -d "/usr" && \
test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
@@ -9031,9 +8679,9 @@ test -d "$prefix" && \
test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "/usr/local" != "$prefix" && \
+test "x/usr/local" != "x$prefix" && \
test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/usr/local" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
@@ -9042,9 +8690,9 @@ test -d "/usr/local" && \
test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "/opt" != "$prefix" && \
+test "x/opt" != "x$prefix" && \
test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x/opt" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under /opt"
test -d /opt/lib && cf_search="$cf_search /opt/lib"
test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
@@ -9053,9 +8701,9 @@ test -d "/opt" && \
test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "$HOME" != "$prefix" && \
+test "x$HOME" != "x$prefix" && \
test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$prefix") && {
+(test -z "$prefix" || test x$prefix = xNONE || test "x$HOME" != "x$prefix") && {
test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
@@ -9068,11 +8716,11 @@ cf_search="$cf_library_path_list $cf_search"
for cf_libdir in $cf_search
do
- echo "$as_me:9071: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo "$as_me:8719: checking for -l$cf_nculib_root in $cf_libdir" >&5
echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9075 "configure"
+#line 8723 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -9084,25 +8732,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9087: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9090: \$? = $ac_status" >&5
+ echo "$as_me:8738: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9093: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8741: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9096: \$? = $ac_status" >&5
+ echo "$as_me:8744: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:9098: result: yes" >&5
+ echo "$as_me:8746: result: yes" >&5
echo "${ECHO_T}yes" >&6
eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:9105: result: no" >&5
+echo "$as_me:8753: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_save_LIBS"
fi
@@ -9117,7 +8765,7 @@ fi
eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
if test $cf_found_library = no ; then
- { { echo "$as_me:9120: error: Cannot link $cf_nculib_root library" >&5
+ { { echo "$as_me:8768: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9125,7 +8773,7 @@ fi
fi
if test -n "$cf_ncurses_LIBS" ; then
- echo "$as_me:9128: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo "$as_me:8776: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
cf_ncurses_SAVE="$LIBS"
for p in $cf_ncurses_LIBS ; do
@@ -9135,7 +8783,7 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
fi
done
cat >conftest.$ac_ext <<_ACEOF
-#line 9138 "configure"
+#line 8786 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
@@ -9147,23 +8795,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9150: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8798: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9153: \$? = $ac_status" >&5
+ echo "$as_me:8801: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9156: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8804: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9159: \$? = $ac_status" >&5
+ echo "$as_me:8807: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:9161: result: yes" >&5
+ echo "$as_me:8809: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:9166: result: no" >&5
+echo "$as_me:8814: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_ncurses_SAVE"
fi
@@ -9179,153 +8827,8 @@ EOF
fi
;;
-pdcurses) #(vi
-
-echo "$as_me:9184: checking if you want to use pkg-config" >&5
-echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
-
-# Check whether --with-pkg-config or --without-pkg-config was given.
-if test "${with_pkg_config+set}" = set; then
- withval="$with_pkg_config"
- cf_pkg_config=$withval
-else
- cf_pkg_config=yes
-fi;
-echo "$as_me:9194: result: $cf_pkg_config" >&5
-echo "${ECHO_T}$cf_pkg_config" >&6
-
-case $cf_pkg_config in #(vi
-no) #(vi
- PKG_CONFIG=none
- ;;
-yes) #(vi
- 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
-echo "$as_me:9205: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $PKG_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
- ;;
- *)
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:9222: found $ac_dir/$ac_word" >&5
- break
-fi
-done
-
- ;;
-esac
-fi
-PKG_CONFIG=$ac_cv_path_PKG_CONFIG
-
-if test -n "$PKG_CONFIG"; then
- echo "$as_me:9233: result: $PKG_CONFIG" >&5
-echo "${ECHO_T}$PKG_CONFIG" >&6
-else
- echo "$as_me:9236: result: no" >&5
-echo "${ECHO_T}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
-echo "$as_me:9245: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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.
- ;;
- *)
- ac_save_IFS=$IFS; IFS=$ac_path_separator
-ac_dummy="$PATH"
-for ac_dir in $ac_dummy; do
- IFS=$ac_save_IFS
- test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:9262: found $ac_dir/$ac_word" >&5
- break
-fi
-done
-
- test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
- ;;
-esac
-fi
-ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
-
-if test -n "$ac_pt_PKG_CONFIG"; then
- echo "$as_me:9274: result: $ac_pt_PKG_CONFIG" >&5
-echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
-else
- echo "$as_me:9277: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- PKG_CONFIG=$ac_pt_PKG_CONFIG
-else
- PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
-fi
-
- ;;
-*)
- PKG_CONFIG=$withval
- ;;
-esac
-
-test -z "$PKG_CONFIG" && PKG_CONFIG=none
-if test "$PKG_CONFIG" != none ; then
-
-if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
-else
- cf_path_syntax="$ac_default_prefix"
-fi
-
-case ".$PKG_CONFIG" in #(vi
-.\$\(*\)*|.\'*\'*) #(vi
- ;;
-..|./*|.\\*) #(vi
- ;;
-.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
- ;;
-.\${*prefix}*) #(vi
- eval PKG_CONFIG="$PKG_CONFIG"
- case ".$PKG_CONFIG" in #(vi
- .NONE/*)
- PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
- ;;
- esac
- ;; #(vi
-.no|.NONE/*)
- PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
- ;;
-*)
- { { echo "$as_me:9320: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
-echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
- { (exit 1); exit 1; }; }
- ;;
-esac
-
-fi
-
-echo "$as_me:9328: checking for X" >&5
+pdcurses)
+ echo "$as_me:8831: checking for X" >&5
echo $ECHO_N "checking for X... $ECHO_C" >&6
# Check whether --with-x or --without-x was given.
@@ -9422,17 +8925,17 @@ if test "$ac_x_includes" = no; then
# Guess where to find include files, by looking for Intrinsic.h.
# First, try using that file with no special directory specified.
cat >conftest.$ac_ext <<_ACEOF
-#line 9425 "configure"
+#line 8928 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
_ACEOF
-if { (eval echo "$as_me:9429: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:8932: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:9435: \$? = $ac_status" >&5
+ echo "$as_me:8938: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -9465,7 +8968,7 @@ if test "$ac_x_libraries" = no; then
ac_save_LIBS=$LIBS
LIBS="-lXt $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9468 "configure"
+#line 8971 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
int
@@ -9477,16 +8980,16 @@ XtMalloc (0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9480: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8983: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9483: \$? = $ac_status" >&5
+ echo "$as_me:8986: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9486: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8989: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9489: \$? = $ac_status" >&5
+ echo "$as_me:8992: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
LIBS=$ac_save_LIBS
# We can link X programs with no special library path.
@@ -9524,7 +9027,7 @@ fi
fi # $with_x != no
if test "$have_x" != yes; then
- echo "$as_me:9527: result: $have_x" >&5
+ echo "$as_me:9030: result: $have_x" >&5
echo "${ECHO_T}$have_x" >&6
no_x=yes
else
@@ -9534,7 +9037,7 @@ else
# Update the cache value to reflect the command line values.
ac_cv_have_x="have_x=yes \
ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
- echo "$as_me:9537: result: libraries $x_libraries, headers $x_includes" >&5
+ echo "$as_me:9040: result: libraries $x_libraries, headers $x_includes" >&5
echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
fi
@@ -9558,11 +9061,11 @@ else
# others require no space. Words are not sufficient . . . .
case `(uname -sr) 2>/dev/null` in
"SunOS 5"*)
- echo "$as_me:9561: checking whether -R must be followed by a space" >&5
+ echo "$as_me:9064: checking whether -R must be followed by a space" >&5
echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
cat >conftest.$ac_ext <<_ACEOF
-#line 9565 "configure"
+#line 9068 "configure"
#include "confdefs.h"
int
@@ -9574,16 +9077,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9577: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9080: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9580: \$? = $ac_status" >&5
+ echo "$as_me:9083: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9583: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9086: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9586: \$? = $ac_status" >&5
+ echo "$as_me:9089: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_nospace=yes
else
@@ -9593,13 +9096,13 @@ ac_R_nospace=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test $ac_R_nospace = yes; then
- echo "$as_me:9596: result: no" >&5
+ echo "$as_me:9099: result: no" >&5
echo "${ECHO_T}no" >&6
X_LIBS="$X_LIBS -R$x_libraries"
else
LIBS="$ac_xsave_LIBS -R $x_libraries"
cat >conftest.$ac_ext <<_ACEOF
-#line 9602 "configure"
+#line 9105 "configure"
#include "confdefs.h"
int
@@ -9611,16 +9114,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9614: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9117: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9617: \$? = $ac_status" >&5
+ echo "$as_me:9120: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9620: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9123: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9623: \$? = $ac_status" >&5
+ echo "$as_me:9126: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_R_space=yes
else
@@ -9630,11 +9133,11 @@ ac_R_space=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
if test $ac_R_space = yes; then
- echo "$as_me:9633: result: yes" >&5
+ echo "$as_me:9136: result: yes" >&5
echo "${ECHO_T}yes" >&6
X_LIBS="$X_LIBS -R $x_libraries"
else
- echo "$as_me:9637: result: neither works" >&5
+ echo "$as_me:9140: result: neither works" >&5
echo "${ECHO_T}neither works" >&6
fi
fi
@@ -9654,7 +9157,7 @@ echo "${ECHO_T}neither works" >&6
# the Alpha needs dnet_stub (dnet does not exist).
ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
cat >conftest.$ac_ext <<_ACEOF
-#line 9657 "configure"
+#line 9160 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -9673,22 +9176,22 @@ XOpenDisplay ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9676: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9179: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9679: \$? = $ac_status" >&5
+ echo "$as_me:9182: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9682: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9185: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9685: \$? = $ac_status" >&5
+ echo "$as_me:9188: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:9691: checking for dnet_ntoa in -ldnet" >&5
+echo "$as_me:9194: checking for dnet_ntoa in -ldnet" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9696,7 +9199,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9699 "configure"
+#line 9202 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -9715,16 +9218,16 @@ dnet_ntoa ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9718: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9221: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9721: \$? = $ac_status" >&5
+ echo "$as_me:9224: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9724: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9227: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9727: \$? = $ac_status" >&5
+ echo "$as_me:9230: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_dnet_ntoa=yes
else
@@ -9735,14 +9238,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:9738: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+echo "$as_me:9241: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
fi
if test $ac_cv_lib_dnet_dnet_ntoa = no; then
- echo "$as_me:9745: checking for dnet_ntoa in -ldnet_stub" >&5
+ echo "$as_me:9248: checking for dnet_ntoa in -ldnet_stub" >&5
echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9750,7 +9253,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldnet_stub $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9753 "configure"
+#line 9256 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -9769,16 +9272,16 @@ dnet_ntoa ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9772: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9275: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9775: \$? = $ac_status" >&5
+ echo "$as_me:9278: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9778: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9281: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9781: \$? = $ac_status" >&5
+ echo "$as_me:9284: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
@@ -9789,7 +9292,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:9792: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+echo "$as_me:9295: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
@@ -9808,13 +9311,13 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
# on Irix 5.2, according to T.E. Dickey.
# The functions gethostbyname, getservbyname, and inet_addr are
# in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
- echo "$as_me:9811: checking for gethostbyname" >&5
+ echo "$as_me:9314: checking for gethostbyname" >&5
echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
if test "${ac_cv_func_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9817 "configure"
+#line 9320 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char gethostbyname (); below. */
@@ -9837,7 +9340,7 @@ main ()
#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
choke me
#else
-f = gethostbyname;
+f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -9845,16 +9348,16 @@ f = gethostbyname;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9848: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9351: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9851: \$? = $ac_status" >&5
+ echo "$as_me:9354: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9854: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9357: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9857: \$? = $ac_status" >&5
+ echo "$as_me:9360: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_gethostbyname=yes
else
@@ -9864,11 +9367,11 @@ ac_cv_func_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:9867: result: $ac_cv_func_gethostbyname" >&5
+echo "$as_me:9370: result: $ac_cv_func_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
if test $ac_cv_func_gethostbyname = no; then
- echo "$as_me:9871: checking for gethostbyname in -lnsl" >&5
+ echo "$as_me:9374: checking for gethostbyname in -lnsl" >&5
echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9876,7 +9379,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9879 "configure"
+#line 9382 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -9895,16 +9398,16 @@ gethostbyname ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9898: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9401: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9901: \$? = $ac_status" >&5
+ echo "$as_me:9404: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9904: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9407: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9907: \$? = $ac_status" >&5
+ echo "$as_me:9410: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_nsl_gethostbyname=yes
else
@@ -9915,14 +9418,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:9918: result: $ac_cv_lib_nsl_gethostbyname" >&5
+echo "$as_me:9421: result: $ac_cv_lib_nsl_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
if test $ac_cv_lib_nsl_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
fi
if test $ac_cv_lib_nsl_gethostbyname = no; then
- echo "$as_me:9925: checking for gethostbyname in -lbsd" >&5
+ echo "$as_me:9428: checking for gethostbyname in -lbsd" >&5
echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9930,7 +9433,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lbsd $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9933 "configure"
+#line 9436 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -9949,16 +9452,16 @@ gethostbyname ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9952: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9455: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9955: \$? = $ac_status" >&5
+ echo "$as_me:9458: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9958: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9461: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9961: \$? = $ac_status" >&5
+ echo "$as_me:9464: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_bsd_gethostbyname=yes
else
@@ -9969,7 +9472,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:9972: result: $ac_cv_lib_bsd_gethostbyname" >&5
+echo "$as_me:9475: result: $ac_cv_lib_bsd_gethostbyname" >&5
echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
if test $ac_cv_lib_bsd_gethostbyname = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
@@ -9985,13 +9488,13 @@ fi
# variants that don't use the nameserver (or something). -lsocket
# must be given before -lnsl if both are needed. We assume that
# if connect needs -lnsl, so does gethostbyname.
- echo "$as_me:9988: checking for connect" >&5
+ echo "$as_me:9491: checking for connect" >&5
echo $ECHO_N "checking for connect... $ECHO_C" >&6
if test "${ac_cv_func_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 9994 "configure"
+#line 9497 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char connect (); below. */
@@ -10014,7 +9517,7 @@ main ()
#if defined (__stub_connect) || defined (__stub___connect)
choke me
#else
-f = connect;
+f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -10022,16 +9525,16 @@ f = connect;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10025: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9528: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10028: \$? = $ac_status" >&5
+ echo "$as_me:9531: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10031: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9534: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10034: \$? = $ac_status" >&5
+ echo "$as_me:9537: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_connect=yes
else
@@ -10041,11 +9544,11 @@ ac_cv_func_connect=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10044: result: $ac_cv_func_connect" >&5
+echo "$as_me:9547: result: $ac_cv_func_connect" >&5
echo "${ECHO_T}$ac_cv_func_connect" >&6
if test $ac_cv_func_connect = no; then
- echo "$as_me:10048: checking for connect in -lsocket" >&5
+ echo "$as_me:9551: checking for connect in -lsocket" >&5
echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
if test "${ac_cv_lib_socket_connect+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10053,7 +9556,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10056 "configure"
+#line 9559 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10072,16 +9575,16 @@ connect ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10075: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9578: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10078: \$? = $ac_status" >&5
+ echo "$as_me:9581: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10081: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9584: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10084: \$? = $ac_status" >&5
+ echo "$as_me:9587: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_socket_connect=yes
else
@@ -10092,7 +9595,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10095: result: $ac_cv_lib_socket_connect" >&5
+echo "$as_me:9598: result: $ac_cv_lib_socket_connect" >&5
echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
if test $ac_cv_lib_socket_connect = yes; then
X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
@@ -10101,13 +9604,13 @@ fi
fi
# Guillermo Gomez says -lposix is necessary on A/UX.
- echo "$as_me:10104: checking for remove" >&5
+ echo "$as_me:9607: checking for remove" >&5
echo $ECHO_N "checking for remove... $ECHO_C" >&6
if test "${ac_cv_func_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10110 "configure"
+#line 9613 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char remove (); below. */
@@ -10130,7 +9633,7 @@ main ()
#if defined (__stub_remove) || defined (__stub___remove)
choke me
#else
-f = remove;
+f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -10138,16 +9641,16 @@ f = remove;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10141: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9644: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10144: \$? = $ac_status" >&5
+ echo "$as_me:9647: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10147: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9650: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10150: \$? = $ac_status" >&5
+ echo "$as_me:9653: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_remove=yes
else
@@ -10157,11 +9660,11 @@ ac_cv_func_remove=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10160: result: $ac_cv_func_remove" >&5
+echo "$as_me:9663: result: $ac_cv_func_remove" >&5
echo "${ECHO_T}$ac_cv_func_remove" >&6
if test $ac_cv_func_remove = no; then
- echo "$as_me:10164: checking for remove in -lposix" >&5
+ echo "$as_me:9667: checking for remove in -lposix" >&5
echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
if test "${ac_cv_lib_posix_remove+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10169,7 +9672,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lposix $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10172 "configure"
+#line 9675 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10188,16 +9691,16 @@ remove ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10191: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9694: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10194: \$? = $ac_status" >&5
+ echo "$as_me:9697: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10197: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9700: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10200: \$? = $ac_status" >&5
+ echo "$as_me:9703: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_posix_remove=yes
else
@@ -10208,7 +9711,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10211: result: $ac_cv_lib_posix_remove" >&5
+echo "$as_me:9714: result: $ac_cv_lib_posix_remove" >&5
echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
if test $ac_cv_lib_posix_remove = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
@@ -10217,13 +9720,13 @@ fi
fi
# BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
- echo "$as_me:10220: checking for shmat" >&5
+ echo "$as_me:9723: checking for shmat" >&5
echo $ECHO_N "checking for shmat... $ECHO_C" >&6
if test "${ac_cv_func_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10226 "configure"
+#line 9729 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shmat (); below. */
@@ -10246,7 +9749,7 @@ main ()
#if defined (__stub_shmat) || defined (__stub___shmat)
choke me
#else
-f = shmat;
+f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -10254,16 +9757,16 @@ f = shmat;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10257: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9760: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10260: \$? = $ac_status" >&5
+ echo "$as_me:9763: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10263: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9766: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10266: \$? = $ac_status" >&5
+ echo "$as_me:9769: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_shmat=yes
else
@@ -10273,11 +9776,11 @@ ac_cv_func_shmat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10276: result: $ac_cv_func_shmat" >&5
+echo "$as_me:9779: result: $ac_cv_func_shmat" >&5
echo "${ECHO_T}$ac_cv_func_shmat" >&6
if test $ac_cv_func_shmat = no; then
- echo "$as_me:10280: checking for shmat in -lipc" >&5
+ echo "$as_me:9783: checking for shmat in -lipc" >&5
echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
if test "${ac_cv_lib_ipc_shmat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10285,7 +9788,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lipc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10288 "configure"
+#line 9791 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10304,16 +9807,16 @@ shmat ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10307: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9810: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10310: \$? = $ac_status" >&5
+ echo "$as_me:9813: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10313: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9816: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10316: \$? = $ac_status" >&5
+ echo "$as_me:9819: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ipc_shmat=yes
else
@@ -10324,7 +9827,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10327: result: $ac_cv_lib_ipc_shmat" >&5
+echo "$as_me:9830: result: $ac_cv_lib_ipc_shmat" >&5
echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
if test $ac_cv_lib_ipc_shmat = yes; then
X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
@@ -10342,7 +9845,7 @@ fi
# These have to be linked with before -lX11, unlike the other
# libraries we check for below, so use a different variable.
# John Interrante, Karl Berry
- echo "$as_me:10345: checking for IceConnectionNumber in -lICE" >&5
+ echo "$as_me:9848: checking for IceConnectionNumber in -lICE" >&5
echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10350,7 +9853,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lICE $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10353 "configure"
+#line 9856 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10369,16 +9872,16 @@ IceConnectionNumber ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10372: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9875: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10375: \$? = $ac_status" >&5
+ echo "$as_me:9878: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10378: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9881: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10381: \$? = $ac_status" >&5
+ echo "$as_me:9884: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ICE_IceConnectionNumber=yes
else
@@ -10389,7 +9892,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10392: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+echo "$as_me:9895: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
@@ -10401,7 +9904,7 @@ fi
cf_x_athena=${cf_x_athena:-Xaw}
-echo "$as_me:10404: checking if you want to link with Xaw 3d library" >&5
+echo "$as_me:9907: checking if you want to link with Xaw 3d library" >&5
echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
withval=
@@ -10412,14 +9915,14 @@ if test "${with_Xaw3d+set}" = set; then
fi;
if test "$withval" = yes ; then
cf_x_athena=Xaw3d
- echo "$as_me:10415: result: yes" >&5
+ echo "$as_me:9918: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:10418: result: no" >&5
+ echo "$as_me:9921: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:10422: checking if you want to link with neXT Athena library" >&5
+echo "$as_me:9925: checking if you want to link with neXT Athena library" >&5
echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
withval=
@@ -10430,14 +9933,14 @@ if test "${with_neXtaw+set}" = set; then
fi;
if test "$withval" = yes ; then
cf_x_athena=neXtaw
- echo "$as_me:10433: result: yes" >&5
+ echo "$as_me:9936: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:10436: result: no" >&5
+ echo "$as_me:9939: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-echo "$as_me:10440: checking if you want to link with Athena-Plus library" >&5
+echo "$as_me:9943: checking if you want to link with Athena-Plus library" >&5
echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
withval=
@@ -10448,10 +9951,10 @@ if test "${with_XawPlus+set}" = set; then
fi;
if test "$withval" = yes ; then
cf_x_athena=XawPlus
- echo "$as_me:10451: result: yes" >&5
+ echo "$as_me:9954: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:10454: result: no" >&5
+ echo "$as_me:9957: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -10471,17 +9974,17 @@ if test "$PKG_CONFIG" != none ; then
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
-echo "${as_me:-configure}:10474: testing found package $cf_athena_pkg ..." 1>&5
+echo "${as_me:-configure}:9977: testing found package $cf_athena_pkg ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:10480: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:9983: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:10484: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:9987: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -10571,14 +10074,27 @@ cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxy
#define $cf_x_athena_LIBS 1
EOF
-echo "$as_me:10574: checking for usable $cf_x_athena/Xmu package" >&5
+ for cf_trim_lib in Xmu Xt X11
+ do
+ case "$LIBS" in
+ *-l$cf_trim_lib\ *-l$cf_trim_lib*)
+ LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
+ test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
+
+echo "${as_me:-configure}:10084: testing ..trimmed $LIBS ..." 1>&5
+
+ ;;
+ esac
+ done
+
+echo "$as_me:10090: checking for usable $cf_x_athena/Xmu package" >&5
echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
if test "${cf_cv_xaw_compat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 10581 "configure"
+#line 10097 "configure"
#include "confdefs.h"
#include <X11/Xmu/CharSet.h>
@@ -10594,16 +10110,16 @@ int check = XmuCompareISOLatin1("big", "small")
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10597: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10113: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10600: \$? = $ac_status" >&5
+ echo "$as_me:10116: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10603: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10119: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10606: \$? = $ac_status" >&5
+ echo "$as_me:10122: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xaw_compat=yes
else
@@ -10613,7 +10129,7 @@ cf_cv_xaw_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10616: result: $cf_cv_xaw_compat" >&5
+echo "$as_me:10132: result: $cf_cv_xaw_compat" >&5
echo "${ECHO_T}$cf_cv_xaw_compat" >&6
if test "$cf_cv_xaw_compat" = no
@@ -10625,22 +10141,25 @@ echo "${ECHO_T}$cf_cv_xaw_compat" >&6
*)
test -n "$verbose" && echo " work around broken package" 1>&6
-echo "${as_me:-configure}:10628: testing work around broken package ..." 1>&5
+echo "${as_me:-configure}:10144: testing work around broken package ..." 1>&5
+
+ cf_save_xmu="$LIBS"
+ cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
test -n "$verbose" && echo " found package xmu" 1>&6
-echo "${as_me:-configure}:10633: testing found package xmu ..." 1>&5
+echo "${as_me:-configure}:10152: testing found package xmu ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:10639: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10158: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:10643: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10162: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -10721,26 +10240,54 @@ if test -n "$cf_new_extra_cppflags" ; then
fi
LIBS="$cf_pkgconfig_libs $LIBS"
- :
+
+ LIBS="$cf_save_xmu"
+
+test -n "$verbose" && echo " ...before $LIBS" 1>&6
+
+echo "${as_me:-configure}:10248: testing ...before $LIBS ..." 1>&5
+
+LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
+test -n "$verbose" && echo " ...after $LIBS" 1>&6
+
+echo "${as_me:-configure}:10253: testing ...after $LIBS ..." 1>&5
+
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
test -n "$verbose" && echo " ...before $LIBS" 1>&6
-echo "${as_me:-configure}:10729: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:10261: testing ...before $LIBS ..." 1>&5
-LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/ / /g'`
+LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
test -n "$verbose" && echo " ...after $LIBS" 1>&6
-echo "${as_me:-configure}:10734: testing ...after $LIBS ..." 1>&5
+echo "${as_me:-configure}:10266: testing ...after $LIBS ..." 1>&5
fi
+ for cf_trim_lib in Xmu Xt X11
+ do
+ case "$LIBS" in
+ *-l$cf_trim_lib\ *-l$cf_trim_lib*)
+ LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
+ test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
+
+echo "${as_me:-configure}:10277: testing ..trimmed $LIBS ..." 1>&5
+
+ ;;
+ esac
+ done
+
;;
esac
fi
break
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
:
fi
@@ -10752,17 +10299,17 @@ if test -z "$cf_x_athena_lib" ; then
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
test -n "$verbose" && echo " found package Xext" 1>&6
-echo "${as_me:-configure}:10755: testing found package Xext ..." 1>&5
+echo "${as_me:-configure}:10302: testing found package Xext ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:10761: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10308: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:10765: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10312: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -10845,8 +10392,10 @@ fi
LIBS="$cf_pkgconfig_libs $LIBS"
:
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
- echo "$as_me:10849: checking for XextCreateExtension in -lXext" >&5
+ echo "$as_me:10398: checking for XextCreateExtension in -lXext" >&5
echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -10854,7 +10403,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXext $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10857 "configure"
+#line 10406 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -10873,16 +10422,16 @@ XextCreateExtension ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10876: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10425: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10879: \$? = $ac_status" >&5
+ echo "$as_me:10428: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10882: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10431: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10885: \$? = $ac_status" >&5
+ echo "$as_me:10434: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xext_XextCreateExtension=yes
else
@@ -10893,7 +10442,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:10896: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
+echo "$as_me:10445: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
LIBS="-lXext $LIBS"
@@ -10906,17 +10455,17 @@ cf_have_X_LIBS=no
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
test -n "$verbose" && echo " found package xt" 1>&6
-echo "${as_me:-configure}:10909: testing found package xt ..." 1>&5
+echo "${as_me:-configure}:10458: testing found package xt ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:10915: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10464: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:10919: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10468: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -11003,14 +10552,14 @@ fi
;;
*)
# we have an "xt" package, but it may omit Xt's dependency on X11
-echo "$as_me:11006: checking for usable X dependency" >&5
+echo "$as_me:10555: checking for usable X dependency" >&5
echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
if test "${cf_cv_xt_x11_compat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11013 "configure"
+#line 10562 "configure"
#include "confdefs.h"
#include <X11/Xlib.h>
@@ -11029,16 +10578,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11032: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10581: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11035: \$? = $ac_status" >&5
+ echo "$as_me:10584: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11038: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10587: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11041: \$? = $ac_status" >&5
+ echo "$as_me:10590: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xt_x11_compat=yes
else
@@ -11048,30 +10597,30 @@ cf_cv_xt_x11_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11051: result: $cf_cv_xt_x11_compat" >&5
+echo "$as_me:10600: result: $cf_cv_xt_x11_compat" >&5
echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
if test "$cf_cv_xt_x11_compat" = no
then
test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
-echo "${as_me:-configure}:11057: testing work around broken X11 dependency ..." 1>&5
+echo "${as_me:-configure}:10606: testing work around broken X11 dependency ..." 1>&5
# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
test -n "$verbose" && echo " found package x11" 1>&6
-echo "${as_me:-configure}:11064: testing found package x11 ..." 1>&5
+echo "${as_me:-configure}:10613: testing found package x11 ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:11070: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10619: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:11074: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10623: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -11154,15 +10703,17 @@ fi
LIBS="$cf_pkgconfig_libs $LIBS"
:
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
test -n "$verbose" && echo " ...before $LIBS" 1>&6
-echo "${as_me:-configure}:11160: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:10711: testing ...before $LIBS ..." 1>&5
-LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/ / /g'`
+LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
test -n "$verbose" && echo " ...after $LIBS" 1>&6
-echo "${as_me:-configure}:11165: testing ...after $LIBS ..." 1>&5
+echo "${as_me:-configure}:10716: testing ...after $LIBS ..." 1>&5
fi
@@ -11170,14 +10721,14 @@ fi
;;
esac
-echo "$as_me:11173: checking for usable X Toolkit package" >&5
+echo "$as_me:10724: checking for usable X Toolkit package" >&5
echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
if test "${cf_cv_xt_ice_compat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11180 "configure"
+#line 10731 "configure"
#include "confdefs.h"
#include <X11/Shell.h>
@@ -11192,16 +10743,16 @@ int num = IceConnectionNumber(0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11195: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10746: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11198: \$? = $ac_status" >&5
+ echo "$as_me:10749: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11201: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10752: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11204: \$? = $ac_status" >&5
+ echo "$as_me:10755: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xt_ice_compat=yes
else
@@ -11211,7 +10762,7 @@ cf_cv_xt_ice_compat=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11214: result: $cf_cv_xt_ice_compat" >&5
+echo "$as_me:10765: result: $cf_cv_xt_ice_compat" >&5
echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
if test "$cf_cv_xt_ice_compat" = no
@@ -11225,22 +10776,22 @@ echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
*)
test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
-echo "${as_me:-configure}:11228: testing work around broken ICE dependency ..." 1>&5
+echo "${as_me:-configure}:10779: testing work around broken ICE dependency ..." 1>&5
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
test -n "$verbose" && echo " found package ice" 1>&6
-echo "${as_me:-configure}:11233: testing found package ice ..." 1>&5
+echo "${as_me:-configure}:10784: testing found package ice ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:11239: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10790: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:11243: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10794: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -11325,17 +10876,17 @@ fi
if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
test -n "$verbose" && echo " found package sm" 1>&6
-echo "${as_me:-configure}:11328: testing found package sm ..." 1>&5
+echo "${as_me:-configure}:10879: testing found package sm ..." 1>&5
cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
-echo "${as_me:-configure}:11334: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
+echo "${as_me:-configure}:10885: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
-echo "${as_me:-configure}:11338: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
+echo "${as_me:-configure}:10889: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
cf_fix_cppflags=no
cf_new_cflags=
@@ -11418,19 +10969,23 @@ fi
LIBS="$cf_pkgconfig_libs $LIBS"
:
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
:
fi
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
test -n "$verbose" && echo " ...before $LIBS" 1>&6
-echo "${as_me:-configure}:11428: testing ...before $LIBS ..." 1>&5
+echo "${as_me:-configure}:10983: testing ...before $LIBS ..." 1>&5
-LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'`
+LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
test -n "$verbose" && echo " ...after $LIBS" 1>&6
-echo "${as_me:-configure}:11433: testing ...after $LIBS ..." 1>&5
+echo "${as_me:-configure}:10988: testing ...after $LIBS ..." 1>&5
fi
@@ -11443,12 +10998,14 @@ fi
cf_have_X_LIBS=yes
else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
LDFLAGS="$X_LIBS $LDFLAGS"
test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
-echo "${as_me:-configure}:11451: testing checking additions to CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11008: testing checking additions to CFLAGS ..." 1>&5
cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"
@@ -11519,7 +11076,7 @@ done
if test -n "$cf_new_cflags" ; then
test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
-echo "${as_me:-configure}:11522: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+echo "${as_me:-configure}:11079: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
CFLAGS="$CFLAGS $cf_new_cflags"
fi
@@ -11527,7 +11084,7 @@ fi
if test -n "$cf_new_cppflags" ; then
test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
-echo "${as_me:-configure}:11530: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+echo "${as_me:-configure}:11087: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
@@ -11535,14 +11092,14 @@ fi
if test -n "$cf_new_extra_cppflags" ; then
test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
-echo "${as_me:-configure}:11538: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+echo "${as_me:-configure}:11095: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
if test "$cf_check_cflags" != "$CFLAGS" ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 11545 "configure"
+#line 11102 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -11554,16 +11111,16 @@ printf("Hello world");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11557: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11114: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11560: \$? = $ac_status" >&5
+ echo "$as_me:11117: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11563: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11120: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11566: \$? = $ac_status" >&5
+ echo "$as_me:11123: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11571,12 +11128,12 @@ else
cat conftest.$ac_ext >&5
test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
-echo "${as_me:-configure}:11574: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11131: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
-echo "${as_me:-configure}:11579: testing but keeping change to \$CPPFLAGS ..." 1>&5
+echo "${as_me:-configure}:11136: testing but keeping change to \$CPPFLAGS ..." 1>&5
fi
CFLAGS="$cf_check_flags"
@@ -11584,13 +11141,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
- echo "$as_me:11587: checking for XOpenDisplay" >&5
+ echo "$as_me:11144: checking for XOpenDisplay" >&5
echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
if test "${ac_cv_func_XOpenDisplay+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11593 "configure"
+#line 11150 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char XOpenDisplay (); below. */
@@ -11613,7 +11170,7 @@ main ()
#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
choke me
#else
-f = XOpenDisplay;
+f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -11621,16 +11178,16 @@ f = XOpenDisplay;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11624: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11181: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11627: \$? = $ac_status" >&5
+ echo "$as_me:11184: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11630: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11187: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11633: \$? = $ac_status" >&5
+ echo "$as_me:11190: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_XOpenDisplay=yes
else
@@ -11640,13 +11197,13 @@ ac_cv_func_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11643: result: $ac_cv_func_XOpenDisplay" >&5
+echo "$as_me:11200: result: $ac_cv_func_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
if test $ac_cv_func_XOpenDisplay = yes; then
:
else
- echo "$as_me:11649: checking for XOpenDisplay in -lX11" >&5
+ echo "$as_me:11206: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11654,7 +11211,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11657 "configure"
+#line 11214 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11673,16 +11230,16 @@ XOpenDisplay ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11676: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11233: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11679: \$? = $ac_status" >&5
+ echo "$as_me:11236: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11682: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11239: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11685: \$? = $ac_status" >&5
+ echo "$as_me:11242: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_X11_XOpenDisplay=yes
else
@@ -11693,7 +11250,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11696: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "$as_me:11253: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
if test $ac_cv_lib_X11_XOpenDisplay = yes; then
LIBS="-lX11 $LIBS"
@@ -11701,13 +11258,13 @@ fi
fi
- echo "$as_me:11704: checking for XtAppInitialize" >&5
+ echo "$as_me:11261: checking for XtAppInitialize" >&5
echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
if test "${ac_cv_func_XtAppInitialize+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11710 "configure"
+#line 11267 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char XtAppInitialize (); below. */
@@ -11730,7 +11287,7 @@ main ()
#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
choke me
#else
-f = XtAppInitialize;
+f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -11738,16 +11295,16 @@ f = XtAppInitialize;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11741: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11298: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11744: \$? = $ac_status" >&5
+ echo "$as_me:11301: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11747: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11304: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11750: \$? = $ac_status" >&5
+ echo "$as_me:11307: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_XtAppInitialize=yes
else
@@ -11757,13 +11314,13 @@ ac_cv_func_XtAppInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:11760: result: $ac_cv_func_XtAppInitialize" >&5
+echo "$as_me:11317: result: $ac_cv_func_XtAppInitialize" >&5
echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
if test $ac_cv_func_XtAppInitialize = yes; then
:
else
- echo "$as_me:11766: checking for XtAppInitialize in -lXt" >&5
+ echo "$as_me:11323: checking for XtAppInitialize in -lXt" >&5
echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11771,7 +11328,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 11774 "configure"
+#line 11331 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -11790,16 +11347,16 @@ XtAppInitialize ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11793: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11350: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11796: \$? = $ac_status" >&5
+ echo "$as_me:11353: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11799: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11356: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11802: \$? = $ac_status" >&5
+ echo "$as_me:11359: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_Xt_XtAppInitialize=yes
else
@@ -11810,10 +11367,11 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:11813: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
+echo "$as_me:11370: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_LIBXT 1
EOF
@@ -11826,7 +11384,7 @@ fi
fi
if test $cf_have_X_LIBS = no ; then
- { echo "$as_me:11829: WARNING: Unable to successfully link X Toolkit library (-lXt) with
+ { echo "$as_me:11387: WARNING: Unable to successfully link X Toolkit library (-lXt) with
test program. You will have to check and add the proper libraries by hand
to makefile." >&5
echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
@@ -11848,14 +11406,14 @@ do
cf_test=X11/$cf_x_athena_root/SimpleMenu.h
if test $cf_path != default ; then
CPPFLAGS="$cf_save -I$cf_path/include"
- echo "$as_me:11851: checking for $cf_test in $cf_path" >&5
+ echo "$as_me:11409: checking for $cf_test in $cf_path" >&5
echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
else
- echo "$as_me:11854: checking for $cf_test" >&5
+ echo "$as_me:11412: checking for $cf_test" >&5
echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
fi
cat >conftest.$ac_ext <<_ACEOF
-#line 11858 "configure"
+#line 11416 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
@@ -11869,16 +11427,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11872: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11430: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11875: \$? = $ac_status" >&5
+ echo "$as_me:11433: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11878: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11436: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11881: \$? = $ac_status" >&5
+ echo "$as_me:11439: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11887,7 +11445,7 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:11890: result: $cf_result" >&5
+ echo "$as_me:11448: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = yes ; then
cf_x_athena_inc=$cf_path
@@ -11899,7 +11457,7 @@ echo "${ECHO_T}$cf_result" >&6
done
if test -z "$cf_x_athena_inc" ; then
- { echo "$as_me:11902: WARNING: Unable to successfully find Athena header files with test program" >&5
+ { echo "$as_me:11460: WARNING: Unable to successfully find Athena header files with test program" >&5
echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
elif test "$cf_x_athena_inc" != default ; then
CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
@@ -11915,24 +11473,29 @@ for cf_path in default \
/usr/local
do
for cf_lib in \
- "-l$cf_x_athena_root -lXmu" \
- "-l$cf_x_athena_root -lXpm -lXmu" \
- "-l${cf_x_athena_root}_s -lXmu_s"
+ ${cf_x_athena_root} \
+ ${cf_x_athena_root}7 \
+ ${cf_x_athena_root}6
+ do
+ for cf_libs in \
+ "-l$cf_lib -lXmu" \
+ "-l$cf_lib -lXpm -lXmu" \
+ "-l${cf_lib}_s -lXmu_s"
do
if test -z "$cf_x_athena_lib" ; then
cf_save="$LIBS"
cf_test=XawSimpleMenuAddGlobalActions
if test $cf_path != default ; then
- LIBS="-L$cf_path/lib $cf_lib $LIBS"
- echo "$as_me:11927: checking for $cf_lib in $cf_path" >&5
-echo $ECHO_N "checking for $cf_lib in $cf_path... $ECHO_C" >&6
+ LIBS="-L$cf_path/lib $cf_libs $LIBS"
+ echo "$as_me:11490: checking for $cf_libs in $cf_path" >&5
+echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
else
- LIBS="$cf_lib $LIBS"
- echo "$as_me:11931: checking for $cf_test in $cf_lib" >&5
-echo $ECHO_N "checking for $cf_test in $cf_lib... $ECHO_C" >&6
+ LIBS="$cf_libs $LIBS"
+ echo "$as_me:11494: checking for $cf_test in $cf_libs" >&5
+echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
fi
cat >conftest.$ac_ext <<_ACEOF
-#line 11935 "configure"
+#line 11498 "configure"
#include "confdefs.h"
#include <X11/Intrinsic.h>
@@ -11948,16 +11511,16 @@ $cf_test((XtAppContext) 0)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:11951: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11514: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11954: \$? = $ac_status" >&5
+ echo "$as_me:11517: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:11957: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11520: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11960: \$? = $ac_status" >&5
+ echo "$as_me:11523: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -11966,19 +11529,21 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:11969: result: $cf_result" >&5
+ echo "$as_me:11532: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test "$cf_result" = yes ; then
- cf_x_athena_lib="$cf_lib"
+ cf_x_athena_lib="$cf_libs"
break
fi
LIBS="$cf_save"
fi
- done
+ done # cf_libs
+ test -n "$cf_x_athena_lib" && break
+ done # cf_lib
done
if test -z "$cf_x_athena_lib" ; then
- { { echo "$as_me:11981: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
+ { { echo "$as_me:11546: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -11991,48 +11556,86 @@ EOF
fi
-for ac_prog in xcurses-config
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in xcurses-config
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:11564: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$XCURSES_CONFIG"; then
+ ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
+echo "$as_me:11579: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
+if test -n "$XCURSES_CONFIG"; then
+ echo "$as_me:11587: result: $XCURSES_CONFIG" >&5
+echo "${ECHO_T}$XCURSES_CONFIG" >&6
+else
+ echo "$as_me:11590: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$XCURSES_CONFIG" && break
+ done
+fi
+if test -z "$XCURSES_CONFIG"; then
+ ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
+ for ac_prog in xcurses-config
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
-echo "$as_me:11998: checking for $ac_word" >&5
+echo "$as_me:11603: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
+if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $XCURSES_CONFIG in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
- ;;
- *)
+ if test -n "$ac_ct_XCURSES_CONFIG"; then
+ ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
+else
ac_save_IFS=$IFS; IFS=$ac_path_separator
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
IFS=$ac_save_IFS
test -z "$ac_dir" && ac_dir=.
- if $as_executable_p "$ac_dir/$ac_word"; then
- ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
- echo "$as_me:12015: found $ac_dir/$ac_word" >&5
- break
-fi
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
+echo "$as_me:11618: found $ac_dir/$ac_word" >&5
+break
done
- ;;
-esac
fi
-XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
-
-if test -n "$XCURSES_CONFIG"; then
- echo "$as_me:12026: result: $XCURSES_CONFIG" >&5
-echo "${ECHO_T}$XCURSES_CONFIG" >&6
+fi
+ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
+if test -n "$ac_ct_XCURSES_CONFIG"; then
+ echo "$as_me:11626: result: $ac_ct_XCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
else
- echo "$as_me:12029: result: no" >&5
+ echo "$as_me:11629: result: no" >&5
echo "${ECHO_T}no" >&6
fi
- test -n "$XCURSES_CONFIG" && break
+ test -n "$ac_ct_XCURSES_CONFIG" && break
done
-test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
+test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
+
+ XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
+fi
if test "$XCURSES_CONFIG" != none ; then
@@ -12047,7 +11650,7 @@ LDFLAGS="$LDFLAGS $X_LIBS"
test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
-echo "${as_me:-configure}:12050: testing checking additions to CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11653: testing checking additions to CFLAGS ..." 1>&5
cf_check_cflags="$CFLAGS"
cf_check_cppflags="$CPPFLAGS"
@@ -12118,7 +11721,7 @@ done
if test -n "$cf_new_cflags" ; then
test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
-echo "${as_me:-configure}:12121: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+echo "${as_me:-configure}:11724: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
CFLAGS="$CFLAGS $cf_new_cflags"
fi
@@ -12126,7 +11729,7 @@ fi
if test -n "$cf_new_cppflags" ; then
test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
-echo "${as_me:-configure}:12129: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+echo "${as_me:-configure}:11732: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
fi
@@ -12134,14 +11737,14 @@ fi
if test -n "$cf_new_extra_cppflags" ; then
test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
-echo "${as_me:-configure}:12137: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+echo "${as_me:-configure}:11740: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
if test "$cf_check_cflags" != "$CFLAGS" ; then
cat >conftest.$ac_ext <<_ACEOF
-#line 12144 "configure"
+#line 11747 "configure"
#include "confdefs.h"
#include <stdio.h>
int
@@ -12153,16 +11756,16 @@ printf("Hello world");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12156: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11759: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12159: \$? = $ac_status" >&5
+ echo "$as_me:11762: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12162: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11765: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12165: \$? = $ac_status" >&5
+ echo "$as_me:11768: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -12170,12 +11773,12 @@ else
cat conftest.$ac_ext >&5
test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
-echo "${as_me:-configure}:12173: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
+echo "${as_me:-configure}:11776: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
-echo "${as_me:-configure}:12178: testing but keeping change to \$CPPFLAGS ..." 1>&5
+echo "${as_me:-configure}:11781: testing but keeping change to \$CPPFLAGS ..." 1>&5
fi
CFLAGS="$cf_check_flags"
@@ -12183,7 +11786,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12186: checking for XOpenDisplay in -lX11" >&5
+echo "$as_me:11789: checking for XOpenDisplay in -lX11" >&5
echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12191,7 +11794,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12194 "configure"
+#line 11797 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12210,16 +11813,16 @@ XOpenDisplay ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12213: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11816: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12216: \$? = $ac_status" >&5
+ echo "$as_me:11819: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12219: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11822: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12222: \$? = $ac_status" >&5
+ echo "$as_me:11825: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_X11_XOpenDisplay=yes
else
@@ -12230,13 +11833,13 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12233: result: $ac_cv_lib_X11_XOpenDisplay" >&5
+echo "$as_me:11836: result: $ac_cv_lib_X11_XOpenDisplay" >&5
echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
if test $ac_cv_lib_X11_XOpenDisplay = yes; then
LIBS="-lX11 $LIBS"
fi
-echo "$as_me:12239: checking for XCurses library" >&5
+echo "$as_me:11842: checking for XCurses library" >&5
echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
if test "${cf_cv_lib_XCurses+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -12244,7 +11847,7 @@ else
LIBS="-lXCurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12247 "configure"
+#line 11850 "configure"
#include "confdefs.h"
#include <xcurses.h>
@@ -12259,16 +11862,16 @@ XCursesExit();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12262: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11865: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12265: \$? = $ac_status" >&5
+ echo "$as_me:11868: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12268: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11871: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12271: \$? = $ac_status" >&5
+ echo "$as_me:11874: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_lib_XCurses=yes
else
@@ -12279,37 +11882,38 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12282: result: $cf_cv_lib_XCurses" >&5
+echo "$as_me:11885: result: $cf_cv_lib_XCurses" >&5
echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
fi
if test $cf_cv_lib_XCurses = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define UNIX 1
EOF
- cat >>confdefs.h <<\EOF
+cat >>confdefs.h <<\EOF
#define XCURSES 1
EOF
- echo "$as_me:12296: checking for xcurses.h" >&5
+ echo "$as_me:11900: checking for xcurses.h" >&5
echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
if test "${ac_cv_header_xcurses_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12302 "configure"
+#line 11906 "configure"
#include "confdefs.h"
#include <xcurses.h>
_ACEOF
-if { (eval echo "$as_me:12306: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:11910: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12312: \$? = $ac_status" >&5
+ echo "$as_me:11916: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12328,17 +11932,18 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12331: result: $ac_cv_header_xcurses_h" >&5
+echo "$as_me:11935: result: $ac_cv_header_xcurses_h" >&5
echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
if test $ac_cv_header_xcurses_h = yes; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_XCURSES 1
EOF
fi
else
- { { echo "$as_me:12341: error: Cannot link with XCurses" >&5
+ { { echo "$as_me:11946: error: Cannot link with XCurses" >&5
echo "$as_me: error: Cannot link with XCurses" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -12346,22 +11951,143 @@ fi
;;
esac
+case $cf_cv_screen in
+curses|curses_*)
+
+echo "$as_me:11957: checking for NetBSD form.h" >&5
+echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
+if test "${cf_cv_netbsd_form_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 11964 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <form.h>
+
+int
+main ()
+{
+
+ FORM *form;
+ int y = current_field(form)->cursor_ypos;
+ int x = current_field(form)->cursor_xpos;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:11983: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:11986: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:11989: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:11992: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_netbsd_form_h=yes
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_netbsd_form_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:12004: result: $cf_cv_netbsd_form_h" >&5
+echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
+
+test "$cf_cv_netbsd_form_h" = yes &&
+cat >>confdefs.h <<\EOF
+#define HAVE_NETBSD_FORM_H 1
+EOF
+
+echo "$as_me:12012: checking for NetBSD menu.h" >&5
+echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
+if test "${cf_cv_netbsd_menu_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 12019 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <menu.h>
+
+int
+main ()
+{
+
+ MENU *menu;
+ int y = menu->max_item_width;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12037: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12040: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12043: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12046: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_netbsd_menu_h=yes
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_netbsd_menu_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:12058: result: $cf_cv_netbsd_menu_h" >&5
+echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
+
+test "$cf_cv_netbsd_menu_h" = yes &&
+cat >>confdefs.h <<\EOF
+#define HAVE_NETBSD_MENU_H 1
+EOF
+
+ ;;
+ncursesw)
+ cf_cv_libtype=w
+ ;;
+esac
+
case $cf_cv_screen in #(vi
pdcurses) #(vi
;;
*)
# look for curses-related libraries
+ : ${cf_panel_lib:=panel}
+ : ${cf_menu_lib:=menu}
+ : ${cf_form_lib:=form}
-as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
-echo "$as_me:12356: checking for new_panel in -lpanel$cf_cv_libtype" >&5
-echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
+as_ac_Lib=`echo "ac_cv_lib_$cf_panel_lib$cf_cv_libtype''_new_panel" | $as_tr_sh`
+echo "$as_me:12082: checking for new_panel in -l$cf_panel_lib$cf_cv_libtype" >&5
+echo $ECHO_N "checking for new_panel in -l$cf_panel_lib$cf_cv_libtype... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpanel$cf_cv_libtype $LIBS"
+LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12364 "configure"
+#line 12090 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12380,16 +12106,16 @@ new_panel ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12383: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12109: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12386: \$? = $ac_status" >&5
+ echo "$as_me:12112: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12389: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12115: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12392: \$? = $ac_status" >&5
+ echo "$as_me:12118: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -12400,27 +12126,27 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12403: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:12129: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
cat >>confdefs.h <<EOF
-#define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
+#define `echo "HAVE_LIB$cf_panel_lib$cf_cv_libtype" | $as_tr_cpp` 1
EOF
- LIBS="-lpanel$cf_cv_libtype $LIBS"
+ LIBS="-l$cf_panel_lib$cf_cv_libtype $LIBS"
fi
-as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
-echo "$as_me:12415: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
-echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
+as_ac_Lib=`echo "ac_cv_lib_$cf_menu_lib$cf_cv_libtype''_menu_driver" | $as_tr_sh`
+echo "$as_me:12141: checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype" >&5
+echo $ECHO_N "checking for menu_driver in -l$cf_menu_lib$cf_cv_libtype... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmenu$cf_cv_libtype $LIBS"
+LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12423 "configure"
+#line 12149 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12439,16 +12165,16 @@ menu_driver ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12442: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12168: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12445: \$? = $ac_status" >&5
+ echo "$as_me:12171: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12448: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12174: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12451: \$? = $ac_status" >&5
+ echo "$as_me:12177: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -12459,27 +12185,27 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12462: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:12188: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
cat >>confdefs.h <<EOF
-#define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
+#define `echo "HAVE_LIB$cf_menu_lib$cf_cv_libtype" | $as_tr_cpp` 1
EOF
- LIBS="-lmenu$cf_cv_libtype $LIBS"
+ LIBS="-l$cf_menu_lib$cf_cv_libtype $LIBS"
fi
-as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
-echo "$as_me:12474: checking for form_driver in -lform$cf_cv_libtype" >&5
-echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
+as_ac_Lib=`echo "ac_cv_lib_$cf_form_lib$cf_cv_libtype''_form_driver" | $as_tr_sh`
+echo "$as_me:12200: checking for form_driver in -l$cf_form_lib$cf_cv_libtype" >&5
+echo $ECHO_N "checking for form_driver in -l$cf_form_lib$cf_cv_libtype... $ECHO_C" >&6
if eval "test \"\${$as_ac_Lib+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lform$cf_cv_libtype $LIBS"
+LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12482 "configure"
+#line 12208 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12498,16 +12224,16 @@ form_driver ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12501: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12227: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12504: \$? = $ac_status" >&5
+ echo "$as_me:12230: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12507: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12233: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12510: \$? = $ac_status" >&5
+ echo "$as_me:12236: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Lib=yes"
else
@@ -12518,14 +12244,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12521: result: `eval echo '${'$as_ac_Lib'}'`" >&5
+echo "$as_me:12247: result: `eval echo '${'$as_ac_Lib'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
if test `eval echo '${'$as_ac_Lib'}'` = yes; then
cat >>confdefs.h <<EOF
-#define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
+#define `echo "HAVE_LIB$cf_form_lib$cf_cv_libtype" | $as_tr_cpp` 1
EOF
- LIBS="-lform$cf_cv_libtype $LIBS"
+ LIBS="-l$cf_form_lib$cf_cv_libtype $LIBS"
fi
@@ -12541,23 +12267,23 @@ for ac_header in \
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12544: checking for $ac_header" >&5
+echo "$as_me:12270: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12550 "configure"
+#line 12276 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:12554: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12280: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12560: \$? = $ac_status" >&5
+ echo "$as_me:12286: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12576,7 +12302,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12579: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12305: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12589,67 +12315,13 @@ done
;;
esac
-echo "$as_me:12592: checking return type of signal handlers" >&5
-echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
-if test "${ac_cv_type_signal+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 12598 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int
-main ()
-{
-int i;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12620: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:12623: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12626: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:12629: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_type_signal=void
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_type_signal=int
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:12639: result: $ac_cv_type_signal" >&5
-echo "${ECHO_T}$ac_cv_type_signal" >&6
-
-cat >>confdefs.h <<EOF
-#define RETSIGTYPE $ac_cv_type_signal
-EOF
-
-echo "$as_me:12646: checking for ANSI C header files" >&5
+echo "$as_me:12318: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12652 "configure"
+#line 12324 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -12657,13 +12329,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:12660: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12332: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12666: \$? = $ac_status" >&5
+ echo "$as_me:12338: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12685,7 +12357,7 @@ rm -f conftest.err conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 12688 "configure"
+#line 12360 "configure"
#include "confdefs.h"
#include <string.h>
@@ -12703,7 +12375,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line 12706 "configure"
+#line 12378 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -12724,7 +12396,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12727 "configure"
+#line 12399 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -12750,15 +12422,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12753: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12756: \$? = $ac_status" >&5
+ echo "$as_me:12428: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12758: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12430: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12761: \$? = $ac_status" >&5
+ echo "$as_me:12433: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -12771,7 +12443,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:12774: result: $ac_cv_header_stdc" >&5
+echo "$as_me:12446: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -12781,13 +12453,13 @@ EOF
fi
-echo "$as_me:12784: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:12456: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12790 "configure"
+#line 12462 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -12803,16 +12475,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12806: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12478: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12809: \$? = $ac_status" >&5
+ echo "$as_me:12481: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12812: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12484: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12815: \$? = $ac_status" >&5
+ echo "$as_me:12487: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_time=yes
else
@@ -12822,7 +12494,7 @@ ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:12825: result: $ac_cv_header_time" >&5
+echo "$as_me:12497: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
@@ -12845,23 +12517,71 @@ unistd.h \
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:12848: checking for $ac_header" >&5
+echo "$as_me:12520: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12526 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:12530: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:12536: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:12555: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+for ac_header in unistd.h getopt.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:12568: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12854 "configure"
+#line 12574 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:12858: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:12578: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
egrep -v '^ *\+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
- echo "$as_me:12864: \$? = $ac_status" >&5
+ echo "$as_me:12584: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12880,7 +12600,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12883: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:12603: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12890,27 +12610,152 @@ EOF
fi
done
+echo "$as_me:12613: checking for header declaring getopt variables" >&5
+echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
+if test "${cf_cv_getopt_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_cv_getopt_header=none
+for cf_header in stdio.h stdlib.h unistd.h getopt.h
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 12623 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main ()
+{
+int x = optind; char *y = optarg
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12636: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12639: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12642: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12645: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_getopt_header=$cf_header
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:12657: result: $cf_cv_getopt_header" >&5
+echo "${ECHO_T}$cf_cv_getopt_header" >&6
+if test $cf_cv_getopt_header != none ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_GETOPT_HEADER 1
+EOF
+
+fi
+
for ac_func in \
gettimeofday \
+
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:12672: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12678 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12709: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12712: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12715: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12718: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:12728: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<EOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+EOF
+
+fi
+done
+
+if test "$cf_enable_widec" = yes; then
+
+for ac_func in \
mblen \
mbrlen \
mbrtowc \
mbsrtowcs \
mbstowcs \
mbtowc \
-strdup \
wcsrtombs \
wcstombs \
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:12907: checking for $ac_func" >&5
+echo "$as_me:12752: checking for $ac_func" >&5
echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12913 "configure"
+#line 12758 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -12933,7 +12778,7 @@ main ()
#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -12941,16 +12786,16 @@ f = $ac_func;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12944: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12789: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12947: \$? = $ac_status" >&5
+ echo "$as_me:12792: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12950: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12795: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12953: \$? = $ac_status" >&5
+ echo "$as_me:12798: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -12960,7 +12805,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12963: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:12808: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
if test `eval echo '${'$as_ac_var'}'` = yes; then
cat >>confdefs.h <<EOF
@@ -12970,14 +12815,16 @@ EOF
fi
done
-echo "$as_me:12973: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
+fi
+
+echo "$as_me:12820: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12980 "configure"
+#line 12827 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -12999,23 +12846,23 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13002: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12849: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13005: \$? = $ac_status" >&5
+ echo "$as_me:12852: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13008: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12855: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13011: \$? = $ac_status" >&5
+ echo "$as_me:12858: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13018 "configure"
+#line 12865 "configure"
#include "confdefs.h"
#define _XOPEN_SOURCE_EXTENDED
@@ -13037,16 +12884,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13040: \"$ac_link\"") >&5
+if { (eval echo "$as_me:12887: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13043: \$? = $ac_status" >&5
+ echo "$as_me:12890: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13046: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12893: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13049: \$? = $ac_status" >&5
+ echo "$as_me:12896: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_xopen_extension=yes
else
@@ -13058,11 +12905,11 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13061: result: $cf_cv_need_xopen_extension" >&5
+echo "$as_me:12908: result: $cf_cv_need_xopen_extension" >&5
echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
-echo "$as_me:13065: checking for term.h" >&5
+echo "$as_me:12912: checking for term.h" >&5
echo $ECHO_N "checking for term.h... $ECHO_C" >&6
if test "${cf_cv_term_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13070,12 +12917,20 @@ else
# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
# for <term.h> if we do not find the variant.
-for cf_header in \
- `echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%/.*%/%'`term.h \
- term.h
+
+cf_header_list="term.h ncurses/term.h ncursesw/term.h"
+
+case ${cf_cv_ncurses_header:-curses.h} in #(vi
+*/*)
+ cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
+ cf_header_list="$cf_header_item $cf_header_list"
+ ;;
+esac
+
+for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 13078 "configure"
+#line 12933 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13089,16 +12944,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13092: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12947: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13095: \$? = $ac_status" >&5
+ echo "$as_me:12950: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13098: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12953: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13101: \$? = $ac_status" >&5
+ echo "$as_me:12956: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -13117,7 +12972,7 @@ no)
for cf_header in ncurses/term.h ncursesw/term.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 13120 "configure"
+#line 12975 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13135,16 +12990,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13138: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:12993: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13141: \$? = $ac_status" >&5
+ echo "$as_me:12996: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13144: \"$ac_try\"") >&5
+ { (eval echo "$as_me:12999: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13147: \$? = $ac_status" >&5
+ echo "$as_me:13002: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -13159,31 +13014,126 @@ rm -f conftest.$ac_objext conftest.$ac_ext
esac
fi
-echo "$as_me:13162: result: $cf_cv_term_header" >&5
+echo "$as_me:13017: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
case $cf_cv_term_header in #(vi
term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
;;
ncurses/term.h) #(vi
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
ncursesw/term.h)
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
EOF
;;
esac
+echo "$as_me:13044: checking for unctrl.h" >&5
+echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
+if test "${cf_cv_unctrl_header+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
+# for <unctrl.h> if we do not find the variant.
+
+cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
+
+case ${cf_cv_ncurses_header:-curses.h} in #(vi
+*/*)
+ cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
+ cf_header_list="$cf_header_item $cf_header_list"
+ ;;
+esac
+
+for cf_header in $cf_header_list
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13065 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <${cf_header}>
+int
+main ()
+{
+WINDOW *x
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13079: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13082: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13085: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13088: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_unctrl_header=$cf_header
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_unctrl_header=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+
+fi
+echo "$as_me:13101: result: $cf_cv_unctrl_header" >&5
+echo "${ECHO_T}$cf_cv_unctrl_header" >&6
+
+case $cf_cv_unctrl_header in #(vi
+no)
+ { echo "$as_me:13106: WARNING: unctrl.h header not found" >&5
+echo "$as_me: WARNING: unctrl.h header not found" >&2;}
+ ;;
+esac
+
+case $cf_cv_unctrl_header in #(vi
+unctrl.h) #(vi
+
+cat >>confdefs.h <<\EOF
+#define HAVE_UNCTRL_H 1
+EOF
+
+ ;;
+ncurses/unctrl.h) #(vi
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_UNCTRL_H 1
+EOF
+
+ ;;
+ncursesw/unctrl.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_UNCTRL_H 1
+EOF
+
+ ;;
+esac
+
for cf_func in \
+assume_default_colors \
chgat \
color_set \
filter \
@@ -13210,8 +13160,10 @@ tigetnum \
tigetstr \
typeahead \
use_default_colors \
-vw_printw \
+use_screen \
+use_window \
vsscanf \
+vw_printw \
wchgat \
winsstr \
wresize \
@@ -13221,10 +13173,94 @@ do
cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo "$as_me:13224: checking for ${cf_func}" >&5
+ echo "$as_me:13176: checking for ${cf_func}" >&5
+echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
+
+echo "${as_me:-configure}:13179: testing ${cf_func} ..." 1>&5
+
+ if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ eval cf_result='$ac_cv_func_'$cf_func
+ if test ".$cf_result" != ".no"; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13188 "configure"
+#include "confdefs.h"
+
+#ifdef HAVE_XCURSES
+#include <xcurses.h>
+char * XCursesProgramName = "test";
+#else
+#include <${cf_cv_ncurses_header:-curses.h}>
+#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
+#include <ncursesw/term.h>
+#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
+#include <ncurses/term.h>
+#elif defined(HAVE_TERM_H)
+#include <term.h>
+#endif
+#endif
+
+int
+main ()
+{
+
+#ifndef ${cf_func}
+long foo = (long)(&${cf_func});
+if (foo + 1234 > 5678)
+ ${cf_cv_main_return:-return}(foo);
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13220: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13223: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13226: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13229: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_result=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_result=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ fi
+ eval 'cf_cv_func_'$cf_func'=$cf_result'
+
+fi
+
+ # use the computed/retrieved cache-value:
+ eval 'cf_result=$cf_cv_func_'$cf_func
+ echo "$as_me:13245: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ if test $cf_result != no; then
+ cat >>confdefs.h <<EOF
+#define HAVE_${cf_tr_func} 1
+EOF
+
+ fi
+done
+
+for cf_func in tputs
+do
+
+cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ echo "$as_me:13260: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-echo "${as_me:-configure}:13227: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:13263: testing ${cf_func} ..." 1>&5
if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13233,7 +13269,7 @@ else
eval cf_result='$ac_cv_func_'$cf_func
if test ".$cf_result" != ".no"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 13236 "configure"
+#line 13272 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -13256,7 +13292,8 @@ main ()
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
-${cf_cv_main_return:-return}(foo == 0);
+if (foo + 1234 > 5678)
+ ${cf_cv_main_return:-return}(foo);
#endif
;
@@ -13264,16 +13301,16 @@ ${cf_cv_main_return:-return}(foo == 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13267: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13304: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13270: \$? = $ac_status" >&5
+ echo "$as_me:13307: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13273: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13310: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13276: \$? = $ac_status" >&5
+ echo "$as_me:13313: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -13289,7 +13326,7 @@ fi
# use the computed/retrieved cache-value:
eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:13292: result: $cf_result" >&5
+ echo "$as_me:13329: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result != no; then
cat >>confdefs.h <<EOF
@@ -13299,14 +13336,82 @@ EOF
fi
done
-echo "$as_me:13302: checking for ncurses extended functions" >&5
+if test x$cf_cv_func_tputs = xyes
+then
+ cf_done=no
+ for cf_arg in int char
+ do
+ for cf_ret in int void
+ do
+ if test $cf_ret = void
+ then
+ cf_return="/* nothing */"
+ else
+ cf_return="return value"
+ fi
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13353 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_cv_term_header>
+
+static $cf_ret outc($cf_arg value) { $cf_return; }
+
+int
+main ()
+{
+
+ tputs("hello", 0, outc);
+ ${cf_cv_main_return:-return}(0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13373: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13376: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13379: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13382: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
+
+echo "${as_me:-configure}:13387: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
+
+ cat >>confdefs.h <<EOF
+#define TPUTS_ARG $cf_arg
+#define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
+#define TPUTS_RETURN(value) $cf_return
+EOF
+ cf_done=yes
+ break
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ done
+ test $cf_done = yes && break
+ done
+fi
+
+echo "$as_me:13407: checking for ncurses extended functions" >&5
echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13309 "configure"
+#line 13414 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13321,16 +13426,16 @@ int x = NCURSES_EXT_FUNCS
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13324: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13327: \$? = $ac_status" >&5
+ echo "$as_me:13432: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13330: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13435: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13333: \$? = $ac_status" >&5
+ echo "$as_me:13438: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_ext_funcs=defined
else
@@ -13338,7 +13443,7 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 13341 "configure"
+#line 13446 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13363,16 +13468,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13366: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13471: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13369: \$? = $ac_status" >&5
+ echo "$as_me:13474: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13372: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13477: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13375: \$? = $ac_status" >&5
+ echo "$as_me:13480: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_ext_funcs=yes
else
@@ -13386,515 +13491,170 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13389: result: $cf_cv_ncurses_ext_funcs" >&5
+echo "$as_me:13494: result: $cf_cv_ncurses_ext_funcs" >&5
echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
-test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
+test "$cf_cv_ncurses_ext_funcs" = yes &&
+cat >>confdefs.h <<\EOF
#define NCURSES_EXT_FUNCS 1
EOF
-echo "$as_me:13395: checking for wide-character functions" >&5
-echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
-if test "${cf_cv_widechar_funcs+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+if test "$cf_enable_widec" = yes
+then
+ # workaround for systems with ncurses before 20111029, due to change of
+ # feature test macro from _XPG5 to _XOPEN_SOURCE
+ if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
+ then
+ cf_define_xpg5=no
+ echo "$as_me:13508: checking if _XPG5 should be defined to enable wide-characters" >&5
+echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line 13402 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13512 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
main ()
{
-
- static wchar_t src_wchar[2];
- static cchar_t dst_cchar;
- setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
-
+int x = _XPG5
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13419: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:13422: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13425: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:13428: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- cf_cv_widechar_funcs=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-cf_cv_widechar_funcs=no
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-
-fi
-echo "$as_me:13439: result: $cf_cv_widechar_funcs" >&5
-echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
-if test "$cf_cv_widechar_funcs" != no ; then
- cat >>confdefs.h <<\EOF
-#define USE_WIDEC_SUPPORT 1
-EOF
-
-else
- cat >>confdefs.h <<\EOF
-#define USE_WIDEC_SUPPORT 0
-EOF
-
-fi
-
-# 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13459: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 13465 "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13471: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13525: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13474: \$? = $ac_status" >&5
+ echo "$as_me:13528: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13477: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13531: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13480: \$? = $ac_status" >&5
+ echo "$as_me:13534: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_Header=yes"
+ :
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:13490: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
-
-fi
-done
-
-echo "$as_me:13500: checking for pid_t" >&5
-echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
-if test "${ac_cv_type_pid_t+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 13506 "configure"
+cf_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XPG5"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13543 "configure"
#include "confdefs.h"
-$ac_includes_default
+
+#include <${cf_cv_ncurses_header:-curses.h}>
int
main ()
{
-if ((pid_t *) 0)
- return 0;
-if (sizeof (pid_t))
- return 0;
+int x = _XPG5
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13521: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13556: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13524: \$? = $ac_status" >&5
+ echo "$as_me:13559: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13527: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13562: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13530: \$? = $ac_status" >&5
+ echo "$as_me:13565: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_type_pid_t=yes
+ cf_define_xpg5=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_type_pid_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save_cppflags"
fi
-echo "$as_me:13540: result: $ac_cv_type_pid_t" >&5
-echo "${ECHO_T}$ac_cv_type_pid_t" >&6
-if test $ac_cv_type_pid_t = yes; then
- :
-else
-
-cat >>confdefs.h <<EOF
-#define pid_t int
-EOF
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:13576: result: $cf_define_xpg5" >&5
+echo "${ECHO_T}$cf_define_xpg5" >&6
-fi
+ if test "$cf_define_xpg5" = yes
+ then
+ CPPFLAGS="$CPPFLAGS -D_XPG5"
+ fi
+ fi
-for ac_header in unistd.h vfork.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:13555: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:13585: checking for wide-character functions" >&5
+echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
+if test "${cf_cv_widechar_funcs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- cat >conftest.$ac_ext <<_ACEOF
-#line 13561 "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:13565: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- egrep -v '^ *\+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:13571: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
- eval "$as_ac_Header=yes"
-else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_ext
-fi
-echo "$as_me:13590: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-EOF
-
-fi
-done
-for ac_func in fork vfork
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:13603: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 13609 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13592 "configure"
#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char $ac_func ();
-char (*f) ();
+#include <${cf_cv_ncurses_header:-curses.h}>
int
main ()
{
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-f = $ac_func;
-#endif
+
+ static wchar_t src_wchar[2];
+ static cchar_t dst_cchar;
+ setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13640: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13609: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13643: \$? = $ac_status" >&5
+ echo "$as_me:13612: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13646: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13615: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13649: \$? = $ac_status" >&5
+ echo "$as_me:13618: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_var=yes"
+ cf_cv_widechar_funcs=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-eval "$as_ac_var=no"
+cf_cv_widechar_funcs=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:13659: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
- cat >>confdefs.h <<EOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-EOF
-
-fi
-done
-
-ac_cv_func_fork_works=$ac_cv_func_fork
-if test "x$ac_cv_func_fork" = xyes; then
- echo "$as_me:13671: checking for working fork" >&5
-echo $ECHO_N "checking for working fork... $ECHO_C" >&6
-if test "${ac_cv_func_fork_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_fork_works=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* By Rüdiger Kuhlmann. */
- #include <sys/types.h>
- #if HAVE_UNISTD_H
- # include <unistd.h>
- #endif
- /* Some systems only have a dummy stub for fork() */
- int main ()
- {
- if (fork() < 0)
- $ac_main_return (1);
- $ac_main_return (0);
- }
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13694: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:13697: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13699: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:13702: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_fork_works=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_func_fork_works=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:13714: result: $ac_cv_func_fork_works" >&5
-echo "${ECHO_T}$ac_cv_func_fork_works" >&6
fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { echo "$as_me:13728: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
-echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- echo "$as_me:13733: checking for working vfork" >&5
-echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
-if test "${ac_cv_func_vfork_works+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_vfork_works=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
-#line 13742 "configure"
-#include "confdefs.h"
-/* Thanks to Paul Eggert for this test. */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#if HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-
-int
-main ()
-{
- pid_t parent = getpid ();
- pid_t child;
-
- sparc_address_test ();
-
- child = vfork ();
-
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
-
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
-
- while (wait(&status) != child)
- ;
- $ac_main_return(
- /* Was there some problem with vforking? */
- child < 0
-
- /* Did the child fail? (This shouldn't happen.) */
- || status
-
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
-
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13839: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:13842: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13844: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:13847: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_vfork_works=yes
-else
- echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_cv_func_vfork_works=no
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-fi
-echo "$as_me:13859: result: $ac_cv_func_vfork_works" >&5
-echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
-
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=ac_cv_func_vfork
- { echo "$as_me:13865: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
-echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
-fi
-
-if test "x$ac_cv_func_vfork_works" = xyes; then
+echo "$as_me:13629: result: $cf_cv_widechar_funcs" >&5
+echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
+ if test "$cf_cv_widechar_funcs" != no ; then
cat >>confdefs.h <<\EOF
-#define HAVE_WORKING_VFORK 1
+#define USE_WIDEC_SUPPORT 1
EOF
-else
-
-cat >>confdefs.h <<\EOF
-#define vfork fork
+ else
+ cat >>confdefs.h <<\EOF
+#define USE_WIDEC_SUPPORT 0
EOF
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
-
-cat >>confdefs.h <<\EOF
-#define HAVE_WORKING_FORK 1
+ fi
+else
+ cat >>confdefs.h <<\EOF
+#define USE_WIDEC_SUPPORT 0
EOF
fi
-echo "$as_me:13890: checking if sys/time.h works with sys/select.h" >&5
+echo "$as_me:13650: checking if sys/time.h works with sys/select.h" >&5
echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
if test "${cf_cv_sys_time_select+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13897 "configure"
+#line 13657 "configure"
#include "confdefs.h"
#include <sys/types.h>
@@ -13914,16 +13674,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13917: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13677: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13920: \$? = $ac_status" >&5
+ echo "$as_me:13680: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13923: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13683: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13926: \$? = $ac_status" >&5
+ echo "$as_me:13686: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_sys_time_select=yes
else
@@ -13935,13 +13695,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13938: result: $cf_cv_sys_time_select" >&5
+echo "$as_me:13698: result: $cf_cv_sys_time_select" >&5
echo "${ECHO_T}$cf_cv_sys_time_select" >&6
-test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
+test "$cf_cv_sys_time_select" = yes &&
+cat >>confdefs.h <<\EOF
#define HAVE_SYS_TIME_SELECT 1
EOF
-echo "$as_me:13944: checking for function curses_version" >&5
+echo "$as_me:13705: checking for function curses_version" >&5
echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
if test "${cf_cv_func_curses_version+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13951,7 +13712,7 @@ if test "$cross_compiling" = yes; then
cf_cv_func_curses_version=unknown
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13954 "configure"
+#line 13715 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -13964,15 +13725,15 @@ int main()
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13967: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13728: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13970: \$? = $ac_status" >&5
+ echo "$as_me:13731: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13972: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13733: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13975: \$? = $ac_status" >&5
+ echo "$as_me:13736: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_func_curses_version=yes
@@ -13987,26 +13748,14 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f core
fi
-echo "$as_me:13990: result: $cf_cv_func_curses_version" >&5
+echo "$as_me:13751: result: $cf_cv_func_curses_version" >&5
echo "${ECHO_T}$cf_cv_func_curses_version" >&6
-test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
+test "$cf_cv_func_curses_version" = yes &&
+cat >>confdefs.h <<\EOF
#define HAVE_CURSES_VERSION 1
EOF
-echo "$as_me:13996: checking for ncurses wrap-prefix" >&5
-echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
-
-# Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
-if test "${with_ncurses_wrap_prefix+set}" = set; then
- withval="$with_ncurses_wrap_prefix"
- NCURSES_WRAP_PREFIX=$withval
-else
- NCURSES_WRAP_PREFIX=_nc_
-fi;
-echo "$as_me:14006: result: $NCURSES_WRAP_PREFIX" >&5
-echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
-
-echo "$as_me:14009: checking for alternate character set array" >&5
+echo "$as_me:13758: checking for alternate character set array" >&5
echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
if test "${cf_cv_curses_acs_map+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14016,7 +13765,7 @@ cf_cv_curses_acs_map=unknown
for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14019 "configure"
+#line 13768 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -14032,16 +13781,16 @@ $name['k'] = ACS_PLUS
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14035: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14038: \$? = $ac_status" >&5
+ echo "$as_me:13787: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14041: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13790: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14044: \$? = $ac_status" >&5
+ echo "$as_me:13793: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_acs_map=$name; break
else
@@ -14052,14 +13801,17 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:14055: result: $cf_cv_curses_acs_map" >&5
+echo "$as_me:13804: result: $cf_cv_curses_acs_map" >&5
echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
-test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
+test "$cf_cv_curses_acs_map" != unknown &&
+cat >>confdefs.h <<EOF
#define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
EOF
-echo "$as_me:14062: checking for wide alternate character set array" >&5
+if test "$cf_enable_widec" = yes; then
+
+echo "$as_me:13814: checking for wide alternate character set array" >&5
echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_map+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14069,7 +13821,7 @@ else
for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14072 "configure"
+#line 13824 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14085,16 +13837,16 @@ void *foo = &($name['k'])
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14088: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13840: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14091: \$? = $ac_status" >&5
+ echo "$as_me:13843: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14094: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13846: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14097: \$? = $ac_status" >&5
+ echo "$as_me:13849: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_map=$name
break
@@ -14105,14 +13857,15 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:14108: result: $cf_cv_curses_wacs_map" >&5
+echo "$as_me:13860: result: $cf_cv_curses_wacs_map" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
-test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
+test "$cf_cv_curses_wacs_map" != unknown &&
+cat >>confdefs.h <<EOF
#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
EOF
-echo "$as_me:14115: checking for wide alternate character constants" >&5
+echo "$as_me:13868: checking for wide alternate character constants" >&5
echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
if test "${cf_cv_curses_wacs_symbols+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14122,7 +13875,7 @@ cf_cv_curses_wacs_symbols=no
if test "$cf_cv_curses_wacs_map" != unknown
then
cat >conftest.$ac_ext <<_ACEOF
-#line 14125 "configure"
+#line 13878 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14139,16 +13892,16 @@ cchar_t *foo = WACS_PLUS;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14142: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13895: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14145: \$? = $ac_status" >&5
+ echo "$as_me:13898: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14148: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13901: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14151: \$? = $ac_status" >&5
+ echo "$as_me:13904: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -14158,7 +13911,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14161 "configure"
+#line 13914 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14174,16 +13927,16 @@ cchar_t *foo = WACS_PLUS
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14177: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13930: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14180: \$? = $ac_status" >&5
+ echo "$as_me:13933: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14183: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13936: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14186: \$? = $ac_status" >&5
+ echo "$as_me:13939: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -14194,17 +13947,20 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-echo "$as_me:14197: result: $cf_cv_curses_wacs_symbols" >&5
+echo "$as_me:13950: result: $cf_cv_curses_wacs_symbols" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
-test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
+test "$cf_cv_curses_wacs_symbols" != no &&
+cat >>confdefs.h <<\EOF
#define CURSES_WACS_SYMBOLS 1
EOF
-echo "$as_me:14204: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+fi
+
+echo "$as_me:13960: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14207 "configure"
+#line 13963 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14222,16 +13978,16 @@ attr_t foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14225: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13981: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14228: \$? = $ac_status" >&5
+ echo "$as_me:13984: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14231: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13987: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14234: \$? = $ac_status" >&5
+ echo "$as_me:13990: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14240,32 +13996,35 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14243: result: $cf_result" >&5
+echo "$as_me:13999: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >>confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define $cf_result 1
EOF
else
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define attr_t long
EOF
fi
+if test "$cf_enable_widec" = yes; then
+
# This is needed on Tru64 5.0 to declare mbstate_t
-echo "$as_me:14261: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:14020: checking if we must include wchar.h to declare mbstate_t" >&5
echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
if test "${cf_cv_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14268 "configure"
+#line 14027 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14283,23 +14042,23 @@ mbstate_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14286: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14045: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14289: \$? = $ac_status" >&5
+ echo "$as_me:14048: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14292: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14051: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14295: \$? = $ac_status" >&5
+ echo "$as_me:14054: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14302 "configure"
+#line 14061 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14318,16 +14077,16 @@ mbstate_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14321: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14080: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14324: \$? = $ac_status" >&5
+ echo "$as_me:14083: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14327: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14086: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14330: \$? = $ac_status" >&5
+ echo "$as_me:14089: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=yes
else
@@ -14339,11 +14098,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14342: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:14101: result: $cf_cv_mbstate_t" >&5
echo "${ECHO_T}$cf_cv_mbstate_t" >&6
if test "$cf_cv_mbstate_t" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define NEED_WCHAR_H 1
EOF
@@ -14361,14 +14121,14 @@ if test "$cf_cv_mbstate_t" != unknown ; then
fi
# This is needed on Tru64 5.0 to declare wchar_t
-echo "$as_me:14364: checking if we must include wchar.h to declare wchar_t" >&5
+echo "$as_me:14124: checking if we must include wchar.h to declare wchar_t" >&5
echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
if test "${cf_cv_wchar_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14371 "configure"
+#line 14131 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14386,23 +14146,23 @@ wchar_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14389: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14149: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14392: \$? = $ac_status" >&5
+ echo "$as_me:14152: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14395: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14155: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14398: \$? = $ac_status" >&5
+ echo "$as_me:14158: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wchar_t=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14405 "configure"
+#line 14165 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14421,16 +14181,16 @@ wchar_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14424: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14184: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14427: \$? = $ac_status" >&5
+ echo "$as_me:14187: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14430: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14190: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14433: \$? = $ac_status" >&5
+ echo "$as_me:14193: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wchar_t=yes
else
@@ -14442,11 +14202,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14445: result: $cf_cv_wchar_t" >&5
+echo "$as_me:14205: result: $cf_cv_wchar_t" >&5
echo "${ECHO_T}$cf_cv_wchar_t" >&6
if test "$cf_cv_wchar_t" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define NEED_WCHAR_H 1
EOF
@@ -14464,14 +14225,14 @@ if test "$cf_cv_wchar_t" != unknown ; then
fi
# This is needed on Tru64 5.0 to declare wint_t
-echo "$as_me:14467: checking if we must include wchar.h to declare wint_t" >&5
+echo "$as_me:14228: checking if we must include wchar.h to declare wint_t" >&5
echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
if test "${cf_cv_wint_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14474 "configure"
+#line 14235 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14489,23 +14250,23 @@ wint_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14492: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14253: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14495: \$? = $ac_status" >&5
+ echo "$as_me:14256: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14498: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14259: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14501: \$? = $ac_status" >&5
+ echo "$as_me:14262: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wint_t=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 14508 "configure"
+#line 14269 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -14524,16 +14285,16 @@ wint_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14527: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14288: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14530: \$? = $ac_status" >&5
+ echo "$as_me:14291: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14533: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14294: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14536: \$? = $ac_status" >&5
+ echo "$as_me:14297: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_wint_t=yes
else
@@ -14545,11 +14306,12 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14548: result: $cf_cv_wint_t" >&5
+echo "$as_me:14309: result: $cf_cv_wint_t" >&5
echo "${ECHO_T}$cf_cv_wint_t" >&6
if test "$cf_cv_wint_t" = yes ; then
- cat >>confdefs.h <<\EOF
+
+cat >>confdefs.h <<\EOF
#define NEED_WCHAR_H 1
EOF
@@ -14566,12 +14328,12 @@ if test "$cf_cv_wint_t" != unknown ; then
NCURSES_OK_WINT_T=1
fi
-if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
+ if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
-echo "$as_me:14571: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14333: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14574 "configure"
+#line 14336 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14589,16 +14351,16 @@ mbstate_t foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14592: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14354: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14595: \$? = $ac_status" >&5
+ echo "$as_me:14357: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14598: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14360: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14601: \$? = $ac_status" >&5
+ echo "$as_me:14363: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14607,31 +14369,32 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14610: result: $cf_result" >&5
+echo "$as_me:14372: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >>confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define $cf_result 1
EOF
else
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define mbstate_t long
EOF
fi
-fi
+ fi
-if test "$NCURSES_OK_WCHAR_T" = 0 ; then
+ if test "$NCURSES_OK_WCHAR_T" = 0 ; then
-echo "$as_me:14631: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14394: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14634 "configure"
+#line 14397 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14649,16 +14412,16 @@ wchar_t foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14415: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14655: \$? = $ac_status" >&5
+ echo "$as_me:14418: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14658: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14421: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14661: \$? = $ac_status" >&5
+ echo "$as_me:14424: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14667,31 +14430,32 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14670: result: $cf_result" >&5
+echo "$as_me:14433: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >>confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define $cf_result 1
EOF
else
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define wchar_t long
EOF
fi
-fi
+ fi
-if test "$NCURSES_OK_WINT_T" = 0 ; then
+ if test "$NCURSES_OK_WINT_T" = 0 ; then
-echo "$as_me:14691: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14455: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14694 "configure"
+#line 14458 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14709,16 +14473,16 @@ wint_t foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14712: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14476: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14715: \$? = $ac_status" >&5
+ echo "$as_me:14479: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14718: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14482: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14721: \$? = $ac_status" >&5
+ echo "$as_me:14485: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14727,30 +14491,32 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14730: result: $cf_result" >&5
+echo "$as_me:14494: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- cat >>confdefs.h <<EOF
+cat >>confdefs.h <<EOF
#define $cf_result 1
EOF
else
- cat >>confdefs.h <<EOF
+
+cat >>confdefs.h <<EOF
#define wint_t long
EOF
fi
+ fi
fi
-echo "$as_me:14749: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14515: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14753 "configure"
+#line 14519 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -14778,16 +14544,16 @@ void *foo = &(boolnames)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14547: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14784: \$? = $ac_status" >&5
+ echo "$as_me:14550: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14787: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14553: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14790: \$? = $ac_status" >&5
+ echo "$as_me:14556: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14796,7 +14562,7 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14799: result: $cf_result" >&5
+echo "$as_me:14565: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
@@ -14808,14 +14574,14 @@ cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz.
EOF
else
- echo "$as_me:14811: checking for data boolnames in library" >&5
+ echo "$as_me:14577: checking for data boolnames in library" >&5
echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
# BSD linkers insist on making weak linkage, but resolve at runtime.
if test "$cross_compiling" = yes; then
# cross-compiling
cat >conftest.$ac_ext <<_ACEOF
-#line 14818 "configure"
+#line 14584 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -14847,16 +14613,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14850: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14616: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14853: \$? = $ac_status" >&5
+ echo "$as_me:14619: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14856: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14622: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14859: \$? = $ac_status" >&5
+ echo "$as_me:14625: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14868,7 +14634,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14871 "configure"
+#line 14637 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -14893,15 +14659,15 @@ int main(void)
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:14896: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14662: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14899: \$? = $ac_status" >&5
+ echo "$as_me:14665: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:14901: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14667: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14904: \$? = $ac_status" >&5
+ echo "$as_me:14670: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14912,7 +14678,7 @@ cf_result=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:14915: result: $cf_result" >&5
+ echo "$as_me:14681: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
@@ -14925,11 +14691,11 @@ EOF
fi
fi
-echo "$as_me:14928: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
+echo "$as_me:14694: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 14932 "configure"
+#line 14698 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -14957,16 +14723,16 @@ void *foo = &(boolfnames)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14960: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14726: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14963: \$? = $ac_status" >&5
+ echo "$as_me:14729: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14966: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14732: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14969: \$? = $ac_status" >&5
+ echo "$as_me:14735: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14975,7 +14741,7 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:14978: result: $cf_result" >&5
+echo "$as_me:14744: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
@@ -14987,14 +14753,14 @@ cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz
EOF
else
- echo "$as_me:14990: checking for data boolfnames in library" >&5
+ echo "$as_me:14756: checking for data boolfnames in library" >&5
echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
# BSD linkers insist on making weak linkage, but resolve at runtime.
if test "$cross_compiling" = yes; then
# cross-compiling
cat >conftest.$ac_ext <<_ACEOF
-#line 14997 "configure"
+#line 14763 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -15026,16 +14792,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15029: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14795: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15032: \$? = $ac_status" >&5
+ echo "$as_me:14798: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15035: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14801: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15038: \$? = $ac_status" >&5
+ echo "$as_me:14804: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -15047,7 +14813,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15050 "configure"
+#line 14816 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -15072,15 +14838,15 @@ int main(void)
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:15075: \"$ac_link\"") >&5
+if { (eval echo "$as_me:14841: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15078: \$? = $ac_status" >&5
+ echo "$as_me:14844: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:15080: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14846: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15083: \$? = $ac_status" >&5
+ echo "$as_me:14849: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -15091,7 +14857,7 @@ cf_result=no
fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:15094: result: $cf_result" >&5
+ echo "$as_me:14860: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result = yes ; then
@@ -15104,6 +14870,1271 @@ EOF
fi
fi
+if ( test "$GCC" = yes || test "$GXX" = yes )
+then
+echo "$as_me:14875: checking if you want to turn on gcc warnings" >&5
+echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
+
+# Check whether --enable-warnings or --disable-warnings was given.
+if test "${enable_warnings+set}" = set; then
+ enableval="$enable_warnings"
+ test "$enableval" != yes && enableval=no
+ if test "$enableval" != "no" ; then
+ with_warnings=yes
+ else
+ with_warnings=no
+ fi
+else
+ enableval=no
+ with_warnings=no
+
+fi;
+echo "$as_me:14892: result: $with_warnings" >&5
+echo "${ECHO_T}$with_warnings" >&6
+if test "$with_warnings" = "yes"
+then
+
+if test "$GCC" = yes
+then
+cat > conftest.i <<EOF
+#ifndef GCC_PRINTF
+#define GCC_PRINTF 0
+#endif
+#ifndef GCC_SCANF
+#define GCC_SCANF 0
+#endif
+#ifndef GCC_NORETURN
+#define GCC_NORETURN /* nothing */
+#endif
+#ifndef GCC_UNUSED
+#define GCC_UNUSED /* nothing */
+#endif
+EOF
+if test "$GCC" = yes
+then
+ { echo "$as_me:14915: checking for $CC __attribute__ directives..." >&5
+echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
+cat > conftest.$ac_ext <<EOF
+#line 14918 "${as_me:-configure}"
+#include "confdefs.h"
+#include "conftest.h"
+#include "conftest.i"
+#if GCC_PRINTF
+#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
+#else
+#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
+#endif
+#if GCC_SCANF
+#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
+#else
+#define GCC_SCANFLIKE(fmt,var) /*nothing*/
+#endif
+extern void wow(char *,...) GCC_SCANFLIKE(1,2);
+extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
+extern void foo(void) GCC_NORETURN;
+int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
+EOF
+ cf_printf_attribute=no
+ cf_scanf_attribute=no
+ for cf_attribute in scanf printf unused noreturn
+ do
+
+cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cf_directive="__attribute__(($cf_attribute))"
+ echo "checking for $CC $cf_directive" 1>&5
+
+ case $cf_attribute in #(vi
+ printf) #(vi
+ cf_printf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ scanf) #(vi
+ cf_scanf_attribute=yes
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE 1
+EOF
+ ;;
+ *) #(vi
+ cat >conftest.h <<EOF
+#define GCC_$cf_ATTRIBUTE $cf_directive
+EOF
+ ;;
+ esac
+
+ if { (eval echo "$as_me:14967: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:14970: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:14972: result: ... $cf_attribute" >&5
+echo "${ECHO_T}... $cf_attribute" >&6
+ cat conftest.h >>confdefs.h
+ case $cf_attribute in #(vi
+ noreturn) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_NORETURN $cf_directive
+EOF
+
+ ;;
+ printf) #(vi
+ cf_value='/* nothing */'
+ if test "$cf_printf_attribute" != no ; then
+ cf_value='__attribute__((format(printf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_PRINTF 1
+EOF
+
+ fi
+
+cat >>confdefs.h <<EOF
+#define GCC_PRINTFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ scanf) #(vi
+ cf_value='/* nothing */'
+ if test "$cf_scanf_attribute" != no ; then
+ cf_value='__attribute__((format(scanf,fmt,var)))'
+
+cat >>confdefs.h <<\EOF
+#define GCC_SCANF 1
+EOF
+
+ fi
+
+cat >>confdefs.h <<EOF
+#define GCC_SCANFLIKE(fmt,var) $cf_value
+EOF
+
+ ;;
+ unused) #(vi
+
+cat >>confdefs.h <<EOF
+#define GCC_UNUSED $cf_directive
+EOF
+
+ ;;
+ esac
+ fi
+ done
+else
+ fgrep define conftest.i >>confdefs.h
+fi
+rm -rf conftest*
+fi
+
+INTEL_COMPILER=no
+
+if test "$GCC" = yes ; then
+ case $host_os in
+ linux*|gnu*)
+ echo "$as_me:15036: checking if this is really Intel C compiler" >&5
+echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -no-gcc"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15041 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+#ifdef __INTEL_COMPILER
+#else
+make an error
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15058: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15061: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15064: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15067: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ INTEL_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ echo "$as_me:15078: result: $INTEL_COMPILER" >&5
+echo "${ECHO_T}$INTEL_COMPILER" >&6
+ ;;
+ esac
+fi
+
+CLANG_COMPILER=no
+
+if test "$GCC" = yes ; then
+ echo "$as_me:15087: checking if this is really Clang C compiler" >&5
+echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
+ cf_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -Qunused-arguments"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15092 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+#ifdef __clang__
+#else
+make an error
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15109: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15112: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15115: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15118: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ CLANG_COMPILER=yes
+cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS="$cf_save_CFLAGS"
+ echo "$as_me:15129: result: $CLANG_COMPILER" >&5
+echo "${ECHO_T}$CLANG_COMPILER" >&6
+fi
+
+cat > conftest.$ac_ext <<EOF
+#line 15134 "${as_me:-configure}"
+int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
+EOF
+
+if test "$INTEL_COMPILER" = yes
+then
+# The "-wdXXX" options suppress warnings:
+# remark #1419: external declaration in primary source file
+# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
+# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
+# remark #193: zero used for undefined preprocessing identifier
+# remark #593: variable "curs_sb_left_arrow" was set but never used
+# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
+# remark #869: parameter "tw" was never referenced
+# remark #981: operands are evaluated in unspecified order
+# warning #279: controlling expression is constant
+
+ { echo "$as_me:15151: checking for $CC warning options..." >&5
+echo "$as_me: checking for $CC warning options..." >&6;}
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS="-Wall"
+ for cf_opt in \
+ wd1419 \
+ wd1683 \
+ wd1684 \
+ wd193 \
+ wd593 \
+ wd279 \
+ wd810 \
+ wd869 \
+ wd981
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if { (eval echo "$as_me:15167: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15170: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:15172: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+
+elif test "$GCC" = yes
+then
+ { echo "$as_me:15181: checking for $CC warning options..." >&5
+echo "$as_me: checking for $CC warning options..." >&6;}
+ cf_save_CFLAGS="$CFLAGS"
+ EXTRA_CFLAGS=
+ cf_warn_CONST=""
+ test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
+ cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
+ test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
+ for cf_opt in W Wall \
+ Wbad-function-cast \
+ Wcast-align \
+ Wcast-qual \
+ Wdeclaration-after-statement \
+ Wextra \
+ Winline \
+ Wmissing-declarations \
+ Wmissing-prototypes \
+ Wnested-externs \
+ Wpointer-arith \
+ Wshadow \
+ Wstrict-prototypes \
+ Wundef $cf_gcc_warnings $cf_warn_CONST
+ do
+ CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
+ if { (eval echo "$as_me:15205: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15208: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ test -n "$verbose" && echo "$as_me:15210: result: ... -$cf_opt" >&5
+echo "${ECHO_T}... -$cf_opt" >&6
+ case $cf_opt in #(vi
+ Wcast-qual) #(vi
+ CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ ;;
+ Winline) #(vi
+ case $GCC_VERSION in
+ [34].*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+echo "${as_me:-configure}:15221: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+
+ continue;;
+ esac
+ ;;
+ Wpointer-arith) #(vi
+ case $GCC_VERSION in
+ [12].*)
+ test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
+
+echo "${as_me:-configure}:15231: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+
+ continue;;
+ esac
+ ;;
+ esac
+ EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
+ fi
+ done
+ CFLAGS="$cf_save_CFLAGS"
+fi
+rm -rf conftest*
+
+fi
+fi
+
+echo "$as_me:15247: checking if you want to use dmalloc for testing" >&5
+echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
+
+# Check whether --with-dmalloc or --without-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then
+ withval="$with_dmalloc"
+
+cat >>confdefs.h <<EOF
+#define USE_DMALLOC 1
+EOF
+
+ : ${with_cflags:=-g}
+ : ${with_no_leaks:=yes}
+ with_dmalloc=yes
+else
+ with_dmalloc=
+fi;
+echo "$as_me:15264: result: ${with_dmalloc:-no}" >&5
+echo "${ECHO_T}${with_dmalloc:-no}" >&6
+
+case .$with_cflags in #(vi
+.*-g*)
+ case .$CFLAGS in #(vi
+ .*-g*) #(vi
+ ;;
+ *)
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -g
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+ esac
+ ;;
+esac
+
+if test "$with_dmalloc" = yes ; then
+ echo "$as_me:15358: checking for dmalloc.h" >&5
+echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dmalloc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15364 "configure"
+#include "confdefs.h"
+#include <dmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:15368: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:15374: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_dmalloc_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_dmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:15393: result: $ac_cv_header_dmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
+if test $ac_cv_header_dmalloc_h = yes; then
+
+echo "$as_me:15397: checking for dmalloc_debug in -ldmalloc" >&5
+echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
+if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldmalloc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 15405 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dmalloc_debug ();
+int
+main ()
+{
+dmalloc_debug ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15424: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15427: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15430: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15433: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dmalloc_dmalloc_debug=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dmalloc_dmalloc_debug=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:15444: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
+if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBDMALLOC 1
+EOF
+
+ LIBS="-ldmalloc $LIBS"
+
+fi
+
+fi
+
+fi
+
+echo "$as_me:15459: checking if you want to use dbmalloc for testing" >&5
+echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
+
+# Check whether --with-dbmalloc or --without-dbmalloc was given.
+if test "${with_dbmalloc+set}" = set; then
+ withval="$with_dbmalloc"
+
+cat >>confdefs.h <<EOF
+#define USE_DBMALLOC 1
+EOF
+
+ : ${with_cflags:=-g}
+ : ${with_no_leaks:=yes}
+ with_dbmalloc=yes
+else
+ with_dbmalloc=
+fi;
+echo "$as_me:15476: result: ${with_dbmalloc:-no}" >&5
+echo "${ECHO_T}${with_dbmalloc:-no}" >&6
+
+case .$with_cflags in #(vi
+.*-g*)
+ case .$CFLAGS in #(vi
+ .*-g*) #(vi
+ ;;
+ *)
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -g
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+ esac
+ ;;
+esac
+
+if test "$with_dbmalloc" = yes ; then
+ echo "$as_me:15570: checking for dbmalloc.h" >&5
+echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
+if test "${ac_cv_header_dbmalloc_h+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15576 "configure"
+#include "confdefs.h"
+#include <dbmalloc.h>
+_ACEOF
+if { (eval echo "$as_me:15580: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ egrep -v '^ *\+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:15586: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_cv_header_dbmalloc_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_dbmalloc_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:15605: result: $ac_cv_header_dbmalloc_h" >&5
+echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
+if test $ac_cv_header_dbmalloc_h = yes; then
+
+echo "$as_me:15609: checking for debug_malloc in -ldbmalloc" >&5
+echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
+if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldbmalloc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 15617 "configure"
+#include "confdefs.h"
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char debug_malloc ();
+int
+main ()
+{
+debug_malloc ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15636: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15639: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15642: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15645: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dbmalloc_debug_malloc=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dbmalloc_debug_malloc=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:15656: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
+if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
+ cat >>confdefs.h <<EOF
+#define HAVE_LIBDBMALLOC 1
+EOF
+
+ LIBS="-ldbmalloc $LIBS"
+
+fi
+
+fi
+
+fi
+
+echo "$as_me:15671: checking if you want to use valgrind for testing" >&5
+echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
+
+# Check whether --with-valgrind or --without-valgrind was given.
+if test "${with_valgrind+set}" = set; then
+ withval="$with_valgrind"
+
+cat >>confdefs.h <<EOF
+#define USE_VALGRIND 1
+EOF
+
+ : ${with_cflags:=-g}
+ : ${with_no_leaks:=yes}
+ with_valgrind=yes
+else
+ with_valgrind=
+fi;
+echo "$as_me:15688: result: ${with_valgrind:-no}" >&5
+echo "${ECHO_T}${with_valgrind:-no}" >&6
+
+case .$with_cflags in #(vi
+.*-g*)
+ case .$CFLAGS in #(vi
+ .*-g*) #(vi
+ ;;
+ *)
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -g
+do
+case $cf_fix_cppflags in
+no)
+ case $cf_add_cflags in #(vi
+ -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+ case $cf_add_cflags in
+ -D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ *$cf_add_cflags) #(vi
+ ;;
+ *) #(vi
+ case $cf_add_cflags in #(vi
+ -D*)
+ cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
+
+CPPFLAGS=`echo "$CPPFLAGS" | \
+ sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
+ -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
+
+ ;;
+ esac
+ cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+ *)
+ cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ ;;
+ esac
+ ;;
+yes)
+ cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ CFLAGS="$CFLAGS $cf_new_cflags"
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+fi
+
+ ;;
+ esac
+ ;;
+esac
+
+echo "$as_me:15781: checking if you want to perform memory-leak testing" >&5
+echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
+
+# Check whether --enable-leaks or --disable-leaks was given.
+if test "${enable_leaks+set}" = set; then
+ enableval="$enable_leaks"
+ if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
+else
+ : ${with_no_leaks:=no}
+fi;
+echo "$as_me:15791: result: $with_no_leaks" >&5
+echo "${ECHO_T}$with_no_leaks" >&6
+
+if test "$with_no_leaks" = yes ; then
+
+cat >>confdefs.h <<\EOF
+#define NO_LEAKS 1
+EOF
+
+cat >>confdefs.h <<\EOF
+#define YY_NO_LEAKS 1
+EOF
+
+fi
+
+LD_RPATH_OPT=
+echo "$as_me:15807: checking for an rpath option" >&5
+echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
+case $cf_cv_system_name in #(vi
+irix*) #(vi
+ if test "$GCC" = yes; then
+ LD_RPATH_OPT="-Wl,-rpath,"
+ else
+ LD_RPATH_OPT="-rpath "
+ fi
+ ;;
+linux*|gnu*|k*bsd*-gnu) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+openbsd[2-9].*|mirbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+dragonfly*|freebsd*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+netbsd*) #(vi
+ LD_RPATH_OPT="-Wl,-rpath,"
+ ;;
+osf*|mls+*) #(vi
+ LD_RPATH_OPT="-rpath "
+ ;;
+solaris2*) #(vi
+ LD_RPATH_OPT="-R"
+ ;;
+*)
+ ;;
+esac
+echo "$as_me:15838: result: $LD_RPATH_OPT" >&5
+echo "${ECHO_T}$LD_RPATH_OPT" >&6
+
+case "x$LD_RPATH_OPT" in #(vi
+x-R*)
+ echo "$as_me:15843: checking if we need a space after rpath option" >&5
+echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
+ cf_save_LIBS="$LIBS"
+ LIBS="${LD_RPATH_OPT}$libdir $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15848 "configure"
+#include "confdefs.h"
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15860: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15863: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15866: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15869: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_rpath_space=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_rpath_space=yes
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$cf_save_LIBS"
+ echo "$as_me:15879: result: $cf_rpath_space" >&5
+echo "${ECHO_T}$cf_rpath_space" >&6
+ test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
+ ;;
+esac
+
+echo "$as_me:15885: checking if rpath-hack should be disabled" >&5
+echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
+
+# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
+if test "${enable_rpath_hack+set}" = set; then
+ enableval="$enable_rpath_hack"
+ test "$enableval" != no && enableval=yes
+ if test "$enableval" != "yes" ; then
+ cf_disable_rpath_hack=yes
+ else
+ cf_disable_rpath_hack=no
+ fi
+else
+ enableval=yes
+ cf_disable_rpath_hack=no
+
+fi;
+echo "$as_me:15902: result: $cf_disable_rpath_hack" >&5
+echo "${ECHO_T}$cf_disable_rpath_hack" >&6
+if test "$cf_disable_rpath_hack" = no ; then
+
+echo "$as_me:15906: checking for updated LDFLAGS" >&5
+echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
+if test -n "$LD_RPATH_OPT" ; then
+ echo "$as_me:15909: result: maybe" >&5
+echo "${ECHO_T}maybe" >&6
+
+ for ac_prog in ldd
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:15916: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$cf_ldd_prog"; then
+ ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
+else
+ ac_save_IFS=$IFS; IFS=$ac_path_separator
+ac_dummy="$PATH"
+for ac_dir in $ac_dummy; do
+ IFS=$ac_save_IFS
+ test -z "$ac_dir" && ac_dir=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_cf_ldd_prog="$ac_prog"
+echo "$as_me:15931: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
+if test -n "$cf_ldd_prog"; then
+ echo "$as_me:15939: result: $cf_ldd_prog" >&5
+echo "${ECHO_T}$cf_ldd_prog" >&6
+else
+ echo "$as_me:15942: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$cf_ldd_prog" && break
+done
+test -n "$cf_ldd_prog" || cf_ldd_prog="no"
+
+ cf_rpath_list="/usr/lib /lib"
+ if test "$cf_ldd_prog" != no
+ then
+ cf_rpath_oops=
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 15956 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main ()
+{
+printf("Hello");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15968: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15971: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15974: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15977: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
+ cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+ # If we passed the link-test, but get a "not found" on a given library,
+ # this could be due to inept reconfiguration of gcc to make it only
+ # partly honor /usr/local/lib (or whatever). Sometimes this behavior
+ # is intentional, e.g., installing gcc in /usr/bin and suppressing the
+ # /usr/local libraries.
+ if test -n "$cf_rpath_oops"
+ then
+ for cf_rpath_src in $cf_rpath_oops
+ do
+ for cf_rpath_dir in \
+ /usr/local \
+ /usr/pkg \
+ /opt/sfw
+ do
+ if test -f $cf_rpath_dir/lib/$cf_rpath_src
+ then
+ test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
+
+echo "${as_me:-configure}:16005: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+
+ LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
+ break
+ fi
+ done
+ done
+ fi
+ fi
+
+ test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:16017: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+
+test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:16021: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+
+cf_rpath_dst=
+for cf_rpath_src in $LDFLAGS
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
+ fi
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+
+echo "${as_me:-configure}:16058: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+LDFLAGS=$cf_rpath_dst
+
+test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:16071: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+
+test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
+
+echo "${as_me:-configure}:16075: testing ...checking LIBS $LIBS ..." 1>&5
+
+cf_rpath_dst=
+for cf_rpath_src in $LIBS
+do
+ case $cf_rpath_src in #(vi
+ -L*) #(vi
+
+ # check if this refers to a directory which we will ignore
+ cf_rpath_skip=no
+ if test -n "$cf_rpath_list"
+ then
+ for cf_rpath_item in $cf_rpath_list
+ do
+ if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
+ then
+ cf_rpath_skip=yes
+ break
+ fi
+ done
+ fi
+
+ if test "$cf_rpath_skip" = no
+ then
+ # transform the option
+ if test "$LD_RPATH_OPT" = "-R " ; then
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
+ else
+ cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
+ fi
+
+ # if we have not already added this, add it now
+ cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
+ if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
+ then
+ test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
+
+echo "${as_me:-configure}:16112: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+
+ EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
+ fi
+ fi
+ ;;
+ esac
+ cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
+done
+LIBS=$cf_rpath_dst
+
+test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
+
+echo "${as_me:-configure}:16125: testing ...checked LIBS $LIBS ..." 1>&5
+
+ test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
+
+echo "${as_me:-configure}:16129: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+
+else
+ echo "$as_me:16132: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+
TEST_ARGS="$LIBS"
LIBS=
@@ -15188,7 +16219,7 @@ DEFS=-DHAVE_CONFIG_H
: ${CONFIG_STATUS=./config.status}
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:15191: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:16222: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -15320,7 +16351,7 @@ EOF
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.52.20101002,
+configured by $0, generated by GNU Autoconf 2.52.20121002,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -15364,7 +16395,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:15367: error: ambiguous option: $1
+ { { echo "$as_me:16398: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
@@ -15383,7 +16414,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:15386: error: unrecognized option: $1
+ -*) { { echo "$as_me:16417: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
@@ -15402,7 +16433,7 @@ cat >&5 << _ACEOF
## Running config.status. ##
## ----------------------- ##
-This file was extended by $as_me 2.52.20101002, executed with
+This file was extended by $as_me 2.52.20121002, executed with
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -15419,7 +16450,9 @@ cat >>$CONFIG_STATUS <<EOF
#
AWK="$AWK"
+ECHO_CC="$ECHO_CC"
ECHO_LD="$ECHO_LD"
+SHOW_CC="$SHOW_LD"
EOF
@@ -15431,7 +16464,7 @@ do
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
- *) { { echo "$as_me:15434: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:16467: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -15490,6 +16523,7 @@ s,@program_transform_name@,$program_transform_name,;t t
s,@bindir@,$bindir,;t t
s,@sbindir@,$sbindir,;t t
s,@libexecdir@,$libexecdir,;t t
+s,@datarootdir@,$datarootdir,;t t
s,@datadir@,$datadir,;t t
s,@sysconfdir@,$sysconfdir,;t t
s,@sharedstatedir@,$sharedstatedir,;t t
@@ -15529,6 +16563,7 @@ s,@CPPFLAGS@,$CPPFLAGS,;t t
s,@ac_ct_CC@,$ac_ct_CC,;t t
s,@EXEEXT@,$EXEEXT,;t t
s,@OBJEXT@,$OBJEXT,;t t
+s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
s,@CPP@,$CPP,;t t
s,@AWK@,$AWK,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
@@ -15541,6 +16576,7 @@ s,@ETAGS@,$ETAGS,;t t
s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
s,@MATH_LIB@,$MATH_LIB,;t t
+s,@top_builddir@,$top_builddir,;t t
s,@CC_G_OPT@,$CC_G_OPT,;t t
s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
@@ -15561,25 +16597,30 @@ s,@PTHREAD@,$PTHREAD,;t t
s,@TEST_ARGS@,$TEST_ARGS,;t t
s,@TEST_DEPS@,$TEST_DEPS,;t t
s,@TEST_LIBS@,$TEST_LIBS,;t t
-s,@TINFO_ARGS@,$TINFO_ARGS,;t t
+s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
+s,@TINFO_LIBS@,$TINFO_LIBS,;t t
s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
-s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
+s,@includesubdir@,$includesubdir,;t t
+s,@PKG_CONFIG@,$PKG_CONFIG,;t t
+s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
s,@ECHO_LT@,$ECHO_LT,;t t
s,@ECHO_LD@,$ECHO_LD,;t t
s,@RULE_CC@,$RULE_CC,;t t
s,@SHOW_CC@,$SHOW_CC,;t t
s,@ECHO_CC@,$ECHO_CC,;t t
-s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
-s,@PKG_CONFIG@,$PKG_CONFIG,;t t
-s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
+s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
s,@X_CFLAGS@,$X_CFLAGS,;t t
s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
s,@X_LIBS@,$X_LIBS,;t t
s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
-s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
+s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
+s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
+s,@cf_ldd_prog@,$cf_ldd_prog,;t t
+s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
CEOF
EOF
@@ -15694,7 +16735,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:15697: creating $ac_file" >&5
+ { echo "$as_me:16738: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -15712,7 +16753,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:15715: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16756: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -15725,13 +16766,45 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:15728: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16769: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
EOF
+cat >>$CONFIG_STATUS <<\EOF
+ ac_warn_datarootdir=no
+ if test x"$ac_file" != x-; then
+ for ac_item in $ac_file_inputs
+ do
+ ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
+ if test -n "$ac_seen"; then
+ ac_used=`grep '@datarootdir@' $ac_item`
+ if test -z "$ac_used"; then
+ { echo "$as_me:16785: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used implicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ fi
+ ac_seen=`grep '${datarootdir}' $ac_item`
+ if test -n "$ac_seen"; then
+ { echo "$as_me:16794: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: datarootdir was used explicitly but not set:
+$ac_seen" >&2;}
+ ac_warn_datarootdir=yes
+ fi
+ done
+ fi
+
+if test "x$ac_warn_datarootdir" = xyes; then
+ ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
+fi
+
+EOF
cat >>$CONFIG_STATUS <<EOF
sed "$ac_vpsub
$extrasub
@@ -15746,11 +16819,35 @@ s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
+ cp $tmp/out $ac_file
+
+ for ac_name in prefix exec_prefix datarootdir
+ do
+ ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
+ if test -n "$ac_seen"; then
+ ac_init=`egrep '[ ]*'$ac_name'[ ]*=' $ac_file`
+ if test -z "$ac_init"; then
+ ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
+ { echo "$as_me:16831: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&5
+echo "$as_me: WARNING: Variable $ac_name is used but was not set:
+$ac_seen" >&2;}
+ fi
+ fi
+ done
+ egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
+ egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
+ if test -s $tmp/out; then
+ ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
+ { echo "$as_me:16842: WARNING: Some variables may not be substituted:
+$ac_seen" >&5
+echo "$as_me: WARNING: Some variables may not be substituted:
+$ac_seen" >&2;}
+ fi
else
cat $tmp/out
- rm -f $tmp/out
fi
+ rm -f $tmp/out
done
EOF
@@ -15791,7 +16888,7 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
* ) ac_file_in=$ac_file.in ;;
esac
- test x"$ac_file" != x- && { echo "$as_me:15794: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:16891: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -15802,7 +16899,7 @@ echo "$as_me: creating $ac_file" >&6;}
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:15805: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:16902: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -15815,7 +16912,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:15818: error: cannot find input file: $f" >&5
+ { { echo "$as_me:16915: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -15873,7 +16970,7 @@ cat >>$CONFIG_STATUS <<\EOF
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
- { echo "$as_me:15876: $ac_file is unchanged" >&5
+ { echo "$as_me:16973: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -15949,7 +17046,8 @@ do
\$(MODEL)/$N.o : \$(srcdir)/$N.c \\
\$(srcdir)/test.priv.h \\
ncurses_cfg.h
- @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
+ $SHOW_CC
+ $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
TEST_EOF
done
diff --git a/test/configure.in b/test/configure.in
index 5ffd3e87bcc0..c9938372e959 100644
--- a/test/configure.in
+++ b/test/configure.in
@@ -1,5 +1,5 @@
dnl***************************************************************************
-dnl Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+dnl Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
dnl *
dnl Permission is hereby granted, free of charge, to any person obtaining a *
dnl copy of this software and associated documentation files (the *
@@ -28,7 +28,7 @@ dnl***************************************************************************
dnl
dnl Author: Thomas E. Dickey 1996, etc.
dnl
-dnl $Id: configure.in,v 1.90 2011/03/22 09:15:08 tom Exp $
+dnl $Id: configure.in,v 1.113 2013/10/19 21:03:17 tom Exp $
dnl This is a simple configuration-script for the ncurses test programs that
dnl allows the test-directory to be separately configured against a reference
dnl system (i.e., sysvr4 curses)
@@ -38,7 +38,7 @@ dnl It's only for testing purposes.
dnl
dnl See http://invisible-island.net/autoconf/ for additional information.
dnl ---------------------------------------------------------------------------
-AC_PREREQ(2.13.20020210)
+AC_PREREQ(2.52.20030208)
AC_INIT(ncurses.c)
AC_CONFIG_HEADER(ncurses_cfg.h:ncurses_tst.hin)
@@ -49,17 +49,18 @@ CF_CHECK_CACHE
AC_ARG_PROGRAM
AC_PROG_MAKE_SET
-AC_PROG_CC
+CF_PROG_CC
AC_PROG_CPP
AC_PROG_AWK
CF_PROG_INSTALL
CF_PROG_LINT
CF_MAKE_TAGS
-CF_MATH_LIB(MATH_LIB,sin(x))
+CF_MATH_LIB(MATH_LIB,pow(sin(x),x))
AC_SUBST(MATH_LIB)
dnl Things that we don't need (or must override) if we're not building ncurses
+CF_TOP_BUILDDIR
CC_G_OPT="-g" AC_SUBST(CC_G_OPT)
CC_SHARED_OPTS=unknown AC_SUBST(CC_SHARED_OPTS)
CPPFLAGS="$CPPFLAGS" AC_SUBST(CPPFLAGS)
@@ -81,9 +82,11 @@ PTHREAD="-lm" AC_SUBST(PTHREAD)
TEST_ARGS="" AC_SUBST(TEST_ARGS)
TEST_DEPS="" AC_SUBST(TEST_DEPS)
TEST_LIBS="" AC_SUBST(TEST_LIBS)
-TINFO_ARGS='$(LIBS_CURSES)' AC_SUBST(TINFO_ARGS)
+TINFO_LDFLAGS='' AC_SUBST(TINFO_LDFLAGS)
+TINFO_LIBS='$(LIBS_CURSES)' AC_SUBST(TINFO_LIBS)
cf_cv_abi_version="" AC_SUBST(cf_cv_abi_version)
cf_cv_rel_version="" AC_SUBST(cf_cv_rel_version)
+includesubdir="" AC_SUBST(includesubdir)
cf_cv_screen=curses
cf_cv_libtype=
@@ -91,55 +94,38 @@ cf_cv_libtype=
AC_EXEEXT
AC_OBJEXT
-CF_ANSI_CC_REQD
CF_GCC_ATTRIBUTES
CF_XOPEN_SOURCE
-AC_C_CONST
CF_SIG_ATOMIC_T
+dnl ---------------------------------------------------------------------------
+CF_HELP_MESSAGE(General Options:)
+CF_PKG_CONFIG
CF_DISABLE_ECHO
-CF_ENABLE_WARNINGS
-
-CF_DISABLE_LEAKS
-CF_WITH_CURSES_DIR
-
-dnl SunOS 4.x
-AC_ARG_WITH(5lib,
- [ --with-5lib use SunOS sysv-libraries],
- [LIBS="-L/usr/5lib $LIBS"
- CPPFLAGS="$CPPFLAGS -I/usr/5include"])
dnl ---------------------------------------------------------------------------
-dnl NcursesW, installed in conventional location
-AC_ARG_WITH(ncursesw,
- [ --with-ncursesw use wide ncurses-libraries (installed)],
- [cf_cv_screen=ncursesw],[
+CF_HELP_MESSAGE(Curses Version-dependent Options:)
+CF_NCURSES_WRAP_PREFIX
-dnl Ncurses, installed in conventional location
-AC_ARG_WITH(ncurses,
- [ --with-ncurses use ncurses-libraries (installed)],
- [cf_cv_screen=ncurses],[
+AC_MSG_CHECKING(if you want to check for wide-character functions)
+CF_ARG_DISABLE(widec,
+ [ --disable-widec disable checks for wide-character functions],
+ cf_enable_widec=no,
+ cf_enable_widec=yes,
+ yes)
+AC_MSG_RESULT($cf_enable_widec)
-AC_ARG_WITH(pdcurses,
- [ --with-pdcurses compile/link with pdcurses X11 library],
- [cf_cv_screen=pdcurses])])])
+dnl ---------------------------------------------------------------------------
+CF_HELP_MESSAGE(Curses Version-dependent Options:)
+CF_WITH_NCURSES_ETC
case $cf_cv_screen in
-curses)
- CF_CURSES_CONFIG
+curses|curses_*)
CF_NETBSD_FORM_H
CF_NETBSD_MENU_H
;;
-ncurses)
- CF_NCURSES_CONFIG
- ;;
ncursesw)
cf_cv_libtype=w
- CF_UTF8_LIB
- CF_NCURSES_CONFIG(ncursesw)
- ;;
-pdcurses) #(vi
- CF_PDCURSES_X11
;;
esac
@@ -153,9 +139,12 @@ pdcurses) #(vi
;;
*)
# look for curses-related libraries
- AC_CHECK_LIB(panel$cf_cv_libtype,new_panel)
- AC_CHECK_LIB(menu$cf_cv_libtype,menu_driver)
- AC_CHECK_LIB(form$cf_cv_libtype,form_driver)
+ : ${cf_panel_lib:=panel}
+ : ${cf_menu_lib:=menu}
+ : ${cf_form_lib:=form}
+ AC_CHECK_LIB($cf_panel_lib$cf_cv_libtype,new_panel)
+ AC_CHECK_LIB($cf_menu_lib$cf_cv_libtype,menu_driver)
+ AC_CHECK_LIB($cf_form_lib$cf_cv_libtype,form_driver)
# look for curses-related headers
AC_CHECK_HEADERS( \
@@ -169,8 +158,6 @@ pdcurses) #(vi
;;
esac
-AC_TYPE_SIGNAL
-
AC_STDC_HEADERS
AC_HEADER_TIME
AC_CHECK_HEADERS( \
@@ -185,20 +172,27 @@ termios.h \
unistd.h \
)
+CF_GETOPT_HEADER
+
AC_CHECK_FUNCS( \
gettimeofday \
+)
+
+if test "$cf_enable_widec" = yes; then
+AC_CHECK_FUNCS( \
mblen \
mbrlen \
mbrtowc \
mbsrtowcs \
mbstowcs \
mbtowc \
-strdup \
wcsrtombs \
wcstombs \
)
+fi
CF_CURSES_FUNCS( \
+assume_default_colors \
chgat \
color_set \
filter \
@@ -225,61 +219,104 @@ tigetnum \
tigetstr \
typeahead \
use_default_colors \
-vw_printw \
+use_screen \
+use_window \
vsscanf \
+vw_printw \
wchgat \
winsstr \
wresize \
wsyncdown \
)
+CF_TPUTS_PROTO
CF_NCURSES_EXT_FUNCS
-AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
-AC_TRY_LINK([
+if test "$cf_enable_widec" = yes
+then
+ # workaround for systems with ncurses before 20111029, due to change of
+ # feature test macro from _XPG5 to _XOPEN_SOURCE
+ if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
+ then
+ cf_define_xpg5=no
+ AC_MSG_CHECKING(if _XPG5 should be defined to enable wide-characters)
+
+ AC_TRY_COMPILE([
#include <${cf_cv_ncurses_header:-curses.h}>],
-[
- static wchar_t src_wchar[2];
- static cchar_t dst_cchar;
- setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
- ],
- [cf_cv_widechar_funcs=yes],
- [cf_cv_widechar_funcs=no])
-])
-if test "$cf_cv_widechar_funcs" != no ; then
- AC_DEFINE(USE_WIDEC_SUPPORT,1)
+ [int x = _XPG5],,
+ [cf_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -D_XPG5"
+ AC_TRY_COMPILE([
+#include <${cf_cv_ncurses_header:-curses.h}>],
+ [int x = _XPG5],
+ [cf_define_xpg5=yes])
+ CPPFLAGS="$cf_save_cppflags"])
+ AC_MSG_RESULT($cf_define_xpg5)
+
+ if test "$cf_define_xpg5" = yes
+ then
+ CPPFLAGS="$CPPFLAGS -D_XPG5"
+ fi
+ fi
+
+ AC_CACHE_CHECK(for wide-character functions,cf_cv_widechar_funcs,[
+ AC_TRY_LINK([
+#include <${cf_cv_ncurses_header:-curses.h}>],
+ [
+ static wchar_t src_wchar[2];
+ static cchar_t dst_cchar;
+ setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
+ ],
+ [cf_cv_widechar_funcs=yes],
+ [cf_cv_widechar_funcs=no])
+ ])
+ if test "$cf_cv_widechar_funcs" != no ; then
+ AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to enable wide-character support in (n)curses])
+ else
+ AC_DEFINE(USE_WIDEC_SUPPORT,0)
+ fi
else
AC_DEFINE(USE_WIDEC_SUPPORT,0)
fi
-AC_FUNC_VFORK
CF_SYS_TIME_SELECT
CF_FUNC_CURSES_VERSION
+
CF_CURSES_ACS_MAP
-CF_CURSES_WACS_MAP
-CF_CURSES_WACS_SYMBOLS
+if test "$cf_enable_widec" = yes; then
+ CF_CURSES_WACS_MAP
+ CF_CURSES_WACS_SYMBOLS
+fi
CF_CURSES_CHECK_TYPE(attr_t,long)
-CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T, NCURSES_OK_MBSTATE_T)
-CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T)
-CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T)
+if test "$cf_enable_widec" = yes; then
+ CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T, NCURSES_OK_MBSTATE_T)
+ CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T)
+ CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T)
-if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
- CF_CURSES_CHECK_TYPE(mbstate_t,long)
-fi
+ if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(mbstate_t,long)
+ fi
-if test "$NCURSES_OK_WCHAR_T" = 0 ; then
- CF_CURSES_CHECK_TYPE(wchar_t,long)
-fi
+ if test "$NCURSES_OK_WCHAR_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(wchar_t,long)
+ fi
-if test "$NCURSES_OK_WINT_T" = 0 ; then
- CF_CURSES_CHECK_TYPE(wint_t,long)
+ if test "$NCURSES_OK_WINT_T" = 0 ; then
+ CF_CURSES_CHECK_TYPE(wint_t,long)
+ fi
fi
CF_CURSES_CHECK_DATA(boolnames)
CF_CURSES_CHECK_DATA(boolfnames)
+dnl ---------------------------------------------------------------------------
+CF_HELP_MESSAGE(Testing/development Options:)
+CF_ENABLE_WARNINGS
+CF_DISABLE_LEAKS
+CF_DISABLE_RPATH_HACK
+
TEST_ARGS="$LIBS"
LIBS=
@@ -302,7 +339,8 @@ do
\$(MODEL)/$N.o : \$(srcdir)/$N.c \\
\$(srcdir)/test.priv.h \\
ncurses_cfg.h
- @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
+ $SHOW_CC
+ $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
TEST_EOF
done
@@ -317,5 +355,7 @@ TEST_EOF
fi
],[
AWK="$AWK"
+ECHO_CC="$ECHO_CC"
ECHO_LD="$ECHO_LD"
+SHOW_CC="$SHOW_LD"
],cat)
diff --git a/test/demo_defkey.c b/test/demo_defkey.c
index ac6dc2df79e8..045c2c7bd3e8 100644
--- a/test/demo_defkey.c
+++ b/test/demo_defkey.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: demo_defkey.c,v 1.20 2010/11/14 00:59:35 tom Exp $
+ * $Id: demo_defkey.c,v 1.22 2013/09/28 22:02:17 tom Exp $
*
* Demonstrate the define_key() function.
* Thomas Dickey - 2002/11/23
@@ -106,7 +106,7 @@ visible(const char *string)
for (pass = 0; pass < 2; ++pass) {
for (n = 0; string[n] != '\0'; ++n) {
char temp[80];
- strcpy(temp, visichar(string[n]));
+ strncpy(temp, visichar(string[n]), sizeof(temp) - 2);
if (pass)
strcat(result, temp);
else
@@ -116,7 +116,7 @@ visible(const char *string)
result = typeCalloc(char, need);
}
} else {
- result = typeCalloc(char, 1);
+ result = typeCalloc(char, (size_t) 1);
}
return result;
}
@@ -186,9 +186,9 @@ duplicate(WINDOW *win, NCURSES_CONST char *name, int code)
const char *prefix = 0;
char temp[BUFSIZ];
- if (!strncmp(value, "\033[", 2)) {
+ if (!strncmp(value, "\033[", (size_t) 2)) {
prefix = "\033O";
- } else if (!strncmp(value, "\033O", 2)) {
+ } else if (!strncmp(value, "\033O", (size_t) 2)) {
prefix = "\033[";
}
if (prefix != 0) {
diff --git a/test/demo_forms.c b/test/demo_forms.c
index afa4ed32c22d..1e6806d2e523 100644
--- a/test/demo_forms.c
+++ b/test/demo_forms.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: demo_forms.c,v 1.38 2011/01/15 18:15:11 tom Exp $
+ * $Id: demo_forms.c,v 1.46 2013/09/28 21:55:54 tom Exp $
*
* Demonstrate a variety of functions from the form library.
* Thomas Dickey - 2003/4/26
@@ -70,14 +70,115 @@ set_max_field -
#include <edit_field.h>
+typedef struct {
+ char *name;
+ char *value;
+} MY_DATA;
+
+static MY_DATA *my_data;
+
static int d_option = 0;
static int j_value = 0;
static int m_value = 0;
static int o_value = 0;
static char *t_value = 0;
+static void
+failed(const char *s)
+{
+ perror(s);
+ ExitProgram(EXIT_FAILURE);
+}
+
+static void
+chomp(char *value)
+{
+ size_t have = strlen(value);
+ while (have != 0 && (value[have - 1] == '\n' || value[have - 1] == '\r')) {
+ value[--have] = '\0';
+ }
+}
+
+static int
+trimmed(const char *value)
+{
+ int result = (int) strlen(value);
+ while (result > 0 && isspace(UChar(value[result - 1]))) {
+ --result;
+ }
+ return result;
+}
+
+static char *
+get_data(const char *name)
+{
+ char *result = t_value;
+ if (my_data != 0) {
+ int n;
+ for (n = 0; my_data[n].name != 0; ++n) {
+ if (!strcmp(name, my_data[n].name)) {
+ result = my_data[n].value;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+/*
+ * Read (possibly) multi-line data with name+value pairs.
+ */
+static void
+read_data(const char *filename)
+{
+ FILE *fp = fopen(filename, "r");
+
+ if (fp != 0) {
+ char buffer[BUFSIZ];
+ char *colon;
+ int more = 0;
+ int item = 0;
+
+ my_data = typeCalloc(MY_DATA, (size_t) 100); /* FIXME */
+ while (fgets(buffer, sizeof(buffer), fp) != 0) {
+ chomp(buffer);
+ if (more) {
+ if (strcmp(buffer, ".")) {
+ char *prior = my_data[more - 1].value;
+ size_t need = strlen(buffer) + 2 + strlen(prior);
+ char *value = typeRealloc(char, need, prior);
+ if (value == 0)
+ failed("realloc");
+ strcat(value, "\n");
+ strcat(value, buffer);
+ my_data[more - 1].value = value;
+ } else {
+ more = 0;
+ }
+ } else if (*buffer == '#') {
+ continue;
+ } else if ((colon = strchr(buffer, ':')) != 0) {
+ char *name;
+ char *value;
+ *colon++ = '\0';
+ name = strdup(buffer);
+ value = strdup(colon);
+ if (name == 0 || value == 0)
+ failed("strdup");
+ my_data[item].name = name;
+ my_data[item].value = value;
+ more = ++item;
+ } else {
+ failed("expected a colon");
+ }
+ }
+ } else {
+ failed(filename);
+ }
+}
+
static FIELD *
-make_label(int frow, int fcol, NCURSES_CONST char *label)
+make_label(const char *label, int frow, int fcol)
{
FIELD *f = new_field(1, (int) strlen(label), frow, fcol, 0, 0);
@@ -92,13 +193,11 @@ make_label(int frow, int fcol, NCURSES_CONST char *label)
* Define each field with an extra one, for reflecting "actual" text.
*/
static FIELD *
-make_field(int frow, int fcol, int rows, int cols)
+make_field(const char *label, int frow, int fcol, int rows, int cols)
{
FIELD *f = new_field(rows, cols, frow, fcol, o_value, 1);
if (f) {
- FieldAttrs *ptr;
-
set_field_back(f, A_UNDERLINE);
/*
* If -j and -d options are combined, -j loses. It is documented in
@@ -108,7 +207,7 @@ make_field(int frow, int fcol, int rows, int cols)
set_field_just(f, j_value);
if (d_option) {
if (has_colors()) {
- set_field_fore(f, COLOR_PAIR(2));
+ set_field_fore(f, (chtype) COLOR_PAIR(2));
set_field_back(f, A_UNDERLINE | COLOR_PAIR(3));
} else {
set_field_fore(f, A_BOLD);
@@ -121,17 +220,7 @@ make_field(int frow, int fcol, int rows, int cols)
set_max_field(f, m_value);
}
- /*
- * The userptr is used in edit_field.c's inactive_field().
- */
- ptr = (FieldAttrs *) field_userptr(f);
- if (ptr == 0) {
- ptr = typeCalloc(FieldAttrs, 1);
- ptr->background = field_back(f);
- }
- set_field_userptr(f, (void *) ptr);
- if (t_value)
- set_field_buffer(f, 0, t_value);
+ init_edit_field(f, get_data(label));
}
return (f);
}
@@ -153,10 +242,10 @@ display_form(FORM * f)
set_form_sub(f, derwin(w, rows, cols, 1, 2));
box(w, 0, 0);
keypad(w, TRUE);
- }
- if (post_form(f) != E_OK)
- wrefresh(w);
+ if (post_form(f) != E_OK)
+ wrefresh(w);
+ }
}
static void
@@ -257,7 +346,7 @@ show_current_field(WINDOW *win, FORM * form)
int currow, curcol;
if (has_colors()) {
- wbkgd(win, COLOR_PAIR(1));
+ wbkgd(win, (chtype) COLOR_PAIR(1));
}
werase(win);
form_getyx(form, currow, curcol);
@@ -309,25 +398,28 @@ show_current_field(WINDOW *win, FORM * form)
}
waddch(win, ' ');
- (void) wattrset(win, field_fore(field));
+ (void) wattrset(win, (int) field_fore(field));
waddstr(win, "fore");
- wattroff(win, field_fore(field));
+ wattroff(win, (int) field_fore(field));
waddch(win, '/');
- (void) wattrset(win, field_back(field));
+ (void) wattrset(win, (int) field_back(field));
waddstr(win, "back");
- wattroff(win, field_back(field));
+ wattroff(win, (int) field_back(field));
- wprintw(win, ", pad '%c'",
- field_pad(field));
+ wprintw(win, ", pad '%c'", field_pad(field));
waddstr(win, "\n");
for (nbuf = 0; nbuf <= 2; ++nbuf) {
if ((buffer = field_buffer(field, nbuf)) != 0) {
wprintw(win, "buffer %d:", nbuf);
(void) wattrset(win, A_REVERSE);
- waddstr(win, buffer);
+ if (nbuf) {
+ waddnstr(win, buffer, trimmed(buffer));
+ } else {
+ waddstr(win, buffer);
+ }
wattroff(win, A_REVERSE);
waddstr(win, "\n");
}
@@ -341,11 +433,12 @@ demo_forms(void)
{
WINDOW *w;
FORM *form;
- FIELD *f[100]; /* FIXME memset to zero */
+ FIELD *f[100]; /* will memset to zero */
int finished = 0, c;
unsigned n = 0;
int pg;
WINDOW *also;
+ const char *fname;
#ifdef NCURSES_MOUSE_VERSION
mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
@@ -363,66 +456,76 @@ demo_forms(void)
for (pg = 0; pg < 4; ++pg) {
char label[80];
sprintf(label, "Sample Form Page %d", pg + 1);
- f[n++] = make_label(0, 15, label);
+ f[n++] = make_label(label, 0, 15);
set_new_page(f[n - 1], TRUE);
switch (pg) {
default:
- f[n++] = make_label(2, 0, "Last Name");
- f[n++] = make_field(3, 0, 1, 18);
+ fname = "Last Name";
+ f[n++] = make_label(fname, 2, 0);
+ f[n++] = make_field(fname, 3, 0, 1, 18);
set_field_type(f[n - 1], TYPE_ALPHA, 1);
- f[n++] = make_label(2, 20, "First Name");
- f[n++] = make_field(3, 20, 1, 12);
+ fname = "First Name";
+ f[n++] = make_label(fname, 2, 20);
+ f[n++] = make_field(fname, 3, 20, 1, 12);
set_field_type(f[n - 1], TYPE_ALPHA, 1);
- f[n++] = make_label(2, 34, "Middle Name");
- f[n++] = make_field(3, 34, 1, 12);
+ fname = "Middle Name";
+ f[n++] = make_label(fname, 2, 34);
+ f[n++] = make_field(fname, 3, 34, 1, 12);
set_field_type(f[n - 1], TYPE_ALPHA, 1);
break;
case 1:
- f[n++] = make_label(2, 0, "Last Name");
- f[n++] = make_field(3, 0, 1, 18);
+ fname = "Last Name";
+ f[n++] = make_label(fname, 2, 0);
+ f[n++] = make_field(fname, 3, 0, 1, 18);
set_field_type(f[n - 1], TYPE_ALPHA, 1);
- f[n++] = make_label(2, 20, "First Name");
- f[n++] = make_field(3, 20, 1, 12);
+ fname = "First Name";
+ f[n++] = make_label(fname, 2, 20);
+ f[n++] = make_field(fname, 3, 20, 1, 12);
set_field_type(f[n - 1], TYPE_ALPHA, 1);
- f[n++] = make_label(2, 34, "MI");
- f[n++] = make_field(3, 34, 1, 1);
+ fname = "MI";
+ f[n++] = make_label(fname, 2, 34);
+ f[n++] = make_field(fname, 3, 34, 1, 1);
set_field_pad(f[n - 1], '?');
set_field_type(f[n - 1], TYPE_ALPHA, 1);
break;
case 2:
- f[n++] = make_label(2, 0, "Host Name");
- f[n++] = make_field(3, 0, 1, 18);
+ fname = "Host Name";
+ f[n++] = make_label(fname, 2, 0);
+ f[n++] = make_field(fname, 3, 0, 1, 24);
set_field_type(f[n - 1], TYPE_ALNUM, 1);
#ifdef NCURSES_VERSION
- f[n++] = make_label(2, 20, "IP Address");
- f[n++] = make_field(3, 20, 1, 12);
+ fname = "IP Address";
+ f[n++] = make_label(fname, 2, 26);
+ f[n++] = make_field(fname, 3, 26, 1, 16);
set_field_type(f[n - 1], TYPE_IPV4, 1);
#endif
break;
case 3:
- f[n++] = make_label(2, 0, "Four digits");
- f[n++] = make_field(3, 0, 1, 18);
+ fname = "Four digits";
+ f[n++] = make_label(fname, 2, 0);
+ f[n++] = make_field(fname, 3, 0, 1, 18);
set_field_type(f[n - 1], TYPE_INTEGER, 4, 0, 0);
- f[n++] = make_label(2, 20, "Numeric");
- f[n++] = make_field(3, 20, 1, 12);
+ fname = "Numeric";
+ f[n++] = make_label(fname, 2, 20);
+ f[n++] = make_field(fname, 3, 20, 1, 12);
set_field_type(f[n - 1], TYPE_NUMERIC, 3, -10000.0, 100000000.0);
break;
}
- f[n++] = make_label(5, 0, "Comments");
- f[n++] = make_field(6, 0, 4, 46);
- set_field_buffer(f[n - 1], 0, "HELLO\nWORLD!");
- set_field_buffer(f[n - 1], 1, "Hello\nWorld!");
+ fname = "Comments";
+ f[n++] = make_label(fname, 5, 0);
+ f[n++] = make_field(fname, 6, 0, 4, 46);
+ init_edit_field(f[n - 1], get_data(fname));
}
f[n] = (FIELD *) 0;
@@ -471,7 +574,7 @@ usage(void)
{
static const char *tbl[] =
{
- "Usage: demo_forms [options]"
+ "Usage: demo_forms [options] [data file]"
,""
," -d make fields dynamic"
," -j value justify (1=left, 2=center, 3=right)"
@@ -517,6 +620,9 @@ main(int argc, char *argv[])
}
}
+ while (optind < argc) {
+ read_data(argv[optind++]);
+ }
initscr();
cbreak();
@@ -531,7 +637,7 @@ main(int argc, char *argv[])
init_pair(1, COLOR_WHITE, COLOR_BLUE);
init_pair(2, COLOR_GREEN, COLOR_BLACK);
init_pair(3, COLOR_CYAN, COLOR_BLACK);
- bkgd(COLOR_PAIR(1));
+ bkgd((chtype) COLOR_PAIR(1));
refresh();
}
@@ -540,6 +646,7 @@ main(int argc, char *argv[])
endwin();
ExitProgram(EXIT_SUCCESS);
}
+
#else
int
main(void)
diff --git a/test/demo_forms.txt b/test/demo_forms.txt
new file mode 100644
index 000000000000..0763fc032901
--- /dev/null
+++ b/test/demo_forms.txt
@@ -0,0 +1,20 @@
+# $Id: demo_forms.txt,v 1.3 2013/06/08 14:10:15 tom Exp $
+First Name:John
+.
+Middle Name:Don
+.
+MI:D
+.
+Last Name:Smith
+.
+Comments:Hello
+World!
+.
+Host Name:localhost@localdomain
+.
+IP Address:192.168.1.100
+.
+Four digits:1234
+.
+Numeric:32768
+.
diff --git a/test/demo_menus.c b/test/demo_menus.c
index 4f758079e793..c742223f0375 100644
--- a/test/demo_menus.c
+++ b/test/demo_menus.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2005-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: demo_menus.c,v 1.32 2011/01/15 20:02:47 tom Exp $
+ * $Id: demo_menus.c,v 1.52 2013/09/28 21:55:02 tom Exp $
*
* Demonstrate a variety of functions from the menu library.
* Thomas Dickey - 2005/4/9
@@ -38,7 +38,6 @@ item_opts -
item_opts_off -
item_opts_on -
item_term -
-item_userptr -
item_visible -
menu_back -
menu_fore -
@@ -49,22 +48,16 @@ menu_opts -
menu_pad -
menu_request_by_name -
menu_request_name -
-menu_sub -
menu_term -
menu_userptr -
set_current_item -
-set_item_init -
set_item_opts -
-set_item_term -
-set_item_userptr -
set_menu_grey -
-set_menu_init -
set_menu_items -
set_menu_opts -
set_menu_pad -
set_menu_pattern -
set_menu_spacing -
-set_menu_term -
set_menu_userptr -
set_top_row -
top_row -
@@ -103,23 +96,21 @@ typedef enum {
#define MENU_Y 1
+typedef struct {
+ const char *name;
+ void (*func) (int);
+ unsigned mask;
+} MENU_DATA;
+
+static void call_files(int);
+
static MENU *mpBanner;
static MENU *mpFile;
static MENU *mpSelect;
-static bool loaded_file = FALSE;
+static WINDOW *status;
-#if !HAVE_STRDUP
-#define strdup my_strdup
-static char *
-strdup(char *s)
-{
- char *p = typeMalloc(char, strlen(s) + 1);
- if (p)
- strcpy(p, s);
- return (p);
-}
-#endif /* not HAVE_STRDUP */
+static bool loaded_file = FALSE;
/* Common function to allow ^T to toggle trace-mode in the middle of a test
* so that trace-files can be made smaller.
@@ -207,6 +198,48 @@ menu_offset(MenuNo number)
return result;
}
+static void
+my_menu_init(MENU * menu)
+{
+ Trace(("called MenuHook my_menu_init"));
+ mvwprintw(status, 2, 0, "menu_init %p", (void *) menu);
+ wclrtoeol(status);
+ wrefresh(status);
+}
+
+static void
+my_menu_term(MENU * menu)
+{
+ Trace(("called MenuHook my_menu_term"));
+ mvwprintw(status, 2, 0, "menu_term %p", (void *) menu);
+ wclrtoeol(status);
+ wrefresh(status);
+}
+
+static void
+my_item_init(MENU * menu)
+{
+ ITEM *item = current_item(menu);
+ const char *name = item_name(item);
+
+ Trace(("called MenuHook my_item_init (%s)", name));
+ mvwprintw(status, 2, 0, "item_init %s", name);
+ wclrtoeol(status);
+ wrefresh(status);
+}
+
+static void
+my_item_term(MENU * menu)
+{
+ ITEM *item = current_item(menu);
+ const char *name = item_name(item);
+
+ Trace(("called MenuHook my_item_term (%s)", name));
+ mvwprintw(status, 2, 0, "item_term %s", name);
+ wclrtoeol(status);
+ wrefresh(status);
+}
+
static MENU *
menu_create(ITEM ** items, int count, int ncols, MenuNo number)
{
@@ -225,8 +258,8 @@ menu_create(ITEM ** items, int count, int ncols, MenuNo number)
result = new_menu(items);
if (has_colors()) {
- set_menu_fore(result, COLOR_PAIR(1));
- set_menu_back(result, COLOR_PAIR(2));
+ set_menu_fore(result, (chtype) COLOR_PAIR(1));
+ set_menu_back(result, (chtype) COLOR_PAIR(2));
}
set_menu_format(result, maxrow, maxcol);
@@ -252,6 +285,10 @@ menu_create(ITEM ** items, int count, int ncols, MenuNo number)
post_menu(result);
+ set_menu_init(result, my_menu_init);
+ set_menu_term(result, my_menu_term);
+ set_item_init(result, my_item_init);
+ set_item_term(result, my_item_term);
return result;
}
@@ -281,12 +318,15 @@ menu_destroy(MENU * m)
free((char *) blob);
}
free(items);
+ items = 0;
}
#ifdef TRACE
if ((count > 0) && (m == mpTrace)) {
ITEM **ip = items;
- while (*ip)
- free(*ip++);
+ if (ip != 0) {
+ while (*ip)
+ free(*ip++);
+ }
}
#endif
}
@@ -305,21 +345,24 @@ menu_display(MENU * m)
static void
build_file_menu(MenuNo number)
{
- static CONST_MENUS char *labels[] =
+ static MENU_DATA table[] =
{
- "Exit",
- (char *) 0
+ {"Exit", call_files, 0},
+ {(char *) 0, 0, 0}
};
- static ITEM *items[SIZEOF(labels)];
+ static ITEM *items[SIZEOF(table)];
ITEM **ip = items;
- CONST_MENUS char **ap;
+ int n;
- for (ap = labels; *ap; ap++)
- *ip++ = new_item(*ap, "");
+ for (n = 0; table[n].name != 0; ++n) {
+ *ip = new_item(table[n].name, "");
+ set_item_userptr(*ip, &table[n]);
+ ++ip;
+ }
*ip = (ITEM *) 0;
- mpFile = menu_create(items, SIZEOF(labels) - 1, 1, number);
+ mpFile = menu_create(items, SIZEOF(table) - 1, 1, number);
}
static int
@@ -331,31 +374,40 @@ perform_file_menu(int cmd)
/*****************************************************************************/
static void
+call_select(int code)
+{
+ (void) code;
+ Trace(("Selected item %d", code));
+}
+
+static void
build_select_menu(MenuNo number, char *filename)
{
- static CONST_MENUS char *labels[] =
+#define MY_DATA(name) { name, call_select, 0 }
+ static MENU_DATA table[] =
{
- "Lions",
- "Tigers",
- "Bears",
- "(Oh my!)",
- "Newts",
- "Platypi",
- "Lemurs",
- "(Oh really?!)",
- "Leopards",
- "Panthers",
- "Pumas",
- "Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs",
- "Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs, Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs",
- (char *) 0
+ MY_DATA("Lions"),
+ MY_DATA("Tigers"),
+ MY_DATA("Bears"),
+ MY_DATA("(Oh my!)"),
+ MY_DATA("Newts"),
+ MY_DATA("Platypi"),
+ MY_DATA("Lemurs"),
+ MY_DATA("(Oh really?!)"),
+ MY_DATA("Leopards"),
+ MY_DATA("Panthers"),
+ MY_DATA("Pumas"),
+ MY_DATA("Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs"),
+ MY_DATA("Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs, Lions, Tigers, Bears, (Oh my!), Newts, Platypi, Lemurs"),
+ {(char *) 0, 0, 0}
};
static ITEM **items;
ITEM **ip;
- CONST_MENUS char **ap = 0;
- CONST_MENUS char **myList = 0;
- unsigned count = 0;
+ MENU_DATA *ap = 0;
+ MENU_DATA *myList = 0;
+ int i;
+ size_t count = 0;
if (filename != 0) {
struct stat sb;
@@ -365,7 +417,7 @@ build_select_menu(MenuNo number, char *filename)
size_t size = (size_t) sb.st_size;
unsigned j, k;
char *blob = typeMalloc(char, size + 1);
- CONST_MENUS char **list = typeCalloc(CONST_MENUS char *, size + 1);
+ MENU_DATA *list = typeCalloc(MENU_DATA, size + 1);
items = typeCalloc(ITEM *, size + 1);
Trace(("build_select_menu blob=%p, items=%p",
@@ -378,19 +430,19 @@ build_select_menu(MenuNo number, char *filename)
bool mark = TRUE;
for (j = k = 0; j < size; ++j) {
if (mark) {
- list[k++] = blob + j;
+ list[k++].name = blob + j;
mark = FALSE;
}
if (blob[j] == '\n') {
blob[j] = '\0';
- if (k > 0 && *list[k - 1] == '\0')
+ if (k > 0 && *list[k - 1].name == '\0')
--k;
mark = TRUE;
} else if (blob[j] == '\t') {
blob[j] = ' '; /* menu items are printable */
}
}
- list[k] = 0;
+ list[k].name = 0;
count = k;
ap = myList = list;
}
@@ -398,17 +450,24 @@ build_select_menu(MenuNo number, char *filename)
}
loaded_file = TRUE;
}
+ if (ap == 0)
+ free(items);
}
}
if (ap == 0) {
- count = SIZEOF(labels) - 1;
+ count = SIZEOF(table) - 1;
items = typeCalloc(ITEM *, count + 1);
- ap = labels;
+ ap = table;
}
ip = items;
- while (*ap != 0)
- *ip++ = new_item(*ap++, "");
+ for (i = 0; ap[i].name != 0; ++i) {
+ ap[i].func = call_select;
+ ap[i].mask = (unsigned) i;
+ *ip = new_item(ap[i].name, "");
+ set_item_userptr(*ip, &table[i]);
+ ++ip;
+ }
*ip = 0;
mpSelect = menu_create(items, (int) count, 1, number);
@@ -425,30 +484,36 @@ perform_select_menu(int cmd)
/*****************************************************************************/
#ifdef TRACE
-#define T_TBL(name) { #name, name }
-static struct {
- const char *name;
- unsigned mask;
-} t_tbl[] = {
+
+static void
+call_trace(int code)
+{
+ (void) code;
+ Trace(("Updating trace mask %d", code));
+}
+
+#define T_TBL(name) { #name, call_trace, name }
+static MENU_DATA t_tbl[] =
+{
T_TBL(TRACE_DISABLE),
- T_TBL(TRACE_TIMES),
- T_TBL(TRACE_TPUTS),
- T_TBL(TRACE_UPDATE),
- T_TBL(TRACE_MOVE),
- T_TBL(TRACE_CHARPUT),
- T_TBL(TRACE_ORDINARY),
- T_TBL(TRACE_CALLS),
- T_TBL(TRACE_VIRTPUT),
- T_TBL(TRACE_IEVENT),
- T_TBL(TRACE_BITS),
- T_TBL(TRACE_ICALLS),
- T_TBL(TRACE_CCALLS),
- T_TBL(TRACE_DATABASE),
- T_TBL(TRACE_ATTRS),
- T_TBL(TRACE_MAXIMUM),
+ T_TBL(TRACE_TIMES),
+ T_TBL(TRACE_TPUTS),
+ T_TBL(TRACE_UPDATE),
+ T_TBL(TRACE_MOVE),
+ T_TBL(TRACE_CHARPUT),
+ T_TBL(TRACE_ORDINARY),
+ T_TBL(TRACE_CALLS),
+ T_TBL(TRACE_VIRTPUT),
+ T_TBL(TRACE_IEVENT),
+ T_TBL(TRACE_BITS),
+ T_TBL(TRACE_ICALLS),
+ T_TBL(TRACE_CCALLS),
+ T_TBL(TRACE_DATABASE),
+ T_TBL(TRACE_ATTRS),
+ T_TBL(TRACE_MAXIMUM),
{
- (char *) 0, 0
+ (char *) 0, 0, 0
}
};
@@ -460,8 +525,11 @@ build_trace_menu(MenuNo number)
ITEM **ip = items;
int n;
- for (n = 0; t_tbl[n].name != 0; n++)
- *ip++ = new_item(t_tbl[n].name, "");
+ for (n = 0; t_tbl[n].name != 0; n++) {
+ *ip = new_item(t_tbl[n].name, "");
+ set_item_userptr(*ip, &t_tbl[n]);
+ ++ip;
+ }
*ip = (ITEM *) 0;
mpTrace = menu_create(items, SIZEOF(t_tbl) - 1, 2, number);
@@ -527,7 +595,8 @@ perform_trace_menu(int cmd)
int result;
for (ip = menu_items(mpTrace); *ip; ip++) {
- unsigned mask = t_tbl[item_index(*ip)].mask;
+ MENU_DATA *td = (MENU_DATA *) item_userptr(*ip);
+ unsigned mask = td->mask;
if (mask == 0)
set_item_value(*ip, _nc_tracing == 0);
else if ((mask & _nc_tracing) == mask)
@@ -540,15 +609,17 @@ perform_trace_menu(int cmd)
if (update_trace_menu(mpTrace) || cmd == REQ_TOGGLE_ITEM) {
newtrace = 0;
for (ip = menu_items(mpTrace); *ip; ip++) {
- if (item_value(*ip))
- newtrace |= t_tbl[item_index(*ip)].mask;
+ if (item_value(*ip)) {
+ MENU_DATA *td = (MENU_DATA *) item_userptr(*ip);
+ newtrace |= td->mask;
+ }
}
trace(newtrace);
Trace(("trace level interactively set to %s", tracetrace(_nc_tracing)));
- MvPrintw(LINES - 2, 0,
- "Trace level is %s\n", tracetrace(_nc_tracing));
- refresh();
+ MvWPrintw(status, 1, 0,
+ "Trace level is %s\n", tracetrace(_nc_tracing));
+ wrefresh(status);
}
}
return result;
@@ -588,27 +659,37 @@ current_menu(void)
}
static void
+call_menus(int code)
+{
+ (void) code;
+ Trace(("Activated menu %d\n", code));
+}
+
+static void
build_menus(char *filename)
{
- static CONST_MENUS char *labels[] =
+ static MENU_DATA table[] =
{
- "File",
- "Select",
+ {"File", call_menus, 0},
+ {"Select", call_menus, 1},
#ifdef TRACE
- "Trace",
+ {"Trace", call_menus, 2},
#endif
- (char *) 0
+ {(char *) 0, 0, 0}
};
- static ITEM *items[SIZEOF(labels)];
+ static ITEM *items[SIZEOF(table)];
ITEM **ip = items;
- CONST_MENUS char **ap;
+ int n;
- for (ap = labels; *ap; ap++)
- *ip++ = new_item(*ap, "");
+ for (n = 0; table[n].name != 0; ++n) {
+ *ip = new_item(table[n].name, "");
+ set_item_userptr(*ip, &table[n]);
+ ++ip;
+ }
*ip = (ITEM *) 0;
- mpBanner = menu_create(items, SIZEOF(labels) - 1, SIZEOF(labels) - 1, eBanner);
+ mpBanner = menu_create(items, SIZEOF(table) - 1, SIZEOF(table) - 1, eBanner);
set_menu_mark(mpBanner, ">");
build_file_menu(eFile);
@@ -671,14 +752,14 @@ move_menus(MENU * current, int by_y, int by_x)
static void
show_status(int ch, MENU * menu)
{
- move(LINES - 1, 0);
- printw("key %s, menu %d, mark %s, match %s",
- keyname(ch),
- menu_number(),
- menu_mark(menu),
- menu_pattern(menu));
- clrtoeol();
- refresh();
+ wmove(status, 0, 0);
+ wprintw(status, "key %s, menu %d, mark %s, match %s",
+ keyname(ch),
+ menu_number(),
+ menu_mark(menu),
+ menu_pattern(menu));
+ wclrtoeol(status);
+ wrefresh(status);
}
static void
@@ -777,9 +858,9 @@ perform_menus(void)
wrefresh(menu_win(last_menu));
if (code == E_UNKNOWN_COMMAND
|| code == E_NOT_POSTED) {
- if (menu_number() == eFile)
- break;
- beep();
+ ITEM *item = current_item(last_menu);
+ MENU_DATA *td = (MENU_DATA *) item_userptr(item);
+ td->func((int) td->mask);
}
if (code == E_REQUEST_DENIED)
beep();
@@ -827,11 +908,23 @@ rip_header(WINDOW *win, int cols)
#endif /* HAVE_RIPOFFLINE */
static void
+call_files(int code)
+{
+ switch (code) {
+ case 0:
+ destroy_menus();
+ endwin();
+ printf("DONE!\n");
+ ExitProgram(EXIT_SUCCESS);
+ }
+}
+
+static void
usage(void)
{
static const char *const tbl[] =
{
- "Usage: demo_menus [options]"
+ "Usage: demo_menus [options] [menu-file]"
,""
,"Options:"
#if HAVE_RIPOFFLINE
@@ -867,7 +960,7 @@ main(int argc, char *argv[])
#endif /* HAVE_RIPOFFLINE */
#ifdef TRACE
case 't':
- trace(strtoul(optarg, 0, 0));
+ trace((unsigned) strtoul(optarg, 0, 0));
break;
#endif
default:
@@ -885,6 +978,7 @@ main(int argc, char *argv[])
init_pair(1, COLOR_RED, COLOR_BLACK);
init_pair(2, COLOR_BLUE, COLOR_WHITE);
}
+ status = newwin(3, COLS, LINES - 3, 0);
build_menus(argc > 1 ? argv[1] : 0);
perform_menus();
destroy_menus();
diff --git a/test/demo_termcap.c b/test/demo_termcap.c
index a3733c67d1c2..6f35c17a63af 100644
--- a/test/demo_termcap.c
+++ b/test/demo_termcap.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2005-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2005-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_termcap.c,v 1.14 2011/01/15 21:41:27 tom Exp $
+ * $Id: demo_termcap.c,v 1.24 2013/06/08 16:58:49 tom Exp $
*
* A simple demo of the termcap interface.
*/
@@ -50,11 +50,90 @@
#if USE_CODE_LISTS
static bool b_opt = FALSE;
static bool n_opt = FALSE;
+static bool q_opt = FALSE;
static bool s_opt = FALSE;
#endif
+static char *d_opt;
+static char *e_opt;
+static char **db_list;
+static int db_item;
+
+static long total_values;
+
#define isCapName(c) (isgraph(c) && strchr("^#=:\\", c) == 0)
+static char *
+make_dbitem(char *p, char *q)
+{
+ char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
+ sprintf(result, "%s=%.*s", e_opt, (int) (p - q), q);
+ return result;
+}
+
+static void
+make_dblist(void)
+{
+ if (d_opt && e_opt) {
+ int pass;
+
+ for (pass = 0; pass < 2; ++pass) {
+ char *p, *q;
+ size_t count = 0;
+
+ for (p = q = d_opt; *p != '\0'; ++p) {
+ if (*p == ':') {
+ if (p != q + 1) {
+ if (pass) {
+ db_list[count] = make_dbitem(p, q);
+ }
+ count++;
+ }
+ q = p + 1;
+ }
+ }
+ if (p != q + 1) {
+ if (pass) {
+ db_list[count] = make_dbitem(p, q);
+ }
+ count++;
+ }
+ if (!pass) {
+ db_list = typeCalloc(char *, count + 1);
+ }
+ }
+ }
+}
+
+static char *
+next_dbitem(void)
+{
+ char *result = 0;
+
+ if (db_list) {
+ if ((result = db_list[db_item]) == 0) {
+ db_item = 0;
+ result = db_list[0];
+ } else {
+ db_item++;
+ }
+ }
+ printf("** %s\n", result);
+ return result;
+}
+
+static void
+free_dblist(void)
+{
+ if (db_list) {
+ int n;
+ for (n = 0; db_list[n]; ++n)
+ free(db_list[n]);
+ free(db_list);
+ db_list = 0;
+ }
+}
+
static void
dumpit(NCURSES_CONST char *cap)
{
@@ -70,66 +149,77 @@ dumpit(NCURSES_CONST char *cap)
int num;
if ((str = tgetstr(cap, &ap)) != 0) {
- /*
- * Note that the strings returned are mostly terminfo format, since
- * ncurses does not convert except for a handful of special cases.
- */
- printf(FNAME(str), cap);
- while (*str != 0) {
- int ch = UChar(*str++);
- switch (ch) {
- case '\177':
- fputs("^?", stdout);
- break;
- case '\033':
- fputs("\\E", stdout);
- break;
- case '\b':
- fputs("\\b", stdout);
- break;
- case '\f':
- fputs("\\f", stdout);
- break;
- case '\n':
- fputs("\\n", stdout);
- break;
- case '\r':
- fputs("\\r", stdout);
- break;
- case ' ':
- fputs("\\s", stdout);
- break;
- case '\t':
- fputs("\\t", stdout);
- break;
- case '^':
- fputs("\\^", stdout);
- break;
- case ':':
- fputs("\\072", stdout);
- break;
- case '\\':
- fputs("\\\\", stdout);
- break;
- default:
- if (isgraph(ch))
- fputc(ch, stdout);
- else if (ch < 32)
- printf("^%c", ch + '@');
- else
- printf("\\%03o", ch);
- break;
+ total_values++;
+ if (!q_opt) {
+ /*
+ * Note that the strings returned are mostly terminfo format, since
+ * ncurses does not convert except for a handful of special cases.
+ */
+ printf(FNAME(str), cap);
+ while (*str != 0) {
+ int ch = UChar(*str++);
+ switch (ch) {
+ case '\177':
+ fputs("^?", stdout);
+ break;
+ case '\033':
+ fputs("\\E", stdout);
+ break;
+ case '\b':
+ fputs("\\b", stdout);
+ break;
+ case '\f':
+ fputs("\\f", stdout);
+ break;
+ case '\n':
+ fputs("\\n", stdout);
+ break;
+ case '\r':
+ fputs("\\r", stdout);
+ break;
+ case ' ':
+ fputs("\\s", stdout);
+ break;
+ case '\t':
+ fputs("\\t", stdout);
+ break;
+ case '^':
+ fputs("\\^", stdout);
+ break;
+ case ':':
+ fputs("\\072", stdout);
+ break;
+ case '\\':
+ fputs("\\\\", stdout);
+ break;
+ default:
+ if (isgraph(ch))
+ fputc(ch, stdout);
+ else if (ch < 32)
+ printf("^%c", ch + '@');
+ else
+ printf("\\%03o", ch);
+ break;
+ }
}
+ printf("\n");
}
- printf("\n");
} else if ((num = tgetnum(cap)) >= 0) {
- printf(FNAME(num), cap);
- printf(" %d\n", num);
+ total_values++;
+ if (!q_opt) {
+ printf(FNAME(num), cap);
+ printf(" %d\n", num);
+ }
} else if (tgetflag(cap) > 0) {
- printf(FNAME(flg), cap);
- printf("%s\n", "true");
+ ++total_values;
+ if (!q_opt) {
+ printf(FNAME(flg), cap);
+ printf("%s\n", "true");
+ }
}
- fflush(stdout);
+
+ if (!q_opt)
+ fflush(stdout);
}
static void
@@ -137,6 +227,9 @@ brute_force(const char *name)
{
char buffer[1024];
+ if (db_list) {
+ putenv(next_dbitem());
+ }
printf("Terminal type %s\n", name);
if (tgetent(buffer, name) >= 0) {
char cap[3];
@@ -159,42 +252,43 @@ brute_force(const char *name)
#if USE_CODE_LISTS
static void
-demo_terminfo(NCURSES_CONST char *name)
+demo_termcap(NCURSES_CONST char *name)
{
unsigned n;
NCURSES_CONST char *cap;
+ char buffer[1024];
+ if (db_list) {
+ putenv(next_dbitem());
+ }
printf("Terminal type \"%s\"\n", name);
-#if HAVE_SETUPTERM
- setupterm(name, 1, (int *) 0);
-#else
- setterm(name);
-#endif
+ if (tgetent(buffer, name) >= 0) {
- if (b_opt) {
- for (n = 0;; ++n) {
- cap = boolcodes[n];
- if (cap == 0)
- break;
- dumpit(cap);
+ if (b_opt) {
+ for (n = 0;; ++n) {
+ cap = boolcodes[n];
+ if (cap == 0)
+ break;
+ dumpit(cap);
+ }
}
- }
- if (n_opt) {
- for (n = 0;; ++n) {
- cap = numcodes[n];
- if (cap == 0)
- break;
- dumpit(cap);
+ if (n_opt) {
+ for (n = 0;; ++n) {
+ cap = numcodes[n];
+ if (cap == 0)
+ break;
+ dumpit(cap);
+ }
}
- }
- if (s_opt) {
- for (n = 0;; ++n) {
- cap = strcodes[n];
- if (cap == 0)
- break;
- dumpit(cap);
+ if (s_opt) {
+ for (n = 0;; ++n) {
+ cap = strcodes[n];
+ if (cap == 0)
+ break;
+ dumpit(cap);
+ }
}
}
}
@@ -204,7 +298,7 @@ usage(void)
{
static const char *msg[] =
{
- "Usage: demo_terminfo [options] [terminal]",
+ "Usage: demo_termcap [options] [terminal]",
"",
"If no options are given, print all (boolean, numeric, string)",
"capabilities for the given terminal, using short names.",
@@ -212,9 +306,15 @@ usage(void)
"Options:",
" -a try all names, print capabilities found",
" -b print boolean-capabilities",
+ " -d LIST colon-separated list of databases to use",
+ " -e NAME environment variable to set with -d option",
" -n print numeric-capabilities",
+ " -q quiet (prints only counts)",
" -r COUNT repeat for given count",
" -s print string-capabilities",
+#ifdef NCURSES_VERSION
+ " -y disable extended capabilities",
+#endif
};
unsigned n;
for (n = 0; n < SIZEOF(msg); ++n) {
@@ -235,7 +335,7 @@ main(int argc, char *argv[])
int repeat;
int r_opt = 1;
- while ((n = getopt(argc, argv, "abnr:s")) != -1) {
+ while ((n = getopt(argc, argv, "abd:e:nqr:sy")) != -1) {
switch (n) {
case 'a':
a_opt = TRUE;
@@ -243,9 +343,18 @@ main(int argc, char *argv[])
case 'b':
b_opt = TRUE;
break;
+ case 'd':
+ d_opt = optarg;
+ break;
+ case 'e':
+ e_opt = optarg;
+ break;
case 'n':
n_opt = TRUE;
break;
+ case 'q':
+ q_opt = TRUE;
+ break;
case 'r':
if ((r_opt = atoi(optarg)) <= 0)
usage();
@@ -253,6 +362,11 @@ main(int argc, char *argv[])
case 's':
s_opt = TRUE;
break;
+#if NCURSES_XNAMES
+ case 'y':
+ use_extended_names(FALSE);
+ break;
+#endif
default:
usage();
break;
@@ -268,6 +382,8 @@ main(int argc, char *argv[])
a_opt = TRUE;
#endif
+ make_dblist();
+
if (a_opt) {
if (optind < argc) {
for (n = optind; n < argc; ++n) {
@@ -285,17 +401,21 @@ main(int argc, char *argv[])
for (repeat = 0; repeat < r_opt; ++repeat) {
if (optind < argc) {
for (n = optind; n < argc; ++n) {
- demo_terminfo(argv[n]);
+ demo_termcap(argv[n]);
}
} else if ((name = getenv("TERM")) != 0) {
- demo_terminfo(name);
+ demo_termcap(name);
} else {
static char dumb[] = "dumb";
- demo_terminfo(dumb);
+ demo_termcap(dumb);
}
}
}
-#endif
+#endif /* USE_CODE_LISTS */
+
+ printf("%ld values\n", total_values);
+
+ free_dblist();
ExitProgram(EXIT_SUCCESS);
}
@@ -306,6 +426,6 @@ main(int argc GCC_UNUSED,
char *argv[]GCC_UNUSED)
{
printf("This program requires termcap\n");
- exit(EXIT_FAILURE);
+ ExitProgram(EXIT_FAILURE);
}
#endif
diff --git a/test/demo_terminfo.c b/test/demo_terminfo.c
index 2ee5b4c40857..239739a47a8f 100644
--- a/test/demo_terminfo.c
+++ b/test/demo_terminfo.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,20 +29,19 @@
/*
* Author: Thomas E. Dickey
*
- * $Id: demo_terminfo.c,v 1.9 2010/11/28 00:15:27 tom Exp $
+ * $Id: demo_terminfo.c,v 1.19 2013/09/28 21:50:01 tom Exp $
*
* A simple demo of the terminfo interface.
*/
#define USE_TINFO
#include <test.priv.h>
-#ifdef NCURSES_VERSION
-#if !(defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H)
-#undef NCURSES_XNAMES
-#define NCURSES_XNAMES 0
-#endif
#if NCURSES_XNAMES
+#if HAVE_TERM_ENTRY_H
#include <term_entry.h>
+#else
+#undef NCURSES_XNAMES
+#define NCURSES_XNAMES 0
#endif
#endif
@@ -52,12 +51,90 @@
static bool b_opt = FALSE;
static bool f_opt = FALSE;
static bool n_opt = FALSE;
+static bool q_opt = FALSE;
static bool s_opt = FALSE;
static bool x_opt = FALSE;
+static char *d_opt;
+static char *e_opt;
+static char **db_list;
+static int db_item;
+
+static long total_values;
+
#define FCOLS 8
#define FNAME(type) "%s %-*s = ", #type, FCOLS
+static char *
+make_dbitem(char *p, char *q)
+{
+ char *result = malloc(strlen(e_opt) + 2 + (size_t) (p - q));
+ sprintf(result, "%s=%.*s", e_opt, (int) (p - q), q);
+ return result;
+}
+
+static void
+make_dblist(void)
+{
+ if (d_opt && e_opt) {
+ int pass;
+
+ for (pass = 0; pass < 2; ++pass) {
+ char *p, *q;
+ size_t count = 0;
+
+ for (p = q = d_opt; *p != '\0'; ++p) {
+ if (*p == ':') {
+ if (p != q + 1) {
+ if (pass) {
+ db_list[count] = make_dbitem(p, q);
+ }
+ count++;
+ }
+ q = p + 1;
+ }
+ }
+ if (p != q + 1) {
+ if (pass) {
+ db_list[count] = make_dbitem(p, q);
+ }
+ count++;
+ }
+ if (!pass) {
+ db_list = typeCalloc(char *, count + 1);
+ }
+ }
+ }
+}
+
+static char *
+next_dbitem(void)
+{
+ char *result = 0;
+
+ if (db_list) {
+ if ((result = db_list[db_item]) == 0) {
+ db_item = 0;
+ result = db_list[0];
+ } else {
+ db_item++;
+ }
+ }
+ printf("** %s\n", result);
+ return result;
+}
+
+static void
+free_dblist(void)
+{
+ if (db_list) {
+ int n;
+ for (n = 0; db_list[n]; ++n)
+ free(db_list[n]);
+ free(db_list);
+ db_list = 0;
+ }
+}
static void
dumpit(NCURSES_CONST char *cap)
{
@@ -72,66 +149,77 @@ dumpit(NCURSES_CONST char *cap)
int num;
if ((str = tigetstr(cap)) != 0 && (str != (char *) -1)) {
- /*
- * Note that the strings returned are mostly terminfo format, since
- * ncurses does not convert except for a handful of special cases.
- */
- printf(FNAME(str), cap);
- while (*str != 0) {
- int ch = UChar(*str++);
- switch (ch) {
- case '\177':
- fputs("^?", stdout);
- break;
- case '\033':
- fputs("\\E", stdout);
- break;
- case '\b':
- fputs("\\b", stdout);
- break;
- case '\f':
- fputs("\\f", stdout);
- break;
- case '\n':
- fputs("\\n", stdout);
- break;
- case '\r':
- fputs("\\r", stdout);
- break;
- case ' ':
- fputs("\\s", stdout);
- break;
- case '\t':
- fputs("\\t", stdout);
- break;
- case '^':
- fputs("\\^", stdout);
- break;
- case ':':
- fputs("\\072", stdout);
- break;
- case '\\':
- fputs("\\\\", stdout);
- break;
- default:
- if (isgraph(ch))
- fputc(ch, stdout);
- else if (ch < 32)
- printf("^%c", ch + '@');
- else
- printf("\\%03o", ch);
- break;
+ total_values++;
+ if (!q_opt) {
+ /*
+ * Note that the strings returned are mostly terminfo format, since
+ * ncurses does not convert except for a handful of special cases.
+ */
+ printf(FNAME(str), cap);
+ while (*str != 0) {
+ int ch = UChar(*str++);
+ switch (ch) {
+ case '\177':
+ fputs("^?", stdout);
+ break;
+ case '\033':
+ fputs("\\E", stdout);
+ break;
+ case '\b':
+ fputs("\\b", stdout);
+ break;
+ case '\f':
+ fputs("\\f", stdout);
+ break;
+ case '\n':
+ fputs("\\n", stdout);
+ break;
+ case '\r':
+ fputs("\\r", stdout);
+ break;
+ case ' ':
+ fputs("\\s", stdout);
+ break;
+ case '\t':
+ fputs("\\t", stdout);
+ break;
+ case '^':
+ fputs("\\^", stdout);
+ break;
+ case ':':
+ fputs("\\072", stdout);
+ break;
+ case '\\':
+ fputs("\\\\", stdout);
+ break;
+ default:
+ if (isgraph(ch))
+ fputc(ch, stdout);
+ else if (ch < 32)
+ printf("^%c", ch + '@');
+ else
+ printf("\\%03o", ch);
+ break;
+ }
}
+ printf("\n");
}
- printf("\n");
} else if ((num = tigetnum(cap)) >= 0) {
- printf(FNAME(num), cap);
- printf(" %d\n", num);
+ total_values++;
+ if (!q_opt) {
+ printf(FNAME(num), cap);
+ printf(" %d\n", num);
+ }
} else if ((num = tigetflag(cap)) >= 0) {
- printf(FNAME(flg), cap);
- printf("%s\n", num ? "true" : "false");
+ total_values++;
+ if (!q_opt) {
+ printf(FNAME(flg), cap);
+ printf("%s\n", num ? "true" : "false");
+ }
}
- fflush(stdout);
+
+ if (!q_opt)
+ fflush(stdout);
}
static void
@@ -140,6 +228,9 @@ demo_terminfo(char *name)
unsigned n;
NCURSES_CONST char *cap;
+ if (db_list) {
+ putenv(next_dbitem());
+ }
printf("Terminal type \"%s\"\n", name);
setupterm(name, 1, (int *) 0);
@@ -191,7 +282,7 @@ demo_terminfo(char *name)
}
#endif
} else {
- char temp[10];
+ char temp[80];
static const char *xterm_keys[] =
{
"kDC", "kDN", "kEND", "kHOM", "kIC",
@@ -200,9 +291,9 @@ demo_terminfo(char *name)
for (n = 0; n < SIZEOF(xterm_keys); ++n) {
for (mod = 0; mod < 8; ++mod) {
if (mod == 0)
- strcpy(temp, xterm_keys[n]);
+ sprintf(temp, "%.*s", 8, xterm_keys[n]);
else
- sprintf(temp, "%s%d", xterm_keys[n], mod);
+ sprintf(temp, "%.*s%d", 8, xterm_keys[n], mod);
dumpit(temp);
}
}
@@ -224,12 +315,16 @@ usage(void)
"",
"Options:",
" -b print boolean-capabilities",
+ " -d LIST colon-separated list of databases to use",
+ " -e NAME environment variable to set with -d option",
" -f print full names",
" -n print numeric-capabilities",
+ " -q quiet (prints only counts)",
" -r COUNT repeat for given count",
" -s print string-capabilities",
#ifdef NCURSES_VERSION
" -x print extended capabilities",
+ " -y disable extended capabilities",
#endif
};
unsigned n;
@@ -246,18 +341,30 @@ main(int argc, char *argv[])
int repeat;
char *name;
int r_opt = 1;
+#ifdef NCURSES_VERSION
+ bool xy_opt = TRUE; /* by default, use_extended_names is true */
+#endif
- while ((n = getopt(argc, argv, "bfnr:sx")) != -1) {
+ while ((n = getopt(argc, argv, "bd:e:fnqr:sxy")) != -1) {
switch (n) {
case 'b':
b_opt = TRUE;
break;
+ case 'd':
+ d_opt = optarg;
+ break;
+ case 'e':
+ e_opt = optarg;
+ break;
case 'f':
f_opt = TRUE;
break;
case 'n':
n_opt = TRUE;
break;
+ case 'q':
+ q_opt = TRUE;
+ break;
case 'r':
if ((r_opt = atoi(optarg)) <= 0)
usage();
@@ -268,7 +375,10 @@ main(int argc, char *argv[])
#ifdef NCURSES_VERSION
case 'x':
x_opt = TRUE;
- use_extended_names(TRUE);
+ xy_opt = TRUE;
+ break;
+ case 'y':
+ xy_opt = FALSE;
break;
#endif
default:
@@ -277,12 +387,18 @@ main(int argc, char *argv[])
}
}
+#if NCURSES_XNAMES
+ use_extended_names(xy_opt);
+#endif
+
if (!(b_opt || n_opt || s_opt || x_opt)) {
b_opt = TRUE;
n_opt = TRUE;
s_opt = TRUE;
}
+ make_dblist();
+
for (repeat = 0; repeat < r_opt; ++repeat) {
if (optind < argc) {
for (n = optind; n < argc; ++n) {
@@ -296,6 +412,10 @@ main(int argc, char *argv[])
}
}
+ printf("%ld values\n", total_values);
+
+ free_dblist();
+
ExitProgram(EXIT_SUCCESS);
}
diff --git a/test/ditto.c b/test/ditto.c
index 636a6eeceb62..921f216bb561 100644
--- a/test/ditto.c
+++ b/test/ditto.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey (1998-on)
*
- * $Id: ditto.c,v 1.40 2010/11/14 01:06:47 tom Exp $
+ * $Id: ditto.c,v 1.42 2012/11/24 20:16:18 tom Exp $
*
* The program illustrates how to set up multiple screens from a single
* program.
@@ -80,6 +80,7 @@ typedef struct {
int which1; /* this screen's index in DITTO[] array */
int length; /* length of windows[] and peeks[] */
char **titles; /* per-window titles */
+ WINDOW **parents; /* display boxes around each screen's data */
WINDOW **windows; /* display data from each screen */
PEEK *peeks; /* indices for each screen's fifo */
FIFO fifo; /* fifo for this screen */
@@ -98,6 +99,9 @@ typedef struct {
DITTO *ditto; /* data for all screens */
} DDATA;
+static void failed(const char *) GCC_NORETURN;
+static void usage(void) GCC_NORETURN;
+
static void
failed(const char *s)
{
@@ -201,6 +205,7 @@ init_screen(
scrollok(stdscr, TRUE);
box(stdscr, 0, 0);
+ target->parents = typeCalloc(WINDOW *, (size_t) target->length);
target->windows = typeCalloc(WINDOW *, (size_t) target->length);
target->peeks = typeCalloc(PEEK, (size_t) target->length);
@@ -220,6 +225,7 @@ init_screen(
nodelay(inner, TRUE);
#endif
+ target->parents[k] = outer;
target->windows[k] = inner;
}
doupdate();
diff --git a/test/dots.c b/test/dots.c
index 2533c7e3b49d..474d8805179e 100644
--- a/test/dots.c
+++ b/test/dots.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1999-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1999-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1999
*
- * $Id: dots.c,v 1.22 2010/11/14 01:00:02 tom Exp $
+ * $Id: dots.c,v 1.25 2013/09/28 22:12:09 tom Exp $
*
* A simple demo of the terminfo interface.
*/
@@ -46,23 +46,23 @@ static bool interrupted = FALSE;
static long total_chars = 0;
static time_t started;
-static int
-outc(TPUTS_ARG c)
+static
+TPUTS_PROTO(outc, c)
{
int rc = c;
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
rc = putc(c, stdout);
}
- return rc;
+ TPUTS_RETURN(rc);
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
@@ -105,6 +105,7 @@ main(int argc GCC_UNUSED,
int x, y, z, p;
double r;
double c;
+ int my_colors;
CATCHALL(onsig);
@@ -112,11 +113,12 @@ main(int argc GCC_UNUSED,
setupterm((char *) 0, 1, (int *) 0);
outs(clear_screen);
outs(cursor_invisible);
- if (max_colors > 1) {
+ my_colors = max_colors;
+ if (my_colors > 1) {
if (!valid(set_a_foreground)
|| !valid(set_a_background)
|| (!valid(orig_colors) && !valid(orig_pair)))
- max_colors = -1;
+ my_colors = -1;
}
r = (double) (lines - 4);
@@ -129,8 +131,8 @@ main(int argc GCC_UNUSED,
p = (ranf() > 0.9) ? '*' : ' ';
tputs(tparm3(cursor_address, y, x), 1, outc);
- if (max_colors > 0) {
- z = (int) (ranf() * max_colors);
+ if (my_colors > 0) {
+ z = (int) (ranf() * my_colors);
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {
diff --git a/test/dots_mvcur.c b/test/dots_mvcur.c
index 558683d56fdb..90b9c4e5b17b 100644
--- a/test/dots_mvcur.c
+++ b/test/dots_mvcur.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2009,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey - 2007
*
- * $Id: dots_mvcur.c,v 1.6 2010/11/14 01:00:44 tom Exp $
+ * $Id: dots_mvcur.c,v 1.10 2013/09/28 22:44:18 tom Exp $
*
* A simple demo of the terminfo interface, and mvcur.
*/
@@ -46,24 +46,24 @@ static bool interrupted = FALSE;
static long total_chars = 0;
static time_t started;
-static int
-outc(TPUTS_ARG c)
+static
+TPUTS_PROTO(outc, c)
{
int rc = c;
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = EOF;
} else {
if (putc(c, stdout) == EOF)
rc = EOF;
}
- return rc;
+ TPUTS_RETURN(rc);
}
static bool
-outs(char *s)
+outs(const char *s)
{
if (valid(s)) {
tputs(s, 1, outc);
@@ -108,6 +108,7 @@ main(int argc GCC_UNUSED,
double r;
double c;
SCREEN *sp;
+ int my_colors;
CATCHALL(onsig);
@@ -116,11 +117,12 @@ main(int argc GCC_UNUSED,
outs(clear_screen);
outs(cursor_home);
outs(cursor_invisible);
- if (max_colors > 1) {
+ my_colors = max_colors;
+ if (my_colors > 1) {
if (!valid(set_a_foreground)
|| !valid(set_a_background)
|| (!valid(orig_colors) && !valid(orig_pair)))
- max_colors = -1;
+ my_colors = -1;
}
r = (double) (lines - 4);
@@ -137,8 +139,8 @@ main(int argc GCC_UNUSED,
y0 = y;
}
- if (max_colors > 0) {
- z = (int) (ranf() * max_colors);
+ if (my_colors > 0) {
+ z = (int) (ranf() * my_colors);
if (ranf() > 0.01) {
tputs(tparm2(set_a_foreground, z), 1, outc);
} else {
@@ -155,6 +157,7 @@ main(int argc GCC_UNUSED,
}
}
outc(p);
+ ++x0;
fflush(stdout);
++total_chars;
}
diff --git a/test/dots_termcap.c b/test/dots_termcap.c
new file mode 100644
index 000000000000..4c1d62d9f9ff
--- /dev/null
+++ b/test/dots_termcap.c
@@ -0,0 +1,254 @@
+/****************************************************************************
+ * Copyright (c) 2013 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/*
+ * Author: Thomas E. Dickey
+ *
+ * $Id: dots_termcap.c,v 1.7 2013/09/28 21:50:35 tom Exp $
+ *
+ * A simple demo of the termcap interface.
+ */
+#define USE_TINFO
+#include <test.priv.h>
+
+#if !defined(__MINGW32__)
+#include <sys/time.h>
+#endif
+
+#if HAVE_TGETENT
+
+#include <time.h>
+
+#define valid(s) ((s != 0) && s != (char *)-1)
+
+static bool interrupted = FALSE;
+static long total_chars = 0;
+static time_t started;
+
+static char *t_AB;
+static char *t_AF;
+static char *t_cl;
+static char *t_cm;
+static char *t_me;
+static char *t_mr;
+static char *t_oc;
+static char *t_op;
+static char *t_ve;
+static char *t_vi;
+
+static struct {
+ const char *name;
+ char **value;
+} my_caps[] = {
+
+ {
+ "AB", &t_AB
+ },
+ {
+ "AF", &t_AF
+ },
+ {
+ "cl", &t_cl
+ },
+ {
+ "cm", &t_cm
+ },
+ {
+ "me", &t_me
+ },
+ {
+ "mr", &t_mr
+ },
+ {
+ "oc", &t_oc
+ },
+ {
+ "op", &t_op
+ },
+ {
+ "ve", &t_ve
+ },
+ {
+ "vi", &t_vi
+ },
+};
+
+static
+TPUTS_PROTO(outc, c)
+{
+ int rc = c;
+
+ if (interrupted) {
+ char tmp = (char) c;
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
+ rc = EOF;
+ } else {
+ rc = putc(c, stdout);
+ }
+ TPUTS_RETURN(rc);
+}
+
+static bool
+outs(char *s)
+{
+ if (valid(s)) {
+ tputs(s, 1, outc);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+cleanup(void)
+{
+ outs(t_me);
+ if (!outs(t_oc))
+ outs(t_op);
+ outs(t_cl);
+ outs(t_ve);
+
+ printf("\n\n%ld total chars, rate %.2f/sec\n",
+ total_chars,
+ ((double) (total_chars) / (double) (time((time_t *) 0) - started)));
+}
+
+static void
+onsig(int n GCC_UNUSED)
+{
+ interrupted = TRUE;
+}
+
+static double
+ranf(void)
+{
+ long r = (rand() & 077777);
+ return ((double) r / 32768.);
+}
+
+static void
+my_napms(int ms)
+{
+#if defined(__MINGW32__) || !HAVE_GETTIMEOFDAY
+ Sleep(ms);
+#else
+ struct timeval data;
+ data.tv_sec = 0;
+ data.tv_usec = ms * 1000;
+ select(0, NULL, NULL, NULL, &data);
+#endif
+}
+
+int
+main(int argc GCC_UNUSED,
+ char *argv[]GCC_UNUSED)
+{
+ int x, y, z, p;
+ int num_colors;
+ int num_lines;
+ int num_columns;
+ double r;
+ double c;
+ char buffer[1024];
+ char area[1024];
+ char *name;
+
+ CATCHALL(onsig);
+
+ srand((unsigned) time(0));
+
+ if ((name = getenv("TERM")) == 0) {
+ fprintf(stderr, "TERM is not set\n");
+ ExitProgram(EXIT_FAILURE);
+ } else if (tgetent(buffer, name) < 0) {
+ fprintf(stderr, "terminal description not found\n");
+ ExitProgram(EXIT_FAILURE);
+ } else {
+ size_t t;
+ char *ap = area;
+ for (t = 0; t < SIZEOF(my_caps); ++t) {
+ *(my_caps[t].value) = tgetstr((NCURSES_CONST char *)
+ my_caps[t].name, &ap);
+ }
+ }
+
+ num_colors = tgetnum("Co");
+ num_lines = tgetnum("li");
+ num_columns = tgetnum("co");
+
+ outs(t_cl);
+ outs(t_vi);
+ if (num_colors > 1) {
+ if (!valid(t_AF)
+ || !valid(t_AB)
+ || (!valid(t_oc) && !valid(t_op)))
+ num_colors = -1;
+ }
+
+ r = (double) (num_lines - 4);
+ c = (double) (num_columns - 4);
+ started = time((time_t *) 0);
+
+ while (!interrupted) {
+ x = (int) (c * ranf()) + 2;
+ y = (int) (r * ranf()) + 2;
+ p = (ranf() > 0.9) ? '*' : ' ';
+
+ tputs(tgoto(t_cm, x, y), 1, outc);
+ if (num_colors > 0) {
+ z = (int) (ranf() * num_colors);
+ if (ranf() > 0.01) {
+ tputs(tgoto(t_AF, 0, z), 1, outc);
+ } else {
+ tputs(tgoto(t_AB, 0, z), 1, outc);
+ my_napms(1);
+ }
+ } else if (valid(t_me)
+ && valid(t_mr)) {
+ if (ranf() <= 0.01) {
+ outs((ranf() > 0.6)
+ ? t_mr
+ : t_me);
+ my_napms(1);
+ }
+ }
+ outc(p);
+ fflush(stdout);
+ ++total_chars;
+ }
+ cleanup();
+ ExitProgram(EXIT_SUCCESS);
+}
+#else
+int
+main(int argc GCC_UNUSED,
+ char *argv[]GCC_UNUSED)
+{
+ fprintf(stderr, "This program requires termcap\n");
+ exit(EXIT_FAILURE);
+}
+#endif
diff --git a/test/echochar.c b/test/echochar.c
index 829d1f2b4296..8cb0833aa023 100644
--- a/test/echochar.c
+++ b/test/echochar.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: echochar.c,v 1.8 2010/11/14 01:00:44 tom Exp $
+ * $Id: echochar.c,v 1.9 2012/06/09 20:30:32 tom Exp $
*
* Demonstrate the echochar function (compare to dots.c).
* Thomas Dickey - 2006/11/4
@@ -74,7 +74,7 @@ set_color(char *my_pairs, int fg, int bg)
(short) fg,
(short) bg);
}
- attron(COLOR_PAIR(pair));
+ attron((attr_t) COLOR_PAIR(pair));
}
int
diff --git a/test/edit_field.c b/test/edit_field.c
index 8a664e8ca9a4..506d08ae0396 100644
--- a/test/edit_field.c
+++ b/test/edit_field.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003-2008,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,11 +26,11 @@
* authorization. *
****************************************************************************/
/*
- * $Id: edit_field.c,v 1.17 2011/01/15 18:15:11 tom Exp $
+ * $Id: edit_field.c,v 1.22 2013/09/28 22:02:17 tom Exp $
*
* A wrapper for form_driver() which keeps track of the user's editing changes
- * for each field, and makes the result available as a null-terminated string
- * in field_buffer(field,1).
+ * for each field, and makes the resulting length available as a
+ * null-terminated string in field_buffer(field,1).
*
* Thomas Dickey - 2003/4/26.
*/
@@ -297,8 +297,49 @@ offset_in_field(FORM * form)
static void
inactive_field(FIELD * f)
{
- FieldAttrs *ptr = (FieldAttrs *) field_userptr(f);
- set_field_back(f, ptr->background);
+ set_field_back(f, field_attrs(f)->background);
+}
+
+FieldAttrs *
+field_attrs(FIELD * f)
+{
+ return (FieldAttrs *) field_userptr(f);
+}
+
+static int
+buffer_length(FIELD * f)
+{
+ return field_attrs(f)->row_lengths[0];
+}
+
+static void
+set_buffer_length(FIELD * f, int length)
+{
+ field_attrs(f)->row_lengths[0] = length;
+}
+
+/*
+ * The userptr is used in edit_field.c's inactive_field(), as well as for
+ * keeping track of the actual lengths of lines in a multiline field.
+ */
+void
+init_edit_field(FIELD * f, char *value)
+{
+ FieldAttrs *ptr = field_attrs(f);
+ if (ptr == 0) {
+ int rows, cols, frow, fcol, nrow, nbuf;
+
+ ptr = typeCalloc(FieldAttrs, (size_t) 1);
+ ptr->background = field_back(f);
+ if (field_info(f, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK) {
+ ptr->row_count = nrow;
+ ptr->row_lengths = typeCalloc(int, (size_t) nrow + 1);
+ }
+ }
+ set_field_userptr(f, (void *) ptr);
+ set_field_buffer(f, 0, value); /* will be formatted */
+ set_field_buffer(f, 1, value); /* will be unformatted */
+ set_buffer_length(f, (int) strlen(value));
}
int
@@ -308,9 +349,7 @@ edit_field(FORM * form, int *result)
int status;
FIELD *before;
unsigned n;
- char lengths[80];
int length;
- char *buffer;
int before_row;
int before_col;
int before_off = offset_in_field(form);
@@ -337,9 +376,7 @@ edit_field(FORM * form, int *result)
if (status == E_OK) {
bool modified = TRUE;
- length = 0;
- if ((buffer = field_buffer(before, 1)) != 0)
- length = atoi(buffer);
+ length = buffer_length(before);
if (length < before_off)
length = before_off;
switch (*result) {
@@ -445,8 +482,7 @@ edit_field(FORM * form, int *result)
< MIN_FORM_COMMAND)
++length;
- sprintf(lengths, "%d", length);
- set_field_buffer(before, 1, lengths);
+ set_buffer_length(before, length);
}
if (current_field(form) != before)
diff --git a/test/edit_field.h b/test/edit_field.h
index eacade37fb8d..3c5b80ec12ea 100644
--- a/test/edit_field.h
+++ b/test/edit_field.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2003-2006,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 2003-2008,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: edit_field.h,v 1.6 2008/12/20 19:23:18 tom Exp $
+ * $Id: edit_field.h,v 1.9 2013/06/08 15:46:01 tom Exp $
*
* Interface of edit_field.c
*/
@@ -45,8 +45,12 @@
typedef struct {
chtype background;
+ int row_count;
+ int *row_lengths;
} FieldAttrs;
+extern FieldAttrs *field_attrs(FIELD * field);
+extern void init_edit_field(FIELD * field, char *value);
extern void help_edit_field(void);
extern int edit_field(FORM * form, int *result);
diff --git a/test/filter.c b/test/filter.c
index 489136e8f630..b90012fe6b34 100644
--- a/test/filter.c
+++ b/test/filter.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey <dickey@clark.net> 1998
*
- * $Id: filter.c,v 1.13 2010/11/13 20:55:54 tom Exp $
+ * $Id: filter.c,v 1.15 2012/06/09 20:30:32 tom Exp $
*/
#include <test.priv.h>
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
background = -1;
#endif
init_pair(1, COLOR_CYAN, (short) background);
- underline = COLOR_PAIR(1);
+ underline = (attr_t) COLOR_PAIR(1);
} else {
underline = A_UNDERLINE;
}
@@ -143,7 +143,7 @@ main(int argc, char *argv[])
reset_shell_mode();
printf("\n");
fflush(stdout);
- system(buffer);
+ IGNORE_RC(system(buffer));
reset_prog_mode();
touchwin(stdscr);
erase();
diff --git a/test/firework.c b/test/firework.c
index 2c409d835a2b..27d8fdfa8668 100644
--- a/test/firework.c
+++ b/test/firework.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: firework.c,v 1.27 2010/11/13 20:58:25 tom Exp $
+ * $Id: firework.c,v 1.29 2013/04/27 19:46:53 tom Exp $
*/
#include <test.priv.h>
@@ -41,7 +41,7 @@ cleanup(void)
endwin();
}
-static RETSIGTYPE
+static void
onsig(int n GCC_UNUSED)
{
cleanup();
@@ -94,14 +94,14 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
- (void) attrset(COLOR_PAIR(1) | bold);
+ (void) attrset((chtype) COLOR_PAIR(1) | bold);
MvPrintw(row - 1, col - 1, " - ");
MvPrintw(row + 0, col - 1, "-+-");
MvPrintw(row + 1, col - 1, " - ");
showit();
init_pair(1, get_colour(&bold), my_bg);
- (void) attrset(COLOR_PAIR(1) | bold);
+ (void) attrset((chtype) COLOR_PAIR(1) | bold);
MvPrintw(row - 2, col - 2, " --- ");
MvPrintw(row - 1, col - 2, "-+++-");
MvPrintw(row + 0, col - 2, "-+#+-");
@@ -110,7 +110,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
- (void) attrset(COLOR_PAIR(1) | bold);
+ (void) attrset((chtype) COLOR_PAIR(1) | bold);
MvPrintw(row - 2, col - 2, " +++ ");
MvPrintw(row - 1, col - 2, "++#++");
MvPrintw(row + 0, col - 2, "+# #+");
@@ -119,7 +119,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
- (void) attrset(COLOR_PAIR(1) | bold);
+ (void) attrset((chtype) COLOR_PAIR(1) | bold);
MvPrintw(row - 2, col - 2, " # ");
MvPrintw(row - 1, col - 2, "## ##");
MvPrintw(row + 0, col - 2, "# #");
@@ -128,7 +128,7 @@ explode(int row, int col)
showit();
init_pair(1, get_colour(&bold), my_bg);
- (void) attrset(COLOR_PAIR(1) | bold);
+ (void) attrset((chtype) COLOR_PAIR(1) | bold);
MvPrintw(row - 2, col - 2, " # # ");
MvPrintw(row - 1, col - 2, "# #");
MvPrintw(row + 0, col - 2, " ");
diff --git a/test/form_driver_w.c b/test/form_driver_w.c
new file mode 100644
index 000000000000..141f517f1f8d
--- /dev/null
+++ b/test/form_driver_w.c
@@ -0,0 +1,150 @@
+/****************************************************************************
+ * Copyright (c) 2013,2014 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Gaute Hope, 2013 *
+ ****************************************************************************/
+
+/*
+ * $Id: form_driver_w.c,v 1.11 2014/02/09 22:20:27 tom Exp $
+ *
+ * Test form_driver_w (int, int, wchar_t), a wide char aware
+ * replacement of form_driver.
+ */
+
+#include <locale.h>
+
+#include <test.priv.h>
+
+#if USE_WIDEC_SUPPORT && USE_LIBFORM
+
+#include <form.h>
+
+int
+main(void)
+{
+ FIELD *field[3];
+ FORM *my_form;
+ bool done = FALSE;
+
+ setlocale(LC_ALL, "");
+
+ /* Initialize curses */
+ initscr();
+ cbreak();
+ noecho();
+ keypad(stdscr, TRUE);
+
+ /* Initialize the fields */
+ field[0] = new_field(1, 10, 4, 18, 0, 0);
+ field[1] = new_field(1, 10, 6, 18, 0, 0);
+ field[2] = NULL;
+
+ /* Set field options */
+ set_field_back(field[0], A_UNDERLINE); /* Print a line for the option */
+ field_opts_off(field[0], O_AUTOSKIP); /* Don't go to next field when this */
+ /* Field is filled up */
+ set_field_back(field[1], A_UNDERLINE);
+ field_opts_off(field[1], O_AUTOSKIP);
+
+ /* Create the form and post it */
+ my_form = new_form(field);
+ post_form(my_form);
+ refresh();
+
+ mvprintw(4, 10, "Value 1:");
+ mvprintw(6, 10, "Value 2:");
+ refresh();
+
+ /* Loop through to get user requests */
+ while (!done) {
+ wint_t ch;
+ int ret = get_wch(&ch);
+
+ mvprintw(8, 10, "Got %d (%#x), type: %s", (int) ch, (int) ch,
+ (ret == KEY_CODE_YES)
+ ? "KEY_CODE_YES"
+ : ((ret == OK)
+ ? "OK"
+ : ((ret == ERR)
+ ? "ERR"
+ : "?")));
+ clrtoeol();
+
+ switch (ret) {
+ case KEY_CODE_YES:
+ switch (ch) {
+ case KEY_DOWN:
+ /* Go to next field */
+ form_driver_w(my_form, KEY_CODE_YES, REQ_NEXT_FIELD);
+ /* Go to the end of the present buffer */
+ /* Leaves nicely at the last character */
+ form_driver_w(my_form, KEY_CODE_YES, REQ_END_LINE);
+ break;
+ case KEY_UP:
+ /* Go to previous field */
+ form_driver_w(my_form, KEY_CODE_YES, REQ_PREV_FIELD);
+ form_driver_w(my_form, KEY_CODE_YES, REQ_END_LINE);
+ break;
+ default:
+ break;
+ }
+ break;
+ case OK:
+ switch (ch) {
+ case CTRL('D'):
+ case QUIT:
+ case ESCAPE:
+ done = TRUE;
+ break;
+ default:
+ form_driver_w(my_form, OK, ch);
+ break;
+ }
+ break;
+ }
+ }
+
+ /* Un post form and free the memory */
+ unpost_form(my_form);
+ free_form(my_form);
+ free_field(field[0]);
+ free_field(field[1]);
+
+ endwin();
+ ExitProgram(EXIT_SUCCESS);
+}
+
+#else
+int
+main(void)
+{
+ printf("This program requires the wide-ncurses and forms library\n");
+ ExitProgram(EXIT_FAILURE);
+}
+#endif /* USE_WIDEC_SUPPORT */
diff --git a/test/gdc.c b/test/gdc.c
index f3018cd8d331..a2263245d95e 100644
--- a/test/gdc.c
+++ b/test/gdc.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -27,13 +27,13 @@
****************************************************************************/
/*
* Grand digital clock for curses compatible terminals
- * Usage: gdc [-s] [n] -- run for n seconds (default infinity)
+ * Usage: gdc [-s] [-t hh:mm:ss] [n] -- run for n seconds (default infinity)
* Flags: -s: scroll
*
* modified 10-18-89 for curses (jrl)
* 10-18-89 added signal handling
*
- * $Id: gdc.c,v 1.34 2010/11/13 21:01:23 tom Exp $
+ * $Id: gdc.c,v 1.40 2014/02/15 17:34:36 tom Exp $
*/
#include <test.priv.h>
@@ -60,7 +60,7 @@ static int sigtermed = 0;
static bool redirected = FALSE;
static bool hascolor = FALSE;
-static RETSIGTYPE
+static void
sighndl(int signo)
{
signal(signo, sighndl);
@@ -72,13 +72,24 @@ sighndl(int signo)
}
static void
+check_term(void)
+{
+ if (sigtermed) {
+ (void) standend();
+ endwin();
+ fprintf(stderr, "gdc terminated by signal %d\n", sigtermed);
+ ExitProgram(EXIT_FAILURE);
+ }
+}
+
+static void
drawbox(bool scrolling)
{
chtype bottom[XLENGTH + 1];
int n;
if (hascolor)
- (void) attrset(COLOR_PAIR(PAIR_FRAMES));
+ (void) attrset((attr_t) COLOR_PAIR(PAIR_FRAMES));
MvAddCh(YBASE - 1, XBASE - 1, ACS_ULCORNER);
hline(ACS_HLINE, XLENGTH);
@@ -102,7 +113,7 @@ drawbox(bool scrolling)
vline(ACS_VLINE, YDEPTH);
if (hascolor)
- (void) attrset(COLOR_PAIR(PAIR_OTHERS));
+ (void) attrset((attr_t) COLOR_PAIR(PAIR_OTHERS));
}
static void
@@ -110,13 +121,13 @@ standt(int on)
{
if (on) {
if (hascolor) {
- attron(COLOR_PAIR(PAIR_DIGITS));
+ attron((attr_t) COLOR_PAIR(PAIR_DIGITS));
} else {
attron(A_STANDOUT);
}
} else {
if (hascolor) {
- attron(COLOR_PAIR(PAIR_OTHERS));
+ attron((attr_t) COLOR_PAIR(PAIR_OTHERS));
} else {
attroff(A_STANDOUT);
}
@@ -147,6 +158,7 @@ usage(void)
,"Options:"
," -n redirect input to /dev/null"
," -s scroll each number into place, rather than flipping"
+ ," -t hh:mm:ss specify starting time (default is ``now'')"
,""
,"If you specify a count, gdc runs for that number of seconds"
};
@@ -156,6 +168,43 @@ usage(void)
ExitProgram(EXIT_FAILURE);
}
+static time_t
+parse_time(const char *value)
+{
+ int hh, mm, ss;
+ int check;
+ time_t result;
+ char c;
+ struct tm *tm;
+
+ if (sscanf(value, "%d:%d:%d%c", &hh, &mm, &ss, &c) != 3) {
+ if (sscanf(value, "%02d%02d%02d%c", &hh, &mm, &ss, &c) != 3) {
+ usage();
+ }
+ }
+
+ if ((hh < 0) || (hh >= 24) ||
+ (mm < 0) || (mm >= 60) ||
+ (ss < 0) || (ss >= 60)) {
+ usage();
+ }
+
+ /* adjust so that the localtime in the main loop will give usable time */
+ result = (hh * 3600) + ((mm * 60) + ss);
+ for (check = 0; check < 24; ++check) {
+ tm = localtime(&result);
+ if (tm->tm_hour == hh)
+ break;
+ result += 3600;
+ }
+
+ if (tm->tm_hour != hh) {
+ fprintf(stderr, "Cannot find local time for %s!\n", value);
+ usage();
+ }
+ return result;
+}
+
int
main(int argc, char *argv[])
{
@@ -166,21 +215,26 @@ main(int argc, char *argv[])
int count = 0;
FILE *ofp = stdout;
FILE *ifp = stdin;
- bool scrol = FALSE;
+ bool smooth = FALSE;
+ bool stages = FALSE;
+ time_t starts = 0;
setlocale(LC_ALL, "");
CATCHALL(sighndl);
- while ((k = getopt(argc, argv, "sn")) != -1) {
+ while ((k = getopt(argc, argv, "nst:")) != -1) {
switch (k) {
- case 's':
- scrol = TRUE;
- break;
case 'n':
ifp = fopen("/dev/null", "r");
redirected = TRUE;
break;
+ case 's':
+ smooth = TRUE;
+ break;
+ case 't':
+ starts = parse_time(optarg);
+ break;
default:
usage();
}
@@ -220,7 +274,7 @@ main(int argc, char *argv[])
init_pair(PAIR_DIGITS, COLOR_BLACK, COLOR_RED);
init_pair(PAIR_OTHERS, COLOR_RED, bg);
init_pair(PAIR_FRAMES, COLOR_WHITE, bg);
- (void) attrset(COLOR_PAIR(PAIR_OTHERS));
+ (void) attrset((attr_t) COLOR_PAIR(PAIR_OTHERS));
}
restart:
@@ -231,9 +285,13 @@ main(int argc, char *argv[])
drawbox(FALSE);
do {
- char buf[30];
+ char buf[40];
- time(&now);
+ if (starts != 0) {
+ now = ++starts;
+ } else {
+ time(&now);
+ }
tm = localtime(&now);
mask = 0;
@@ -247,12 +305,13 @@ main(int argc, char *argv[])
set(10, 17);
for (k = 0; k < 6; k++) {
- if (scrol) {
+ if (smooth) {
for (i = 0; i < 5; i++)
newer[i] = (newer[i] & ~mask) | (newer[i + 1] & mask);
newer[5] = (newer[5] & ~mask) | (next[k] & mask);
- } else
+ } else {
newer[k] = (newer[k] & ~mask) | (next[k] & mask);
+ }
next[k] = 0;
for (s = 1; s >= 0; s--) {
standt(s);
@@ -273,7 +332,7 @@ main(int argc, char *argv[])
}
}
if (!s) {
- if (scrol)
+ if (smooth)
drawbox(TRUE);
refresh();
/*
@@ -286,14 +345,41 @@ main(int argc, char *argv[])
* a lot of time when asking what time it is, at the top of
* this loop -T.Dickey
*/
- if (scrol)
+ if (smooth)
napms(85);
+ if (stages) {
+ stages = FALSE;
+ switch (wgetch(stdscr)) {
+ case 'q':
+ count = 1;
+ break;
+ case 'S':
+ stages = TRUE;
+ /* FALLTHRU */
+ case 's':
+ nodelay(stdscr, FALSE);
+ break;
+ case ' ':
+ nodelay(stdscr, TRUE);
+ break;
+#ifdef KEY_RESIZE
+ case KEY_RESIZE:
+#endif
+ case '?':
+ goto restart;
+ case ERR:
+ check_term();
+ /* FALLTHRU */
+ default:
+ continue;
+ }
+ }
}
}
}
/* this depends on the detailed format of ctime(3) */
- (void) strcpy(buf, ctime(&now));
+ (void) strncpy(buf, ctime(&now), (size_t) 30);
(void) strcpy(buf + 10, buf + 19);
MvAddStr(16, 30, buf);
@@ -302,11 +388,11 @@ main(int argc, char *argv[])
refresh();
/*
- * If we're not scrolling, wait 1000 msec (1 sec). Use napms() rather
- * than sleep() because the latter does odd things on some systems,
- * e.g., suspending output as well.
+ * If we're not smooth-scrolling, wait 1000 msec (1 sec). Use napms()
+ * rather than sleep() because the latter does odd things on some
+ * systems, e.g., suspending output as well.
*/
- if (scrol)
+ if (smooth)
napms(500);
else
napms(1000);
@@ -318,10 +404,14 @@ main(int argc, char *argv[])
* will return an error if interrupted. This works only if we can
* read from the input, of course.
*/
+ stages = FALSE;
switch (wgetch(stdscr)) {
case 'q':
count = 1;
break;
+ case 'S':
+ stages = TRUE;
+ /* FALLTHRU */
case 's':
nodelay(stdscr, FALSE);
break;
@@ -334,12 +424,7 @@ main(int argc, char *argv[])
case '?':
goto restart;
case ERR:
- if (sigtermed) {
- (void) standend();
- endwin();
- fprintf(stderr, "gdc terminated by signal %d\n", sigtermed);
- ExitProgram(EXIT_FAILURE);
- }
+ check_term();
/* FALLTHRU */
default:
continue;
diff --git a/test/hanoi.c b/test/hanoi.c
index 3366e93a3312..2262a5203bd0 100644
--- a/test/hanoi.c
+++ b/test/hanoi.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -41,10 +41,11 @@
*
* Date: 05.Nov.90
*
- * $Id: hanoi.c,v 1.31 2010/11/14 01:01:07 tom Exp $
+ * $Id: hanoi.c,v 1.35 2013/09/28 22:02:17 tom Exp $
*/
#include <test.priv.h>
+#include <math.h>
#define NPEGS 3 /* This is not configurable !! */
#define MINTILES 3
@@ -57,7 +58,7 @@
#define MIDPEG 39
#define RIGHTPEG 59
-#define LENTOIND(x) (((x)-1)/2)
+#define LENTOIND(x) (((int)(x)-1)/2)
#define OTHER(a,b) (3-((a)+(b)))
struct Peg {
@@ -84,10 +85,11 @@ static short TileColour[] =
COLOR_MAGENTA, /* Length 17 */
COLOR_RED, /* Length 19 */
};
+static int NTiles = 0;
static int NMoves = 0;
static bool AutoFlag = FALSE;
-static void InitTiles(int NTiles);
+static void InitTiles(void);
static void DisplayTiles(void);
static void MakeMove(int From, int To);
static void AutoMove(int From, int To, int Num);
@@ -99,7 +101,7 @@ static int InvalidMove(int From, int To);
int
main(int argc, char **argv)
{
- int NTiles, FromCol, ToCol;
+ int FromCol, ToCol;
setlocale(LC_ALL, "");
@@ -130,9 +132,6 @@ main(int argc, char **argv)
Usage();
ExitProgram(EXIT_FAILURE);
}
-#ifdef TRACE
- trace(TRACE_MAXIMUM);
-#endif
initscr();
if (has_colors()) {
int i;
@@ -155,7 +154,7 @@ main(int argc, char **argv)
curs_set(0);
leaveok(stdscr, TRUE); /* Attempt to remove cursor */
}
- InitTiles(NTiles);
+ InitTiles();
DisplayTiles();
if (AutoFlag) {
do {
@@ -211,7 +210,7 @@ InvalidMove(int From, int To)
}
static void
-InitTiles(int NTiles)
+InitTiles(void)
{
int Size, SlotNo;
@@ -232,7 +231,7 @@ DisplayTiles(void)
erase();
MvAddStr(1, 24, "T O W E R S O F H A N O I");
MvAddStr(3, 34, "SJR 1990");
- MvPrintw(19, 5, "Moves : %d", NMoves);
+ MvPrintw(19, 5, "Moves : %d of %.0f", NMoves, pow(2.0, (float) NTiles) - 1);
(void) attrset(A_REVERSE);
MvAddStr(BASELINE, 8,
" ");
@@ -255,7 +254,7 @@ DisplayTiles(void)
memset(TileBuf, ' ', len);
TileBuf[len] = '\0';
if (has_colors())
- (void) attrset(COLOR_PAIR(LENTOIND(len)));
+ (void) attrset((attr_t) COLOR_PAIR(LENTOIND(len)));
else
(void) attrset(A_REVERSE);
MvAddStr(BASELINE - (SlotNo + 1),
@@ -310,12 +309,12 @@ AutoMove(int From, int To, int Num)
if (Num == 1) {
MakeMove(From, To);
napms(500);
- return;
+ } else {
+ AutoMove(From, OTHER(From, To), Num - 1);
+ MakeMove(From, To);
+ napms(500);
+ AutoMove(OTHER(From, To), To, Num - 1);
}
- AutoMove(From, OTHER(From, To), Num - 1);
- MakeMove(From, To);
- napms(500);
- AutoMove(OTHER(From, To), To, Num - 1);
}
static int
diff --git a/test/hashtest.c b/test/hashtest.c
index 919a1091e844..849922173c8f 100644
--- a/test/hashtest.c
+++ b/test/hashtest.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2010,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -30,7 +30,7 @@
*
* Generate timing statistics for vertical-motion optimization.
*
- * $Id: hashtest.c,v 1.31 2010/11/13 23:43:15 tom Exp $
+ * $Id: hashtest.c,v 1.32 2013/04/27 19:50:17 tom Exp $
*/
#include <test.priv.h>
@@ -54,7 +54,7 @@ cleanup(void)
endwin();
}
-static RETSIGTYPE
+static void
finish(int sig GCC_UNUSED)
{
cleanup();
diff --git a/test/inchs.c b/test/inchs.c
index f07a2bdabd0d..be3aab86f578 100644
--- a/test/inchs.c
+++ b/test/inchs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: inchs.c,v 1.11 2010/11/13 23:41:23 tom Exp $
+ * $Id: inchs.c,v 1.12 2012/11/18 01:58:15 tom Exp $
*
* Author: Thomas E Dickey
*/
@@ -50,6 +50,16 @@
#define BASE_Y 7
#define MAX_COLS 1024
+static void
+failed(const char *s)
+{
+ int save = errno;
+ endwin();
+ errno = save;
+ perror(s);
+ ExitProgram(EXIT_FAILURE);
+}
+
static bool
Quit(int ch)
{
@@ -87,6 +97,8 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin)
txtwin = stdscr;
base_y = BASE_Y;
}
+ if (txtwin == 0)
+ failed("cannot create txtwin");
keypad(txtwin, TRUE); /* enable keyboard mapping */
(void) cbreak(); /* take input chars one at a time, no wait for \n */
diff --git a/test/ins_wide.c b/test/ins_wide.c
index 87deb1a14d53..a168dc112fcb 100644
--- a/test/ins_wide.c
+++ b/test/ins_wide.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: ins_wide.c,v 1.15 2010/12/12 00:20:14 tom Exp $
+ * $Id: ins_wide.c,v 1.20 2012/12/16 00:51:02 tom Exp $
*
* Demonstrate the wins_wstr() and wins_wch functions.
* Thomas Dickey - 2002/11/23
@@ -228,8 +228,9 @@ test_inserts(int level)
WINDOW *work = 0;
WINDOW *show = 0;
int margin = (2 * MY_TABSIZE) - 1;
- Options option = ((m_opt ? oMove : oDefault)
- | ((w_opt || (level > 0)) ? oWindow : oDefault));
+ Options option = (Options) ((int) (m_opt ? oMove : oDefault)
+ | (int) ((w_opt || (level > 0))
+ ? oWindow : oDefault));
if (first) {
static char cmd[80];
@@ -241,6 +242,15 @@ test_inserts(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those
+ * that are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -274,14 +284,8 @@ test_inserts(int level)
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgdset(work, COLOR_PAIR(1) | ' ');
+ wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) {
@@ -290,11 +294,13 @@ test_inserts(int level)
case key_RECUR:
test_inserts(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -438,10 +444,10 @@ test_inserts(int level)
}
}
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
+ delwin(show);
}
static void
diff --git a/test/insdelln.c b/test/insdelln.c
index d5034a445966..758f0887f2ba 100644
--- a/test/insdelln.c
+++ b/test/insdelln.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2008-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2008-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: insdelln.c,v 1.5 2010/11/13 23:39:38 tom Exp $
+ * $Id: insdelln.c,v 1.7 2012/11/18 00:37:58 tom Exp $
*
* test-driver for deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln
*/
@@ -175,6 +175,8 @@ do_subwindow(WINDOW *win, STATUS * sp, void func(WINDOW *))
delwin(win1);
touchwin(win);
} else {
+ if (win1)
+ delwin(win1);
beep();
}
}
@@ -300,7 +302,7 @@ test_winsdelln(WINDOW *win)
init_status(win, &st);
do {
- (void) wattrset(win, st.attr | (attr_t) COLOR_PAIR(st.pair));
+ (void) wattrset(win, (int) (st.attr | (attr_t) COLOR_PAIR(st.pair)));
switch (st.ch) {
case 'i':
for (n = 0; n < st.count; ++n)
diff --git a/test/inserts.c b/test/inserts.c
index a12fa4011283..ae38fa217521 100644
--- a/test/inserts.c
+++ b/test/inserts.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2002-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2002-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: inserts.c,v 1.23 2010/12/12 00:19:55 tom Exp $
+ * $Id: inserts.c,v 1.27 2012/12/16 00:35:27 tom Exp $
*
* Demonstrate the winsstr() and winsch functions.
* Thomas Dickey - 2002/10/19
@@ -167,6 +167,15 @@ test_inserts(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those
+ * that are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -200,14 +209,8 @@ test_inserts(int level)
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgdset(work, COLOR_PAIR(1) | ' ');
+ wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) {
@@ -216,11 +219,13 @@ test_inserts(int level)
case key_RECUR:
test_inserts(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -368,10 +373,10 @@ test_inserts(int level)
}
}
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
+ delwin(show);
}
static void
diff --git a/test/knight.c b/test/knight.c
index d9f81facacec..ae9d223441bf 100644
--- a/test/knight.c
+++ b/test/knight.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -33,7 +33,7 @@
* Eric S. Raymond <esr@snark.thyrsus.com> July 22 1995. Mouse support
* added September 20th 1995.
*
- * $Id: knight.c,v 1.31 2010/11/13 20:44:21 tom Exp $
+ * $Id: knight.c,v 1.36 2013/02/16 19:53:08 tom Exp $
*/
#include <test.priv.h>
@@ -123,13 +123,16 @@ init_program(void)
(void) init_pair(PLUS_COLOR, (short) COLOR_RED, (short) bg);
(void) init_pair(MINUS_COLOR, (short) COLOR_GREEN, (short) bg);
- trail |= COLOR_PAIR(TRAIL_COLOR);
- plus |= COLOR_PAIR(PLUS_COLOR);
- minus |= COLOR_PAIR(MINUS_COLOR);
+ trail |= (chtype) COLOR_PAIR(TRAIL_COLOR);
+ plus |= (chtype) COLOR_PAIR(PLUS_COLOR);
+ minus |= (chtype) COLOR_PAIR(MINUS_COLOR);
}
#ifdef NCURSES_MOUSE_VERSION
(void) mousemask(BUTTON1_CLICKED, (mmask_t *) NULL);
#endif /* NCURSES_MOUSE_VERSION */
+#if defined(PDCURSES)
+ mouse_set(BUTTON1_RELEASED);
+#endif
oldch = minus;
}
@@ -300,15 +303,16 @@ mark_possibles(int prow, int pcol, chtype mark)
}
}
-static void
+static bool
find_next_move(int *y, int *x)
{
unsigned j, k;
int found = -1;
int first = -1;
- int next = 0;
+ int next = -1;
int oldy, oldx;
int newy, newx;
+ bool result = FALSE;
if (movecount > 1) {
oldy = history[movecount - 1].y;
@@ -335,9 +339,27 @@ find_next_move(int *y, int *x)
*y = oldy + offsets[next].y;
*x = oldx + offsets[next].x;
}
- } else {
- beep();
+ result = TRUE;
}
+ return result;
+}
+
+static void
+count_next_moves(int y, int x)
+{
+ int count = 0;
+ unsigned j;
+
+ wprintw(msgwin, "\nMove %d", movecount);
+ for (j = 0; j < SIZEOF(offsets); j++) {
+ int newy = y + offsets[j].y;
+ int newx = x + offsets[j].x;
+ if (chksqr(newy, newx)) {
+ ++count;
+ }
+ }
+ wprintw(msgwin, ", gives %d choices", count);
+ wclrtoeol(msgwin);
}
static void
@@ -558,8 +580,9 @@ play(void)
nx = col + 1;
break;
-#ifdef NCURSES_MOUSE_VERSION
+#ifdef KEY_MOUSE
case KEY_MOUSE:
+#ifdef NCURSES_MOUSE_VERSION
{
MEVENT myevent;
@@ -576,6 +599,24 @@ play(void)
}
}
#endif /* NCURSES_MOUSE_VERSION */
+#ifdef PDCURSES
+ {
+ int test_y, test_x;
+ request_mouse_pos();
+ test_y = MOUSE_Y_POS + 0;
+ test_x = MOUSE_X_POS + 1;
+ if (test_y >= CY(0) && test_y <= CY(BDEPTH)
+ && test_x >= CX(0) && test_x <= CX(BWIDTH)) {
+ ny = CYINV(test_y);
+ nx = CXINV(test_x);
+ wmove(helpwin, 0, 0);
+ wrefresh(helpwin);
+ ungetch('\n');
+ }
+ break;
+ }
+#endif /* PDCURSES */
+#endif /* KEY_MOUSE */
case KEY_B2:
case '\n':
@@ -614,8 +655,8 @@ play(void)
ny = history[movecount].y;
nx = history[movecount].x;
if (nx < 0 || ny < 0) {
- ny = lastrow;
- nx = lastcol;
+ ny = (lastrow >= 0) ? lastrow : 0;
+ nx = (lastcol >= 0) ? lastcol : 0;
}
movecount = 0;
board[ny][nx] = FALSE;
@@ -652,7 +693,10 @@ play(void)
case 'a':
nx = col;
ny = rw;
- find_next_move(&ny, &nx);
+ if (find_next_move(&ny, &nx))
+ count_next_moves(ny, nx);
+ else
+ beep();
break;
case 'F':
diff --git a/test/linedata.h b/test/linedata.h
index 2510ee72f646..751bc6b5db27 100644
--- a/test/linedata.h
+++ b/test/linedata.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -85,10 +85,8 @@ read_linedata(WINDOW *work)
beep();
continue;
}
- } else if (code != ERR) {
- result = (int) ch;
- break;
} else {
+ result = (int) ch;
break;
}
}
diff --git a/test/make-tar.sh b/test/make-tar.sh
index 0ebccbbc6e87..a71e1e1e0f97 100755
--- a/test/make-tar.sh
+++ b/test/make-tar.sh
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: make-tar.sh,v 1.10 2011/03/26 20:46:51 tom Exp $
+# $Id: make-tar.sh,v 1.12 2013/10/26 23:11:43 tom Exp $
##############################################################################
-# Copyright (c) 2010,2011 Free Software Foundation, Inc. #
+# Copyright (c) 2010-2011,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -66,11 +66,11 @@ edit_specfile() {
make_changelog() {
test -f $1 && chmod u+w $1
cat >$1 <<EOF
-`echo $PKG_NAME|tr '[A-Z]' '[a-z]'` ($NCURSES_PATCH) unstable; urgency=low
+`echo $PKG_NAME|tr '[A-Z]' '[a-z]'` ($NCURSES_MAJOR.$NCURSES_MINOR-$NCURSES_PATCH) unstable; urgency=low
* snapshot of ncurses subpackage for $PKG_NAME.
- -- `head -1 $HOME/.signature` `date -R`
+ -- `head -n 1 $HOME/.signature` `date -R`
EOF
}
@@ -108,7 +108,10 @@ for spec in $BUILD/$ROOTNAME/package/*.spec
do
edit_specfile $spec
done
-make_changelog $BUILD/$ROOTNAME/package/debian/changelog
+for spec in $BUILD/$ROOTNAME/package/debian*
+do
+ make_changelog $spec/changelog
+done
cp -p $SOURCE/NEWS $BUILD/$ROOTNAME
diff --git a/test/modules b/test/modules
index 67c019e77161..628335a914ec 100644
--- a/test/modules
+++ b/test/modules
@@ -1,6 +1,6 @@
-# $Id: modules,v 1.43 2010/01/23 17:51:38 tom Exp $
+# $Id: modules,v 1.50 2013/12/07 18:06:01 tom Exp $
##############################################################################
-# Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. #
+# Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -50,12 +50,14 @@ demo_terminfo progs $(srcdir) $(HEADER_DEPS)
ditto progs $(srcdir) $(HEADER_DEPS)
dots progs $(srcdir) $(HEADER_DEPS)
dots_mvcur progs $(srcdir) $(HEADER_DEPS)
+dots_termcap progs $(srcdir) $(HEADER_DEPS)
echochar progs $(srcdir) $(HEADER_DEPS)
edit_field progs $(srcdir) $(HEADER_DEPS) $(srcdir)/edit_field.h
filter progs $(srcdir) $(HEADER_DEPS)
firework progs $(srcdir) $(HEADER_DEPS)
firstlast progs $(srcdir) $(HEADER_DEPS)
foldkeys progs $(srcdir) $(HEADER_DEPS)
+form_driver_w progs $(srcdir) $(HEADER_DEPS)
gdc progs $(srcdir) $(HEADER_DEPS)
hanoi progs $(srcdir) $(HEADER_DEPS)
hashtest progs $(srcdir) $(HEADER_DEPS)
@@ -86,10 +88,12 @@ test_getstr progs $(srcdir) $(HEADER_DEPS)
test_instr progs $(srcdir) $(HEADER_DEPS)
test_inwstr progs $(srcdir) $(HEADER_DEPS)
test_opaque progs $(srcdir) $(HEADER_DEPS)
+test_vid_puts progs $(srcdir) $(HEADER_DEPS)
+test_vidputs progs $(srcdir) $(HEADER_DEPS)
testaddch progs $(srcdir) $(HEADER_DEPS)
testcurs progs $(srcdir) $(HEADER_DEPS)
testscanw progs $(srcdir) $(HEADER_DEPS)
-view progs $(srcdir) $(HEADER_DEPS)
+view progs $(srcdir) $(HEADER_DEPS) $(srcdir)/widechars.h
worm progs $(srcdir) $(HEADER_DEPS)
xmas progs $(srcdir) $(HEADER_DEPS)
diff --git a/test/movewindow.c b/test/movewindow.c
index e55a694a084a..9effda41a4da 100644
--- a/test/movewindow.c
+++ b/test/movewindow.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2008,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,18 +26,22 @@
* authorization. *
****************************************************************************/
/*
- * $Id: movewindow.c,v 1.24 2010/11/13 23:34:55 tom Exp $
+ * $Id: movewindow.c,v 1.39 2013/05/04 19:41:02 tom Exp $
*
* Demonstrate move functions for windows and derived windows from the curses
* library.
*
- * Thomas Dickey - 2006/2/11
+ * Author: Thomas E. Dickey
*/
/*
derwin
mvderwin
subwin
mvwin
+
+TODO:
+ add command to reset subwindow's origin to coincide with parent.
+ add command to delete subwindow (check if it has subwindows though)
*/
#include <test.priv.h>
@@ -76,6 +80,14 @@ static unsigned num_windows;
static FRAME *all_windows;
static void
+failed(const char *s)
+{
+ perror(s);
+ endwin();
+ ExitProgram(EXIT_FAILURE);
+}
+
+static void
message(int lineno, CONST_FMT char *fmt, va_list argp)
{
int y, x;
@@ -122,7 +134,12 @@ tail_line(CONST_FMT char *fmt,...)
* Arrow keys move cursor, return location at current on non-arrow key.
*/
static PAIR *
-selectcell(WINDOW *parent, int uli, int ulj, int lri, int lrj)
+selectcell(WINDOW *parent,
+ WINDOW *child,
+ int uli, int ulj,
+ int lri, int lrj,
+ bool relative,
+ bool * more)
{
static PAIR res; /* result cell */
int si = lri - uli + 1; /* depth of the select area */
@@ -131,25 +148,46 @@ selectcell(WINDOW *parent, int uli, int ulj, int lri, int lrj)
res.y = uli;
res.x = ulj;
+
+ if (child != 0) {
+ if (relative) {
+ getparyx(child, i, j);
+ } else {
+ getbegyx(child, i, j);
+ i -= uli + getbegy(parent);
+ j -= ulj + getbegx(parent);
+ }
+ }
+
+ if (more)
+ *more = FALSE;
+
for (;;) {
- tail_line("Upper left [%2d,%2d] Lower right [%2d,%2d] -> %d,%d",
+ bool moved = FALSE;
+
+ tail_line("Upper left [%2d,%2d] Lower right [%2d,%2d] -> %d,%d -> %d,%d",
uli, ulj,
lri, lrj,
+ i, j,
uli + i, ulj + j);
wmove(parent, uli + i, ulj + j);
switch (wgetch(parent)) {
case KEY_UP:
i += si - 1;
+ moved = TRUE;
break;
case KEY_DOWN:
i++;
+ moved = TRUE;
break;
case KEY_LEFT:
j += sj - 1;
+ moved = TRUE;
break;
case KEY_RIGHT:
j++;
+ moved = TRUE;
break;
case QUIT:
case ESCAPE:
@@ -161,8 +199,13 @@ selectcell(WINDOW *parent, int uli, int ulj, int lri, int lrj)
getmouse(&event);
if (event.y > uli && event.x > ulj) {
- i = event.y - uli;
- j = event.x - ulj;
+ if (parent != stdscr) {
+ i = event.y - getbegy(parent) - uli;
+ j = event.x - getbegx(parent) - ulj;
+ } else {
+ i = event.y - uli;
+ j = event.x - ulj;
+ }
} else {
beep();
break;
@@ -175,8 +218,26 @@ selectcell(WINDOW *parent, int uli, int ulj, int lri, int lrj)
res.x = ulj + j;
return (&res);
}
- i %= si;
- j %= sj;
+
+ if (si <= 0)
+ i = 0;
+ else
+ i %= si;
+
+ if (sj <= 0)
+ j = 0;
+ else
+ j %= sj;
+
+ /*
+ * If the caller can handle continuous movement, return the result.
+ */
+ if (moved && more) {
+ *more = TRUE;
+ res.y = uli + i;
+ res.x = ulj + j;
+ return (&res);
+ }
}
}
@@ -194,12 +255,20 @@ getwindow(WINDOW *parent, PAIR * ul, PAIR * lr)
bool result = FALSE;
head_line("Use arrows to move cursor, anything else to mark corner 1");
- if ((tmp = selectcell(parent, min_line, min_col, max_line, max_col)) != 0) {
+ if ((tmp = selectcell(parent, 0,
+ min_line, min_col,
+ max_line, max_col,
+ FALSE,
+ (bool *) 0)) != 0) {
*ul = *tmp;
MvWAddCh(parent, ul->y, ul->x, '*');
head_line("Use arrows to move cursor, anything else to mark corner 2");
- if ((tmp = selectcell(parent, ul->y, ul->x, max_line, max_col)) != 0) {
+ if ((tmp = selectcell(parent, 0,
+ ul->y, ul->x,
+ max_line, max_col,
+ FALSE,
+ (bool *) 0)) != 0) {
*lr = *tmp;
MvWAddCh(parent, lr->y, lr->x, '*');
wmove(parent, lr->y, lr->x);
@@ -252,6 +321,8 @@ add_window(WINDOW *parent, WINDOW *child)
keypad(child, TRUE);
if (need > have) {
all_windows = typeRealloc(FRAME, need, all_windows);
+ if (!all_windows)
+ failed("add_window");
}
all_windows[num_windows].parent = parent;
all_windows[num_windows].child = child;
@@ -341,10 +412,7 @@ recur_move_window(WINDOW *parent, int dy, int dx)
for (n = 0; n < num_windows; ++n) {
if (all_windows[n].parent == parent) {
- int y0, x0;
-
- getbegyx(all_windows[n].child, y0, x0);
- mvwin(all_windows[n].child, y0 + dy, x0 + dx);
+ mvwin(all_windows[n].child, dy, dx);
recur_move_window(all_windows[n].child, dy, dx);
}
}
@@ -366,20 +434,24 @@ move_window(WINDOW *win, bool recur)
int min_line = top ? LINE_MIN : 0;
int max_line = top ? LINE_MAX : getmaxy(parent);
PAIR *tmp;
+ bool more;
head_line("Select new position for %swindow", top ? "" : "sub");
- if ((tmp = selectcell(parent,
- min_line, min_col,
- max_line, max_col)) != 0) {
+ while ((tmp = selectcell(parent,
+ win,
+ min_line, min_col,
+ max_line, max_col,
+ FALSE,
+ &more)) != 0) {
int y0, x0;
getbegyx(parent, y0, x0);
/*
- * Note: Moving a subwindow has the effect of moving a viewport
- * around the screen. The parent window retains the contents of
- * the subwindow in the original location, but the viewport will
- * show the contents (again) at the new location. So it will look
- * odd when testing.
+ * Moving a subwindow has the effect of moving a viewport around
+ * the screen. The parent window retains the contents of the
+ * subwindow in the original location, but the viewport will show
+ * the contents (again) at the new location. So it will look odd
+ * when testing.
*/
if (mvwin(win, y0 + tmp->y, x0 + tmp->x) != ERR) {
if (recur) {
@@ -388,45 +460,69 @@ move_window(WINDOW *win, bool recur)
refresh_all(win);
doupdate();
result = TRUE;
+ } else {
+ result = FALSE;
}
+ if (!more)
+ break;
}
}
+ head_line("done");
return result;
}
+static void
+show_derwin(WINDOW *win)
+{
+ int pary, parx, maxy, maxx;
+
+ getmaxyx(win, maxy, maxx);
+ getparyx(win, pary, parx);
+
+ head_line("Select new position for derived window at %d,%d (%d,%d)",
+ pary, parx, maxy, maxx);
+}
+
/*
* test mvderwin().
*/
static bool
-move_subwin(WINDOW *win)
+move_derwin(WINDOW *win)
{
WINDOW *parent = parent_of(win);
bool result = FALSE;
if (parent != 0) {
bool top = (parent == stdscr);
- if (!top) {
- int min_col = top ? COL_MIN : 0;
- int max_col = top ? COL_MAX : getmaxx(parent);
- int min_line = top ? LINE_MIN : 0;
- int max_line = top ? LINE_MAX : getmaxy(parent);
- PAIR *tmp;
-
- head_line("Select new position for subwindow");
-
- if ((tmp = selectcell(parent,
- min_line, min_col,
- max_line, max_col)) != 0) {
- int y0, x0;
- getbegyx(parent, y0, x0);
- if (mvderwin(win, y0 + tmp->y, x0 + tmp->x) != ERR) {
- refresh_all(win);
- doupdate();
- result = TRUE;
- }
+ int min_col = top ? COL_MIN : 0;
+ int max_col = top ? COL_MAX : getmaxx(parent);
+ int min_line = top ? LINE_MIN : 0;
+ int max_line = top ? LINE_MAX : getmaxy(parent);
+ PAIR *tmp;
+ bool more;
+
+ show_derwin(win);
+ while ((tmp = selectcell(parent,
+ win,
+ min_line, min_col,
+ max_line, max_col,
+ TRUE,
+ &more)) != 0) {
+ if (mvderwin(win, tmp->y, tmp->x) != ERR) {
+ refresh_all(win);
+ doupdate();
+ repaint_one(win);
+ doupdate();
+ result = TRUE;
+ show_derwin(win);
+ } else {
+ flash();
}
+ if (!more)
+ break;
}
}
+ head_line("done");
return result;
}
@@ -449,6 +545,28 @@ fill_window(WINDOW *win, chtype ch)
wrefresh(win);
}
+static void
+fill_with_pattern(WINDOW *win)
+{
+ int y, x;
+ int y0, x0;
+ int y1, x1;
+ int ch = 'a';
+
+ getyx(win, y0, x0);
+ getmaxyx(win, y1, x1);
+ for (y = 0; y < y1; ++y) {
+ for (x = 0; x < x1; ++x) {
+ MvWAddCh(win, y, x, (chtype) ch);
+ if (++ch > 'z')
+ ch = 'a';
+ }
+ }
+ wsyncdown(win);
+ wmove(win, y0, x0);
+ wrefresh(win);
+}
+
#define lines_of(ul,lr) (lr.y - ul.y + 1)
#define cols_of(ul,lr) (lr.x - ul.x + 1)
#define pair_of(ul) ul.y, ul.x
@@ -523,12 +641,13 @@ show_help(WINDOW *current)
{ 'b', "Draw a box inside the current window" },
{ 'c', "Create a new window" },
{ 'd', "Create a new derived window" },
+ { 'D', "Move derived window (moves viewport)" },
{ 'f', "Fill the current window with the next character" },
+ { 'F', "Fill the current window with a pattern" },
{ 'm', "Move the current window" },
{ 'M', "Move the current window (and its children)" },
{ 'q', "Quit" },
{ 's', "Create a new subwindow" },
- { 't', "Move the current subwindow (moves content)" },
{ CTRL('L'), "Repaint all windows, doing current one last" },
{ CTRL('N'), "Cursor to next window" },
{ CTRL('P'), "Cursor to previous window" },
@@ -571,6 +690,10 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
#endif /* NCURSES_MOUSE_VERSION */
while (!done && (ch = wgetch(current_win)) != ERR) {
+ int y, x;
+
+ getyx(current_win, y, x);
+
switch (ch) {
case '?':
show_help(current_win);
@@ -584,9 +707,18 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
case 'd':
current_win = create_my_derwin(current_win);
break;
+ case 'D':
+ if (!move_derwin(current_win)) {
+ tail_line("error");
+ continue;
+ }
+ break;
case 'f':
fill_window(current_win, (chtype) wgetch(current_win));
break;
+ case 'F':
+ fill_with_pattern(current_win);
+ break;
case 'm':
case 'M':
if (!move_window(current_win, (ch == 'M'))) {
@@ -600,12 +732,6 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
case 's':
current_win = create_my_subwin(current_win);
break;
- case 't':
- if (!move_subwin(current_win)) {
- tail_line("error");
- continue;
- }
- break;
case CTRL('L'):
refresh_all(current_win);
break;
@@ -621,6 +747,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
/* want to allow deleting a window also */
#endif
default:
+ wmove(current_win, y, x);
tail_line("unrecognized key (use '?' for help)");
beep();
continue;
diff --git a/test/ncurses.c b/test/ncurses.c
index 5a422cf1a8cd..40d8ac465136 100644
--- a/test/ncurses.c
+++ b/test/ncurses.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -40,7 +40,7 @@ AUTHOR
Author: Eric S. Raymond <esr@snark.thyrsus.com> 1993
Thomas E. Dickey (beginning revision 1.27 in 1996).
-$Id: ncurses.c,v 1.365 2011/01/22 19:48:33 tom Exp $
+$Id: ncurses.c,v 1.397 2014/02/01 22:29:37 tom Exp $
***************************************************************************/
@@ -157,15 +157,23 @@ static bool use_colors; /* true if we use colors */
static int max_pairs; /* ...and the number of color pairs */
typedef struct {
- short red;
- short green;
- short blue;
+ NCURSES_COLOR_T red;
+ NCURSES_COLOR_T green;
+ NCURSES_COLOR_T blue;
} RGB_DATA;
static RGB_DATA *all_colors;
static void main_menu(bool);
+static void
+failed(const char *s)
+{
+ perror(s);
+ endwin();
+ ExitProgram(EXIT_FAILURE);
+}
+
/* The behavior of mvhline, mvvline for negative/zero length is unspecified,
* though we can rely on negative x/y values to stop the macro.
*/
@@ -490,7 +498,7 @@ ShellOut(bool message)
#ifdef __MINGW32__
system("cmd.exe");
#else
- system("sh");
+ IGNORE_RC(system("sh"));
#endif
if (message)
addstr("returned from shellout.\n");
@@ -723,6 +731,8 @@ remember_boxes(unsigned level, WINDOW *txt_win, WINDOW *box_win)
len_winstack = need;
winstack = typeRealloc(WINSTACK, len_winstack, winstack);
}
+ if (!winstack)
+ failed("remember_boxes");
winstack[level].text = txt_win;
winstack[level].frame = box_win;
}
@@ -777,12 +787,21 @@ resize_boxes(unsigned level, WINDOW *win)
}
doupdate();
}
-#endif /* resize_boxes */
+#endif /* resize_boxes */
#else
#define forget_boxes() /* nothing */
#define remember_boxes(level,text,frame) /* nothing */
#endif
+/*
+ * Return-code is OK/ERR or a keyname.
+ */
+static const char *
+ok_keyname(int code)
+{
+ return ((code == OK) ? "OK" : ((code == ERR) ? "ERR" : keyname(code)));
+}
+
static void
wgetch_test(unsigned level, WINDOW *win, int delay)
{
@@ -824,9 +843,11 @@ wgetch_test(unsigned level, WINDOW *win, int delay)
} else if (c == 'g') {
waddstr(win, "getstr test: ");
echo();
- wgetnstr(win, buf, sizeof(buf) - 1);
+ c = wgetnstr(win, buf, sizeof(buf) - 1);
noecho();
- wprintw(win, "I saw %d characters:\n\t`%s'.", (int) strlen(buf), buf);
+ wprintw(win, "I saw %d characters:\n\t`%s' (%s).",
+ (int) strlen(buf), buf,
+ ok_keyname(c));
wclrtoeol(win);
wgetch_wrap(win, first_y);
} else if (c == 'k') {
@@ -1023,6 +1044,8 @@ wcstos(const wchar_t *src)
free(result);
result = 0;
}
+ } else {
+ failed("wcstos");
}
}
return result;
@@ -1072,7 +1095,7 @@ wget_wch_test(unsigned level, WINDOW *win, int delay)
} else if (c == 'g') {
waddstr(win, "getstr test: ");
echo();
- code = wgetn_wstr(win, wint_buf, sizeof(wint_buf) - 1);
+ code = wgetn_wstr(win, wint_buf, BUFSIZ - 1);
noecho();
if (code == ERR) {
wprintw(win, "wgetn_wstr returns an error.");
@@ -1278,29 +1301,29 @@ show_color_attr(int fg, int bg, int tx)
}
static bool
-cycle_color_attr(int ch, short *fg, short *bg, short *tx)
+cycle_color_attr(int ch, NCURSES_COLOR_T *fg, NCURSES_COLOR_T *bg, NCURSES_COLOR_T *tx)
{
bool error = FALSE;
if (use_colors) {
switch (ch) {
case 'f':
- *fg = (short) (*fg + 1);
+ *fg = (NCURSES_COLOR_T) (*fg + 1);
break;
case 'F':
- *fg = (short) (*fg - 1);
+ *fg = (NCURSES_COLOR_T) (*fg - 1);
break;
case 'b':
- *bg = (short) (*bg + 1);
+ *bg = (NCURSES_COLOR_T) (*bg + 1);
break;
case 'B':
- *bg = (short) (*bg - 1);
+ *bg = (NCURSES_COLOR_T) (*bg - 1);
break;
case 't':
- *tx = (short) (*tx + 1);
+ *tx = (NCURSES_COLOR_T) (*tx + 1);
break;
case 'T':
- *tx = (short) (*tx - 1);
+ *tx = (NCURSES_COLOR_T) (*tx - 1);
break;
default:
beep();
@@ -1308,17 +1331,17 @@ cycle_color_attr(int ch, short *fg, short *bg, short *tx)
break;
}
if (*fg >= COLORS)
- *fg = (short) min_colors;
+ *fg = (NCURSES_COLOR_T) min_colors;
if (*fg < min_colors)
- *fg = (short) (COLORS - 1);
+ *fg = (NCURSES_COLOR_T) (COLORS - 1);
if (*bg >= COLORS)
- *bg = (short) min_colors;
+ *bg = (NCURSES_COLOR_T) min_colors;
if (*bg < min_colors)
- *bg = (short) (COLORS - 1);
+ *bg = (NCURSES_COLOR_T) (COLORS - 1);
if (*tx >= COLORS)
*tx = -1;
if (*tx < -1)
- *tx = (short) (COLORS - 1);
+ *tx = (NCURSES_COLOR_T) (COLORS - 1);
} else {
beep();
error = TRUE;
@@ -1394,7 +1417,7 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name)
if (!(termattrs() & test)) {
printw(" (N/A)");
} else {
- if (ncv > 0 && (getbkgd(stdscr) & A_COLOR)) {
+ if (ncv > 0 && stdscr && (getbkgd(stdscr) & A_COLOR)) {
static const chtype table[] =
{
A_STANDOUT,
@@ -1406,6 +1429,9 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name)
#ifdef A_INVIS
A_INVIS,
#endif
+#ifdef A_ITALIC
+ A_ITALIC,
+#endif
A_PROTECT,
A_ALTCHARSET
};
@@ -1427,11 +1453,13 @@ show_attr(int row, int skip, bool arrow, chtype attr, const char *name)
}
return row + 2;
}
+
+typedef struct {
+ attr_t attr;
+ NCURSES_CONST char *name;
+} ATTR_TBL;
/* *INDENT-OFF* */
-static const struct {
- chtype attr;
- NCURSES_CONST char * name;
-} attrs_to_test[] = {
+static const ATTR_TBL attrs_to_test[] = {
{ A_STANDOUT, "STANDOUT" },
{ A_REVERSE, "REVERSE" },
{ A_BOLD, "BOLD" },
@@ -1442,12 +1470,36 @@ static const struct {
#ifdef A_INVIS
{ A_INVIS, "INVISIBLE" },
#endif
+#ifdef A_ITALIC
+ { A_ITALIC, "ITALIC" },
+#endif
{ A_NORMAL, "NORMAL" },
};
/* *INDENT-ON* */
+static unsigned
+init_attr_list(ATTR_TBL * target, attr_t attrs)
+{
+ unsigned result = 0;
+ size_t n;
+
+ for (n = 0; n < SIZEOF(attrs_to_test); ++n) {
+ attr_t test = attrs_to_test[n].attr;
+ if (test == A_NORMAL || (test & attrs) != 0) {
+ target[result++] = attrs_to_test[n];
+ }
+ }
+ return result;
+}
+
static bool
-attr_getc(int *skip, short *fg, short *bg, short *tx, int *ac, unsigned *kc)
+attr_getc(int *skip,
+ NCURSES_COLOR_T *fg,
+ NCURSES_COLOR_T *bg,
+ NCURSES_COLOR_T *tx,
+ int *ac,
+ unsigned *kc,
+ unsigned limit)
{
bool result = TRUE;
bool error = FALSE;
@@ -1480,13 +1532,13 @@ attr_getc(int *skip, short *fg, short *bg, short *tx, int *ac, unsigned *kc)
break;
case 'v':
if (*kc == 0)
- *kc = SIZEOF(attrs_to_test) - 1;
+ *kc = limit - 1;
else
*kc -= 1;
break;
case 'V':
*kc += 1;
- if (*kc >= SIZEOF(attrs_to_test))
+ if (*kc >= limit)
*kc = 0;
break;
case '<':
@@ -1513,72 +1565,78 @@ attr_test(void)
{
int n;
int skip = get_xmc();
- short fg = COLOR_BLACK; /* color pair 0 is special */
- short bg = COLOR_BLACK;
- short tx = -1;
+ NCURSES_COLOR_T fg = COLOR_BLACK; /* color pair 0 is special */
+ NCURSES_COLOR_T bg = COLOR_BLACK;
+ NCURSES_COLOR_T tx = -1;
int ac = 0;
unsigned j, k;
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, termattrs());
- if (skip < 0)
- skip = 0;
+ if (my_size > 1) {
+ if (skip < 0)
+ skip = 0;
- n = skip; /* make it easy */
- k = SIZEOF(attrs_to_test) - 1;
- init_attr_string();
+ n = skip; /* make it easy */
+ k = my_size - 1;
+ init_attr_string();
- do {
- int row = 2;
- chtype normal = A_NORMAL | BLANK;
- chtype extras = (chtype) ac;
+ do {
+ int row = 2;
+ chtype normal = A_NORMAL | BLANK;
+ chtype extras = (chtype) ac;
- if (use_colors) {
- short pair = (short) (fg != COLOR_BLACK || bg != COLOR_BLACK);
- if (pair != 0) {
- pair = 1;
- if (init_pair(pair, fg, bg) == ERR) {
- beep();
- } else {
- normal |= (chtype) COLOR_PAIR(pair);
+ if (use_colors) {
+ NCURSES_PAIRS_T pair = 0;
+ if ((fg != COLOR_BLACK) || (bg != COLOR_BLACK)) {
+ pair = 1;
+ if (init_pair(pair, fg, bg) == ERR) {
+ beep();
+ } else {
+ normal |= (chtype) COLOR_PAIR(pair);
+ }
}
- }
- if (tx >= 0) {
- pair = 2;
- if (init_pair(pair, tx, bg) == ERR) {
- beep();
- } else {
- extras |= (chtype) COLOR_PAIR(pair);
+ if (tx >= 0) {
+ pair = 2;
+ if (init_pair(pair, tx, bg) == ERR) {
+ beep();
+ } else {
+ extras |= (chtype) COLOR_PAIR(pair);
+ }
}
}
- }
- bkgd(normal);
- bkgdset(normal);
- erase();
+ bkgd(normal);
+ bkgdset(normal);
+ erase();
- box(stdscr, 0, 0);
- MvAddStr(0, 20, "Character attribute test display");
+ box(stdscr, 0, 0);
+ MvAddStr(0, 20, "Character attribute test display");
- for (j = 0; j < SIZEOF(attrs_to_test); ++j) {
- bool arrow = (j == k);
- row = show_attr(row, n, arrow,
- extras |
- attrs_to_test[j].attr |
- attrs_to_test[k].attr,
- attrs_to_test[j].name);
- }
+ for (j = 0; j < my_size; ++j) {
+ bool arrow = (j == k);
+ row = show_attr(row, n, arrow,
+ extras |
+ my_list[j].attr |
+ my_list[k].attr,
+ my_list[j].name);
+ }
- MvPrintw(row, 8,
- "This terminal does %shave the magic-cookie glitch",
- get_xmc() > -1 ? "" : "not ");
- MvPrintw(row + 1, 8, "Enter '?' for help.");
- show_color_attr(fg, bg, tx);
- printw(" ACS (%d)", ac != 0);
+ MvPrintw(row, 8,
+ "This terminal does %shave the magic-cookie glitch",
+ get_xmc() > -1 ? "" : "not ");
+ MvPrintw(row + 1, 8, "Enter '?' for help.");
+ show_color_attr(fg, bg, tx);
+ printw(" ACS (%d)", ac != 0);
- refresh();
- } while (attr_getc(&n, &fg, &bg, &tx, &ac, &k));
+ refresh();
+ } while (attr_getc(&n, &fg, &bg, &tx, &ac, &k, my_size));
- bkgdset(A_NORMAL | BLANK);
- erase();
- endwin();
+ bkgdset(A_NORMAL | BLANK);
+ erase();
+ endwin();
+ } else {
+ Cannot("does not support video attributes.");
+ }
}
#if USE_WIDEC_SUPPORT
@@ -1616,7 +1674,7 @@ wide_init_attr_string(void)
}
static void
-set_wide_background(short pair)
+set_wide_background(NCURSES_PAIRS_T pair)
{
cchar_t normal;
wchar_t blank[2];
@@ -1634,9 +1692,10 @@ get_wide_background(void)
attr_t result = A_NORMAL;
attr_t attr;
cchar_t ch;
- short pair;
+ NCURSES_PAIRS_T pair;
wchar_t wch[10];
+ memset(&ch, 0, sizeof(ch));
if (getbkgrnd(&ch) != ERR) {
if (getcchar(&ch, wch, &attr, &pair, 0) != ERR) {
result = attr;
@@ -1646,7 +1705,12 @@ get_wide_background(void)
}
static int
-wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const char *name)
+wide_show_attr(int row,
+ int skip,
+ bool arrow,
+ chtype attr,
+ NCURSES_PAIRS_T pair,
+ const char *name)
{
int ncv = get_ncv();
chtype test = attr & ~WA_ALTCHARSET;
@@ -1675,10 +1739,10 @@ wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const cha
add_wch(&ch);
}
} else {
- attr_t old_attr;
- short old_pair;
+ attr_t old_attr = 0;
+ NCURSES_PAIRS_T old_pair = 0;
- (void) attr_get(&old_attr, &old_pair, 0);
+ (void) (attr_get) (&old_attr, &old_pair, 0);
(void) attr_set(attr, pair, 0);
addwstr(wide_attr_test_string);
(void) attr_set(old_attr, old_pair, 0);
@@ -1723,7 +1787,10 @@ wide_show_attr(int row, int skip, bool arrow, chtype attr, short pair, const cha
}
static bool
-wide_attr_getc(int *skip, short *fg, short *bg, short *tx, int *ac, unsigned *kc)
+wide_attr_getc(int *skip,
+ NCURSES_COLOR_T *fg, NCURSES_COLOR_T *bg,
+ NCURSES_COLOR_T *tx, int *ac,
+ unsigned *kc, unsigned limit)
{
bool result = TRUE;
bool error = FALSE;
@@ -1756,13 +1823,13 @@ wide_attr_getc(int *skip, short *fg, short *bg, short *tx, int *ac, unsigned *kc
break;
case 'v':
if (*kc == 0)
- *kc = SIZEOF(attrs_to_test) - 1;
+ *kc = limit - 1;
else
*kc -= 1;
break;
case 'V':
*kc += 1;
- if (*kc >= SIZEOF(attrs_to_test))
+ if (*kc >= limit)
*kc = 0;
break;
case '<':
@@ -1789,68 +1856,74 @@ wide_attr_test(void)
{
int n;
int skip = get_xmc();
- short fg = COLOR_BLACK; /* color pair 0 is special */
- short bg = COLOR_BLACK;
- short tx = -1;
+ NCURSES_COLOR_T fg = COLOR_BLACK; /* color pair 0 is special */
+ NCURSES_COLOR_T bg = COLOR_BLACK;
+ NCURSES_COLOR_T tx = -1;
int ac = 0;
unsigned j, k;
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, term_attrs());
- if (skip < 0)
- skip = 0;
+ if (my_size > 1) {
+ if (skip < 0)
+ skip = 0;
- n = skip; /* make it easy */
- k = SIZEOF(attrs_to_test) - 1;
- wide_init_attr_string();
+ n = skip; /* make it easy */
+ k = my_size - 1;
+ wide_init_attr_string();
- do {
- int row = 2;
- short pair = 0;
- short extras = 0;
+ do {
+ int row = 2;
+ NCURSES_PAIRS_T pair = 0;
+ NCURSES_PAIRS_T extras = 0;
- if (use_colors) {
- pair = (short) (fg != COLOR_BLACK || bg != COLOR_BLACK);
- if (pair != 0) {
- pair = 1;
- if (init_pair(pair, fg, bg) == ERR) {
- beep();
+ if (use_colors) {
+ pair = (NCURSES_PAIRS_T) (fg != COLOR_BLACK || bg != COLOR_BLACK);
+ if (pair != 0) {
+ pair = 1;
+ if (init_pair(pair, fg, bg) == ERR) {
+ beep();
+ }
}
- }
- extras = pair;
- if (tx >= 0) {
- extras = 2;
- if (init_pair(extras, tx, bg) == ERR) {
- beep();
+ extras = pair;
+ if (tx >= 0) {
+ extras = 2;
+ if (init_pair(extras, tx, bg) == ERR) {
+ beep();
+ }
}
}
- }
- set_wide_background(pair);
- erase();
+ set_wide_background(pair);
+ erase();
- box_set(stdscr, 0, 0);
- MvAddStr(0, 20, "Character attribute test display");
+ box_set(stdscr, 0, 0);
+ MvAddStr(0, 20, "Character attribute test display");
- for (j = 0; j < SIZEOF(attrs_to_test); ++j) {
- row = wide_show_attr(row, n, j == k,
- ((attr_t) ac |
- attrs_to_test[j].attr |
- attrs_to_test[k].attr),
- extras,
- attrs_to_test[j].name);
- }
+ for (j = 0; j < my_size; ++j) {
+ row = wide_show_attr(row, n, j == k,
+ ((attr_t) ac |
+ my_list[j].attr |
+ my_list[k].attr),
+ extras,
+ my_list[j].name);
+ }
- MvPrintw(row, 8,
- "This terminal does %shave the magic-cookie glitch",
- get_xmc() > -1 ? "" : "not ");
- MvPrintw(row + 1, 8, "Enter '?' for help.");
- show_color_attr(fg, bg, tx);
- printw(" ACS (%d)", ac != 0);
+ MvPrintw(row, 8,
+ "This terminal does %shave the magic-cookie glitch",
+ get_xmc() > -1 ? "" : "not ");
+ MvPrintw(row + 1, 8, "Enter '?' for help.");
+ show_color_attr(fg, bg, tx);
+ printw(" ACS (%d)", ac != 0);
- refresh();
- } while (wide_attr_getc(&n, &fg, &bg, &tx, &ac, &k));
+ refresh();
+ } while (wide_attr_getc(&n, &fg, &bg, &tx, &ac, &k, my_size));
- set_wide_background(0);
- erase();
- endwin();
+ set_wide_background(0);
+ erase();
+ endwin();
+ } else {
+ Cannot("does not support extended video attributes.");
+ }
}
#endif
@@ -1895,7 +1968,7 @@ show_color_name(int y, int x, int color, bool wide)
} else if (color < 0) {
strcpy(temp, "default");
} else {
- strcpy(temp, the_color_names[color]);
+ sprintf(temp, "%.*s", 16, the_color_names[color]);
}
printw("%-*.*s", width, width, temp);
}
@@ -1949,7 +2022,7 @@ color_legend(WINDOW *helpwin, bool wide)
static void
color_test(void)
{
- short i;
+ NCURSES_PAIRS_T i;
int top = 0, width;
int base_row = 0;
int grid_top = top + 3;
@@ -2010,16 +2083,16 @@ color_test(void)
show_color_name(top + 2, (i + 1) * width, i + min_colors, opt_wide);
/* show a grid of colors, with color names/ numbers on the left */
- for (i = (short) (base_row * per_row); i < pairs_max; i++) {
+ for (i = (NCURSES_PAIRS_T) (base_row * per_row); i < pairs_max; i++) {
int row = grid_top + (i / per_row) - base_row;
int col = (i % per_row + 1) * width;
- short pair = i;
+ NCURSES_PAIRS_T pair = i;
-#define InxToFG(i) (short) ((i % (COLORS - min_colors)) + min_colors)
-#define InxToBG(i) (short) ((i / (COLORS - min_colors)) + min_colors)
+#define InxToFG(i) (NCURSES_COLOR_T) ((i % (COLORS - min_colors)) + min_colors)
+#define InxToBG(i) (NCURSES_COLOR_T) ((i / (COLORS - min_colors)) + min_colors)
if (row >= 0 && move(row, col) != ERR) {
- short fg = InxToFG(i);
- short bg = InxToBG(i);
+ NCURSES_COLOR_T fg = InxToFG(i);
+ NCURSES_COLOR_T bg = InxToBG(i);
init_pair(pair, fg, bg);
attron((attr_t) COLOR_PAIR(pair));
@@ -2031,7 +2104,7 @@ color_test(void)
attron((attr_t) A_REVERSE);
if (opt_nums) {
- sprintf(numbered, "{%02X}", i);
+ sprintf(numbered, "{%02X}", (int) i);
hello = numbered;
}
printw("%-*.*s", width, width, hello);
@@ -2159,7 +2232,7 @@ wide_color_test(void)
bool opt_wide = FALSE;
bool opt_nums = FALSE;
bool opt_xchr = FALSE;
- wchar_t buffer[10];
+ wchar_t buffer[80];
WINDOW *helpwin;
if (COLORS * COLORS == COLOR_PAIRS) {
@@ -2216,11 +2289,11 @@ wide_color_test(void)
for (i = (base_row * per_row); i < pairs_max; i++) {
int row = grid_top + (i / per_row) - base_row;
int col = (i % per_row + 1) * width;
- short pair = (short) i;
+ NCURSES_PAIRS_T pair = (NCURSES_PAIRS_T) i;
if (row >= 0 && move(row, col) != ERR) {
init_pair(pair, InxToFG(i), InxToBG(i));
- color_set(pair, NULL);
+ (void) color_set(pair, NULL);
if (opt_acsc)
attr_on((attr_t) A_ALTCHARSET, NULL);
if (opt_bold)
@@ -2347,21 +2420,21 @@ wide_color_test(void)
#endif /* USE_WIDEC_SUPPORT */
static void
-change_color(short current, int field, int value, int usebase)
+change_color(NCURSES_PAIRS_T current, int field, int value, int usebase)
{
- short red, green, blue;
+ NCURSES_COLOR_T red, green, blue;
color_content(current, &red, &green, &blue);
switch (field) {
case 0:
- red = (short) (usebase ? (red + value) : value);
+ red = (NCURSES_COLOR_T) (usebase ? (red + value) : value);
break;
case 1:
- green = (short) (usebase ? (green + value) : value);
+ green = (NCURSES_COLOR_T) (usebase ? (green + value) : value);
break;
case 2:
- blue = (short) (usebase ? (blue + value) : value);
+ blue = (NCURSES_COLOR_T) (usebase ? (blue + value) : value);
break;
}
@@ -2372,7 +2445,7 @@ change_color(short current, int field, int value, int usebase)
static void
init_all_colors(void)
{
- short c;
+ NCURSES_PAIRS_T c;
for (c = 0; c < COLORS; ++c)
init_color(c,
@@ -2398,18 +2471,20 @@ color_edit(void)
refresh();
for (i = 0; i < max_colors; i++)
- init_pair((short) i, (short) COLOR_WHITE, (short) i);
+ init_pair((NCURSES_PAIRS_T) i,
+ (NCURSES_COLOR_T) COLOR_WHITE,
+ (NCURSES_COLOR_T) i);
MvPrintw(LINES - 2, 0, "Number: %d", value);
do {
- short red, green, blue;
+ NCURSES_COLOR_T red, green, blue;
attron(A_BOLD);
MvAddStr(0, 20, "Color RGB Value Editing");
attroff(A_BOLD);
- for (i = (short) top_color;
+ for (i = (NCURSES_COLOR_T) top_color;
(i - top_color < page_size)
&& (i < max_colors); i++) {
char numeric[80];
@@ -2423,30 +2498,30 @@ color_edit(void)
addstr(" ");
(void) attrset(A_NORMAL);
- color_content((short) i, &red, &green, &blue);
+ color_content((NCURSES_PAIRS_T) i, &red, &green, &blue);
addstr(" R = ");
if (current == i && field == 0)
attron(A_STANDOUT);
- printw("%04d", red);
+ printw("%04d", (int) red);
if (current == i && field == 0)
(void) attrset(A_NORMAL);
addstr(", G = ");
if (current == i && field == 1)
attron(A_STANDOUT);
- printw("%04d", green);
+ printw("%04d", (int) green);
if (current == i && field == 1)
(void) attrset(A_NORMAL);
addstr(", B = ");
if (current == i && field == 2)
attron(A_STANDOUT);
- printw("%04d", blue);
+ printw("%04d", (int) blue);
if (current == i && field == 2)
(void) attrset(A_NORMAL);
(void) attrset(A_NORMAL);
printw(" ( %3d %3d %3d )",
- scaled_rgb(red),
- scaled_rgb(green),
- scaled_rgb(blue));
+ (int) scaled_rgb(red),
+ (int) scaled_rgb(green),
+ (int) scaled_rgb(blue));
}
MvAddStr(LINES - 3, 0,
@@ -2510,15 +2585,15 @@ color_edit(void)
break;
case '+':
- change_color((short) current, field, value, 1);
+ change_color((NCURSES_PAIRS_T) current, field, value, 1);
break;
case '-':
- change_color((short) current, field, -value, 1);
+ change_color((NCURSES_PAIRS_T) current, field, -value, 1);
break;
case '=':
- change_color((short) current, field, value, 0);
+ change_color((NCURSES_PAIRS_T) current, field, value, 0);
break;
case '?':
@@ -2545,7 +2620,9 @@ color_edit(void)
endwin();
main_menu(FALSE);
for (i = 0; i < max_colors; i++)
- init_pair((short) i, (short) COLOR_WHITE, (short) i);
+ init_pair((NCURSES_PAIRS_T) i,
+ (NCURSES_COLOR_T) COLOR_WHITE,
+ (NCURSES_COLOR_T) i);
refresh();
break;
@@ -2586,32 +2663,19 @@ color_edit(void)
* Alternate character-set stuff
*
****************************************************************************/
-/* *INDENT-OFF* */
-static struct {
- chtype attr;
- const char *name;
-} attrs_to_cycle[] = {
- { A_NORMAL, "normal" },
- { A_BOLD, "bold" },
- { A_BLINK, "blink" },
- { A_REVERSE, "reverse" },
- { A_UNDERLINE, "underline" },
-};
-/* *INDENT-ON* */
-
static bool
-cycle_attr(int ch, unsigned *at_code, chtype *attr)
+cycle_attr(int ch, unsigned *at_code, chtype *attr, ATTR_TBL * list, unsigned limit)
{
bool result = TRUE;
switch (ch) {
case 'v':
- if ((*at_code += 1) >= SIZEOF(attrs_to_cycle))
+ if ((*at_code += 1) >= limit)
*at_code = 0;
break;
case 'V':
if (*at_code == 0)
- *at_code = SIZEOF(attrs_to_cycle) - 1;
+ *at_code = limit - 1;
else
*at_code -= 1;
break;
@@ -2620,12 +2684,12 @@ cycle_attr(int ch, unsigned *at_code, chtype *attr)
break;
}
if (result)
- *attr = attrs_to_cycle[*at_code].attr;
+ *attr = list[*at_code].attr;
return result;
}
static bool
-cycle_colors(int ch, int *fg, int *bg, short *pair)
+cycle_colors(int ch, int *fg, int *bg, NCURSES_PAIRS_T *pair)
{
bool result = FALSE;
@@ -2653,10 +2717,12 @@ cycle_colors(int ch, int *fg, int *bg, short *pair)
break;
}
if (result) {
- *pair = (short) (*fg != COLOR_BLACK || *bg != COLOR_BLACK);
+ *pair = (NCURSES_PAIRS_T) (*fg != COLOR_BLACK || *bg != COLOR_BLACK);
if (*pair != 0) {
*pair = 1;
- if (init_pair(*pair, (short) *fg, (short) *bg) == ERR) {
+ if (init_pair(*pair,
+ (NCURSES_COLOR_T) *fg,
+ (NCURSES_COLOR_T) *bg) == ERR) {
result = FALSE;
}
}
@@ -2715,7 +2781,7 @@ slk_help(void)
static void
call_slk_color(int fg, int bg)
{
- init_pair(1, (short) bg, (short) fg);
+ init_pair(1, (NCURSES_COLOR_T) bg, (NCURSES_COLOR_T) fg);
slk_color(1);
MvPrintw(SLK_WORK, 0, "Colors %d/%d\n", fg, bg);
clrtoeol();
@@ -2737,8 +2803,10 @@ slk_test(void)
#if HAVE_SLK_COLOR
int fg = COLOR_BLACK;
int bg = COLOR_WHITE;
- short pair = 0;
+ NCURSES_PAIRS_T pair = 0;
#endif
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, termattrs());
c = CTRL('l');
#if HAVE_SLK_COLOR
@@ -2800,7 +2868,7 @@ slk_test(void)
MvAddStr(SLK_WORK, 0, "Please enter the label value: ");
strcpy(buf, "");
if ((s = slk_label(c - '0')) != 0) {
- strncpy(buf, s, 8);
+ strncpy(buf, s, (size_t) 8);
}
wGetstring(stdscr, buf, 8);
slk_set((c - '0'), buf, fmt);
@@ -2819,7 +2887,7 @@ slk_test(void)
#endif
default:
- if (cycle_attr(c, &at_code, &attr)) {
+ if (cycle_attr(c, &at_code, &attr, my_list, my_size)) {
slk_attrset(attr);
slk_touch();
slk_noutrefresh();
@@ -2859,7 +2927,9 @@ wide_slk_test(void)
unsigned at_code = 0;
int fg = COLOR_BLACK;
int bg = COLOR_WHITE;
- short pair = 0;
+ NCURSES_PAIRS_T pair = 0;
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, term_attrs());
c = CTRL('l');
if (use_colors) {
@@ -2955,13 +3025,13 @@ wide_slk_test(void)
case 'F':
if (use_colors) {
- fg = (short) ((fg + 1) % COLORS);
+ fg = (NCURSES_COLOR_T) ((fg + 1) % COLORS);
call_slk_color(fg, bg);
}
break;
case 'B':
if (use_colors) {
- bg = (short) ((bg + 1) % COLORS);
+ bg = (NCURSES_COLOR_T) ((bg + 1) % COLORS);
call_slk_color(fg, bg);
}
break;
@@ -2971,8 +3041,8 @@ wide_slk_test(void)
break;
#endif
default:
- if (cycle_attr(c, &at_code, &attr)) {
- slk_attr_set(attr, (fg || bg), NULL);
+ if (cycle_attr(c, &at_code, &attr, my_list, my_size)) {
+ slk_attr_set(attr, (NCURSES_COLOR_T) (fg || bg), NULL);
slk_touch();
slk_noutrefresh();
break;
@@ -3000,15 +3070,46 @@ wide_slk_test(void)
#endif
#endif /* SLK_INIT */
-/* ISO 6429: codes 0x80 to 0x9f may be control characters that cause the
+static void
+show_256_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
+{
+ unsigned first = 0;
+ unsigned last = 255;
+ unsigned code;
+ int count;
+
+ erase();
+ attron(A_BOLD);
+ MvPrintw(0, 20, "Display of Character Codes %#0x to %#0x",
+ first, last);
+ attroff(A_BOLD);
+ refresh();
+
+ for (code = first; code <= last; ++code) {
+ int row = (int) (2 + (code / 16));
+ int col = (int) (5 * (code % 16));
+ IGNORE_RC(mvaddch(row, col, colored_chtype(code, attr, pair)));
+ for (count = 1; count < repeat; ++count) {
+ addch(colored_chtype(code, attr, pair));
+ }
+ }
+
+}
+
+/*
+ * Show a slice of 32 characters, allowing those to be repeated up to the
+ * screen's width.
+ *
+ * ISO 6429: codes 0x80 to 0x9f may be control characters that cause the
* terminal to perform functions. The remaining codes can be graphic.
*/
static void
-show_upper_chars(unsigned first, int repeat, attr_t attr, short pair)
+show_upper_chars(int base, int pagesize, int repeat, attr_t attr, NCURSES_PAIRS_T pair)
{
- bool C1 = (first == 128);
unsigned code;
- unsigned last = first + 31;
+ unsigned first = (unsigned) base;
+ unsigned last = first + (unsigned) pagesize - 2;
+ bool C1 = (first == 128);
int reply;
erase();
@@ -3020,8 +3121,8 @@ show_upper_chars(unsigned first, int repeat, attr_t attr, short pair)
for (code = first; code <= last; code++) {
int count = repeat;
- int row = 2 + ((int) (code - first) % 16);
- int col = ((int) (code - first) / 16) * COLS / 2;
+ int row = 2 + ((int) (code - first) % (pagesize / 2));
+ int col = ((int) (code - first) / (pagesize / 2)) * COLS / 2;
char tmp[80];
sprintf(tmp, "%3u (0x%x)", code, code);
MvPrintw(row, col, "%*s: ", COLS / 4, tmp);
@@ -3045,7 +3146,7 @@ show_upper_chars(unsigned first, int repeat, attr_t attr, short pair)
#define PC_COLS 4
static void
-show_pc_chars(int repeat, attr_t attr, short pair)
+show_pc_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
{
unsigned code;
@@ -3086,7 +3187,7 @@ show_pc_chars(int repeat, attr_t attr, short pair)
}
static void
-show_box_chars(int repeat, attr_t attr, short pair)
+show_box_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
{
(void) repeat;
@@ -3133,7 +3234,7 @@ show_1_acs(int n, int repeat, const char *name, chtype code)
}
static void
-show_acs_chars(int repeat, attr_t attr, short pair)
+show_acs_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
/* display the ACS character set */
{
int n;
@@ -3195,6 +3296,7 @@ static void
acs_display(void)
{
int c = 'a';
+ int pagesize = 32;
char *term = getenv("TERM");
const char *pch_kludge = ((term != 0 && strstr(term, "linux"))
? "p=PC, "
@@ -3205,8 +3307,10 @@ acs_display(void)
int fg = COLOR_BLACK;
int bg = COLOR_BLACK;
unsigned at_code = 0;
- short pair = 0;
- void (*last_show_acs) (int, attr_t, short) = 0;
+ NCURSES_PAIRS_T pair = 0;
+ void (*last_show_acs) (int, attr_t, NCURSES_PAIRS_T) = 0;
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, termattrs());
do {
switch (c) {
@@ -3222,6 +3326,13 @@ acs_display(void)
else
beep();
break;
+ case 'w':
+ if (pagesize == 32) {
+ pagesize = 256;
+ } else {
+ pagesize = 32;
+ }
+ break;
case 'x':
ToggleAcs(last_show_acs, show_box_chars);
break;
@@ -3257,7 +3368,7 @@ acs_display(void)
--repeat;
break;
default:
- if (cycle_attr(c, &at_code, &attr)
+ if (cycle_attr(c, &at_code, &attr, my_list, my_size)
|| cycle_colors(c, &fg, &bg, &pair)) {
break;
} else {
@@ -3265,25 +3376,28 @@ acs_display(void)
}
break;
}
- if (last_show_acs != 0)
+ if (pagesize != 32) {
+ show_256_chars(repeat, attr, pair);
+ } else if (last_show_acs != 0) {
last_show_acs(repeat, attr, pair);
- else
- show_upper_chars((unsigned) (digit * 32 + 128), repeat, attr, pair);
+ } else {
+ show_upper_chars(digit * pagesize + 128, pagesize, repeat, attr, pair);
+ }
MvPrintw(LINES - 3, 0,
"Note: ANSI terminals may not display C1 characters.");
MvPrintw(LINES - 2, 0,
- "Select: a=ACS, x=box, %s0=C1, 1-3,+/- non-ASCII, </> repeat, ESC=quit",
+ "Select: a=ACS, w=all x=box, %s0=C1, 1-3,+/- non-ASCII, </> repeat, ESC=quit",
pch_kludge);
if (use_colors) {
MvPrintw(LINES - 1, 0,
"v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
- attrs_to_cycle[at_code].name,
+ my_list[at_code].name,
fg, bg);
} else {
MvPrintw(LINES - 1, 0,
"v/V cycles through video attributes (%s).",
- attrs_to_cycle[at_code].name);
+ my_list[at_code].name);
}
refresh();
} while (!isQuit(c = Getchar()));
@@ -3295,7 +3409,7 @@ acs_display(void)
#if USE_WIDEC_SUPPORT
static cchar_t *
-merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, short pair)
+merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, NCURSES_PAIRS_T pair)
{
int count;
@@ -3312,8 +3426,55 @@ merge_wide_attr(cchar_t *dst, const cchar_t *src, attr_t attr, short pair)
return dst;
}
+/*
+ * Header/legend take up no more than 8 lines, leaving 16 lines on a 24-line
+ * display. If there are no repeats, we could normally display 16 lines of 64
+ * characters (1024 total). However, taking repeats and double-width cells
+ * into account, use 256 characters for the page.
+ */
static void
-show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair)
+show_paged_widechars(int base,
+ int pagesize,
+ int repeat,
+ int space,
+ attr_t attr,
+ NCURSES_PAIRS_T pair)
+{
+ int first = base * pagesize;
+ int last = first + pagesize - 1;
+ int per_line = 16;
+ cchar_t temp;
+ wchar_t code;
+ wchar_t codes[10];
+
+ erase();
+ attron(A_BOLD);
+ MvPrintw(0, 20, "Display of Character Codes %#x to %#x", first, last);
+ attroff(A_BOLD);
+
+ for (code = first; (int) code <= last; code++) {
+ int row = (2 + ((int) code - first) / per_line);
+ int col = 5 * ((int) code % per_line);
+ int count;
+
+ memset(&codes, 0, sizeof(codes));
+ codes[0] = code;
+ setcchar(&temp, codes, attr, pair, 0);
+ move(row, col);
+ if (wcwidth(code) == 0 && code != 0) {
+ addch((chtype) space |
+ (A_REVERSE ^ attr) |
+ (attr_t) COLOR_PAIR(pair));
+ }
+ add_wch(&temp);
+ for (count = 1; count < repeat; ++count) {
+ add_wch(&temp);
+ }
+ }
+}
+
+static void
+show_upper_widechars(int first, int repeat, int space, attr_t attr, NCURSES_PAIRS_T pair)
{
cchar_t temp;
wchar_t code;
@@ -3332,11 +3493,13 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair)
int count = repeat;
int y, x;
- memset(&codes, 0, sizeof(codes));
- codes[0] = code;
sprintf(tmp, "%3ld (0x%lx)", (long) code, (long) code);
MvPrintw(row, col, "%*s: ", COLS / 4, tmp);
+
+ memset(&codes, 0, sizeof(codes));
+ codes[0] = code;
setcchar(&temp, codes, attr, pair, 0);
+
do {
/*
* Give non-spacing characters something to combine with. If we
@@ -3350,16 +3513,17 @@ show_upper_widechars(int first, int repeat, int space, attr_t attr, short pair)
(attr_t) COLOR_PAIR(pair));
}
/*
- * This could use add_wch(), but is done for comparison with the
- * normal 'f' test (and to make a test-case for echo_wchar()).
- * The screen will flicker because the erase() at the top of the
- * function is met by the builtin refresh() in echo_wchar().
+ * This uses echo_wchar(), for comparison with the normal 'f'
+ * test (and to make a test-case for echo_wchar()). The screen
+ * may flicker because the erase() at the top of the function
+ * is met by the builtin refresh() in echo_wchar().
*/
echo_wchar(&temp);
/*
* The repeat-count may make text wrap - avoid that.
*/
getyx(stdscr, y, x);
+ (void) y;
if (x >= col + (COLS / 2) - 2)
break;
} while (--count > 0);
@@ -3383,7 +3547,7 @@ show_1_wacs(int n, int repeat, const char *name, const cchar_t *code)
#define MERGE_ATTR(wch) merge_wide_attr(&temp, wch, attr, pair)
static void
-show_wacs_chars(int repeat, attr_t attr, short pair)
+show_wacs_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
/* display the wide-ACS character set */
{
cchar_t temp;
@@ -3443,7 +3607,7 @@ show_wacs_chars(int repeat, attr_t attr, short pair)
#ifdef WACS_D_PLUS
static void
-show_wacs_chars_double(int repeat, attr_t attr, short pair)
+show_wacs_chars_double(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
/* display the wide-ACS character set */
{
cchar_t temp;
@@ -3504,7 +3668,7 @@ show_wacs_chars_double(int repeat, attr_t attr, short pair)
#ifdef WACS_T_PLUS
static void
-show_wacs_chars_thick(int repeat, attr_t attr, short pair)
+show_wacs_chars_thick(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
/* display the wide-ACS character set */
{
cchar_t temp;
@@ -3568,7 +3732,7 @@ show_wacs_chars_thick(int repeat, attr_t attr, short pair)
#define MERGE_ATTR(n,wch) merge_wide_attr(&temp[n], wch, attr, pair)
static void
-show_wbox_chars(int repeat, attr_t attr, short pair)
+show_wbox_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
{
cchar_t temp[8];
@@ -3603,7 +3767,7 @@ show_wbox_chars(int repeat, attr_t attr, short pair)
#undef MERGE_ATTR
static int
-show_2_wacs(int n, const char *name, const char *code, attr_t attr, short pair)
+show_2_wacs(int n, const char *name, const char *code, attr_t attr, NCURSES_PAIRS_T pair)
{
const int height = 16;
int row = 2 + (n % height);
@@ -3612,7 +3776,7 @@ show_2_wacs(int n, const char *name, const char *code, attr_t attr, short pair)
MvPrintw(row, col, "%*s : ", COLS / 4, name);
(void) attr_set(attr, pair, 0);
- addstr(strcpy(temp, code));
+ addstr(strncpy(temp, code, 20));
(void) attr_set(A_NORMAL, 0, 0);
return n + 1;
}
@@ -3620,7 +3784,7 @@ show_2_wacs(int n, const char *name, const char *code, attr_t attr, short pair)
#define SHOW_UTF8(n, name, code) show_2_wacs(n, name, code, attr, pair)
static void
-show_utf8_chars(int repeat, attr_t attr, short pair)
+show_utf8_chars(int repeat, attr_t attr, NCURSES_PAIRS_T pair)
{
int n;
@@ -3680,12 +3844,15 @@ wide_acs_display(void)
int digit = 0;
int repeat = 1;
int space = ' ';
+ int pagesize = 32;
chtype attr = A_NORMAL;
int fg = COLOR_BLACK;
int bg = COLOR_BLACK;
unsigned at_code = 0;
- short pair = 0;
- void (*last_show_wacs) (int, attr_t, short) = 0;
+ NCURSES_PAIRS_T pair = 0;
+ void (*last_show_wacs) (int, attr_t, NCURSES_PAIRS_T) = 0;
+ ATTR_TBL my_list[SIZEOF(attrs_to_test)];
+ unsigned my_size = init_attr_list(my_list, term_attrs());
do {
switch (c) {
@@ -3705,6 +3872,13 @@ wide_acs_display(void)
ToggleAcs(last_show_wacs, show_wacs_chars_thick);
break;
#endif
+ case 'w':
+ if (pagesize == 32) {
+ pagesize = 256;
+ } else {
+ pagesize = 32;
+ }
+ break;
case 'x':
ToggleAcs(last_show_wacs, show_wbox_chars);
break;
@@ -3728,7 +3902,7 @@ wide_acs_display(void)
} else if (c == '_') {
space = (space == ' ') ? '_' : ' ';
last_show_wacs = 0;
- } else if (cycle_attr(c, &at_code, &attr)
+ } else if (cycle_attr(c, &at_code, &attr, my_list, my_size)
|| cycle_colors(c, &fg, &bg, &pair)) {
if (last_show_wacs != 0)
break;
@@ -3738,22 +3912,27 @@ wide_acs_display(void)
}
break;
}
- if (last_show_wacs != 0)
+ if (pagesize != 32) {
+ show_paged_widechars(digit, pagesize, repeat, space, attr, pair);
+ } else if (last_show_wacs != 0) {
last_show_wacs(repeat, attr, pair);
- else
+ } else {
show_upper_widechars(digit * 32 + 128, repeat, space, attr, pair);
+ }
- MvPrintw(LINES - 3, 0,
- "Select: a/d/t WACS, x box, u UTF-8, 0-9,+/- non-ASCII, </> repeat, ESC=quit");
+ MvPrintw(LINES - 4, 0,
+ "Select: a/d/t WACS, w=all x=box, u UTF-8, ^L repaint");
+ MvPrintw(LINES - 3, 2,
+ "0-9,+/- non-ASCII, </> repeat, _ space, ESC=quit");
if (use_colors) {
- MvPrintw(LINES - 2, 0,
+ MvPrintw(LINES - 2, 2,
"v/V, f/F, b/B cycle through video attributes (%s) and color %d/%d.",
- attrs_to_cycle[at_code].name,
+ my_list[at_code].name,
fg, bg);
} else {
- MvPrintw(LINES - 2, 0,
+ MvPrintw(LINES - 2, 2,
"v/V cycles through video attributes (%s).",
- attrs_to_cycle[at_code].name);
+ my_list[at_code].name);
}
refresh();
} while (!isQuit(c = Getchar()));
@@ -3779,7 +3958,7 @@ test_sgr_attributes(void)
/* Use non-default colors if possible to exercise bce a little */
if (use_colors) {
init_pair(1, COLOR_WHITE, COLOR_BLUE);
- normal |= COLOR_PAIR(1);
+ normal |= (chtype) COLOR_PAIR(1);
}
bkgdset(normal);
erase();
@@ -4115,7 +4294,8 @@ getwindow(void)
outerbox(ul, lr, TRUE);
refresh();
- wrefresh(rwindow);
+ if (rwindow != 0)
+ wrefresh(rwindow);
move(0, 0);
clrtoeol();
@@ -4185,10 +4365,12 @@ acs_and_scroll(void)
transient((FRAME *) 0, (char *) 0);
switch (c) {
case CTRL('C'):
- if ((neww = typeCalloc(FRAME, 1)) == 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) == 0) {
+ failed("acs_and_scroll");
goto breakout;
}
if ((neww->wind = getwindow()) == (WINDOW *) 0) {
+ failed("acs_and_scroll");
free(neww);
goto breakout;
}
@@ -4265,16 +4447,20 @@ acs_and_scroll(void)
if ((fp = fopen(DUMPFILE, "r")) == (FILE *) 0) {
transient(current, "Can't open screen dump file");
} else {
- if ((neww = typeCalloc(FRAME, 1)) != 0) {
+ if ((neww = typeCalloc(FRAME, (size_t) 1)) != 0) {
neww->next = current ? current->next : 0;
neww->last = current;
- neww->last->next = neww;
- neww->next->last = neww;
+ if (neww->last != 0)
+ neww->last->next = neww;
+ if (neww->next != 0)
+ neww->next->last = neww;
neww->wind = getwin(fp);
wrefresh(neww->wind);
+ } else {
+ failed("acs_and_scroll");
}
(void) fclose(fp);
}
@@ -4463,7 +4649,7 @@ saywhat(NCURSES_CONST char *text)
mkpanel(rows,cols,tly,tlx) - alloc a win and panel and associate them
--------------------------------------------------------------------------*/
static PANEL *
-mkpanel(short color, int rows, int cols, int tly, int tlx)
+mkpanel(NCURSES_COLOR_T color, int rows, int cols, int tly, int tlx)
{
WINDOW *win;
PANEL *pan = 0;
@@ -4472,8 +4658,10 @@ mkpanel(short color, int rows, int cols, int tly, int tlx)
if ((pan = new_panel(win)) == 0) {
delwin(win);
} else if (use_colors) {
- short fg = (short) ((color == COLOR_BLUE) ? COLOR_WHITE : COLOR_BLACK);
- short bg = color;
+ NCURSES_COLOR_T fg = (NCURSES_COLOR_T) ((color == COLOR_BLUE)
+ ? COLOR_WHITE
+ : COLOR_BLACK);
+ NCURSES_COLOR_T bg = color;
init_pair(color, fg, bg);
wbkgdset(win, (attr_t) (COLOR_PAIR(color) | ' '));
@@ -5226,7 +5414,7 @@ flushinp_test(WINDOW *win)
#ifdef A_COLOR
if (use_colors) {
init_pair(2, COLOR_CYAN, COLOR_BLUE);
- wbkgd(subWin, COLOR_PAIR(2) | ' ');
+ wbkgd(subWin, (chtype) (COLOR_PAIR(2) | ' '));
}
#endif
(void) wattrset(subWin, A_BOLD);
@@ -5449,6 +5637,8 @@ tracetrace(unsigned tlevel)
for (n = 0; t_tbl[n].name != 0; n++)
need += strlen(t_tbl[n].name) + 2;
buf = typeMalloc(char, need);
+ if (!buf)
+ failed("tracetrace");
}
sprintf(buf, "0x%02x = {", tlevel);
if (tlevel == 0) {
@@ -5622,10 +5812,9 @@ display_form(FORM * f)
set_form_sub(f, derwin(w, rows, cols, 1, 2));
box(w, 0, 0);
keypad(w, TRUE);
+ if (post_form(f) != E_OK)
+ wrefresh(w);
}
-
- if (post_form(f) != E_OK)
- wrefresh(w);
}
static void
@@ -5649,55 +5838,60 @@ edit_secure(FIELD * me, int c)
if (field_info(me, &rows, &cols, &frow, &fcol, &nrow, &nbuf) == E_OK
&& nbuf > 0) {
char *source = field_buffer(me, 1);
- char temp[80];
- long len;
-
- strcpy(temp, source ? source : "");
- len = (long) (char *) field_userptr(me);
- if (c <= KEY_MAX) {
- if (isgraph(c) && (len + 1) < (int) sizeof(temp)) {
- temp[len++] = (char) c;
- temp[len] = 0;
- set_field_buffer(me, 1, temp);
- c = '*';
- } else {
- c = 0;
- }
- } else {
- switch (c) {
- case REQ_BEG_FIELD:
- case REQ_CLR_EOF:
- case REQ_CLR_EOL:
- case REQ_DEL_LINE:
- case REQ_DEL_WORD:
- case REQ_DOWN_CHAR:
- case REQ_END_FIELD:
- case REQ_INS_CHAR:
- case REQ_INS_LINE:
- case REQ_LEFT_CHAR:
- case REQ_NEW_LINE:
- case REQ_NEXT_WORD:
- case REQ_PREV_WORD:
- case REQ_RIGHT_CHAR:
- case REQ_UP_CHAR:
- c = 0; /* we don't want to do inline editing */
- break;
- case REQ_CLR_FIELD:
- if (len) {
- temp[0] = 0;
+ size_t have = (source ? strlen(source) : 0) + 1;
+ size_t need = 80 + have;
+ char *temp = malloc(need);
+ size_t len;
+
+ if (temp != 0) {
+ strncpy(temp, source ? source : "", have + 1);
+ len = (size_t) (char *) field_userptr(me);
+ if (c <= KEY_MAX) {
+ if (isgraph(c) && (len + 1) < sizeof(temp)) {
+ temp[len++] = (char) c;
+ temp[len] = 0;
set_field_buffer(me, 1, temp);
+ c = '*';
+ } else {
+ c = 0;
}
- break;
- case REQ_DEL_CHAR:
- case REQ_DEL_PREV:
- if (len) {
- temp[--len] = 0;
- set_field_buffer(me, 1, temp);
+ } else {
+ switch (c) {
+ case REQ_BEG_FIELD:
+ case REQ_CLR_EOF:
+ case REQ_CLR_EOL:
+ case REQ_DEL_LINE:
+ case REQ_DEL_WORD:
+ case REQ_DOWN_CHAR:
+ case REQ_END_FIELD:
+ case REQ_INS_CHAR:
+ case REQ_INS_LINE:
+ case REQ_LEFT_CHAR:
+ case REQ_NEW_LINE:
+ case REQ_NEXT_WORD:
+ case REQ_PREV_WORD:
+ case REQ_RIGHT_CHAR:
+ case REQ_UP_CHAR:
+ c = 0; /* we don't want to do inline editing */
+ break;
+ case REQ_CLR_FIELD:
+ if (len) {
+ temp[0] = 0;
+ set_field_buffer(me, 1, temp);
+ }
+ break;
+ case REQ_DEL_CHAR:
+ case REQ_DEL_PREV:
+ if (len) {
+ temp[--len] = 0;
+ set_field_buffer(me, 1, temp);
+ }
+ break;
}
- break;
}
+ set_field_userptr(me, (void *) len);
+ free(temp);
}
- set_field_userptr(me, (void *) len);
}
return c;
}
@@ -6045,7 +6239,7 @@ overlap_helpitem(int state, int item, char *message)
static void
overlap_test_1_attr(WINDOW *win, int flavor, int col)
{
- short cpair = (short) (1 + (flavor * 2) + col);
+ NCURSES_PAIRS_T cpair = (NCURSES_PAIRS_T) (1 + (flavor * 2) + col);
switch (flavor) {
case 0:
@@ -6056,11 +6250,11 @@ overlap_test_1_attr(WINDOW *win, int flavor, int col)
break;
case 2:
init_pair(cpair, COLOR_BLUE, COLOR_WHITE);
- (void) wattrset(win, (attr_t) COLOR_PAIR(cpair) | A_NORMAL);
+ (void) wattrset(win, (int) (COLOR_PAIR(cpair) | A_NORMAL));
break;
case 3:
init_pair(cpair, COLOR_WHITE, COLOR_BLUE);
- (void) wattrset(win, (attr_t) COLOR_PAIR(cpair) | A_BOLD);
+ (void) wattrset(win, (int) (COLOR_PAIR(cpair) | A_BOLD));
break;
}
}
@@ -6068,7 +6262,7 @@ overlap_test_1_attr(WINDOW *win, int flavor, int col)
static void
overlap_test_2_attr(WINDOW *win, int flavor, int col)
{
- short cpair = (short) (9 + (flavor * 2) + col);
+ NCURSES_PAIRS_T cpair = (NCURSES_PAIRS_T) (9 + (flavor * 2) + col);
switch (flavor) {
case 0:
@@ -6483,6 +6677,7 @@ usage(void)
," -a f,b set default-colors (assumed white-on-black)"
," -d use default-colors if terminal supports them"
#endif
+ ," -E call use_env(FALSE) to ignore $LINES and $COLUMNS"
#if USE_SOFTKEYS
," -e fmt specify format for soft-keys test (e)"
#endif
@@ -6495,6 +6690,9 @@ usage(void)
#if USE_LIBPANEL
," -s msec specify nominal time for panel-demo (default: 1, to hold)"
#endif
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714)
+ ," -T call use_tioctl(TRUE) to allow SIGWINCH to override environment"
+#endif
#ifdef TRACE
," -t mask specify default trace-level (may toggle with ^T)"
#endif
@@ -6517,7 +6715,7 @@ set_terminal_modes(void)
}
#ifdef SIGUSR1
-static RETSIGTYPE
+static void
announce_sig(int sig)
{
(void) fprintf(stderr, "Handled signal %d\r\n", sig);
@@ -6613,7 +6811,7 @@ main_menu(bool top)
command = 0;
for (;;) {
char ch = '\0';
- if (read(fileno(stdin), &ch, 1) <= 0) {
+ if (read(fileno(stdin), &ch, (size_t) 1) <= 0) {
if (command == 0)
command = 'q';
break;
@@ -6681,17 +6879,27 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
- while ((c = getopt(argc, argv, "a:de:fhmp:s:t:")) != -1) {
+ while ((c = getopt(argc, argv, "a:dEe:fhmp:s:Tt:")) != -1) {
switch (c) {
#ifdef NCURSES_VERSION
case 'a':
assumed_colors = TRUE;
- sscanf(optarg, "%d,%d", &default_fg, &default_bg);
+ switch (sscanf(optarg, "%d,%d", &default_fg, &default_bg)) {
+ case 0:
+ default_fg = COLOR_WHITE;
+ /* FALLTHRU */
+ case 1:
+ default_bg = COLOR_BLACK;
+ break;
+ }
break;
case 'd':
default_colors = TRUE;
break;
#endif
+ case 'E':
+ use_env(FALSE);
+ break;
case 'e':
my_e_param = atoi(optarg);
#ifdef NCURSES_VERSION
@@ -6721,6 +6929,11 @@ main(int argc, char *argv[])
nap_msec = (int) atol(optarg);
break;
#endif
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20120714)
+ case 'T':
+ use_tioctl(TRUE);
+ break;
+#endif
#ifdef TRACE
case 't':
save_trace = (unsigned) strtol(optarg, 0, 0);
@@ -6761,7 +6974,7 @@ main(int argc, char *argv[])
bkgdset(BLANK);
/* tests, in general, will want these modes */
- use_colors = monochrome ? FALSE : has_colors();
+ use_colors = (bool) (monochrome ? FALSE : has_colors());
if (use_colors) {
start_color();
@@ -6772,7 +6985,7 @@ main(int argc, char *argv[])
use_default_colors();
min_colors = -1;
}
-#if NCURSES_VERSION_PATCH >= 20000708
+#if HAVE_ASSUME_DEFAULT_COLORS
if (assumed_colors)
assume_default_colors(default_fg, default_bg);
#endif
@@ -6783,8 +6996,10 @@ main(int argc, char *argv[])
max_pairs = COLOR_PAIRS; /* was > 256 ? 256 : COLOR_PAIRS */
if (can_change_color()) {
- short cp;
+ NCURSES_PAIRS_T cp;
all_colors = typeMalloc(RGB_DATA, (unsigned) max_colors);
+ if (!all_colors)
+ failed("all_colors");
for (cp = 0; cp < max_colors; ++cp) {
color_content(cp,
&all_colors[cp].red,
@@ -6809,9 +7024,10 @@ main(int argc, char *argv[])
&& okRGB(red)
&& okRGB(green)
&& okRGB(blue)) {
- all_colors[c].red = (short) ((red * 1000) / scale);
- all_colors[c].green = (short) ((green * 1000) / scale);
- all_colors[c].blue = (short) ((blue * 1000) / scale);
+#define Scaled(n) (NCURSES_COLOR_T) (((n) * 1000) / scale)
+ all_colors[c].red = Scaled(red);
+ all_colors[c].green = Scaled(green);
+ all_colors[c].blue = Scaled(blue);
}
}
fclose(fp);
diff --git a/test/newdemo.c b/test/newdemo.c
index 75626a9051e1..fef092f2470c 100644
--- a/test/newdemo.c
+++ b/test/newdemo.c
@@ -2,7 +2,7 @@
* newdemo.c - A demo program using PDCurses. The program illustrate
* the use of colours for text output.
*
- * $Id: newdemo.c,v 1.35 2010/12/12 00:19:15 tom Exp $
+ * $Id: newdemo.c,v 1.40 2013/04/27 19:46:53 tom Exp $
*/
#include <test.priv.h>
@@ -47,7 +47,7 @@ static const char *messages[] =
/*
* Trap interrupt
*/
-static RETSIGTYPE
+static void
trap(int sig GCC_UNUSED)
{
endwin();
@@ -84,7 +84,7 @@ set_colors(WINDOW *win, int pair, int foreground, int background)
if (pair > COLOR_PAIRS)
pair = COLOR_PAIRS;
init_pair((short) pair, (short) foreground, (short) background);
- (void) wattrset(win, (attr_t) COLOR_PAIR(pair));
+ (void) wattrset(win, (int) COLOR_PAIR(pair));
}
}
@@ -96,7 +96,7 @@ use_colors(WINDOW *win, int pair, chtype attrs)
pair = COLOR_PAIRS;
attrs |= (chtype) COLOR_PAIR(pair);
}
- (void) wattrset(win, attrs);
+ (void) wattrset(win, (int) attrs);
return attrs;
}
@@ -113,12 +113,19 @@ SubWinTest(WINDOW *win)
getbegyx(win, by, bx);
sw = w / 3;
sh = h / 3;
- if ((swin1 = subwin(win, sh, sw, by + 3, bx + 5)) == NULL)
+
+ if ((swin1 = subwin(win, sh, sw, by + 3, bx + 5)) == NULL) {
return 1;
- if ((swin2 = subwin(win, sh, sw, by + 4, bx + 8)) == NULL)
+ }
+ if ((swin2 = subwin(win, sh, sw, by + 4, bx + 8)) == NULL) {
+ delwin(swin1);
return 1;
- if ((swin3 = subwin(win, sh, sw, by + 5, bx + 11)) == NULL)
+ }
+ if ((swin3 = subwin(win, sh, sw, by + 5, bx + 11)) == NULL) {
+ delwin(swin1);
+ delwin(swin2);
return 1;
+ }
set_colors(swin1, 8, COLOR_RED, COLOR_BLUE);
werase(swin1);
@@ -215,7 +222,7 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
WINDOW *win;
int w, x, y, i, j, k;
- char buffer[200];
+ char buffer[SIZEOF(messages) * 80];
const char *message;
int width, height;
chtype save[80];
diff --git a/test/package/mingw-ncurses-examples.spec b/test/package/mingw-ncurses-examples.spec
new file mode 100644
index 000000000000..fdc2a69fac7c
--- /dev/null
+++ b/test/package/mingw-ncurses-examples.spec
@@ -0,0 +1,109 @@
+Summary: ncurses-examples - example/test programs from ncurses
+%?mingw_package_header
+
+%define AppProgram ncurses-examples
+%define AppVersion MAJOR.MINOR
+%define AppRelease YYYYMMDD
+# $Id: mingw-ncurses-examples.spec,v 1.3 2013/10/26 23:30:21 tom Exp $
+Name: mingw32-ncurses6-examples
+Version: %{AppVersion}
+Release: %{AppRelease}
+License: X11
+Group: Development/Libraries
+Source: ncurses-examples-%{release}.tgz
+# URL: http://invisible-island.net/ncurses/
+
+BuildRequires: mingw32-ncurses6
+
+BuildRequires: mingw32-filesystem >= 95
+BuildRequires: mingw32-gcc
+BuildRequires: mingw32-binutils
+
+BuildRequires: mingw64-ncurses6
+
+BuildRequires: mingw64-filesystem >= 95
+BuildRequires: mingw64-gcc
+BuildRequires: mingw64-binutils
+
+%define CC_NORMAL -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wconversion
+%define CC_STRICT %{CC_NORMAL} -W -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wwrite-strings -ansi -pedantic
+
+%description -n mingw32-ncurses6-examples
+Cross-compiling support for ncurses to mingw32.
+
+The ncurses library routines are a terminal-independent method of
+updating character screens with reasonable optimization.
+
+This package is used for testing ABI 6 with cross-compiles to MinGW.
+
+%package -n mingw64-ncurses6-examples
+Summary: Curses library for MinGW64
+
+%description -n mingw64-ncurses6-examples
+Cross-compiling support for ncurses to mingw64.
+
+The ncurses library routines are a terminal-independent method of
+updating character screens with reasonable optimization.
+
+This package is used for testing ABI 6 with cross-compiles to MinGW.
+
+%prep
+
+# override location of bindir, e.g., to avoid conflict with pdcurses
+%global mingw32_bindir %{mingw32_exec_prefix}/bin/%{AppProgram}
+%global mingw64_bindir %{mingw64_exec_prefix}/bin/%{AppProgram}
+
+%define CFG_OPTS \\\
+ --disable-echo \\\
+ --enable-warnings \\\
+ --verbose
+
+%define debug_package %{nil}
+%setup -q -n ncurses-examples-%{release}
+
+%build
+mkdir BUILD-W32
+pushd BUILD-W32
+CFLAGS="%{CC_NORMAL}" \
+CC=%{mingw32_cc} \
+%mingw32_configure %{CFG_OPTS}
+cp config.status /tmp/ming32-config.status
+make
+popd
+
+mkdir BUILD-W64
+pushd BUILD-W64
+CFLAGS="%{CC_NORMAL}" \
+CC=%{mingw64_cc} \
+%mingw64_configure %{CFG_OPTS}
+cp config.status /tmp/ming64-config.status
+make
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+pushd BUILD-W32
+%{mingw32_make} install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+pushd BUILD-W64
+%{mingw64_make} install DESTDIR=$RPM_BUILD_ROOT
+popd
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root,-)
+
+%files -n mingw32-ncurses6-examples
+%{mingw32_bindir}/*
+
+%files -n mingw64-ncurses6-examples
+%{mingw64_bindir}/*
+
+%changelog
+
+* Sat Oct 19 2013 Thomas E. Dickey
+- initial version
diff --git a/test/package/ncurses-examples.spec b/test/package/ncurses-examples.spec
index ad79e5a2218a..8a016780800d 100644
--- a/test/package/ncurses-examples.spec
+++ b/test/package/ncurses-examples.spec
@@ -2,7 +2,7 @@ Summary: ncurses-examples - example/test programs from ncurses
%define AppProgram ncurses-examples
%define AppVersion MAJOR.MINOR
%define AppRelease YYYYMMDD
-# $Id: ncurses-examples.spec,v 1.2 2011/03/25 17:46:44 tom Exp $
+# $Id: ncurses-examples.spec,v 1.3 2013/10/05 23:44:19 tom Exp $
Name: %{AppProgram}
Version: %{AppVersion}
Release: %{AppRelease}
@@ -51,5 +51,5 @@ strip $RPM_BUILD_ROOT%{_bindir}/%{AppProgram}/*
%changelog
# each patch should add its ChangeLog entries here
-* Fri Mar 25 2010 Thomas Dickey
+* Thu Mar 25 2010 Thomas Dickey
- initial version
diff --git a/test/programs b/test/programs
index bfcc134eb9cc..f307cc72f6d7 100644
--- a/test/programs
+++ b/test/programs
@@ -1,6 +1,6 @@
-# $Id: programs,v 1.19 2009/09/12 19:44:01 tom Exp $
+# $Id: programs,v 1.24 2013/12/07 18:06:24 tom Exp $
##############################################################################
-# Copyright (c) 2006-2008,2009 Free Software Foundation, Inc. #
+# Copyright (c) 2006-2009,2013 Free Software Foundation, Inc. #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -48,11 +48,13 @@ demo_terminfo $(LDFLAGS_TINFO) $(LOCAL_LIBS) demo_terminfo
ditto $(LDFLAGS_THREADS) $(LOCAL_LIBS) ditto
dots $(LDFLAGS_TINFO) $(LOCAL_LIBS) dots
dots_mvcur $(LDFLAGS_CURSES) $(LOCAL_LIBS) dots_mvcur
+dots_termcap $(LDFLAGS_TINFO) $(LOCAL_LIBS) dots_termcap
echochar $(LDFLAGS_CURSES) $(LOCAL_LIBS) echochar
filter $(LDFLAGS_CURSES) $(LOCAL_LIBS) filter
firework $(LDFLAGS_CURSES) $(LOCAL_LIBS) firework
firstlast $(LDFLAGS_DEFAULT) $(LOCAL_LIBS) firstlast
foldkeys $(LDFLAGS_CURSES) $(LOCAL_LIBS) foldkeys
+form_driver_w $(LDFLAGS_DEFAULT) $(LOCAL_LIBS) form_driver_w
gdc $(LDFLAGS_CURSES) $(LOCAL_LIBS) gdc
hanoi $(LDFLAGS_CURSES) $(LOCAL_LIBS) hanoi
hashtest $(LDFLAGS_CURSES) $(LOCAL_LIBS) hashtest
@@ -83,6 +85,8 @@ test_getstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_getstr
test_instr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_instr
test_inwstr $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_inwstr
test_opaque $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_opaque
+test_vid_puts $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_vid_puts
+test_vidputs $(LDFLAGS_CURSES) $(LOCAL_LIBS) test_vidputs
testaddch $(LDFLAGS_CURSES) $(LOCAL_LIBS) testaddch
testcurs $(LDFLAGS_CURSES) $(LOCAL_LIBS) testcurs
testscanw $(LDFLAGS_CURSES) $(LOCAL_LIBS) testscanw
diff --git a/test/railroad.c b/test/railroad.c
index 973ec46a38de..33dc46f1dd1c 100644
--- a/test/railroad.c
+++ b/test/railroad.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2000-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 2000-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/*
* Author: Thomas E. Dickey - 2000
*
- * $Id: railroad.c,v 1.19 2009/10/24 21:37:56 tom Exp $
+ * $Id: railroad.c,v 1.21 2013/09/28 22:02:17 tom Exp $
*
* A simple demo of the termcap interface.
*/
@@ -55,20 +55,20 @@ static char *backup;
static bool interrupted = FALSE;
-static int
-outc(TPUTS_ARG c)
+static
+TPUTS_PROTO(outc, c)
{
int rc = OK;
if (interrupted) {
char tmp = (char) c;
- if (write(STDOUT_FILENO, &tmp, 1) == -1)
+ if (write(STDOUT_FILENO, &tmp, (size_t) 1) == -1)
rc = ERR;
} else {
if (putc(c, stdout) == EOF)
rc = ERR;
}
- return rc;
+ TPUTS_RETURN(rc);
}
static void
diff --git a/test/rain.c b/test/rain.c
index 5f0cbfa301a7..471a88d61cdb 100644
--- a/test/rain.c
+++ b/test/rain.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: rain.c,v 1.38 2010/11/13 20:11:46 tom Exp $
+ * $Id: rain.c,v 1.40 2012/01/21 23:54:47 tom Exp $
*/
#include <test.priv.h>
@@ -222,7 +222,7 @@ draw_drop(void *arg)
* Find myself in the list of threads so we can count the number of loops.
*/
for (mystats = 0; mystats < MAX_THREADS; ++mystats) {
-#ifdef __MINGW32__
+#if defined(__MINGW32__) && !defined(__WINPTHREADS_VERSION)
if (drop_threads[mystats].myself.p == pthread_self().p)
#else
if (drop_threads[mystats].myself == pthread_self())
@@ -256,7 +256,7 @@ draw_drop(void *arg)
/*
* The description of pthread_create() is misleading, since it implies that
* threads will exit cleanly after their function returns.
- *
+ *
* Since they do not (and the number of threads is limited by system
* resources), make a limited number of threads, and signal any that are
* waiting when we want a thread past that limit.
diff --git a/test/redraw.c b/test/redraw.c
index f62c098b794d..9cb0de95a809 100644
--- a/test/redraw.c
+++ b/test/redraw.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2006-2007,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2006-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: redraw.c,v 1.5 2010/05/01 22:04:08 tom Exp $
+ * $Id: redraw.c,v 1.8 2012/12/08 20:46:02 tom Exp $
*
* Demonstrate the redrawwin() and wredrawln() functions.
* Thomas Dickey - 2006/11/4
@@ -113,7 +113,7 @@ test_redraw(WINDOW *win)
* using mvcur(). It is ifdef'd for NCURSES, since X/Open does
* not define the case where the old location is unknown.
*/
- system("date");
+ IGNORE_RC(system("date"));
mvcur(-1, -1, y, x);
break;
#endif
diff --git a/test/tclock.c b/test/tclock.c
index fb44725d3209..24f33827b449 100644
--- a/test/tclock.c
+++ b/test/tclock.c
@@ -1,4 +1,4 @@
-/* $Id: tclock.c,v 1.30 2011/03/22 09:16:00 tom Exp $ */
+/* $Id: tclock.c,v 1.33 2013/09/28 21:52:34 tom Exp $ */
#include <test.priv.h>
@@ -53,14 +53,14 @@
/* Plot a point */
static void
-plot(int x, int y, char col)
+plot(int x, int y, int col)
{
MvAddCh(y, x, (chtype) col);
}
/* Draw a diagonal(arbitrary) line using Bresenham's alogrithm. */
static void
-dline(int pair, int from_x, int from_y, int x2, int y2, char ch)
+dline(int pair, int from_x, int from_y, int x2, int y2, int ch)
{
int dx, dy;
int ax, ay;
@@ -135,8 +135,8 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
short my_bg = COLOR_BLACK;
#if HAVE_GETTIMEOFDAY
struct timeval current;
- double fraction = 0.0;
#endif
+ double fraction = 0.0;
setlocale(LC_ALL, "");
@@ -216,12 +216,12 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
attroff(A_REVERSE);
if (has_colors())
- (void) attrset(COLOR_PAIR(1));
+ (void) attrset((attr_t) COLOR_PAIR(1));
dline(1, cx, cy, cx + sdx, cy - sdy, 'O');
if (has_colors())
- (void) attrset(COLOR_PAIR(0));
+ (void) attrset((attr_t) COLOR_PAIR(0));
text = ctime(&tim);
MvPrintw(2, 0, "%.*s", (int) (strlen(text) - 1), text);
diff --git a/test/test.priv.h b/test/test.priv.h
index 51d52a83ceb2..d3915fba61b3 100644
--- a/test/test.priv.h
+++ b/test/test.priv.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2013,2014 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
/****************************************************************************
* Author: Thomas E. Dickey 1996-on *
****************************************************************************/
-/* $Id: test.priv.h,v 1.103 2011/03/22 09:15:45 tom Exp $ */
+/* $Id: test.priv.h,v 1.123 2014/02/01 22:09:27 tom Exp $ */
#ifndef __TEST_PRIV_H
#define __TEST_PRIV_H 1
@@ -58,6 +58,10 @@
/*
* Fallback definitions to accommodate broken compilers.
*/
+#ifndef HAVE_ASSUME_DEFAULT_COLORS
+#define HAVE_ASSUME_DEFAULT_COLORS 0
+#endif
+
#ifndef HAVE_CURSES_VERSION
#define HAVE_CURSES_VERSION 0
#endif
@@ -158,6 +162,10 @@
#define HAVE_RIPOFFLINE 0
#endif
+#ifndef HAVE_SCR_DUMP
+#define HAVE_SCR_DUMP 0
+#endif
+
#ifndef HAVE_SETUPTERM
#define HAVE_SETUPTERM 0
#endif
@@ -170,14 +178,30 @@
#define HAVE_SLK_INIT 0
#endif
+#ifndef HAVE_SYS_IOCTL_H
+#define HAVE_SYS_IOCTL_H 0
+#endif
+
+#ifndef HAVE_SYS_SELECT_H
+#define HAVE_SYS_SELECT_H 0
+#endif
+
#ifndef HAVE_TERMATTRS
#define HAVE_TERMATTRS 0
#endif
+#ifndef HAVE_TERMIOS_H
+#define HAVE_TERMIOS_H 0
+#endif
+
#ifndef HAVE_TERMNAME
#define HAVE_TERMNAME 0
#endif
+#ifndef HAVE_TERM_ENTRY_H
+#define HAVE_TERM_ENTRY_H 0
+#endif
+
#ifndef HAVE_TGETENT
#define HAVE_TGETENT 0
#endif
@@ -202,6 +226,14 @@
#define HAVE_USE_DEFAULT_COLORS 0
#endif
+#ifndef HAVE_USE_SCREEN
+#define HAVE_USE_SCREEN 0
+#endif
+
+#ifndef HAVE_USE_WINDOW
+#define HAVE_USE_WINDOW 0
+#endif
+
#ifndef HAVE_WRESIZE
#define HAVE_WRESIZE 0
#endif
@@ -222,6 +254,13 @@
#define NO_LEAKS 0
#endif
+/*
+ * Workaround for HPUX
+ */
+#if defined(__hpux) && !defined(NCURSES_VERSION)
+#define _ACS_COMPAT_CODE /* needed for acs_map vs __acs_map */
+#endif
+
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
@@ -269,21 +308,18 @@
/*
* Not all curses.h implementations include unctrl.h,
- * Solaris 10 xpg4 for example.
*/
-#if defined(NCURSES_VERSION) || defined(_XOPEN_CURSES)
-#if defined(HAVE_NCURSESW_NCURSES_H)
+#if defined(HAVE_NCURSESW_UNCTRL_H)
#include <ncursesw/unctrl.h>
-#elif defined(HAVE_NCURSES_NCURSES_H)
+#elif defined(HAVE_NCURSES_UNCTRL_H)
#include <ncurses/unctrl.h>
-#else
+#elif defined(HAVE_UNCTRL_H)
#include <unctrl.h>
#endif
-#endif
#if HAVE_GETOPT_H
#include <getopt.h>
-#else
+#elif !defined(HAVE_GETOPT_HEADER)
/* 'getopt()' may be prototyped in <stdlib.h>, but declaring its variables
* doesn't hurt.
*/
@@ -323,17 +359,20 @@ extern int optind;
#endif
#if !USE_SOFTKEYS
-#define slk_init() /* nothing */
-#define slk_restore() /* nothing */
-#define slk_clear() /* nothing */
+#define slk_init() /* nothing */
+#define slk_restore() /* nothing */
+#define slk_clear() /* nothing */
#endif
#ifndef HAVE_WSYNCDOWN
-#define wsyncdown(win) /* nothing */
+#define wsyncdown(win) /* nothing */
#endif
#ifndef USE_WIDEC_SUPPORT
-#if (defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)) && defined(WACS_ULCORNER)
+#if (defined(_XOPEN_SOURCE_EXTENDED) \
+ || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500)) \
+ || (defined(NCURSES_WIDECHAR) && (NCURSES_WIDECHAR - 0 < 1))) \
+ && defined(WACS_ULCORNER)
#define USE_WIDEC_SUPPORT 1
#else
#define USE_WIDEC_SUPPORT 0
@@ -385,6 +424,14 @@ extern int optind;
#define NCURSES_CH_T cchar_t
#endif
+#ifndef NCURSES_COLOR_T
+#define NCURSES_COLOR_T short
+#endif
+
+#ifndef NCURSES_PAIRS_T
+#define NCURSES_PAIRS_T short
+#endif
+
#ifndef NCURSES_OPAQUE
#define NCURSES_OPAQUE 0
#endif
@@ -507,7 +554,7 @@ extern char *strnames[], *strcodes[], *strfnames[];
if ((count = getcchar(s, NULL, NULL, NULL, NULL)) > 0) { \
wchar_t test_wch[CCHARW_MAX + 2]; \
attr_t test_attrs; \
- short test_pair; \
+ NCURSES_PAIRS_T test_pair; \
\
if (getcchar( s, test_wch, &test_attrs, &test_pair, NULL) == OK \
&& test_wch[0] != L'\0') { \
@@ -576,6 +623,17 @@ extern char *strnames[], *strcodes[], *strfnames[];
#define TIGETSTR(ti,tc) tgetstr(tc,&area_pointer)
#endif
+/*
+ * So far (2013 - more than ten years), only ncurses implements
+ * use_extended_names().
+ */
+#if defined(NCURSES_XNAMES)
+#elif defined(NCURSES_VERSION) && defined(HAVE_TERM_ENTRY_H) && HAVE_TERM_ENTRY_H
+#define NCURSES_XNAMES 1
+#else
+#define NCURSES_XNAMES 0
+#endif
+
/* ncurses implements tparm() with varargs, X/Open with a fixed-parameter list
* (which is incompatible with legacy usage, doesn't solve any problems).
*/
@@ -609,8 +667,32 @@ extern char *strnames[], *strcodes[], *strfnames[];
#define EXIT_FAILURE 1
#endif
-#ifdef __MINGW32__
+#if defined(__MINGW32__)
+
+#if defined(PDCURSES)
+#ifdef WINVER
+# if WINVER < 0x0501
+# error WINVER must at least be 0x0501
+# endif
+#else
+# define WINVER 0x0501
+#endif
+#include <windows.h>
+#include <sys/time.h> /* for struct timeval */
+#undef sleep
+#define sleep(n) Sleep((n) * 1000)
+#define SIGHUP 1
+#define SIGKILL 9
+#define getlogin() "username"
+
+#elif defined(HAVE_NCURSESW_NCURSES_H)
+#include <ncursesw/nc_mingw.h>
+#elif defined(HAVE_NCURSES_NCURSES_H)
+#include <ncurses/nc_mingw.h>
+#else
#include <nc_mingw.h>
+#endif
+
/* conflicts in test/firstlast.c */
#undef large
#undef small
@@ -653,25 +735,32 @@ extern char *strnames[], *strcodes[], *strfnames[];
* The same would be needed for HPUX 10.20
*/
#ifndef TPUTS_ARG
+#define TPUTS_ARG int
+#endif
+
#if defined(sun) && !defined(_XOPEN_CURSES) && !defined(NCURSES_VERSION_PATCH)
+#undef TPUTS_ARG
#define TPUTS_ARG char
extern char *tgoto(char *, int, int); /* available, but not prototyped */
-#else
-#define TPUTS_ARG int
#endif
+
+#ifndef TPUTS_PROTO
+#define TPUTS_PROTO(func,value) int func(TPUTS_ARG value)
+#endif
+
+#ifndef TPUTS_RETURN
+#define TPUTS_RETURN(value) return value
#endif
/*
* Workarounds for Solaris's X/Open curses
*/
-#if defined(sun) && defined(_XOPEN_CURSES) && !defined(NCURSES_VERSION_PATCH)
#if !defined(KEY_MIN) && defined(__KEY_MIN)
#define KEY_MIN __KEY_MIN
#endif
#if !defined(KEY_MAX) && defined(__KEY_MIN)
#define KEY_MAX __KEY_MAX
#endif
-#endif
/*
* Workaround to build with Sun's default SVr4 curses.
@@ -702,23 +791,10 @@ extern char *tgoto(char *, int, int); /* available, but not prototyped */
#define CONST_MENUS /* nothing */
#endif
-#ifndef HAVE_USE_WINDOW
-#if !defined(NCURSES_VERSION_PATCH) || (NCURSES_VERSION_PATCH < 20070915) || !NCURSES_EXT_FUNCS
-#define HAVE_USE_WINDOW 0
-#else
-#define HAVE_USE_WINDOW 1
-#endif
-#endif
-
/*
* Simplify setting up demo of threading with these macros.
*/
-#if !HAVE_USE_WINDOW
-typedef int (*NCURSES_WINDOW_CB) (WINDOW *, void *);
-typedef int (*NCURSES_SCREEN_CB) (SCREEN *, void *);
-#endif
-
#if HAVE_USE_WINDOW
#define USING_WINDOW(w,func) use_window(w, (NCURSES_WINDOW_CB) func, w)
#define USING_WINDOW2(w,func,data) use_window(w, (NCURSES_WINDOW_CB) func, data)
@@ -745,6 +821,8 @@ typedef int (*NCURSES_SCREEN_CB) (SCREEN *, void *);
#define USE_TRACE 0
#endif
+#define Trace2(p) /* nothing */
+
#define MvAddCh (void) mvaddch
#define MvWAddCh (void) mvwaddch
#define MvAddStr (void) mvaddstr
diff --git a/test/test_add_wchstr.c b/test/test_add_wchstr.c
index a48f2c49e1c2..c509f0035ac5 100644
--- a/test/test_add_wchstr.c
+++ b/test/test_add_wchstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010,2011 Free Software Foundation, Inc. *
+ * Copyright (c) 2010-2011,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: test_add_wchstr.c,v 1.15 2011/01/15 18:15:11 tom Exp $
+ * $Id: test_add_wchstr.c,v 1.20 2012/12/16 00:12:04 tom Exp $
*
* Demonstrate the waddwchstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
@@ -90,6 +90,8 @@ static size_t temp_length;
if (need > temp_length) { \
temp_length = need * 2; \
temp_buffer = typeRealloc(cchar_t, temp_length, temp_buffer); \
+ if (!temp_buffer) \
+ failed("TempBuffer"); \
} \
have[0] = 0; \
have[1] = 0; \
@@ -317,6 +319,15 @@ test_add_wchstr(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -350,14 +361,8 @@ test_add_wchstr(int level)
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgdset(work, COLOR_PAIR(1) | ' ');
+ wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) {
@@ -366,11 +371,13 @@ test_add_wchstr(int level)
case key_RECUR:
test_add_wchstr(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -514,8 +521,8 @@ test_add_wchstr(int level)
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
diff --git a/test/test_addchstr.c b/test/test_addchstr.c
index 815ccc595bf9..2aae844e7651 100644
--- a/test/test_addchstr.c
+++ b/test/test_addchstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: test_addchstr.c,v 1.13 2010/12/12 01:28:24 tom Exp $
+ * $Id: test_addchstr.c,v 1.18 2012/12/16 00:36:27 tom Exp $
*
* Demonstrate the waddchstr() and waddch functions.
* Thomas Dickey - 2009/9/12
@@ -101,6 +101,8 @@ ChStr(const char *source)
if (need > temp_length) {
temp_length = need * 2;
temp_buffer = typeRealloc(chtype, temp_length, temp_buffer);
+ if (!temp_buffer)
+ failed("TempBuffer");
}
do {
const char *s;
@@ -237,6 +239,15 @@ test_adds(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -270,14 +281,8 @@ test_adds(int level)
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- show_attr = COLOR_PAIR(1);
+ show_attr = (attr_t) COLOR_PAIR(1);
wbkgdset(work, show_attr | ' ');
} else {
show_attr = A_STANDOUT;
@@ -289,11 +294,13 @@ test_adds(int level)
case key_RECUR:
test_adds(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -445,10 +452,10 @@ test_adds(int level)
}
}
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
+ delwin(show);
}
static void
diff --git a/test/test_addstr.c b/test/test_addstr.c
index 5cc184a2d4b2..a14cdedcc9e0 100644
--- a/test/test_addstr.c
+++ b/test/test_addstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: test_addstr.c,v 1.6 2010/12/12 00:17:37 tom Exp $
+ * $Id: test_addstr.c,v 1.10 2012/12/16 00:14:10 tom Exp $
*
* Demonstrate the waddstr() and waddch functions.
* Thomas Dickey - 2009/9/12
@@ -161,6 +161,15 @@ test_adds(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters added in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -194,14 +203,8 @@ test_adds(int level)
doupdate();
- /*
- * Show the characters added in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgdset(work, COLOR_PAIR(1) | ' ');
+ wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) {
@@ -210,11 +213,13 @@ test_adds(int level)
case key_RECUR:
test_adds(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -361,8 +366,8 @@ test_adds(int level)
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
diff --git a/test/test_addwstr.c b/test/test_addwstr.c
index 92334aee3b16..cb057faf955a 100644
--- a/test/test_addwstr.c
+++ b/test/test_addwstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 2009-2010,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: test_addwstr.c,v 1.6 2010/12/12 00:18:00 tom Exp $
+ * $Id: test_addwstr.c,v 1.11 2012/12/16 00:11:18 tom Exp $
*
* Demonstrate the waddwstr() and wadd_wch functions.
* Thomas Dickey - 2009/9/12
@@ -233,8 +233,9 @@ test_inserts(int level)
WINDOW *work = 0;
WINDOW *show = 0;
int margin = (2 * MY_TABSIZE) - 1;
- Options option = ((m_opt ? oMove : oDefault)
- | ((w_opt || (level > 0)) ? oWindow : oDefault));
+ Options option = (Options) ((int) (m_opt ? oMove : oDefault)
+ | (int) ((w_opt || (level > 0))
+ ? oWindow : oDefault));
if (first) {
static char cmd[80];
@@ -246,6 +247,15 @@ test_inserts(int level)
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
keypad(stdscr, TRUE);
+
+ /*
+ * Show the characters inserted in color, to distinguish from those that
+ * are shifted.
+ */
+ if (has_colors()) {
+ start_color();
+ init_pair(1, COLOR_WHITE, COLOR_BLUE);
+ }
}
limit = LINES - 5;
@@ -279,14 +289,8 @@ test_inserts(int level)
doupdate();
- /*
- * Show the characters inserted in color, to distinguish from those that
- * are shifted.
- */
if (has_colors()) {
- start_color();
- init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgdset(work, COLOR_PAIR(1) | ' ');
+ wbkgdset(work, (chtype) (COLOR_PAIR(1) | ' '));
}
while ((ch = read_linedata(work)) != ERR && !isQUIT(ch)) {
@@ -295,11 +299,13 @@ test_inserts(int level)
case key_RECUR:
test_inserts(level + 1);
- touchwin(look);
+ if (look)
+ touchwin(look);
touchwin(work);
touchwin(show);
- wnoutrefresh(look);
+ if (look)
+ wnoutrefresh(look);
wnoutrefresh(work);
wnoutrefresh(show);
@@ -445,8 +451,8 @@ test_inserts(int level)
break;
}
}
+ delwin(show);
if (level > 0) {
- delwin(show);
delwin(work);
delwin(look);
}
diff --git a/test/test_getstr.c b/test/test_getstr.c
index a0863937886b..3f64c77b4858 100644
--- a/test/test_getstr.c
+++ b/test/test_getstr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 2007-2008,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 2007-2009,2012 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -26,7 +26,7 @@
* authorization. *
****************************************************************************/
/*
- * $Id: test_getstr.c,v 1.9 2009/08/29 19:02:25 tom Exp $
+ * $Id: test_getstr.c,v 1.10 2012/07/07 18:22:49 tom Exp $
*
* Author: Thomas E Dickey
*
@@ -58,6 +58,15 @@ typedef enum {
eMaxFlavor
} Flavors;
+/*
+ * Return-code is OK/ERR or a keyname.
+ */
+static const char *
+ok_keyname(int code)
+{
+ return ((code == OK) ? "OK" : ((code == ERR) ? "ERR" : keyname(code)));
+}
+
static bool
Quit(int ch)
{
@@ -310,7 +319,7 @@ test_getstr(int level, char **argv, WINDOW *strwin)
}
noecho();
(void) wattrset(txtwin, A_NORMAL);
- wprintw(strwin, "%d:%s", rc, buffer);
+ wprintw(strwin, "%s:%s", ok_keyname(rc), buffer);
wnoutrefresh(strwin);
break;
default:
diff --git a/test/test_vid_puts.c b/test/test_vid_puts.c
new file mode 100644
index 000000000000..6c8bc36a7886
--- /dev/null
+++ b/test/test_vid_puts.c
@@ -0,0 +1,148 @@
+/****************************************************************************
+ * Copyright (c) 2013 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+/*
+ * $Id: test_vid_puts.c,v 1.5 2013/09/28 22:42:29 tom Exp $
+ *
+ * Demonstrate the vid_puts and vid_attr functions.
+ * Thomas Dickey - 2013/01/12
+ */
+
+#define USE_TINFO
+#include <test.priv.h>
+
+#if USE_WIDEC_SUPPORT && HAVE_SETUPTERM
+
+#define valid(s) ((s != 0) && s != (char *)-1)
+
+static FILE *my_fp;
+static bool p_opt = FALSE;
+
+static
+TPUTS_PROTO(outc, c)
+{
+ int rc = c;
+
+ rc = putc(c, my_fp);
+ TPUTS_RETURN(rc);
+}
+
+static bool
+outs(const char *s)
+{
+ if (valid(s)) {
+ tputs(s, 1, outc);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+cleanup(void)
+{
+ outs(exit_attribute_mode);
+ if (!outs(orig_colors))
+ outs(orig_pair);
+ outs(cursor_normal);
+}
+
+static void
+change_attr(chtype attr)
+{
+ if (p_opt) {
+ vid_puts(attr, (short) 0, (void *) 0, outc);
+ } else {
+ vid_attr(attr, (short) 0, (void *) 0);
+ }
+}
+
+static void
+test_vid_puts(void)
+{
+ fprintf(my_fp, "Name: ");
+ change_attr(A_BOLD);
+ fputs("Bold", my_fp);
+ change_attr(A_REVERSE);
+ fputs(" Reverse", my_fp);
+ change_attr(A_NORMAL);
+ fputs("\n", my_fp);
+}
+
+static void
+usage(void)
+{
+ static const char *tbl[] =
+ {
+ "Usage: test_vid_puts [options]"
+ ,""
+ ,"Options:"
+ ," -e use stderr (default stdout)"
+ ," -p use vid_puts (default vid_attr)"
+ };
+ unsigned n;
+ for (n = 0; n < SIZEOF(tbl); ++n)
+ fprintf(stderr, "%s\n", tbl[n]);
+ ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ int ch;
+
+ my_fp = stdout;
+
+ while ((ch = getopt(argc, argv, "ep")) != -1) {
+ switch (ch) {
+ case 'e':
+ my_fp = stderr;
+ break;
+ case 'p':
+ p_opt = TRUE;
+ break;
+ default:
+ usage();
+ break;
+ }
+ }
+ if (optind < argc)
+ usage();
+
+ setupterm((char *) 0, 1, (int *) 0);
+ test_vid_puts();
+ cleanup();
+ ExitProgram(EXIT_SUCCESS);
+}
+
+#else
+int
+main(void)
+{
+ printf("This program requires the wide-ncurses terminfo library\n");
+ ExitProgram(EXIT_FAILURE);
+}
+#endif
diff --git a/test/test_vidputs.c b/test/test_vidputs.c
new file mode 100644
index 000000000000..2215fa91a38f
--- /dev/null
+++ b/test/test_vidputs.c
@@ -0,0 +1,148 @@
+/****************************************************************************
+ * Copyright (c) 2013 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+/*
+ * $Id: test_vidputs.c,v 1.4 2013/09/28 22:45:21 tom Exp $
+ *
+ * Demonstrate the vidputs and vidattr functions.
+ * Thomas Dickey - 2013/01/12
+ */
+
+#define USE_TINFO
+#include <test.priv.h>
+
+#if HAVE_SETUPTERM
+
+#define valid(s) ((s != 0) && s != (char *)-1)
+
+static FILE *my_fp;
+static bool p_opt = FALSE;
+
+static
+TPUTS_PROTO(outc, c)
+{
+ int rc = c;
+
+ rc = putc(c, my_fp);
+ TPUTS_RETURN(rc);
+}
+
+static bool
+outs(const char *s)
+{
+ if (valid(s)) {
+ tputs(s, 1, outc);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void
+cleanup(void)
+{
+ outs(exit_attribute_mode);
+ if (!outs(orig_colors))
+ outs(orig_pair);
+ outs(cursor_normal);
+}
+
+static void
+change_attr(chtype attr)
+{
+ if (p_opt) {
+ vidputs(attr, outc);
+ } else {
+ vidattr(attr);
+ }
+}
+
+static void
+test_vidputs(void)
+{
+ fprintf(my_fp, "Name: ");
+ change_attr(A_BOLD);
+ fputs("Bold", my_fp);
+ change_attr(A_REVERSE);
+ fputs(" Reverse", my_fp);
+ change_attr(A_NORMAL);
+ fputs("\n", my_fp);
+}
+
+static void
+usage(void)
+{
+ static const char *tbl[] =
+ {
+ "Usage: test_vidputs [options]"
+ ,""
+ ,"Options:"
+ ," -e use stderr (default stdout)"
+ ," -p use vidputs (default vidattr)"
+ };
+ unsigned n;
+ for (n = 0; n < SIZEOF(tbl); ++n)
+ fprintf(stderr, "%s\n", tbl[n]);
+ ExitProgram(EXIT_FAILURE);
+}
+
+int
+main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
+{
+ int ch;
+
+ my_fp = stdout;
+
+ while ((ch = getopt(argc, argv, "ep")) != -1) {
+ switch (ch) {
+ case 'e':
+ my_fp = stderr;
+ break;
+ case 'p':
+ p_opt = TRUE;
+ break;
+ default:
+ usage();
+ break;
+ }
+ }
+ if (optind < argc)
+ usage();
+
+ setupterm((char *) 0, 1, (int *) 0);
+ test_vidputs();
+ cleanup();
+ ExitProgram(EXIT_SUCCESS);
+}
+#else
+int
+main(int argc GCC_UNUSED,
+ char *argv[]GCC_UNUSED)
+{
+ fprintf(stderr, "This program requires terminfo\n");
+ exit(EXIT_FAILURE);
+}
+#endif
diff --git a/test/testaddch.c b/test/testaddch.c
index 7a909e28ab95..f0a476e10e41 100644
--- a/test/testaddch.c
+++ b/test/testaddch.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2006,2009 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2011,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -29,7 +29,7 @@
* This is an example written by Alexander V. Lukyanov <lav@yars.free.net>,
* to demonstrate an inconsistency between ncurses and SVr4 curses.
*
- * $Id: testaddch.c,v 1.7 2009/08/29 19:02:25 tom Exp $
+ * $Id: testaddch.c,v 1.9 2013/01/13 01:02:41 tom Exp $
*/
#include <test.priv.h>
@@ -63,7 +63,7 @@ main(
for (i = 0; i < 8; i++) {
back = (i & 1) ? A_BOLD | 'B' : ' ';
set = (i & 2) ? A_REVERSE : 0;
- attr = (i & 4) ? COLOR_PAIR(4) : 0;
+ attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0);
bkgdset(back);
(void) attrset(set);
@@ -72,9 +72,9 @@ main(
}
addch('\n');
for (i = 0; i < 8; i++) {
- back = (i & 1) ? A_BOLD | 'B' | COLOR_PAIR(1) : ' ';
- set = (i & 2) ? A_REVERSE | COLOR_PAIR(2) : 0;
- attr = (i & 4) ? COLOR_PAIR(4) : 0;
+ back = (i & 1) ? (A_BOLD | 'B' | COLOR_PAIR(1)) : ' ';
+ set = (i & 2) ? (A_REVERSE | COLOR_PAIR(2)) : 0;
+ attr = (chtype) ((i & 4) ? COLOR_PAIR(4) : 0);
bkgdset(back);
(void) attrset(set);
diff --git a/test/testcurs.c b/test/testcurs.c
index 5cc62f2df301..c1268981e051 100644
--- a/test/testcurs.c
+++ b/test/testcurs.c
@@ -6,7 +6,7 @@
* wrs(5/28/93) -- modified to be consistent (perform identically) with either
* PDCurses or under Unix System V, R4
*
- * $Id: testcurs.c,v 1.43 2010/11/13 21:02:28 tom Exp $
+ * $Id: testcurs.c,v 1.48 2013/05/18 22:05:06 tom Exp $
*/
#include <test.priv.h>
@@ -45,18 +45,6 @@ static const COMMAND command[] =
};
#define MAX_OPTIONS (int) SIZEOF(command)
-#if !HAVE_STRDUP
-#define strdup my_strdup
-static char *
-strdup(char *s)
-{
- char *p = typeMalloc(char, strlen(s) + 1);
- if (p)
- strcpy(p, s);
- return (p);
-}
-#endif /* not HAVE_STRDUP */
-
static int width, height;
int
@@ -85,7 +73,7 @@ main(
#ifdef A_COLOR
if (has_colors()) {
init_pair(1, COLOR_WHITE, COLOR_BLUE);
- wbkgd(win, COLOR_PAIR(1));
+ wbkgd(win, (chtype) COLOR_PAIR(1));
} else
wbkgd(win, A_REVERSE);
#else
@@ -353,6 +341,9 @@ inputTest(WINDOW *win)
typeahead(-1);
#endif
+#ifdef NCURSES_MOUSE_VERSION
+ mousemask(ALL_MOUSE_EVENTS, (mmask_t *) 0);
+#endif
#if defined(PDCURSES)
mouse_set(ALL_MOUSE_EVENTS);
#endif
@@ -367,8 +358,38 @@ inputTest(WINDOW *win)
wprintw(win, "Key Pressed: %c", c);
else
wprintw(win, "Key Pressed: %s", unctrl(UChar(c)));
-#if defined(PDCURSES)
+#ifdef KEY_MOUSE
if (c == KEY_MOUSE) {
+#if defined(NCURSES_MOUSE_VERSION)
+#define ButtonChanged(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, 037))
+#define ButtonPressed(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_PRESSED))
+#define ButtonDouble(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_DOUBLE_CLICKED))
+#define ButtonTriple(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_TRIPLE_CLICKED))
+#define ButtonRelease(n) ((event.bstate) & NCURSES_MOUSE_MASK(1, NCURSES_BUTTON_RELEASED))
+ MEVENT event;
+ int button = 0;
+
+ getmouse(&event);
+ if (ButtonChanged(1))
+ button = 1;
+ else if (ButtonChanged(2))
+ button = 2;
+ else if (ButtonChanged(3))
+ button = 3;
+ else
+ button = 0;
+ wmove(win, 4, 18);
+ wprintw(win, "Button %d: ", button);
+ if (ButtonPressed(button))
+ wprintw(win, "pressed: ");
+ else if (ButtonDouble(button))
+ wprintw(win, "double: ");
+ else if (ButtonTriple(button))
+ wprintw(win, "triple: ");
+ else
+ wprintw(win, "released: ");
+ wprintw(win, " Position: Y: %d X: %d", event.y, event.x);
+#elif defined(PDCURSES)
int button = 0;
request_mouse_pos();
if (BUTTON_CHANGED(1))
@@ -390,8 +411,9 @@ inputTest(WINDOW *win)
else
wprintw(win, "released: ");
wprintw(win, " Position: Y: %d X: %d", MOUSE_Y_POS, MOUSE_X_POS);
+#endif /* NCURSES_VERSION vs PDCURSES */
}
-#endif
+#endif /* KEY_MOUSE */
wrefresh(win);
if (c == ' ')
break;
@@ -491,7 +513,7 @@ outputTest(WINDOW *win)
#ifdef A_COLOR
if (has_colors()) {
init_pair(3, COLOR_BLUE, COLOR_WHITE);
- wbkgd(win1, COLOR_PAIR(3));
+ wbkgd(win1, (chtype) COLOR_PAIR(3));
} else
wbkgd(win1, A_NORMAL);
#else
@@ -693,9 +715,11 @@ padTest(WINDOW *dummy GCC_UNUSED)
raw();
wgetch(pad);
- spad = subpad(pad, 12, 25, 6, 52);
- MvWAddStr(spad, 2, 2, "This is a new subpad");
- box(spad, 0, 0);
+ if ((spad = subpad(pad, 12, 25, 6, 52)) != 0) {
+ MvWAddStr(spad, 2, 2, "This is a new subpad");
+ box(spad, 0, 0);
+ delwin(spad);
+ }
prefresh(pad, 0, 0, 0, 0, 15, 75);
keypad(pad, TRUE);
raw();
diff --git a/test/view.c b/test/view.c
index 6e5c2411cf41..4782d8509748 100644
--- a/test/view.c
+++ b/test/view.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -50,10 +50,11 @@
* scroll operation worked, and the refresh() code only had to do a
* partial repaint.
*
- * $Id: view.c,v 1.81 2010/11/14 01:06:02 tom Exp $
+ * $Id: view.c,v 1.94 2013/09/28 21:58:42 tom Exp $
*/
#include <test.priv.h>
+#include <widechars.h>
#include <time.h>
@@ -81,24 +82,10 @@
#include <sys/ptem.h>
#endif
-#if USE_WIDEC_SUPPORT
-#if HAVE_MBTOWC && HAVE_MBLEN
-#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
-#define count_mbytes(buffer,length,state) mblen(buffer,length)
-#define check_mbytes(wch,buffer,length,state) \
- (int) mbtowc(&wch, buffer, length)
-#define state_unused
-#elif HAVE_MBRTOWC && HAVE_MBRLEN
-#define reset_mbytes(state) init_mb(state)
-#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
-#define check_mbytes(wch,buffer,length,state) \
- (int) mbrtowc(&wch, buffer, length, &state)
-#else
-make an error
-#endif
-#endif /* USE_WIDEC_SUPPORT */
+#undef CTRL
+#define CTRL(x) ((x) & 0x1f)
-static RETSIGTYPE finish(int sig) GCC_NORETURN;
+static void finish(int sig) GCC_NORETURN;
static void show_all(const char *tag);
#if defined(SIGWINCH) && defined(TIOCGWINSZ) && HAVE_RESIZE_TERM
@@ -108,11 +95,11 @@ static void show_all(const char *tag);
#endif
#if CAN_RESIZE
-static RETSIGTYPE adjust(int sig);
+static void adjust(int sig);
static int interrupted;
+static bool waiting = FALSE;
#endif
-static bool waiting = FALSE;
static int shift = 0;
static bool try_color = FALSE;
@@ -121,6 +108,8 @@ static NCURSES_CH_T **vec_lines;
static NCURSES_CH_T **lptr;
static int num_lines;
+static void usage(void) GCC_NORETURN;
+
static void
usage(void)
{
@@ -135,6 +124,7 @@ usage(void)
#if defined(KEY_RESIZE)
," -r use old-style sigwinch handler rather than KEY_RESIZE"
#endif
+ ," -s start in single-step mode, waiting for input"
#ifdef TRACE
," -t trace screen updates"
," -T NUM specify trace mask"
@@ -180,7 +170,7 @@ ch_dup(char *src)
{
unsigned len = (unsigned) strlen(src);
NCURSES_CH_T *dst = typeMalloc(NCURSES_CH_T, len + 1);
- unsigned j, k;
+ size_t j, k;
#if USE_WIDEC_SUPPORT
wchar_t wstr[CCHARW_MAX + 1];
wchar_t wch;
@@ -243,6 +233,7 @@ main(int argc, char *argv[])
int value = 0;
bool done = FALSE;
bool got_number = FALSE;
+ bool single_step = FALSE;
#if CAN_RESIZE
bool nonposix_resize = FALSE;
#endif
@@ -258,7 +249,7 @@ main(int argc, char *argv[])
(void) signal(SIGINT, finish); /* arrange interrupts to terminate */
#endif
- while ((i = getopt(argc, argv, "cin:rtT:")) != -1) {
+ while ((i = getopt(argc, argv, "cin:rstT:")) != -1) {
switch (i) {
case 'c':
try_color = TRUE;
@@ -276,9 +267,18 @@ main(int argc, char *argv[])
nonposix_resize = TRUE;
break;
#endif
+ case 's':
+ single_step = TRUE;
+ break;
#ifdef TRACE
case 'T':
- trace((unsigned) atoi(optarg));
+ {
+ char *next = 0;
+ int tvalue = (int) strtol(optarg, &next, 0);
+ if (tvalue < 0 || (next != 0 && *next != 0))
+ usage();
+ trace((unsigned) tvalue);
+ }
break;
case 't':
trace(TRACE_CALLS);
@@ -306,7 +306,7 @@ main(int argc, char *argv[])
(void) signal(SIGWINCH, adjust); /* arrange interrupts to resize */
#endif
- /* slurp the file */
+ Trace(("slurp the file"));
for (lptr = &vec_lines[0]; (lptr - vec_lines) < MAXLINES; lptr++) {
char temp[BUFSIZ], *s, *d;
int col;
@@ -314,8 +314,26 @@ main(int argc, char *argv[])
if (fgets(buf, sizeof(buf), fp) == 0)
break;
- /* convert tabs so that shift will work properly */
+#if USE_WIDEC_SUPPORT
+ if (lptr == vec_lines) {
+ if (!memcmp("", buf, 3)) {
+ Trace(("trim BOM"));
+ s = buf + 3;
+ d = buf;
+ do {
+ } while ((*d++ = *s++) != '\0');
+ }
+ }
+#endif
+
+ /* convert tabs and nonprinting chars so that shift will work properly */
for (s = buf, d = temp, col = 0; (*d = *s) != '\0'; s++) {
+ if (*d == '\r') {
+ if (s[1] == '\n')
+ continue;
+ else
+ break;
+ }
if (*d == '\n') {
*d = '\0';
break;
@@ -347,14 +365,15 @@ main(int argc, char *argv[])
(void) nonl(); /* tell curses not to do NL->CR/NL on output */
(void) cbreak(); /* take input chars one at a time, no wait for \n */
(void) noecho(); /* don't echo input */
- nodelay(stdscr, TRUE);
+ if (!single_step)
+ nodelay(stdscr, TRUE);
idlok(stdscr, TRUE); /* allow use of insert/delete line */
if (try_color) {
if (has_colors()) {
start_color();
init_pair(my_pair, COLOR_WHITE, COLOR_BLUE);
- bkgd(COLOR_PAIR(my_pair));
+ bkgd((chtype) COLOR_PAIR(my_pair));
} else {
try_color = FALSE;
}
@@ -373,10 +392,12 @@ main(int argc, char *argv[])
adjust(0);
my_label = "interrupt";
}
-#endif
waiting = TRUE;
c = getch();
waiting = FALSE;
+#else
+ c = getch();
+#endif
if ((c < 127) && isdigit(c)) {
if (!got_number) {
MvPrintw(0, 0, "Count: ");
@@ -466,6 +487,9 @@ main(int argc, char *argv[])
nodelay(stdscr, TRUE);
my_delay = 0;
break;
+ case CTRL('L'):
+ redrawwin(stdscr);
+ break;
case ERR:
if (!my_delay)
napms(50);
@@ -483,7 +507,7 @@ main(int argc, char *argv[])
finish(0); /* we're done */
}
-static RETSIGTYPE
+static void
finish(int sig)
{
endwin();
@@ -510,7 +534,7 @@ finish(int sig)
* The 'wrefresh(curscr)' is needed to force the refresh to start from the top
* of the screen -- some xterms mangle the bitmap while resizing.
*/
-static RETSIGTYPE
+static void
adjust(int sig)
{
if (waiting || sig == 0) {
@@ -553,7 +577,7 @@ show_all(const char *tag)
printw("%.*s", COLS, temp);
clrtoeol();
this_time = time((time_t *) 0);
- strcpy(temp, ctime(&this_time));
+ strncpy(temp, ctime(&this_time), (size_t) 30);
if ((i = (int) strlen(temp)) != 0) {
temp[--i] = 0;
if (move(0, COLS - i - 2) != ERR)
diff --git a/test/widechars.h b/test/widechars.h
new file mode 100644
index 000000000000..e7897bae6ca7
--- /dev/null
+++ b/test/widechars.h
@@ -0,0 +1,71 @@
+/****************************************************************************
+ * Copyright (c) 2012 Free Software Foundation, Inc. *
+ * *
+ * Permission is hereby granted, free of charge, to any person obtaining a *
+ * copy of this software and associated documentation files (the *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+#ifndef __WIDECHARS_H
+#define __WIDECHARS_H 1
+
+#include <test.priv.h>
+
+#if USE_WIDEC_SUPPORT
+
+#if defined(__MINGW32__)
+/*
+ * MinGW has wide-character functions, but they do not work correctly.
+ */
+
+extern int _nc_mbtowc(wchar_t *pwc, const char *s, size_t n);
+extern int __MINGW_NOTHROW _nc_mbtowc(wchar_t *pwc, const char *s, size_t n);
+#define mbtowc(pwc,s,n) _nc_mbtowc(pwc,s,n)
+
+extern int __MINGW_NOTHROW _nc_mblen(const char *, size_t);
+#define mblen(s,n) _nc_mblen(s, n)
+
+#endif /* __MINGW32__ */
+
+#if HAVE_MBTOWC && HAVE_MBLEN
+#define reset_mbytes(state) IGNORE_RC(mblen(NULL, 0)), IGNORE_RC(mbtowc(NULL, NULL, 0))
+#define count_mbytes(buffer,length,state) mblen(buffer,length)
+#define check_mbytes(wch,buffer,length,state) \
+ (int) mbtowc(&wch, buffer, length)
+#define state_unused
+#elif HAVE_MBRTOWC && HAVE_MBRLEN
+#define reset_mbytes(state) init_mb(state)
+#define count_mbytes(buffer,length,state) mbrlen(buffer,length,&state)
+#define check_mbytes(wch,buffer,length,state) \
+ (int) mbrtowc(&wch, buffer, length, &state)
+#else
+make an error
+#endif
+
+#else
+
+#endif /* USE_WIDEC_SUPPORT */
+
+extern void widechars_stub(void);
+
+#endif /* __WIDECHARS_H */
diff --git a/test/worm.c b/test/worm.c
index 98f099cb9cb6..c3fc0da822ef 100644
--- a/test/worm.c
+++ b/test/worm.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2012,2013 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -61,7 +61,7 @@ Options:
traces will be dumped. The program stops and waits for one character of
input at the beginning and end of the interval.
- $Id: worm.c,v 1.60 2010/11/13 20:21:21 tom Exp $
+ $Id: worm.c,v 1.65 2013/06/22 20:01:41 tom Exp $
*/
#include <test.priv.h>
@@ -202,6 +202,14 @@ static const struct options {
/* *INDENT-ON* */
static void
+failed(const char *s)
+{
+ perror(s);
+ endwin();
+ ExitProgram(EXIT_FAILURE);
+}
+
+static void
cleanup(void)
{
USING_WINDOW(stdscr, wrefresh);
@@ -209,7 +217,7 @@ cleanup(void)
endwin();
}
-static RETSIGTYPE
+static void
onsig(int sig GCC_UNUSED)
{
cleanup();
@@ -354,8 +362,7 @@ draw_all_worms(void)
if (first) {
first = FALSE;
for (n = 0, w = &worm[0]; n < number; n++, w++) {
- int rc;
- rc = pthread_create(&(w->thread), NULL, start_worm, w);
+ (void) pthread_create(&(w->thread), NULL, start_worm, w);
}
}
#else
@@ -391,6 +398,8 @@ update_refs(WINDOW *win)
if (last_x != COLS - 1) {
for (y = 0; y <= last_y; y++) {
refs[y] = typeRealloc(int, (size_t) COLS, refs[y]);
+ if (!refs[y])
+ failed("update_refs");
for (x = last_x + 1; x < COLS; x++)
refs[y][x] = 0;
}
@@ -402,6 +411,8 @@ update_refs(WINDOW *win)
refs = typeRealloc(int *, (size_t) LINES, refs);
for (y = last_y + 1; y < LINES; y++) {
refs[y] = typeMalloc(int, (size_t) COLS);
+ if (!refs[y])
+ failed("update_refs");
for (x = 0; x < COLS; x++)
refs[y][x] = 0;
}
@@ -419,6 +430,7 @@ main(int argc, char *argv[])
struct worm *w;
int *ip;
bool done = FALSE;
+ int max_refs;
setlocale(LC_ALL, "");
@@ -489,7 +501,7 @@ main(int argc, char *argv[])
#define SET_COLOR(num, fg) \
init_pair(num+1, (short) fg, (short) bg); \
- flavor[num] |= COLOR_PAIR(num+1) | A_BOLD
+ flavor[num] |= (chtype) COLOR_PAIR(num+1) | A_BOLD
SET_COLOR(0, COLOR_GREEN);
SET_COLOR(1, COLOR_RED);
@@ -501,8 +513,9 @@ main(int argc, char *argv[])
}
#endif /* A_COLOR */
- refs = typeMalloc(int *, (size_t) LINES);
- for (y = 0; y < LINES; y++) {
+ max_refs = LINES;
+ refs = typeMalloc(int *, (size_t) max_refs);
+ for (y = 0; y < max_refs; y++) {
refs[y] = typeMalloc(int, (size_t) COLS);
for (x = 0; x < COLS; x++) {
refs[y][x] = 0;
@@ -596,7 +609,7 @@ main(int argc, char *argv[])
Trace(("Cleanup"));
cleanup();
#ifdef NO_LEAKS
- for (y = 0; y < LINES; y++) {
+ for (y = 0; y < max_refs; y++) {
free(refs[y]);
}
free(refs);
diff --git a/test/xmas.c b/test/xmas.c
index fc0cc4cbd0e9..087fcd9d81d1 100644
--- a/test/xmas.c
+++ b/test/xmas.c
@@ -92,7 +92,7 @@
/******************************************************************************/
/*
- * $Id: xmas.c,v 1.27 2010/11/13 20:24:10 tom Exp $
+ * $Id: xmas.c,v 1.28 2013/04/27 19:46:53 tom Exp $
*/
#include <test.priv.h>
@@ -148,7 +148,7 @@ static int strng5(void);
static int reindeer(void);
static int blinkit(void);
-static RETSIGTYPE done(int sig) GCC_NORETURN;
+static void done(int sig) GCC_NORETURN;
static void
set_color(WINDOW *win, chtype color)
@@ -1143,7 +1143,7 @@ reindeer(void)
return (0);
}
-static RETSIGTYPE
+static void
done(int sig GCC_UNUSED)
{
CATCHALL(done);