aboutsummaryrefslogtreecommitdiff
path: root/contrib/dialog
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2018-10-20 20:49:46 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2018-10-20 20:49:46 +0000
commitf4f33ea0c752ff0f9bfad34991d5bbb54e71133d (patch)
tree40442a08324132e6e11845ccaa4f3e675edc8a4f /contrib/dialog
parentb0dee75e6460644cb00f57245a3e797626a0083f (diff)
parent4dccdce4191d6e2bc3ba9f782b0fe1aa46b743e3 (diff)
downloadsrc-f4f33ea0c752ff0f9bfad34991d5bbb54e71133d.tar.gz
src-f4f33ea0c752ff0f9bfad34991d5bbb54e71133d.zip
Update libdialog to 1.3-20180621
Notes
Notes: svn path=/head/; revision=339488
Diffstat (limited to 'contrib/dialog')
-rw-r--r--contrib/dialog/CHANGES323
-rw-r--r--contrib/dialog/VERSION2
-rw-r--r--contrib/dialog/aclocal.m43007
-rw-r--r--contrib/dialog/argv.c71
-rw-r--r--contrib/dialog/arrows.c26
-rw-r--r--contrib/dialog/buildlist.c520
-rw-r--r--contrib/dialog/buttons.c55
-rw-r--r--contrib/dialog/calendar.c510
-rw-r--r--contrib/dialog/checklist.c44
-rwxr-xr-xcontrib/dialog/config.guess856
-rwxr-xr-xcontrib/dialog/config.sub1697
-rwxr-xr-xcontrib/dialog/configure15307
-rw-r--r--contrib/dialog/configure.in42
-rwxr-xr-xcontrib/dialog/demo.pl337
-rw-r--r--contrib/dialog/dialog.1639
-rw-r--r--contrib/dialog/dialog.31601
-rw-r--r--contrib/dialog/dialog.c500
-rw-r--r--contrib/dialog/dialog.h63
-rw-r--r--contrib/dialog/dialog.pl712
-rw-r--r--contrib/dialog/dlg_keys.c138
-rw-r--r--contrib/dialog/dlg_keys.h12
-rw-r--r--contrib/dialog/editbox.c65
-rw-r--r--contrib/dialog/formbox.c51
-rw-r--r--contrib/dialog/fselect.c51
-rw-r--r--contrib/dialog/guage.c41
-rwxr-xr-xcontrib/dialog/headers.sh103
-rw-r--r--contrib/dialog/inputbox.c29
-rw-r--r--contrib/dialog/inputstr.c18
-rw-r--r--contrib/dialog/makefile.in71
-rw-r--r--contrib/dialog/menubox.c55
-rw-r--r--contrib/dialog/mixedform.c6
-rw-r--r--contrib/dialog/mixedgauge.c35
-rw-r--r--contrib/dialog/mouse.c38
-rw-r--r--contrib/dialog/mousewget.c8
-rw-r--r--contrib/dialog/msgbox.c22
-rw-r--r--contrib/dialog/package/debian/changelog138
-rw-r--r--contrib/dialog/package/debian/control20
-rw-r--r--contrib/dialog/package/debian/copyright4
-rwxr-xr-xcontrib/dialog/package/debian/postinst7
-rwxr-xr-xcontrib/dialog/package/debian/rules25
-rw-r--r--contrib/dialog/package/debian/watch2
-rw-r--r--contrib/dialog/package/dialog.map222
-rw-r--r--contrib/dialog/package/dialog.spec68
-rw-r--r--contrib/dialog/package/dialog.sym202
-rw-r--r--contrib/dialog/package/freebsd/Makefile4
-rw-r--r--contrib/dialog/pause.c32
-rw-r--r--contrib/dialog/po/de.po37
-rw-r--r--contrib/dialog/po/dialog.pot35
-rw-r--r--contrib/dialog/po/es.po30
-rw-r--r--contrib/dialog/po/fur.po113
-rw-r--r--contrib/dialog/po/gd.po111
-rw-r--r--contrib/dialog/po/hr.po12
-rw-r--r--contrib/dialog/po/hu.po41
-rw-r--r--contrib/dialog/po/lv.po37
-rw-r--r--contrib/dialog/po/ro.po52
-rw-r--r--contrib/dialog/po/tr.po35
-rw-r--r--contrib/dialog/prgbox.c10
-rw-r--r--contrib/dialog/progressbox.c373
-rw-r--r--contrib/dialog/rangebox.c45
-rw-r--r--contrib/dialog/rc.c25
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifman129
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifmcfg268
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifmcfg430
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifmcfg514
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifpoll19
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.ifreq120
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.rcnews79
-rwxr-xr-xcontrib/dialog/samples/copifuncs/copi.sendifm215
-rw-r--r--contrib/dialog/samples/copifuncs/copi.trnrc13
-rw-r--r--contrib/dialog/samples/copifuncs/ifpatch101
-rwxr-xr-xcontrib/dialog/samples/dselect11
-rw-r--r--contrib/dialog/samples/install/FDISK.TEST28
-rw-r--r--contrib/dialog/samples/install/makefile.in35
-rw-r--r--contrib/dialog/samples/install/setup.c371
-rw-r--r--contrib/dialog/samples/install/setup.help49
-rwxr-xr-xcontrib/dialog/samples/menubox1131
-rwxr-xr-xcontrib/dialog/samples/programbox7
-rwxr-xr-xcontrib/dialog/samples/programbox27
-rwxr-xr-xcontrib/dialog/samples/progress7
-rwxr-xr-xcontrib/dialog/samples/progress27
-rwxr-xr-xcontrib/dialog/samples/run_test.sh56
-rw-r--r--contrib/dialog/samples/setup-edit4
-rw-r--r--contrib/dialog/samples/setup-tempfile4
-rw-r--r--contrib/dialog/tailbox.c44
-rw-r--r--contrib/dialog/textbox.c32
-rw-r--r--contrib/dialog/timebox.c27
-rw-r--r--contrib/dialog/trace.c56
-rw-r--r--contrib/dialog/treeview.c34
-rw-r--r--contrib/dialog/ttysize.c87
-rw-r--r--contrib/dialog/ui_getc.c27
-rw-r--r--contrib/dialog/util.c253
-rw-r--r--contrib/dialog/yesno.c24
92 files changed, 22355 insertions, 7959 deletions
diff --git a/contrib/dialog/CHANGES b/contrib/dialog/CHANGES
index d5d61a6c7ac2..17c5b2735487 100644
--- a/contrib/dialog/CHANGES
+++ b/contrib/dialog/CHANGES
@@ -1,9 +1,328 @@
--- $Id: CHANGES,v 1.476 2013/09/24 00:06:47 tom Exp $
+-- $Id: CHANGES,v 1.619 2018/06/21 09:19:45 tom Exp $
-- Thomas E. Dickey <dickey@invisible-island.net>
This version of dialog was originally from a Debian snapshot. I've done this
to it:
+2018/06/21
+ + improve file-offset computation in textbox.c (Werner Fink).
+ + fix an overlooked case with real_auto_size() to maximize when
+ height or width is given as -1.
+ + build-fixes for configure options "--disable-Xdialog2" and
+ "--disable-form"
+ + add traces for each widget to show its parameters.
+ + modify color scheme for mixedgauge to use the dialog window colors,
+ like the captions.
+ + fix a too-small malloc in the mixedgauge widget.
+ + fix a use-after-free in dlg_remove_callback().
+ + improve handling of SIGWINCH for several widgets (Debian #865840).
+ + menubox, the point of the Debian report was that it would be nice
+ to increase the window size if the terminal size increases. Did
+ that as a special case less problematic than decreasing the
+ terminal size. Added samples/menubox11 to demonstrate by
+ comparison with menubox10 a problem with debconf which puts extra
+ newlines in the caption that interfere with autowrap.
+ + progressbox and derived prgbox, programbox, now handle resizing.
+ + yesno, window was cleared
+ + add dlg_ttysize() to support new options, allowing scripts to obtain
+ some text-formatting details without initializing the terminal.
+ + add options --print-text-only, and --print-text-size for scripts that
+ adjust the widget size according to how the captions are formatted.
+ + improve dialog.pl:
+ + add demo.pl, to demonstrate the functions
+ + quote/escape string parameters passed to dialog.
+ + ensure all "integer" parameters are really integers.
+ + use actual screensize for list captions rather than assuming 24
+ lines.
+ + when trimming blanks, treat unconverted tabs the same as spaces.
+ + correct parameter to test when trimming blanks from the script,
+ e.g., with "--trim" (report by Jarno Suni).
+ + improve documentation of the various whitespace-filtering options,
+ to show which take precedence (Debian #867536, cf: Debian #102942).
+ + modify msgbox.c, yesno.c to bind SCROLLKEY_BINDINGS before
+ TRAVERSE_BINDINGS so that up/down arrow will by default scroll the
+ message up/down rather than be aliases for tab-traversal (report by
+ Fredrik Kers).
+ + modify dump_one_binding() to show when a binding is overridden.
+ + improve format of trace-file, making comment-syntax consistent,
+ as well as showing argv-splitting as a series of comments.
+ + modify dlg_string_to_argv() to change the quoting behavior to be
+ more consistent with shell behavior (patch by Denilson Sa Maia).
+ + modify dlg_getc() to return ESC when a timeout expires, notifying
+ callers that a quit occurred rather than exiting the application
+ (suggested by Rodrigo Freitas).
+ + modify handle_inputs() to ensure cursor-visibility is restored when
+ there is no input character available (report by Guillaume Vareille).
+ + improve comment in manual page regarding which widgets can use the
+ "--help-button" (prompted by discussion with Csanyi Pal).
+ + add a check for valid object pointer in tailbox's main loop since
+ the getc-callback may have been freed within ui_getc.c (report by
+ "David").
+ + improved configure macros for ncurses: CF_GNU_SOURCE, CF_SHARED_OPTS,
+ CF_CURSES_LIBS, CF_CURSES_FUNCS, CF_NCURSES_CONFIG
+ + improved configure script checks for groff vs man2html:
+ CF_PROG_GROFF and CF_WITH_MAN2HTML
+ + build-fix from lynx for AM_WITH_NLS configure macro
+ + update config.guess, config.sub
+
+2017/12/09
+ + update ftp url in test-packages.
+ + modify test-packages to use recommended compiler/linker flags.
+ + improved configure macros AM_WITH_NLS, CF_CC_ENV_FLAGS,
+ CF_CURSES_LIBS, CF_NCURSES_CONFIG, CF_SHARED_OPTS, CF_WITH_LIBTOOL,
+ CF__INTL_BODY.
+ + update config.guess, config.sub
+
+2017/05/09
+ + improved configure macros CF_ADD_CFLAGS, CF_CC_ENV_FLAGS, and
+ CF_SHARED_OPTS.
+ + updated hu.po and tr.po from
+ http://translationproject.org/latest/dialog/
+ + update config.guess, config.sub
+
+2017/01/31
+ + use DLG_TRACE macro consistently to make "--disable-trace" configure
+ option work.
+ + modify buildlist widget to support option "--reorder" for to allow
+ user to reorder the data based on the sequence of selections
+ (discussion with Paraic O'Ceallaigh).
+ + fill background color on unused parts of buildlist.
+ + fix a minor error in buildlist which let pageup switch columns.
+ + change several calls to dlg_trace_msg to prefix with "#" to make
+ the trace logs more consistent for parsing.
+ + add samples/run_test.sh
+ + further improve performance with very long command-lines by changes
+ to howmany_tags().
+ + modify dlg_string_to_argv() to convert escaped double-quotes to
+ plain double-quotes when within a double-quoted string.
+ + modify makefile to apply CFLAGS to linking
+ + modify dlg_string_to_argv() to ignore escaped newlines except when
+ quoted, fixing a problem with samples/checklist9.
+ + interpret $DIALOGOPTS before expanding "--file", etc., to allow
+ the environment variable to turn on tracing in that process.
+ + improve performance when processing very long command lines, e.g.,
+ using "--file" by changing dialog_opts[] to an array of pointers to
+ the expanded argv[] (discussion with Lars Tauber).
+ + modified autoconf macros
+ + CF_CC_ENV_FLAGS amend the last change to move only the
+ preprocessor, optimization and warning flags to CPPFLAGS and
+ CFLAGS, leaving the residue in CC. That happens to work for gcc's
+ various "model" options, but may require tuning for other compilers
+ + CF_LARGEFILE workaround for clang exit-code vs warnings
+ + CF_MATH_LIB quiet strict gcc warning
+ + CF_WITH_LIBTOOL fix a few places in configure/build scripts where
+ DESTDIR and rpath were combined
+ + CF_XOPEN_SOURCE add "uclinux" to list of Linux's
+ + update config.guess, config.sub
+
+2016/11/20
+ + added fur.po (Friulian) from
+ http://translationproject.org/latest/dialog/
+
+2016/08/28
+ + improve parsing and trace for "bindkey", to convert space to/from
+ "\s", as well as handle octal escapes for single byte characters.
+ + change explicit checks for space character used for select or toggle
+ to make this rebindable to "TOGGLE" (prompted by discussion with
+ Paul van Tilburg).
+ + add default bindings for cursor left/right to formbox. The cursor
+ left/right cases were replaced with rebindable symbols in 2005/12/07
+ without providing these keys as default values (report/patch by
+ Miroslav Lichvar).
+ + modified autoconf macros
+ + CF_PROG_LINT add cpplint to programs to use; drop ad hoc tdlint and
+ alint.
+ + CF_CC_ENV_FLAGS don't limit the check to -I, -U and -D options,
+ since the added options can include various compiler options before
+ and after preprocessor options.
+ + CF_GNU_SOURCE recent glibc (Debian 2.23-4 for example) has
+ misordered ifdef/checks for new symbol _DEFAULT_SOURCE, producing
+ warning messages when only _GNU_SOURCE is defined. Add a followup
+ check to define _DEFAULT_SOURCE.
+ + CF_XOPEN_SOURCE use _GNU_SOURCE for cygwin headers, tested with
+ cygwin 2.3, 2.5 (patch by Corinna Vinschen).
+ + mention --no-collapse option in manual page description of
+ --tab-correct option.
+ + update config.guess, config.sub
+
+2016/04/24
+ + fix a special case in drawing shadow on a line-drawing cell where the
+ alternate-character set flag was lost (report by Martin Kravec).
+ + fix a regression from 2015/05/13 changes for escaping; it is
+ necessary to retain backslashes within quotes to make "\Z" escapes
+ work (report by Marcin Krol).
+ + fix test package for RPMs; changes in 2015 omitted symbolic links
+ for the library.
+ + fix typo in help message for "--buildlist" (report by Rihards Olups).
+ + modified autoconf macros
+ + CF_PROG_AR, CF_AR_FLAGS added to improve check for archive tool.
+ + CF_LD_RPATH_OPT, change FreeBSD to use -Wl,-rpath rather than
+ -rpath option. According to FreeBSD #178732, either works since
+ FreeBSD 4.x; however scons does not accept anything except the
+ -Wl,-rpath form.
+ + CF_WITH_NCURSES_ETC, change from ncurses to check for pthreads
+ dependency.
+
+2016/02/09
+ + modify editbox widget to add a trailing newline if the text has none
+ to ensure the last line is not ignored (report by Florent Rougon).
+ + change mouse initialization to look for button-presses rather than
+ button-clicks, for better response.
+ + modify dump_curses_key() to show mouse-coding in readable form.
+ + correct mapping of mouse-clicks on the day-grid in calendar widget
+ when "--week-start" is used to set the start of the week (report by
+ Stefan Vogtner).
+ > integrated changes from Stefan Vogtner:
+ + use Gregorian algorithm for leap year
+ + use mktime if available; calendar was written just as it became
+ standard.
+
+2016/01/26 - release 1.3
+ + correct --infobox documentation, which said it shows an OK button.
+ + fix a couple of place in test-scripts which referred to $SIG_TRAP
+ rather than $SIG_QUIT
+ + reorganize dialog.3, to use subsections for generating navigation
+ pane, using man2html
+ + add "--week-start" option for calendar widget (prompted by discussion
+ with Stefan Vogtner).
+ + add a limit-check in editbox.c to ensure that mouse-clicks outside
+ the filled-in text area do not access past the end of the array
+ (report by Stefan Vogtner).
+ + update configure macros from ncurses changes.
+ + update config.guess, config.sub
+
+2015/09/20
+ + decrease table value for minimum number of arguments for the widgets
+ which use --no-items option (report by Raven Singularity).
+ + update configure macros:
+ + use $SHELL consistently, deprecate non-POSIX shell
+ + PKG_CONFIG may simply be unset - fix
+ + add option to allow changing ABI version, from ncurses6.
+
+2015/05/28
+ + fixes for two autoconf macros, CF_ADD_INCDIR and CF_NCURSES_CONFIG
+ from work on ncurses.
+ + build-fix for NetBSD curses (patch by Matthias Scheler).
+
+2015/05/13
+ + add configure option --with-install-prefix, like ncurses.
+ + add --with-screen and related configure options from ncurses-examples
+ to allow building with ncurses6 test-packages.
+ + update configure macros for improved coding style from lynx changes.
+ + updated ro.po from
+ http://translationproject.org/latest/dialog/
+ + update config.guess, config.sub
+ > patches by Florent Rougon:
+ + fix two bugs in the "--file" option.
+ + When the number of arguments read from the included file is 0, the
+ code used to just skip over '--file' and its argument instead of
+ removing them from the argument list, causing "Error: Unknown
+ option --file" later on.
+ + In the alternative case (at least one argument read from the file),
+ the previous code used to do '--j;' in order to "force rescan" of
+ the inserted arguments. However, control then flowed to outer
+ blocks where a '++j;' counteracted this measure, causing "Error:
+ Unknown option --msgbox" (for instance) later on.
+ + modify escaping in argv.c to be more uniform, whether or not the
+ backslash is found within a parameter.
+
+2015/02/25
+ + modify gauge widget to keep from erasing a second gauge widget, e.g.,
+ via the "--and-widget" option. This is a cosmetic change to match
+ behavior of dialog 1.0 (report by Jason Orendorf).
+ + add configure option "--with-man2html"
+ + add configure options for versioned symbols, from ongoing work on
+ ncurses.
+ + update configure macros, e.g., for shared libraries
+
+2015/01/25
+ + suppress highlighting of character which denotes an abbreviation or
+ shortcut for the OK/Cancel and other buttons for these widgets, which
+ use abbreviations for the list shown on the screen: buildlist,
+ checklist/radiobox, menubox, treeview (Debian #775295).
+ + add grid up/left and down/right bindings in editbox.c as synonyms for
+ field prev and next, respectively when handling the OK/Cancel buttons
+ (Debian #775294).
+
+2014/09/11
+ + correct malloc-size for change to prgbox.
+
+2014/09/10
+ + fixes to make "-c" option work when passing command to shell for the
+ prgbox widget, for example in samples/prgbox2 (report by Korantin
+ Auguste).
+
+2014/09/08
+ + fix an out-of-bounds array index in buildlist widget (report by
+ Cade Foster).
+
+2014/09/01
+ + add configure check for groff, needed for html/ps/pdf output.
+ + update configure-script macros:
+ + CF_ACVERSION_CHECK - work around another gratuitous incompatibility
+ introduced in 2.69
+ + CF_ADD_CFLAGS - workaround for ash-shell, e.g., with Minix
+ + CF_ADD_LIBS - filter out duplicates
+ + CF_CURSES_FUNCS - improve workaround for weak-linkage, seems to fix
+ tests with NetBSD 6.1
+ + CF_INTEL_COMPILER - clean up the -no-gcc option which was leftover
+ from testing.
+ + CF_LIB_SUFFIX - change suffix for AIX shared libraries to ".so".
+ + CF_MAKEFLAGS - workaround for GNU make 4.0 incompatibility with
+ previous releases.
+ + CF_XOPEN_SOURCE - add cases for Minix, UnixWare and improve the
+ workaround for Solaris.
+ + improve comparison in compare_cache() function, in case difference
+ between pointers does not fit in int's.
+ + updated de.po, es.po, hu.po, lv.po from
+ http://translationproject.org/latest/dialog/
+ + update config.guess, config.sub
+
+2014/02/19
+ + cleanup of manpages prompted by Gislason's comments.
+ + several changes to manpages to improve presentation (patches by
+ Bjarni I. Gislason, Debian #739180, Debian #739181)
+ + use "\/" when transitioning from italic to normal font
+ + correct an instance of "e.g,."
+ + use "\e" rather than "\\" to present a literal "\"
+ + improve formatting of table header
+ + remove some excess space-characters
+ + change a reference 0-9 to use "through" as the connector
+ + use "\&" to separate "." from a space to make the space shorter
+ + change a list's TP macro parameters to make the hanging text align
+ better with the adjacent paragraph
+ + add comma in a few places before "and" in a list
+ + separate units from numbers with a nonfillable space
+ + replace "-" with en-dash in a few places
+ + corrected argument indices after "--args" and "--file" to rescan the
+ argument list after removing/substituting those options.
+ + fix loops for "--file" option to handle cases with zero or no tokens at
+ all substituted (Redhat #1066168).
+ + add gd.po from
+ http://translationproject.org/latest/dialog/
+
+2014/01/12
+ + improve calculation for amount to scroll in programbox when an "Ok"
+ button might obscure part of the data (report by Florent Rougon).
+ + modify program to permit --separate-output to be used with buildlist
+ and treeview widgets (report by Florent Rougon).
+ + add list-height parameter to manpage description of --buildlist
+ (report by Florent Rougon).
+ + minor fixes to dialog.1 manpage; the reported problem was actually
+ fixed in 20120703 (Debian #726233, patch by Bjarni Ingi Gislason).
+ + add a "Hello World" example to dialog.3 manpage (prompted by
+ discussions with Dustin Oprea, Kevin Ingwersen).
+ + correct comparison in dlg_lookup_key() so that using "bindkey" with
+ a "*" wildcard parameter works as documented (report by Stewart
+ Benedict).
+ + updated configure macros, fixes for clang and mingw.
+ + update config.guess, config.sub
+
+2013/09/28
+ + fix a regression in gauge widget from 2013/09/28 changes;
+ dlg_reallocate_gauge() failed when no --title option was given
+ (report by Tritonas Insomnia).
+
2013/09/23
+ fix samples/inputbox6-utf8, which had depended unnecessarily on bash.
+ improve memory caching for wide-character manipulation in gauge
@@ -434,7 +753,7 @@ to it:
to display (Debian #579390).
+ add makefile rules for generating html, etc., documentation from
nroff.
- > patches by Samuel Martín Moro
+ > patches by Samuel Martin Moro
+ reset errors in tailbox before reading new character.
+ modify dlg_draw_scrollbar(), omitting hiding percentages in boxes
when no arrows or scrollbar are needed.
diff --git a/contrib/dialog/VERSION b/contrib/dialog/VERSION
index b6b52c5ade05..12fccce09544 100644
--- a/contrib/dialog/VERSION
+++ b/contrib/dialog/VERSION
@@ -1 +1 @@
-11:1:0 1.2 20130923
+15:0:0 1.3 20180621
diff --git a/contrib/dialog/aclocal.m4 b/contrib/dialog/aclocal.m4
index 35f94c5f4da3..c33827fce67b 100644
--- a/contrib/dialog/aclocal.m4
+++ b/contrib/dialog/aclocal.m4
@@ -1,7 +1,7 @@
dnl macros used for DIALOG configure script
-dnl $Id: aclocal.m4,v 1.94 2013/09/22 14:26:24 tom Exp $
+dnl $Id: aclocal.m4,v 1.120 2018/06/21 00:30:26 tom Exp $
dnl ---------------------------------------------------------------------------
-dnl Copyright 1999-2012,2013 -- Thomas E. Dickey
+dnl Copyright 1999-2017,2018 -- Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@@ -31,7 +31,7 @@ dnl see
dnl http://invisible-island.net/autoconf/
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
-dnl AM_GNU_GETTEXT version: 13 updated: 2012/11/09 05:47:26
+dnl AM_GNU_GETTEXT version: 14 updated: 2015/04/15 19:08:48
dnl --------------
dnl Usage: Just like AM_WITH_NLS, which see.
AC_DEFUN([AM_GNU_GETTEXT],
@@ -73,7 +73,7 @@ strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
- "$presentlang"*) useit=yes;;
+ ("$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
@@ -167,7 +167,7 @@ size_t iconv();
AC_SUBST(LIBICONV)
])dnl
dnl ---------------------------------------------------------------------------
-dnl AM_LANGINFO_CODESET version: 3 updated: 2002/10/27 23:21:42
+dnl AM_LANGINFO_CODESET version: 4 updated: 2015/04/18 08:56:57
dnl -------------------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -178,19 +178,19 @@ dnl
dnl From Bruno Haible.
AC_DEFUN([AM_LANGINFO_CODESET],
[
- AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
- [AC_TRY_LINK([#include <langinfo.h>],
- [char* cs = nl_langinfo(CODESET);],
- am_cv_langinfo_codeset=yes,
- am_cv_langinfo_codeset=no)
- ])
- if test $am_cv_langinfo_codeset = yes; then
- AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
- [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
- fi
+AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl AM_LC_MESSAGES version: 4 updated: 2002/10/27 23:21:42
+dnl AM_LC_MESSAGES version: 5 updated: 2015/05/10 19:52:14
dnl --------------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -211,17 +211,17 @@ dnl
dnl serial 2
dnl
AC_DEFUN([AM_LC_MESSAGES],
- [if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])dnl
+[if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+fi])dnl
dnl ---------------------------------------------------------------------------
-dnl AM_PATH_PROG_WITH_TEST version: 8 updated: 2009/01/11 20:31:12
+dnl AM_PATH_PROG_WITH_TEST version: 9 updated: 2015/04/15 19:08:48
dnl ----------------------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -250,10 +250,10 @@ set dummy $2; ac_word=[$]2
AC_MSG_CHECKING([for $ac_word])
AC_CACHE_VAL(ac_cv_path_$1,
[case "[$]$1" in
- [[\\/]*|?:[\\/]]*)
+ ([[\\/]*|?:[\\/]]*)
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
;;
- *)
+ (*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
for ac_dir in ifelse([$5], , $PATH, [$5]); do
test -z "$ac_dir" && ac_dir=.
@@ -280,7 +280,7 @@ fi
AC_SUBST($1)dnl
])dnl
dnl ---------------------------------------------------------------------------
-dnl AM_WITH_NLS version: 25 updated: 2012/10/06 08:57:51
+dnl AM_WITH_NLS version: 29 updated: 2018/02/21 21:26:03
dnl -----------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -354,6 +354,8 @@ AC_DEFUN([AM_WITH_NLS],
dnl If we use NLS figure out what method
if test "$USE_NLS" = "yes"; then
+ dnl We need to process the po/ directory.
+ POSUB=po
AC_DEFINE(ENABLE_NLS, 1,
[Define to 1 if translation of program messages to the user's native language
is requested.])
@@ -367,20 +369,49 @@ AC_DEFUN([AM_WITH_NLS],
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
dnl User does not insist on using GNU NLS library. Figure out what
- dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to use. If GNU gettext is available we use this. Else we may have
dnl to fall back to GNU NLS library.
CATOBJEXT=NONE
+ dnl Save these (possibly-set) variables for reference. If the user
+ dnl overrode these to provide full pathnames, then warn if not actually
+ dnl GNU gettext, but do not override their values. Also, if they were
+ dnl overridden, suppress the part of the library test which prevents it
+ dnl from finding anything other than GNU gettext. Doing this also
+ dnl suppresses a bogus search for the intl library.
+ cf_save_msgfmt_path="$MSGFMT"
+ cf_save_xgettext_path="$XGETTEXT"
+
+ dnl Search for GNU msgfmt in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ AC_SUBST(MSGFMT)
+
+ dnl Search for GNU xgettext in the PATH.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
+
+ cf_save_OPTS_1="$CPPFLAGS"
+ if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
+ test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
+ CF_ADD_CFLAGS(-DIGNORE_MSGFMT_HACK)
+ fi
+
cf_save_LIBS_1="$LIBS"
CF_ADD_LIBS($LIBICONV)
- AC_CACHE_CHECK([for libintl.h and gettext()], cf_cv_func_gettext,[
- CF_FIND_LINKAGE(CF__INTL_HEAD,
- CF__INTL_BODY,
+
+ CF_FIND_LINKAGE(CF__INTL_HEAD,
+ CF__INTL_BODY($2),
intl,
cf_cv_func_gettext=yes,
cf_cv_func_gettext=no)
- ])
+
+ AC_MSG_CHECKING([for libintl.h and gettext()])
+ AC_MSG_RESULT($cf_cv_func_gettext)
+
LIBS="$cf_save_LIBS_1"
+ CPPFLAGS="$cf_save_OPTS_1"
if test "$cf_cv_func_gettext" = yes ; then
AC_DEFINE(HAVE_LIBINTL_H,1,[Define to 1 if we have libintl.h])
@@ -408,159 +439,150 @@ AC_DEFUN([AM_WITH_NLS],
AC_CHECK_FUNCS(dcgettext)
LIBS="$gt_save_LIBS"
- dnl Search for GNU msgfmt in the PATH.
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
-
- dnl Search for GNU xgettext in the PATH.
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
-
CATOBJEXT=.gmo
fi
+ elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
+ AC_MSG_WARN(disabling NLS feature)
+ sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
+ mv confdefs.tmp confdefs.h
+ ALL_LINGUAS=
+ CATOBJEXT=.ignored
+ MSGFMT=":"
+ GMSGFMT=":"
+ XGETTEXT=":"
+ POSUB=
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ USE_NLS=no
+ nls_cv_use_gnu_gettext=no
fi
if test "$CATOBJEXT" = "NONE"; then
dnl GNU gettext is not found in the C library.
dnl Fall back on GNU gettext library.
- nls_cv_use_gnu_gettext=yes
+ nls_cv_use_gnu_gettext=maybe
fi
fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- if test ! -d $srcdir/intl ; then
- AC_MSG_ERROR(no NLS library is packaged with this application)
- fi
- dnl Mark actions used to generate GNU NLS library.
- INTLOBJS="\$(GETTOBJS)"
- AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1], :)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [$ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1], :)
- AC_SUBST(MSGFMT)
- BUILD_INCLUDED_LIBINTL=yes
- USE_INCLUDED_LIBINTL=yes
+ if test "$nls_cv_use_gnu_gettext" != "no"; then
CATOBJEXT=.gmo
- INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ if test -f $srcdir/intl/libintl.h ; then
+ dnl Mark actions used to generate GNU NLS library.
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ elif test "$nls_cv_use_gnu_gettext" = "yes"; then
+ nls_cv_use_gnu_gettext=no
+ AC_MSG_WARN(no NLS library is packaged with this application)
+ fi
fi
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
dnl Test whether we really found GNU msgfmt.
if test "$GMSGFMT" != ":"; then
- dnl If it is no GNU msgfmt we define it as : so that the
- dnl Makefiles still can work.
if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
- AC_MSG_RESULT(
- [found msgfmt program is not GNU msgfmt; ignore it])
- GMSGFMT=":"
+ AC_MSG_WARN([found msgfmt program is not GNU msgfmt])
fi
fi
- dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
- dnl If it is no GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
+ AC_MSG_WARN([found xgettext program is not GNU xgettext])
fi
fi
-
- dnl We need to process the po/ directory.
- POSUB=po
fi
- AC_OUTPUT_COMMANDS(
- [for ac_file in $CONFIG_FILES; do
-
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
-
- # PO directories have a Makefile.in generated from Makefile.inn.
- case "$ac_file" in */[Mm]akefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- ac_base=`basename $ac_file .in`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ if test "$XGETTEXT" != ":"; then
+ AC_OUTPUT_COMMANDS(
+ [for ac_file in $CONFIG_FILES; do
+
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
- sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
- fi
- ;;
- esac
- done])
-
- dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
- dnl to 'yes' because some of the testsuite requires it.
- if test "$PACKAGE" = gettext; then
- BUILD_INCLUDED_LIBINTL=yes
- fi
+ # PO directories have a Makefile.in generated from Makefile.inn.
+ case "$ac_file" in
+ (*/[Mm]akefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ ac_base=`basename $ac_file .in`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+
+ case "$ac_given_srcdir" in
+ (.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ (/*) top_srcdir="$ac_given_srcdir" ;;
+ (*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
+ sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
+ fi
+ ;;
+ esac
+ done])
- dnl intl/plural.c is generated from intl/plural.y. It requires bison,
- dnl because plural.y uses bison specific features. It requires at least
- dnl bison-1.26 because earlier versions generate a plural.c that doesn't
- dnl compile.
- dnl bison is only needed for the maintainer (who touches plural.y). But in
- dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
- dnl the rule in general Makefile. Now, some people carelessly touch the
- dnl files or have a broken "make" program, hence the plural.c rule will
- dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
- dnl present or too old.
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- AC_CHECK_PROGS([INTLBISON], [bison])
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- dnl Found it, now check the version.
- AC_MSG_CHECKING([version of bison])
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
changequote(<<,>>)dnl
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
changequote([,])dnl
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- AC_MSG_RESULT([$ac_prog_version])
- fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
fi
- fi
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.in.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.in.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+ fi
dnl Make all variables we use known to autoconf.
AC_SUBST(BUILD_INCLUDED_LIBINTL)
@@ -590,7 +612,7 @@ changequote([,])dnl
AC_SUBST(GENCAT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ACVERSION_CHECK version: 4 updated: 2013/03/04 19:52:56
+dnl CF_ACVERSION_CHECK version: 5 updated: 2014/06/04 19:11:49
dnl ------------------
dnl Conditionally generate script according to whether we're using a given autoconf.
dnl
@@ -599,7 +621,7 @@ 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([AC_ACVERSION], ,[ifdef([AC_AUTOCONF_VERSION],[m4_copy([AC_AUTOCONF_VERSION],[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(
@@ -616,7 +638,7 @@ define([CF_ACVERSION_COMPARE],
[ifelse([$8], , ,[$8])],
[ifelse([$9], , ,[$9])])])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
+dnl CF_ADD_CFLAGS version: 13 updated: 2017/02/25 18:57:40
dnl -------------
dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
dnl The second parameter if given makes this macro verbose.
@@ -634,51 +656,51 @@ cf_new_extra_cppflags=
for cf_add_cflags in $1
do
case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[[^=]]*='\''\"[[^"]]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+ CF_APPEND_TEXT(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"
+ CF_APPEND_TEXT(cf_new_extra_cppflags,$cf_add_cflags)
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CF_REMOVE_DEFINE(CPPFLAGS,$CPPFLAGS,$cf_tst_cppflags)
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+ CF_APPEND_TEXT(cf_new_cppflags,$cf_add_cflags)
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+ CF_APPEND_TEXT(cf_new_cflags,$cf_add_cflags)
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+ CF_APPEND_TEXT(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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -687,24 +709,24 @@ done
if test -n "$cf_new_cflags" ; then
ifelse([$2],,,[CF_VERBOSE(add to \$CFLAGS $cf_new_cflags)])
- CFLAGS="$CFLAGS $cf_new_cflags"
+ CF_APPEND_TEXT(CFLAGS,$cf_new_cflags)
fi
if test -n "$cf_new_cppflags" ; then
ifelse([$2],,,[CF_VERBOSE(add to \$CPPFLAGS $cf_new_cppflags)])
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ CF_APPEND_TEXT(CPPFLAGS,$cf_new_cppflags)
fi
if test -n "$cf_new_extra_cppflags" ; then
ifelse([$2],,,[CF_VERBOSE(add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags)])
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ CF_APPEND_TEXT(EXTRA_CPPFLAGS,$cf_new_extra_cppflags)
fi
AC_SUBST(EXTRA_CPPFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_INCDIR version: 13 updated: 2010/05/26 16:44:57
+dnl CF_ADD_INCDIR version: 15 updated: 2018/06/20 20:23:13
dnl -------------
dnl Add an include-directory to $CPPFLAGS. Don't add /usr/include, since it's
dnl redundant. We don't normally need to add -I/usr/local/include for gcc,
@@ -735,7 +757,7 @@ if test -n "$1" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+ CF_APPEND_TEXT(CPPFLAGS,-I$cf_add_incdir)
AC_TRY_COMPILE([#include <stdio.h>],
[printf("Hello")],
[],
@@ -755,6 +777,8 @@ if test -n "$1" ; then
else
break
fi
+ else
+ break
fi
done
done
@@ -769,7 +793,7 @@ dnl $1 = library to add, without the "-l"
dnl $2 = variable to update (default $LIBS)
AC_DEFUN([CF_ADD_LIB],[CF_ADD_LIBS(-l$1,ifelse($2,,LIBS,[$2]))])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_LIBDIR version: 9 updated: 2010/05/26 16:44:57
+dnl CF_ADD_LIBDIR version: 10 updated: 2015/04/18 08:56:57
dnl -------------
dnl Adds to the library-path
dnl
@@ -781,39 +805,70 @@ dnl
AC_DEFUN([CF_ADD_LIBDIR],
[
if test -n "$1" ; then
- for cf_add_libdir in $1
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- CF_VERBOSE(adding $cf_add_libdir to library-path)
- ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
- fi
- fi
- done
+ for cf_add_libdir in $1
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ CF_VERBOSE(adding $cf_add_libdir to library-path)
+ ifelse([$2],,LDFLAGS,[$2])="-L$cf_add_libdir $ifelse([$2],,LDFLAGS,[$2])"
+ fi
+ fi
+ done
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_LIBS version: 1 updated: 2010/06/02 05:03:05
+dnl CF_ADD_LIBS version: 2 updated: 2014/07/13 14:33:27
dnl -----------
-dnl Add one or more libraries, used to enforce consistency.
+dnl Add one or more libraries, used to enforce consistency. Libraries are
+dnl prepended to an existing list, since their dependencies are assumed to
+dnl already exist in the list.
dnl
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
+AC_DEFUN([CF_ADD_LIBS],[
+cf_add_libs="$1"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in [$]ifelse($2,,LIBS,[$2])
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+ifelse($2,,LIBS,[$2])="$cf_add_libs"
+])dnl
+dnl ---------------------------------------------------------------------------
+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.
+dnl
+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'`
+CF_VERBOSE(...after $LIBS)
+])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ADD_OPTIONAL_PATH version: 1 updated: 2007/07/29 12:33:33
+dnl CF_ADD_OPTIONAL_PATH version: 3 updated: 2015/05/10 19:52:14
dnl --------------------
dnl Add an optional search-path to the compile/link variables.
dnl See CF_WITH_PATH
@@ -821,15 +876,15 @@ dnl
dnl $1 = shell variable containing the result of --with-XXX=[DIR]
dnl $2 = module to look for.
AC_DEFUN([CF_ADD_OPTIONAL_PATH],[
- case "$1" in #(vi
- no) #(vi
- ;;
- yes) #(vi
- ;;
- *)
- CF_ADD_SEARCHPATH([$1], [AC_MSG_ERROR(cannot find $2 under $1)])
- ;;
- esac
+case "$1" in
+(no)
+ ;;
+(yes)
+ ;;
+(*)
+ CF_ADD_SEARCHPATH([$1], [AC_MSG_ERROR(cannot find $2 under $1)])
+ ;;
+esac
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_ADD_SEARCHPATH version: 5 updated: 2009/01/11 20:40:21
@@ -862,7 +917,7 @@ $2])
done
])
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
@@ -872,9 +927,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"
@@ -884,6 +939,16 @@ ifelse([$5],NONE,,[(test $5 = NONE || test "$4" != "$5") &&]) {
}
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_APPEND_TEXT version: 1 updated: 2017/02/25 18:58:55
+dnl --------------
+dnl use this macro for appending text without introducing an extra blank at
+dnl the beginning
+define([CF_APPEND_TEXT],
+[
+ test -n "[$]$1" && $1="[$]$1 "
+ $1="[$]{$1}$2"
+])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.
@@ -912,7 +977,7 @@ ifelse($5,,[ :],$5)
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_ARG_OPTION version: 4 updated: 2010/05/26 05:38:42
+dnl CF_ARG_OPTION version: 5 updated: 2015/05/10 19:52:14
dnl -------------
dnl Restricted form of AC_ARG_ENABLE that ensures user doesn't give bogus
dnl values.
@@ -925,17 +990,74 @@ dnl $4 = action if perform if option is default
dnl $5 = default option value (either 'yes' or 'no')
AC_DEFUN([CF_ARG_OPTION],
[AC_ARG_ENABLE([$1],[$2],[test "$enableval" != ifelse([$5],no,yes,no) && enableval=ifelse([$5],no,no,yes)
- if test "$enableval" != "$5" ; then
+ if test "$enableval" != "$5" ; then
ifelse([$3],,[ :]dnl
,[ $3]) ifelse([$4],,,[
- else
- $4])
- fi],[enableval=$5 ifelse([$4],,,[
- $4
+ else
+ $4])
+ fi],[enableval=$5 ifelse([$4],,,[
+ $4
])dnl
- ])])dnl
+])])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_BUNDLED_INTL version: 17 updated: 2012/10/06 08:57:51
+dnl CF_AR_FLAGS version: 6 updated: 2015/10/10 15:25:05
+dnl -----------
+dnl Check for suitable "ar" (archiver) options for updating an archive.
+dnl
+dnl In particular, handle some obsolete cases where the "-" might be omitted,
+dnl as well as a workaround for breakage of make's archive rules by the GNU
+dnl binutils "ar" program.
+AC_DEFUN([CF_AR_FLAGS],[
+AC_REQUIRE([CF_PROG_AR])
+
+AC_CACHE_CHECK(for options to update archives, cf_cv_ar_flags,[
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ rm -f conftest.a
+
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int testdata[[3]] = { 123, 456, 789 };
+EOF
+ if AC_TRY_EVAL(ac_compile) ; then
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&AC_FD_CC
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&AC_FD_CC 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ CF_VERBOSE(cannot compile test-program)
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+])
+
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+AC_SUBST(ARFLAGS)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_BUNDLED_INTL version: 19 updated: 2018/06/20 20:23:13
dnl ---------------
dnl Top-level macro for configuring an application with a bundled copy of
dnl the intl and po directories for gettext.
@@ -1004,7 +1126,7 @@ dnl this updates SUB_MAKEFILE and MSG_DIR_MAKE:
CF_OUR_MESSAGES($1)
if test "$USE_INCLUDED_LIBINTL" = yes ; then
- if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+ if test "$nls_cv_force_use_gnu_gettext" = yes ; then
:
elif test "$nls_cv_use_gnu_gettext" = yes ; then
:
@@ -1031,7 +1153,7 @@ else
fi
if test -z "$INTLDIR_MAKE" ; then
- CPPFLAGS="$CPPFLAGS -I../intl"
+ CF_APPEND_TEXT(CPPFLAGS,-I../intl)
fi
dnl FIXME: we use this in lynx (the alternative is a spurious dependency upon
@@ -1065,27 +1187,48 @@ if test "$USE_INCLUDED_LIBINTL" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CC_ENV_FLAGS version: 1 updated: 2012/10/03 05:25:49
+dnl CF_CC_ENV_FLAGS version: 8 updated: 2017/09/23 08:50:24
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.
+dnl into CC. This will not help with broken scripts that wrap the compiler
+dnl with options, but eliminates a more common category of user confusion.
+dnl
+dnl In particular, it addresses the problem of being able to run the C
+dnl preprocessor in a consistent manner.
+dnl
+dnl Caveat: this also disallows blanks in the pathname for the compiler, but
+dnl the nuisance of having inconsistent settings for compiler and preprocessor
+dnl outweighs that limitation.
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]]*)
+case "$CC" in
+(*[[\ \ ]]-*)
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)
+ cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[[ ]]* / /g' -e 's/[[ ]]*[[ ]]-[[^ ]].*//'`
+ cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", [substr]([$]0,1+length(prog))); }'`
+ CC="$cf_prog"
+ for cf_arg in $cf_flags
+ do
+ case "x$cf_arg" in
+ (x-[[IUDfgOW]]*)
+ CF_ADD_CFLAGS($cf_arg)
+ ;;
+ (*)
+ CC="$CC $cf_arg"
+ ;;
+ esac
+ done
+ CF_VERBOSE(resulting CC: '$CC')
+ CF_VERBOSE(resulting CFLAGS: '$CFLAGS')
+ CF_VERBOSE(resulting CPPFLAGS: '$CPPFLAGS')
;;
-*)
+(*)
AC_MSG_RESULT(ok)
;;
esac
@@ -1126,6 +1269,28 @@ if test ".$system_name" != ".$cf_cv_system_name" ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_CHECK_CFLAGS version: 3 updated: 2014/07/22 05:32:57
+dnl ---------------
+dnl Conditionally add to $CFLAGS and $CPPFLAGS values which are derived from
+dnl a build-configuration such as imake. These have the pitfall that they
+dnl often contain compiler-specific options which we cannot use, mixed with
+dnl preprocessor options that we usually can.
+AC_DEFUN([CF_CHECK_CFLAGS],
+[
+CF_VERBOSE(checking additions to CFLAGS)
+cf_check_cflags="$CFLAGS"
+cf_check_cppflags="$CPPFLAGS"
+CF_ADD_CFLAGS($1,yes)
+if test "x$cf_check_cflags" != "x$CFLAGS" ; then
+AC_TRY_LINK([#include <stdio.h>],[printf("Hello world");],,
+ [CF_VERBOSE(test-compile failed. Undoing change to \$CFLAGS)
+ if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
+ CF_VERBOSE(but keeping change to \$CPPFLAGS)
+ fi
+ CFLAGS="$cf_check_flags"])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_CHECK_LIBTOOL_VERSION version: 1 updated: 2013/04/06 18:03:09
dnl ------------------------
dnl Show the version of libtool
@@ -1147,7 +1312,7 @@ else
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CLANG_COMPILER version: 1 updated: 2012/06/16 14:55:39
+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
@@ -1158,7 +1323,7 @@ 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 = INTEL_COMPILER (default) or INTEL_CPLUSPLUS
+dnl $2 = CLANG_COMPILER (default)
dnl $3 = CFLAGS (default) or CXXFLAGS
AC_DEFUN([CF_CLANG_COMPILER],[
ifelse([$2],,CLANG_COMPILER,[$2])=no
@@ -1216,22 +1381,22 @@ CF_NCURSES_VERSION
CF_CURSES_LIBS
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_CPPFLAGS version: 11 updated: 2011/04/09 14:51:08
+dnl CF_CURSES_CPPFLAGS version: 13 updated: 2018/06/20 20:23:13
dnl ------------------
dnl Look for the curses headers.
AC_DEFUN([CF_CURSES_CPPFLAGS],[
AC_CACHE_CHECK(for extra include directories,cf_cv_curses_incdir,[
cf_cv_curses_incdir=no
-case $host_os in #(vi
-hpux10.*) #(vi
+case $host_os in
+(hpux10.*)
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*)
+(sunos3*|sunos4*)
if test "x$cf_cv_screen" = "xcurses_5lib"
then
test -d /usr/5lib && \
@@ -1241,13 +1406,16 @@ sunos3*|sunos4*)
;;
esac
])
-test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
+if test "$cf_cv_curses_incdir" != no
+then
+ CF_APPEND_TEXT(CPPFLAGS,$cf_cv_curses_incdir)
+fi
CF_CURSES_HEADER
CF_TERM_HEADER
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_FUNCS version: 17 updated: 2011/05/14 16:07:29
+dnl CF_CURSES_FUNCS version: 19 updated: 2018/01/03 04:47:33
dnl ---------------
dnl Curses-functions are a little complicated, since a lot of them are macros.
AC_DEFUN([CF_CURSES_FUNCS],
@@ -1268,8 +1436,9 @@ do
[
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
-if (foo + 1234 > 5678)
- ${cf_cv_main_return:-return}(foo);
+fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
+if (foo + 1234L > 5678L)
+ ${cf_cv_main_return:-return}(foo != 0);
#endif
],
[cf_result=yes],
@@ -1286,7 +1455,7 @@ if (foo + 1234 > 5678)
done
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_HEADER version: 3 updated: 2011/05/01 19:47:45
+dnl CF_CURSES_HEADER version: 5 updated: 2015/04/23 20:35:30
dnl ----------------
dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
dnl variations of ncurses' installs.
@@ -1295,11 +1464,9 @@ dnl $1 = ncurses when looking for ncurses, or is empty
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/ncurses.h \
- $1/curses.h]) \
- ncurses.h \
- curses.h ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
+for cf_header in \
+ ncurses.h ifelse($1,,,[$1/ncurses.h]) \
+ curses.h ifelse($1,,,[$1/curses.h]) ifelse($1,,[ncurses/ncurses.h ncurses/curses.h])
do
AC_TRY_COMPILE([#include <${cf_header}>],
[initscr(); tgoto("?", 0,0)],
@@ -1315,7 +1482,7 @@ fi
AC_CHECK_HEADERS($cf_cv_ncurses_header)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_CURSES_LIBS version: 37 updated: 2013/02/09 17:33:50
+dnl CF_CURSES_LIBS version: 42 updated: 2018/06/20 20:23:13
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.
@@ -1324,17 +1491,17 @@ AC_DEFUN([CF_CURSES_LIBS],[
AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
AC_MSG_CHECKING(if we have identified curses libraries)
AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
- [initscr(); tgoto("?", 0,0)],
- cf_result=yes,
- cf_result=no)
+ [initscr(); tgoto("?", 0,0)],
+ cf_result=yes,
+ cf_result=no)
AC_MSG_RESULT($cf_result)
if test "$cf_result" = no ; then
-case $host_os in #(vi
-freebsd*) #(vi
- AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)])
- ;;
-hpux10.*) #(vi
+case $host_os in
+(freebsd*)
+ AC_CHECK_LIB(mytinfo,tgoto,[CF_ADD_LIBS(-lmytinfo)])
+ ;;
+(hpux10.*)
# 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
@@ -1348,14 +1515,14 @@ hpux10.*) #(vi
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"
+ CF_APPEND_TEXT(CPPFLAGS,-D__HP_CURSES -D_HP_CURSES)
ac_cv_func_initscr=yes
])])
fi
;;
-linux*)
+(linux*)
case `arch 2>/dev/null` in
- x86_64)
+ (x86_64)
if test -d /lib64
then
CF_ADD_LIBDIR(/lib64)
@@ -1363,21 +1530,21 @@ linux*)
CF_ADD_LIBDIR(/lib)
fi
;;
- *)
+ (*)
CF_ADD_LIBDIR(/lib)
;;
esac
;;
-sunos3*|sunos4*)
+(sunos3*|sunos4*)
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
- ;;
+ fi
+ ac_cv_func_initscr=yes
+ ;;
esac
if test ".$ac_cv_func_initscr" != .yes ; then
@@ -1397,7 +1564,10 @@ if test ".$ac_cv_func_initscr" != .yes ; 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])
+ AC_CHECK_LIB($cf_term_lib,tgoto,[
+ : ${cf_nculib_root:=$cf_term_lib}
+ break
+ ])
done
])
fi
@@ -1408,42 +1578,41 @@ if test ".$ac_cv_func_initscr" != .yes ; then
then
for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
do
- AC_CHECK_LIB($cf_curs_lib,initscr,[break])
+ LIBS="-l$cf_curs_lib $cf_save_LIBS"
+ if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; 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 = yes && break
+ elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+ cf_result=no
+ 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)
+ test $cf_result != error && break
+ fi
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: 10 updated: 2012/10/06 08:57:51
+dnl CF_CURSES_TERM_H version: 11 updated: 2015/04/15 19:08:48
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,
@@ -1460,8 +1629,8 @@ AC_CACHE_CHECK(for term.h, cf_cv_term_header,[
cf_header_list="term.h ncurses/term.h ncursesw/term.h"
-case ${cf_cv_ncurses_header:-curses.h} in #(vi
-*/*)
+case ${cf_cv_ncurses_header:-curses.h} in
+(*/*)
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"
;;
@@ -1478,8 +1647,8 @@ do
[cf_cv_term_header=no])
done
-case $cf_cv_term_header in #(vi
-no)
+case $cf_cv_term_header in
+(no)
# If curses is ncurses, some packagers still mess it up by trying to make
# us use GNU termcap. This handles the most common case.
for cf_header in ncurses/term.h ncursesw/term.h
@@ -1500,20 +1669,20 @@ make an error
esac
])
-case $cf_cv_term_header in #(vi
-term.h) #(vi
+case $cf_cv_term_header in
+(term.h)
AC_DEFINE(HAVE_TERM_H,1,[Define to 1 if we have term.h])
;;
-ncurses/term.h) #(vi
+(ncurses/term.h)
AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
-ncursesw/term.h)
+(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_UNCTRL_H version: 2 updated: 2012/10/06 08:57:51
+dnl CF_CURSES_UNCTRL_H version: 4 updated: 2015/04/15 19:08:48
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
@@ -1530,8 +1699,8 @@ AC_CACHE_CHECK(for unctrl.h, cf_cv_unctrl_header,[
cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
-case ${cf_cv_ncurses_header:-curses.h} in #(vi
-*/*)
+case ${cf_cv_ncurses_header:-curses.h} in
+(*/*)
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"
;;
@@ -1547,22 +1716,22 @@ do
break],
[cf_cv_unctrl_header=no])
done
+])
-case $cf_cv_unctrl_header in #(vi
-no)
+case $cf_cv_unctrl_header in
+(no)
AC_MSG_WARN(unctrl.h header not found)
;;
esac
-])
-case $cf_cv_unctrl_header in #(vi
-unctrl.h) #(vi
+case $cf_cv_unctrl_header in
+(unctrl.h)
AC_DEFINE(HAVE_UNCTRL_H,1,[Define to 1 if we have unctrl.h])
;;
-ncurses/unctrl.h) #(vi
+(ncurses/unctrl.h)
AC_DEFINE(HAVE_NCURSES_UNCTRL_H,1,[Define to 1 if we have ncurses/unctrl.h])
;;
-ncursesw/unctrl.h)
+(ncursesw/unctrl.h)
AC_DEFINE(HAVE_NCURSESW_UNCTRL_H,1,[Define to 1 if we have ncursesw/unctrl.h])
;;
esac
@@ -1654,7 +1823,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: 12 updated: 2012/10/06 16:30:28
+dnl CF_DISABLE_ECHO version: 13 updated: 2015/04/18 08:56:57
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.
@@ -1671,17 +1840,17 @@ AC_MSG_CHECKING(if you want to see long compiling messages)
CF_ARG_DISABLE(echo,
[ --disable-echo do not display "compiling" commands],
[
- ECHO_LT='--silent'
- ECHO_LD='@echo linking [$]@;'
- RULE_CC='@echo compiling [$]<'
- SHOW_CC='@echo compiling [$]@'
- ECHO_CC='@'
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking [$]@;'
+ RULE_CC='@echo compiling [$]<'
+ SHOW_CC='@echo compiling [$]@'
+ ECHO_CC='@'
],[
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC=''
- SHOW_CC=''
- ECHO_CC=''
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
])
AC_MSG_RESULT($enableval)
AC_SUBST(ECHO_LT)
@@ -1691,7 +1860,7 @@ AC_SUBST(SHOW_CC)
AC_SUBST(ECHO_CC)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_DISABLE_LIBTOOL_VERSION version: 1 updated: 2010/05/15 15:45:59
+dnl CF_DISABLE_LIBTOOL_VERSION version: 3 updated: 2015/04/17 21:13:04
dnl --------------------------
dnl Check if we should use the libtool 1.5 feature "-version-number" instead of
dnl the older "-version-info" feature. The newer feature allows us to use
@@ -1710,8 +1879,25 @@ if test "$cf_libtool_version" = yes ; then
LIBTOOL_VERSION="-version-number"
else
LIBTOOL_VERSION="-version-info"
+ case "x$VERSION" in
+ (x)
+ AC_MSG_WARN(VERSION was not set)
+ ;;
+ (x*.*.*)
+ ABI_VERSION="$VERSION"
+ CF_VERBOSE(ABI_VERSION: $ABI_VERSION)
+ ;;
+ (x*:*:*)
+ ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
+ CF_VERBOSE(ABI_VERSION: $ABI_VERSION)
+ ;;
+ (*)
+ AC_MSG_WARN(unexpected VERSION value: $VERSION)
+ ;;
+ esac
fi
+AC_SUBST(ABI_VERSION)
AC_SUBST(LIBTOOL_VERSION)
])dnl
dnl ---------------------------------------------------------------------------
@@ -1798,7 +1984,7 @@ fi
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_FIND_LINKAGE version: 19 updated: 2010/05/29 16:31:02
+dnl CF_FIND_LINKAGE version: 21 updated: 2018/06/20 20:23:13
dnl ---------------
dnl Find a library (specifically the linkage used in the code fragment),
dnl searching for it if it is not already in the library path.
@@ -1846,73 +2032,74 @@ AC_TRY_LINK([$1],[$2],[
cf_cv_find_linkage_$3=no
LIBS="$cf_save_LIBS"
- CF_VERBOSE(find linkage for $3 library)
- CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
-
- cf_save_CPPFLAGS="$CPPFLAGS"
- cf_test_CPPFLAGS="$CPPFLAGS"
-
- CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6]))
- for cf_cv_header_path_$3 in $cf_search
- do
- if test -d $cf_cv_header_path_$3 ; then
- CF_VERBOSE(... testing $cf_cv_header_path_$3)
- CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_$3"
- AC_TRY_COMPILE([$1],[$2],[
- CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3)
- cf_cv_find_linkage_$3=maybe
- cf_test_CPPFLAGS="$CPPFLAGS"
- break],[
- CPPFLAGS="$cf_save_CPPFLAGS"
- ])
- fi
- done
+ CF_VERBOSE(find linkage for $3 library)
+ CF_MSG_LOG([Searching for headers in [FIND_LINKAGE]($3,$6)])
- if test "$cf_cv_find_linkage_$3" = maybe ; then
-
- CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)])
-
- cf_save_LIBS="$LIBS"
- cf_save_LDFLAGS="$LDFLAGS"
-
- ifelse([$6],,,[
- CPPFLAGS="$cf_test_CPPFLAGS"
- LIBS="-l$3 $7 $cf_save_LIBS"
- AC_TRY_LINK([$1],[$2],[
- CF_VERBOSE(... found $3 library in system)
- cf_cv_find_linkage_$3=yes])
- CPPFLAGS="$cf_save_CPPFLAGS"
- LIBS="$cf_save_LIBS"
- ])
-
- if test "$cf_cv_find_linkage_$3" != yes ; then
- CF_LIBRARY_PATH(cf_search,$3)
- for cf_cv_library_path_$3 in $cf_search
- do
- if test -d $cf_cv_library_path_$3 ; then
- CF_VERBOSE(... testing $cf_cv_library_path_$3)
- CPPFLAGS="$cf_test_CPPFLAGS"
- LIBS="-l$3 $7 $cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
- AC_TRY_LINK([$1],[$2],[
- CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3)
- cf_cv_find_linkage_$3=yes
- cf_cv_library_file_$3="-l$3"
- break],[
- CPPFLAGS="$cf_save_CPPFLAGS"
- LIBS="$cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS"
- ])
- fi
- done
- CPPFLAGS="$cf_save_CPPFLAGS"
- LDFLAGS="$cf_save_LDFLAGS"
- fi
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
- else
- cf_cv_find_linkage_$3=no
- fi
- ],$7)
+ CF_HEADER_PATH(cf_search,ifelse([$6],,[$3],[$6]))
+ for cf_cv_header_path_$3 in $cf_search
+ do
+ if test -d $cf_cv_header_path_$3 ; then
+ CF_VERBOSE(... testing $cf_cv_header_path_$3)
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ CF_APPEND_TEXT(CPPFLAGS,-I$cf_cv_header_path_$3)
+ AC_TRY_COMPILE([$1],[$2],[
+ CF_VERBOSE(... found $3 headers in $cf_cv_header_path_$3)
+ cf_cv_find_linkage_$3=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break],[
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ ])
+ fi
+ done
+
+ if test "$cf_cv_find_linkage_$3" = maybe ; then
+
+ CF_MSG_LOG([Searching for $3 library in [FIND_LINKAGE]($3,$6)])
+
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
+
+ ifelse([$6],,,[
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-l$3 $7 $cf_save_LIBS"
+ AC_TRY_LINK([$1],[$2],[
+ CF_VERBOSE(... found $3 library in system)
+ cf_cv_find_linkage_$3=yes])
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ ])
+
+ if test "$cf_cv_find_linkage_$3" != yes ; then
+ CF_LIBRARY_PATH(cf_search,$3)
+ for cf_cv_library_path_$3 in $cf_search
+ do
+ if test -d $cf_cv_library_path_$3 ; then
+ CF_VERBOSE(... testing $cf_cv_library_path_$3)
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-l$3 $7 $cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_$3"
+ AC_TRY_LINK([$1],[$2],[
+ CF_VERBOSE(... found $3 library in $cf_cv_library_path_$3)
+ cf_cv_find_linkage_$3=yes
+ cf_cv_library_file_$3="-l$3"
+ break],[
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ ])
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
+
+ else
+ cf_cv_find_linkage_$3=no
+ fi
+ ],$7)
])
LIBS="$cf_save_LIBS"
@@ -1977,7 +2164,7 @@ if test $cf_cv_type_unionwait = yes; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_ATTRIBUTES version: 16 updated: 2012/10/02 20:55:03
+dnl CF_GCC_ATTRIBUTES version: 17 updated: 2015/04/12 15:39:00
dnl -----------------
dnl Test for availability of useful gcc __attribute__ directives to quiet
dnl compiler warnings. Though useful, not all are supported -- and contrary
@@ -2031,20 +2218,20 @@ EOF
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&AC_FD_CC
- case $cf_attribute in #(vi
- printf) #(vi
+ case $cf_attribute in
+ (printf)
cf_printf_attribute=yes
cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
- scanf) #(vi
+ (scanf)
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
@@ -2054,11 +2241,11 @@ EOF
if AC_TRY_EVAL(ac_compile); then
test -n "$verbose" && AC_MSG_RESULT(... $cf_attribute)
cat conftest.h >>confdefs.h
- case $cf_attribute in #(vi
- noreturn) #(vi
+ case $cf_attribute in
+ (noreturn)
AC_DEFINE_UNQUOTED(GCC_NORETURN,$cf_directive,[Define to noreturn-attribute for gcc])
;;
- printf) #(vi
+ (printf)
cf_value='/* nothing */'
if test "$cf_printf_attribute" != no ; then
cf_value='__attribute__((format(printf,fmt,var)))'
@@ -2066,7 +2253,7 @@ EOF
fi
AC_DEFINE_UNQUOTED(GCC_PRINTFLIKE(fmt,var),$cf_value,[Define to printf-attribute for gcc])
;;
- scanf) #(vi
+ (scanf)
cf_value='/* nothing */'
if test "$cf_scanf_attribute" != no ; then
cf_value='__attribute__((format(scanf,fmt,var)))'
@@ -2074,7 +2261,7 @@ EOF
fi
AC_DEFINE_UNQUOTED(GCC_SCANFLIKE(fmt,var),$cf_value,[Define to sscanf-attribute for gcc])
;;
- unused) #(vi
+ (unused)
AC_DEFINE_UNQUOTED(GCC_UNUSED,$cf_directive,[Define to unused-attribute for gcc])
;;
esac
@@ -2101,7 +2288,7 @@ if test "$GCC" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GCC_WARNINGS version: 29 updated: 2012/06/16 14:55:39
+dnl CF_GCC_WARNINGS version: 33 updated: 2018/06/20 20:23:13
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:
@@ -2173,10 +2360,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 \
@@ -2184,25 +2375,25 @@ 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
test -n "$verbose" && AC_MSG_RESULT(... -$cf_opt)
- case $cf_opt in #(vi
- Wcast-qual) #(vi
- CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ case $cf_opt in
+ (Wcast-qual)
+ CF_APPEND_TEXT(CPPFLAGS,-DXTSTRINGDEFINES)
;;
- Winline) #(vi
+ (Winline)
case $GCC_VERSION in
- [[34]].*)
+ ([[34]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;;
esac
;;
- Wpointer-arith) #(vi
+ (Wpointer-arith)
case $GCC_VERSION in
- [[12]].*)
+ ([[12]].*)
CF_VERBOSE(feature is broken in gcc $GCC_VERSION)
continue;;
esac
@@ -2218,7 +2409,7 @@ rm -rf conftest*
AC_SUBST(EXTRA_CFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
+dnl CF_GNU_SOURCE version: 9 updated: 2018/06/20 20:23:13
dnl -------------
dnl Check if we must define _GNU_SOURCE to get a reasonable value for
dnl _XOPEN_SOURCE, upon which many POSIX definitions depend. This is a defect
@@ -2226,26 +2417,102 @@ dnl (or misfeature) of glibc2, which breaks portability of many applications,
dnl since it is interwoven with GNU extensions.
dnl
dnl Well, yes we could work around it...
+dnl
+dnl Parameters:
+dnl $1 is the nominal value for _XOPEN_SOURCE
AC_DEFUN([CF_GNU_SOURCE],
[
-AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
+cf_gnu_xopen_source=ifelse($1,,500,$1)
+
+AC_CACHE_CHECK(if this is the GNU C library,cf_cv_gnu_library,[
AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifndef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_gnu_source=no],
- [cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- AC_TRY_COMPILE([#include <sys/types.h>],[
-#ifdef _XOPEN_SOURCE
-make an error
-#endif],
- [cf_cv_gnu_source=no],
- [cf_cv_gnu_source=yes])
- CPPFLAGS="$cf_save"
- ])
+ #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
+ return 0;
+ #else
+ # error not GNU C library
+ #endif],
+ [cf_cv_gnu_library=yes],
+ [cf_cv_gnu_library=no])
])
-test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+
+if test x$cf_cv_gnu_library = xyes; then
+
+ # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
+ # was changed to help a little...
+ AC_CACHE_CHECK(if _DEFAULT_SOURCE can be used as a basis,cf_cv_gnu_library_219,[
+ cf_save="$CPPFLAGS"
+ CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
+ return 0;
+ #else
+ # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
+ #endif],
+ [cf_cv_gnu_library_219=yes],
+ [cf_cv_gnu_library_219=no])
+ CPPFLAGS="$cf_save"
+ ])
+
+ if test "x$cf_cv_gnu_library_219" = xyes; then
+ cf_save="$CPPFLAGS"
+ AC_CACHE_CHECK(if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE,cf_cv_gnu_dftsrc_219,[
+ CF_ADD_CFLAGS(-D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source)
+ AC_TRY_COMPILE([
+ #include <limits.h>
+ #include <sys/types.h>
+ ],[
+ #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
+ return 0;
+ #else
+ # error GNU C library is too old
+ #endif],
+ [cf_cv_gnu_dftsrc_219=yes],
+ [cf_cv_gnu_dftsrc_219=no])
+ ])
+ test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
+ else
+ cf_cv_gnu_dftsrc_219=maybe
+ fi
+
+ if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
+
+ AC_CACHE_CHECK(if we must define _GNU_SOURCE,cf_cv_gnu_source,[
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+ #ifndef _XOPEN_SOURCE
+ #error expected _XOPEN_SOURCE to be defined
+ #endif],
+ [cf_cv_gnu_source=no],
+ [cf_save="$CPPFLAGS"
+ CF_ADD_CFLAGS(-D_GNU_SOURCE)
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+ #ifdef _XOPEN_SOURCE
+ #error expected _XOPEN_SOURCE to be undefined
+ #endif],
+ [cf_cv_gnu_source=no],
+ [cf_cv_gnu_source=yes])
+ CPPFLAGS="$cf_save"
+ ])
+ ])
+
+ if test "$cf_cv_gnu_source" = yes
+ then
+ AC_CACHE_CHECK(if we should also define _DEFAULT_SOURCE,cf_cv_default_source,[
+ CF_APPEND_TEXT(CPPFLAGS,-D_GNU_SOURCE)
+ AC_TRY_COMPILE([#include <sys/types.h>],[
+ #ifdef _DEFAULT_SOURCE
+ #error expected _DEFAULT_SOURCE to be undefined
+ #endif],
+ [cf_cv_default_source=no],
+ [cf_cv_default_source=yes])
+ ])
+ if test "$cf_cv_default_source" = yes
+ then
+ CF_APPEND_TEXT(CPPFLAGS,-D_DEFAULT_SOURCE)
+ fi
+ fi
+ fi
+
+fi
])dnl
dnl ---------------------------------------------------------------------------
dnl CF_HEADERS_SH version: 1 updated: 2007/07/04 15:37:05
@@ -2259,7 +2526,7 @@ AC_SUBST(PACKAGE_CONFIG)
EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
])
dnl ---------------------------------------------------------------------------
-dnl CF_HEADER_PATH version: 12 updated: 2010/05/05 05:22:40
+dnl CF_HEADER_PATH version: 13 updated: 2015/04/15 19:08:48
dnl --------------
dnl Construct a search-list of directories for a nonstandard header-file
dnl
@@ -2275,8 +2542,8 @@ cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
for cf_header_path in $CPPFLAGS $CFLAGS
do
- case $cf_header_path in #(vi
- -I*)
+ case $cf_header_path in
+ (-I*)
cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
CF_ADD_SUBDIR_PATH($1,$2,include,$cf_header_path,NONE)
cf_header_path_list="$cf_header_path_list [$]$1"
@@ -2305,7 +2572,7 @@ test -d "$oldincludedir" && {
$1="[$]$1 $cf_header_path_list"
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_INTEL_COMPILER version: 5 updated: 2013/02/10 10:41:05
+dnl CF_INTEL_COMPILER version: 7 updated: 2015/04/12 15:39:00
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
@@ -2324,7 +2591,7 @@ ifelse([$2],,INTEL_COMPILER,[$2])=no
if test "$ifelse([$1],,[$1],GCC)" = yes ; then
case $host_os in
- linux*|gnu*)
+ (linux*|gnu*)
AC_MSG_CHECKING(if this is really Intel ifelse([$1],GXX,C++,C) compiler)
cf_save_CFLAGS="$ifelse([$3],,CFLAGS,[$3])"
ifelse([$3],,CFLAGS,[$3])="$ifelse([$3],,CFLAGS,[$3]) -no-gcc"
@@ -2334,7 +2601,7 @@ if test "$ifelse([$1],,[$1],GCC)" = yes ; then
make an error
#endif
],[ifelse([$2],,INTEL_COMPILER,[$2])=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
],[])
ifelse([$3],,CFLAGS,[$3])="$cf_save_CFLAGS"
AC_MSG_RESULT($ifelse([$2],,INTEL_COMPILER,[$2]))
@@ -2343,13 +2610,13 @@ cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LARGEFILE version: 8 updated: 2012/10/06 08:57:51
+dnl CF_LARGEFILE version: 11 updated: 2018/06/20 20:23:13
dnl ------------
dnl Add checks for large file support.
AC_DEFUN([CF_LARGEFILE],[
ifdef([AC_FUNC_FSEEKO],[
- AC_SYS_LARGEFILE
- if test "$enable_largefile" != no ; then
+ AC_SYS_LARGEFILE
+ if test "$enable_largefile" != no ; then
AC_FUNC_FSEEKO
# Normally we would collect these definitions in the config.h,
@@ -2359,12 +2626,22 @@ ifdef([AC_FUNC_FSEEKO],[
# header files by themselves before looking at the body files it is
# told to compile. For ncurses, those header files do not include
# the config.h
- test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
- test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
- test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
+ if test "$ac_cv_sys_large_files" != no
+ then
+ CF_APPEND_TEXT(CPPFLAGS,-D_LARGE_FILES)
+ fi
+ if test "$ac_cv_sys_largefile_source" != no
+ then
+ CF_APPEND_TEXT(CPPFLAGS,-D_LARGEFILE_SOURCE)
+ fi
+ if test "$ac_cv_sys_file_offset_bits" != no
+ then
+ CF_APPEND_TEXT(CPPFLAGS,-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits)
+ fi
AC_CACHE_CHECK(whether to use struct dirent64, cf_cv_struct_dirent64,[
AC_TRY_COMPILE([
+#pragma GCC diagnostic error "-Wincompatible-pointer-types"
#include <sys/types.h>
#include <dirent.h>
],[
@@ -2378,11 +2655,11 @@ ifdef([AC_FUNC_FSEEKO],[
[cf_cv_struct_dirent64=no])
])
test "$cf_cv_struct_dirent64" = yes && AC_DEFINE(HAVE_STRUCT_DIRENT64,1,[Define to 1 if we have struct dirent64])
- fi
+ fi
])
])
dnl ---------------------------------------------------------------------------
-dnl CF_LD_RPATH_OPT version: 5 updated: 2011/07/17 14:48:41
+dnl CF_LD_RPATH_OPT version: 7 updated: 2016/02/20 18:01:19
dnl ---------------
dnl For the given system and compiler, find the compiler flags to pass to the
dnl loader to use the "rpath" feature.
@@ -2392,39 +2669,39 @@ AC_REQUIRE([CF_CHECK_CACHE])
LD_RPATH_OPT=
AC_MSG_CHECKING(for an rpath option)
-case $cf_cv_system_name in #(vi
-irix*) #(vi
+case $cf_cv_system_name in
+(irix*)
if test "$GCC" = yes; then
LD_RPATH_OPT="-Wl,-rpath,"
else
LD_RPATH_OPT="-rpath "
fi
;;
-linux*|gnu*|k*bsd*-gnu) #(vi
+(linux*|gnu*|k*bsd*-gnu|freebsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-openbsd[[2-9]].*|mirbsd*) #(vi
+(openbsd[[2-9]].*|mirbsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-dragonfly*|freebsd*) #(vi
+(dragonfly*)
LD_RPATH_OPT="-rpath "
;;
-netbsd*) #(vi
+(netbsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-osf*|mls+*) #(vi
+(osf*|mls+*)
LD_RPATH_OPT="-rpath "
;;
-solaris2*) #(vi
+(solaris2*)
LD_RPATH_OPT="-R"
;;
-*)
+(*)
;;
esac
AC_MSG_RESULT($LD_RPATH_OPT)
-case "x$LD_RPATH_OPT" in #(vi
-x-R*)
+case "x$LD_RPATH_OPT" in
+(x-R*)
AC_MSG_CHECKING(if we need a space after rpath option)
cf_save_LIBS="$LIBS"
CF_ADD_LIBS(${LD_RPATH_OPT}$libdir)
@@ -2436,7 +2713,7 @@ x-R*)
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIBRARY_PATH version: 9 updated: 2010/03/28 12:52:50
+dnl CF_LIBRARY_PATH version: 10 updated: 2015/04/15 19:08:48
dnl ---------------
dnl Construct a search-list of directories for a nonstandard library-file
dnl
@@ -2450,8 +2727,8 @@ cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
for cf_library_path in $LDFLAGS $LIBS
do
- case $cf_library_path in #(vi
- -L*)
+ case $cf_library_path in
+ (-L*)
cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
CF_ADD_SUBDIR_PATH($1,$2,lib,$cf_library_path,NONE)
cf_library_path_list="$cf_library_path_list [$]$1"
@@ -2477,24 +2754,28 @@ fi
test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_PREFIX version: 9 updated: 2012/01/21 19:28:10
+dnl CF_LIB_PREFIX version: 12 updated: 2015/10/17 19:03:33
dnl -------------
dnl Compute the library-prefix for the given host system
dnl $1 = variable to set
define([CF_LIB_PREFIX],
[
- case $cf_cv_system_name in #(vi
- OS/2*|os2*) #(vi
- LIB_PREFIX=''
- ;;
- *) LIB_PREFIX='lib'
- ;;
+ case $cf_cv_system_name in
+ (OS/2*|os2*)
+ if test "$DFT_LWR_MODEL" = libtool; then
+ LIB_PREFIX='lib'
+ else
+ LIB_PREFIX=''
+ fi
+ ;;
+ (*) LIB_PREFIX='lib'
+ ;;
esac
ifelse($1,,,[$1=$LIB_PREFIX])
AC_SUBST(LIB_PREFIX)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_LIB_SUFFIX version: 22 updated: 2013/09/07 13:54:05
+dnl CF_LIB_SUFFIX version: 25 updated: 2015/04/17 21:13:04
dnl -------------
dnl Compute the library file-suffix from the given model name
dnl $1 = model name
@@ -2503,61 +2784,64 @@ dnl $3 = dependency variable to set (actual filename)
dnl The variable $LIB_SUFFIX, if set, prepends the variable to set.
AC_DEFUN([CF_LIB_SUFFIX],
[
- case X$1 in #(vi
- Xlibtool) #(vi
+ case X$1 in
+ (Xlibtool)
$2='.la'
$3=[$]$2
;;
- Xdebug) #(vi
+ (Xdebug)
$2='_g.a'
$3=[$]$2
;;
- Xprofile) #(vi
+ (Xprofile)
$2='_p.a'
$3=[$]$2
;;
- Xshared) #(vi
+ (Xshared)
case $cf_cv_system_name in
- aix[[5-7]]*) #(vi
- $2='.a'
+ (aix[[5-7]]*)
+ $2='.so'
$3=[$]$2
;;
- cygwin*|msys*|mingw*) #(vi
+ (cygwin*|msys*|mingw*)
$2='.dll'
$3='.dll.a'
;;
- darwin*) #(vi
+ (darwin*)
$2='.dylib'
$3=[$]$2
;;
- hpux*) #(vi
+ (hpux*)
case $target in
- ia64*) #(vi
+ (ia64*)
$2='.so'
$3=[$]$2
;;
- *) #(vi
+ (*)
$2='.sl'
$3=[$]$2
;;
esac
;;
- *) #(vi
+ (*)
$2='.so'
$3=[$]$2
;;
esac
;;
- *)
+ (*)
$2='.a'
$3=[$]$2
;;
esac
- test -n "$LIB_SUFFIX" && $2="${LIB_SUFFIX}[$]{$2}"
- test -n "$LIB_SUFFIX" && $3="${LIB_SUFFIX}[$]{$3}"
+ if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
+ then
+ $2="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$2}"
+ $3="${LIB_SUFFIX}${EXTRA_SUFFIX}[$]{$3}"
+ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MAKEFLAGS version: 14 updated: 2011/03/31 19:29:46
+dnl CF_MAKEFLAGS version: 18 updated: 2018/02/21 21:26:03
dnl ------------
dnl Some 'make' programs support ${MAKEFLAGS}, some ${MFLAGS}, to pass 'make'
dnl options to lower-levels. It's very useful for "make -n" -- if we have it.
@@ -2570,24 +2854,26 @@ AC_CACHE_CHECK(for makeflags variable, cf_cv_makeflags,[
for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
do
cat >cf_makeflags.tmp <<CF_EOF
-SHELL = /bin/sh
+SHELL = $SHELL
all :
@ echo '.$cf_option'
CF_EOF
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[[ ]]*$,,'`
case "$cf_result" in
- .*k)
+ (.*k|.*kw)
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
case "$cf_result" in
- .*CC=*) cf_cv_makeflags=
+ (.*CC=*) cf_cv_makeflags=
;;
- *) cf_cv_makeflags=$cf_option
+ (*) cf_cv_makeflags=$cf_option
;;
esac
break
;;
- .-) ;;
- *) echo "given option \"$cf_option\", no match \"$cf_result\""
+ (.-)
+ ;;
+ (*)
+ CF_MSG_LOG(given option \"$cf_option\", no match \"$cf_result\")
;;
esac
done
@@ -2634,7 +2920,7 @@ AC_SUBST(MAKE_UPPER_TAGS)
AC_SUBST(MAKE_LOWER_TAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MATH_LIB version: 8 updated: 2010/05/29 16:31:02
+dnl CF_MATH_LIB version: 9 updated: 2017/01/21 11:06:25
dnl -----------
dnl Checks for libraries. At least one UNIX system, Apple Macintosh
dnl Rhapsody 5.5, does not have -lm. We cannot use the simpler
@@ -2645,6 +2931,7 @@ AC_CACHE_CHECK(if -lm needed for math functions,
cf_cv_need_libm,[
AC_TRY_LINK([
#include <stdio.h>
+ #include <stdlib.h>
#include <math.h>
],
[double x = rand(); printf("result = %g\n", ]ifelse([$2],,sin(x),$2)[)],
@@ -2694,7 +2981,7 @@ if test "$cf_cv_mbstate_t" != unknown ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_MIXEDCASE_FILENAMES version: 5 updated: 2013/09/07 13:54:05
+dnl CF_MIXEDCASE_FILENAMES version: 7 updated: 2015/04/12 15:39:00
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.
@@ -2702,11 +2989,11 @@ 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*|*-msys*|*-mingw32*|*-uwin*) #(vi
+ case $target_alias in
+ (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
cf_cv_mixedcase=no
;;
- *)
+ (*)
cf_cv_mixedcase=yes
;;
esac
@@ -2765,46 +3052,97 @@ printf("old\n");
,[$1=no])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_CONFIG version: 10 updated: 2012/10/06 08:57:51
+dnl CF_NCURSES_CONFIG version: 21 updated: 2018/06/20 20:23:13
dnl -----------------
-dnl Tie together the configure-script macros for ncurses.
-dnl Prefer the "-config" script from ncurses 6.x, to simplify analysis.
-dnl Allow that to be overridden using the $NCURSES_CONFIG environment variable.
+dnl Tie together the configure-script macros for ncurses, preferring these in
+dnl order:
+dnl a) ".pc" files for pkg-config, using $NCURSES_CONFIG_PKG
+dnl b) the "-config" script from ncurses, using $NCURSES_CONFIG
+dnl c) just plain libraries
dnl
dnl $1 is the root library name (default: "ncurses")
-AC_DEFUN([CF_NCURSES_CONFIG],
-[
+AC_DEFUN([CF_NCURSES_CONFIG],[
+AC_REQUIRE([CF_PKG_CONFIG])
cf_ncuconfig_root=ifelse($1,,ncurses,$1)
+cf_have_ncuconfig=no
-echo "Looking for ${cf_ncuconfig_root}-config"
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ AC_MSG_CHECKING(pkg-config for $cf_ncuconfig_root)
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ AC_MSG_RESULT(yes)
-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)])
+ AC_MSG_CHECKING(if the $cf_ncuconfig_root package files work)
+ cf_have_ncuconfig=unknown
-if test "$NCURSES_CONFIG" != none ; then
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
+ CF_ADD_CFLAGS(`$PKG_CONFIG --cflags $cf_ncuconfig_root`)
+ CF_ADD_LIBS(`$PKG_CONFIG --libs $cf_ncuconfig_root`)
-# even with config script, some packages use no-override for curses.h
-CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
+ AC_TRY_LINK([#include <${cf_cv_ncurses_header:-curses.h}>],
+ [initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);],
+ [AC_TRY_RUN([#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }],
+ [cf_have_ncuconfig=yes],
+ [cf_have_ncuconfig=no],
+ [cf_have_ncuconfig=maybe])],
+ [cf_have_ncuconfig=no])
+ AC_MSG_RESULT($cf_have_ncuconfig)
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+ AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+ CF_TERM_HEADER
+ fi
-dnl like CF_NCURSES_CPPFLAGS
-AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
+ else
+ AC_MSG_RESULT(no)
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
-dnl like CF_NCURSES_LIBS
-CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_ncuconfig_root)
-AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
+if test "x$cf_have_ncuconfig" = "xno"; then
+ cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
-dnl like CF_NCURSES_VERSION
-cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+ CF_ACVERSION_CHECK(2.52,
+ [AC_CHECK_TOOLS(NCURSES_CONFIG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)],
+ [AC_PATH_PROGS(NCURSES_CONFIG, ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config, none)])
-else
+ if test "$NCURSES_CONFIG" != none ; then
+
+ CF_ADD_CFLAGS(`$NCURSES_CONFIG --cflags`)
+ CF_ADD_LIBS(`$NCURSES_CONFIG --libs`)
-CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1))
-CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
+ # even with config script, some packages use no-override for curses.h
+ CF_CURSES_HEADER(ifelse($1,,ncurses,$1))
+ dnl like CF_NCURSES_CPPFLAGS
+ 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)
+ AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
+
+ dnl like CF_NCURSES_VERSION
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+ CF_NCURSES_CPPFLAGS(ifelse($1,,ncurses,$1))
+ CF_NCURSES_LIBS(ifelse($1,,ncurses,$1))
+
+ fi
+else
+ NCURSES_CONFIG=none
fi
])dnl
dnl ---------------------------------------------------------------------------
@@ -2859,7 +3197,7 @@ AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
CF_NCURSES_VERSION
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_HEADER version: 3 updated: 2012/10/06 08:57:51
+dnl CF_NCURSES_HEADER version: 4 updated: 2015/04/15 19:08:48
dnl -----------------
dnl Find a "curses" header file, e.g,. "curses.h", or one of the more common
dnl variations of ncurses' installs.
@@ -2908,24 +3246,24 @@ fi
# Set definitions to allow ifdef'ing for ncurses.h
-case $cf_cv_ncurses_header in # (vi
-*ncurses.h)
+case $cf_cv_ncurses_header in
+(*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)
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|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)
+(ncursesw/curses.h|ncursesw/ncurses.h)
AC_DEFINE(HAVE_NCURSESW_NCURSES_H,1,[Define to 1 if we have ncursesw/ncurses.h])
;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_LIBS version: 16 updated: 2010/11/20 17:02:38
+dnl CF_NCURSES_LIBS version: 17 updated: 2015/04/15 19:08:48
dnl ---------------
dnl Look for the ncurses library. This is a little complicated on Linux,
dnl because it may be linked with the gpm (general purpose mouse) library.
@@ -2951,8 +3289,8 @@ AC_CHECK_LIB(gpm,Gpm_Open,
[LIBS="$cf_ncurses_SAVE"],
[cf_ncurses_LIBS="-lgpm"])])
-case $host_os in #(vi
-freebsd*)
+case $host_os in
+(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
@@ -2993,7 +3331,22 @@ CF_UPPER(cf_nculib_ROOT,HAVE_LIB$cf_nculib_root)
AC_DEFINE_UNQUOTED($cf_nculib_ROOT)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NCURSES_VERSION version: 14 updated: 2012/10/06 08:57:51
+dnl CF_NCURSES_PTHREADS version: 2 updated: 2016/04/22 05:07:41
+dnl -------------------
+dnl Use this followup check to ensure that we link with pthreads if ncurses
+dnl uses it.
+AC_DEFUN([CF_NCURSES_PTHREADS],[
+: ${cf_nculib_root:=ifelse($1,,ncurses,$1)}
+AC_CHECK_LIB($cf_nculib_root,_nc_init_pthreads,
+ cf_cv_ncurses_pthreads=yes,
+ cf_cv_ncurses_pthreads=no)
+if test "$cf_cv_ncurses_pthreads" = yes
+then
+ CF_ADD_LIBS(-lpthread)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NCURSES_VERSION version: 15 updated: 2017/05/09 19:26:10
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
@@ -3008,7 +3361,7 @@ AC_CACHE_CHECK(for ncurses version, cf_cv_ncurses_version,[
AC_TRY_RUN([
#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
-int main()
+int main(void)
{
FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
@@ -3055,7 +3408,27 @@ EOF
test "$cf_cv_ncurses_version" = no || AC_DEFINE(NCURSES,1,[Define to 1 if we are using ncurses headers/libraries])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NO_LEAKS_OPTION version: 5 updated: 2012/10/02 20:55:03
+dnl CF_NL_LANGINFO_1STDAY version: 1 updated: 2016/02/08 19:06:25
+dnl ---------------------
+dnl glibc locale support has runtime extensions which might be implemented in
+dnl other systems.
+AC_DEFUN([CF_NL_LANGINFO_1STDAY],[
+AC_CACHE_CHECK(if runtime has nl_langinfo support for first weekday,
+ cf_nl_langinfo_1stday,[
+ AC_TRY_COMPILE([
+#include <langinfo.h>
+#include <locale.h>
+],[
+ int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
+ long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
+],[cf_nl_langinfo_1stday=yes
+],[cf_nl_langinfo_1stday=no
+])
+])
+test "x$cf_nl_langinfo_1stday" = xyes && AC_DEFINE(HAVE_NL_LANGINFO_1STDAY)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_NO_LEAKS_OPTION version: 6 updated: 2015/04/12 15:39:00
dnl ------------------
dnl see CF_WITH_NO_LEAKS
AC_DEFUN([CF_NO_LEAKS_OPTION],[
@@ -3071,12 +3444,12 @@ AC_ARG_WITH($1,
[with_$1=])
AC_MSG_RESULT(${with_$1:-no})
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
+case .$with_cflags in
+(.*-g*)
+ case .$CFLAGS in
+ (.*-g*)
;;
- *)
+ (*)
CF_ADD_CFLAGS([-g])
;;
esac
@@ -3084,17 +3457,17 @@ case .$with_cflags in #(vi
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_NUMBER_SYNTAX version: 1 updated: 2003/09/20 18:12:49
+dnl CF_NUMBER_SYNTAX version: 2 updated: 2015/04/17 21:13:04
dnl ----------------
dnl Check if the given variable is a number. If not, report an error.
dnl $1 is the variable
dnl $2 is the message
AC_DEFUN([CF_NUMBER_SYNTAX],[
if test -n "$1" ; then
- case $1 in #(vi
- [[0-9]]*) #(vi
+ case $1 in
+ ([[0-9]]*)
;;
- *)
+ (*)
AC_MSG_ERROR($2 is not a number: $1)
;;
esac
@@ -3140,7 +3513,7 @@ AC_SUBST(MSG_DIR_MAKE)
AC_SUBST(SUB_MAKEFILE)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATHSEP version: 6 updated: 2012/09/29 18:38:12
+dnl CF_PATHSEP version: 7 updated: 2015/04/12 15:39:00
dnl ----------
dnl Provide a value for the $PATH and similar separator (or amend the value
dnl as provided in autoconf 2.5x).
@@ -3148,15 +3521,15 @@ AC_DEFUN([CF_PATHSEP],
[
AC_MSG_CHECKING(for PATH separator)
case $cf_cv_system_name in
- os2*) PATH_SEPARATOR=';' ;;
- *) ${PATH_SEPARATOR:=':'} ;;
+ (os2*) PATH_SEPARATOR=';' ;;
+ (*) ${PATH_SEPARATOR:=':'} ;;
esac
ifelse([$1],,,[$1=$PATH_SEPARATOR])
AC_SUBST(PATH_SEPARATOR)
AC_MSG_RESULT($PATH_SEPARATOR)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PATH_SYNTAX version: 14 updated: 2012/06/19 20:58:54
+dnl CF_PATH_SYNTAX version: 16 updated: 2015/04/18 08:56:57
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
@@ -3164,36 +3537,81 @@ dnl result begins with 'NONE'. This is necessary to work around autoconf's
dnl delayed evaluation of those symbols.
AC_DEFUN([CF_PATH_SYNTAX],[
if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
+ cf_path_syntax="$prefix"
else
- cf_path_syntax="$ac_default_prefix"
+ cf_path_syntax="$ac_default_prefix"
fi
-case ".[$]$1" in #(vi
-.\[$]\(*\)*|.\'*\'*) #(vi
- ;;
-..|./*|.\\*) #(vi
- ;;
-.[[a-zA-Z]]:[[\\/]]*) #(vi OS/2 EMX
- ;;
-.\[$]{*prefix}*|.\[$]{*dir}*) #(vi
- eval $1="[$]$1"
- case ".[$]$1" in #(vi
- .NONE/*)
- $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
- ;;
- esac
- ;; #(vi
-.no|.NONE/*)
- $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
- ;;
-*)
- ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
- ;;
+case ".[$]$1" in
+(.\[$]\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[[a-zA-Z]]:[[\\/]]*) # OS/2 EMX
+ ;;
+(.\[$]{*prefix}*|.\[$]{*dir}*)
+ eval $1="[$]$1"
+ case ".[$]$1" in
+ (.NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ $1=`echo [$]$1 | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ ifelse([$2],,[AC_MSG_ERROR([expected a pathname, not \"[$]$1\"])],$2)
+ ;;
esac
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PKG_CONFIG version: 7 updated: 2011/04/29 04:53:22
+dnl CF_PDCURSES_X11 version: 14 updated: 2018/06/20 20:23:13
+dnl ---------------
+dnl Configure for PDCurses' X11 library
+AC_DEFUN([CF_PDCURSES_X11],[
+AC_REQUIRE([CF_X_ATHENA])
+
+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
+
+CF_ADD_CFLAGS(`$XCURSES_CONFIG --cflags`)
+CF_ADD_LIBS(`$XCURSES_CONFIG --libs`)
+
+cf_cv_lib_XCurses=yes
+
+else
+
+LDFLAGS="$LDFLAGS $X_LIBS"
+CF_CHECK_CFLAGS($X_CFLAGS)
+AC_CHECK_LIB(X11,XOpenDisplay,
+ [CF_ADD_LIBS(-lX11)],,
+ [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])
+AC_CACHE_CHECK(for XCurses library,cf_cv_lib_XCurses,[
+CF_ADD_LIBS(-lXCurses)
+AC_TRY_LINK([
+#include <xcurses.h>
+char *XCursesProgramName = "test";
+],[XCursesExit();],
+[cf_cv_lib_XCurses=yes],
+[cf_cv_lib_XCurses=no])
+])
+
+fi
+
+if test $cf_cv_lib_XCurses = yes ; then
+ 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: 10 updated: 2015/04/26 18:06:58
dnl -------------
dnl Check for the package-config program, unless disabled by command-line.
AC_DEFUN([CF_PKG_CONFIG],
@@ -3205,16 +3623,16 @@ AC_ARG_WITH(pkg-config,
[cf_pkg_config=yes])
AC_MSG_RESULT($cf_pkg_config)
-case $cf_pkg_config in #(vi
-no) #(vi
+case $cf_pkg_config in
+(no)
PKG_CONFIG=none
;;
-yes) #(vi
+(yes)
CF_ACVERSION_CHECK(2.52,
[AC_PATH_TOOL(PKG_CONFIG, pkg-config, none)],
[AC_PATH_PROG(PKG_CONFIG, pkg-config, none)])
;;
-*)
+(*)
PKG_CONFIG=$withval
;;
esac
@@ -3222,12 +3640,14 @@ esac
test -z "$PKG_CONFIG" && PKG_CONFIG=none
if test "$PKG_CONFIG" != none ; then
CF_PATH_SYNTAX(PKG_CONFIG)
+elif test "x$cf_pkg_config" != xno ; then
+ AC_MSG_WARN(pkg-config is not installed)
fi
AC_SUBST(PKG_CONFIG)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_POSIX_C_SOURCE version: 8 updated: 2010/05/26 05:38:42
+dnl CF_POSIX_C_SOURCE version: 10 updated: 2018/06/20 20:23:13
dnl -----------------
dnl Define _POSIX_C_SOURCE to the given level, and _POSIX_SOURCE if needed.
dnl
@@ -3259,15 +3679,15 @@ make an error
#endif],
[cf_cv_posix_c_source=no],
[cf_want_posix_source=no
- case .$cf_POSIX_C_SOURCE in #(vi
- .[[12]]??*) #(vi
+ case .$cf_POSIX_C_SOURCE in
+ (.[[12]]??*)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
;;
- .2) #(vi
+ (.2)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
cf_want_posix_source=yes
;;
- .*)
+ (.*)
cf_want_posix_source=yes
;;
esac
@@ -3280,7 +3700,8 @@ make an error
fi
CF_MSG_LOG(ifdef from value $cf_POSIX_C_SOURCE)
CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+ CF_APPEND_TEXT(CPPFLAGS,$cf_cv_posix_c_source)
CF_MSG_LOG(if the second compile does not leave our definition intact error)
AC_TRY_COMPILE([#include <sys/types.h>],[
#ifndef _POSIX_C_SOURCE
@@ -3300,7 +3721,14 @@ fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_CC version: 3 updated: 2012/10/06 15:31:55
+dnl CF_PROG_AR version: 1 updated: 2009/01/01 20:15:22
+dnl ----------
+dnl Check for archiver "ar".
+AC_DEFUN([CF_PROG_AR],[
+AC_CHECK_TOOL(AR, ar, ar)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_CC version: 4 updated: 2014/07/12 18:57:58
dnl ----------
dnl standard check for CC, plus followup sanity checks
dnl $1 = optional parameter to pass to AC_PROG_CC to specify compiler name
@@ -3310,24 +3738,24 @@ CF_GCC_VERSION
CF_ACVERSION_CHECK(2.52,
[AC_PROG_CC_STDC],
[CF_ANSI_CC_REQD])
-CF_CC_ENV_FLAGS
+CF_CC_ENV_FLAGS
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_EXT version: 11 updated: 2012/10/06 08:57:51
+dnl CF_PROG_EXT version: 14 updated: 2018/06/20 20:23:13
dnl -----------
dnl Compute $PROG_EXT, used for non-Unix ports, such as OS/2 EMX.
AC_DEFUN([CF_PROG_EXT],
[
AC_REQUIRE([CF_CHECK_CACHE])
case $cf_cv_system_name in
-os2*)
- CFLAGS="$CFLAGS -Zmt"
- CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
- CXXFLAGS="$CXXFLAGS -Zmt"
- # autoconf's macro sets -Zexe and suffix both, which conflict:w
- LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
- ac_cv_exeext=.exe
- ;;
+(os2*)
+ CFLAGS="$CFLAGS -Zmt"
+ CF_APPEND_TEXT(CPPFLAGS,-D__ST_MT_ERRNO__)
+ CXXFLAGS="$CXXFLAGS -Zmt"
+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+ ac_cv_exeext=.exe
+ ;;
esac
AC_EXEEXT
@@ -3338,11 +3766,31 @@ AC_SUBST(PROG_EXT)
test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT",[Define to the program extension (normally blank)])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_PROG_LINT version: 2 updated: 2009/08/12 04:43:14
+dnl CF_PROG_GROFF version: 3 updated: 2018/01/07 13:16:19
+dnl -------------
+dnl Check if groff is available, for cases (such as html output) where nroff
+dnl is not enough.
+AC_DEFUN([CF_PROG_GROFF],[
+AC_PATH_PROG(GROFF_PATH,groff,no)
+AC_PATH_PROGS(NROFF_PATH,nroff mandoc,no)
+AC_PATH_PROG(TBL_PATH,tbl,cat)
+if test "x$GROFF_PATH" = xno
+then
+ NROFF_NOTE=
+ GROFF_NOTE="#"
+else
+ NROFF_NOTE="#"
+ GROFF_NOTE=
+fi
+AC_SUBST(GROFF_NOTE)
+AC_SUBST(NROFF_NOTE)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_PROG_LINT version: 3 updated: 2016/05/22 15:25:54
dnl ------------
AC_DEFUN([CF_PROG_LINT],
[
-AC_CHECK_PROGS(LINT, tdlint lint alint splint lclint)
+AC_CHECK_PROGS(LINT, lint cppcheck splint)
AC_SUBST(LINT_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
@@ -3442,7 +3890,7 @@ fi
AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_RPATH_HACK_2 version: 6 updated: 2010/04/17 16:31:24
+dnl CF_RPATH_HACK_2 version: 7 updated: 2015/04/12 15:39:00
dnl ---------------
dnl Do one set of substitutions for CF_RPATH_HACK, adding an rpath option to
dnl EXTRA_LDFLAGS for each -L option found.
@@ -3458,8 +3906,8 @@ CF_VERBOSE(...checking $1 [$]$1)
cf_rpath_dst=
for cf_rpath_src in [$]$1
do
- case $cf_rpath_src in #(vi
- -L*) #(vi
+ case $cf_rpath_src in
+ (-L*)
# check if this refers to a directory which we will ignore
cf_rpath_skip=no
@@ -3502,7 +3950,7 @@ CF_VERBOSE(...checked $1 [$]$1)
AC_SUBST(EXTRA_LDFLAGS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_SHARED_OPTS version: 83 updated: 2013/09/21 17:34:53
+dnl CF_SHARED_OPTS version: 92 updated: 2017/12/30 17:26:05
dnl --------------
dnl --------------
dnl Attempt to determine the appropriate CC/LD options for creating a shared
@@ -3537,6 +3985,12 @@ AC_DEFUN([CF_SHARED_OPTS],
INSTALL_LIB="-m 644"
: ${rel_builddir:=.}
+ shlibdir=$libdir
+ AC_SUBST(shlibdir)
+
+ MAKE_DLLS="#"
+ AC_SUBST(MAKE_DLLS)
+
cf_cv_do_symlinks=no
cf_ld_rpath_opt=
test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
@@ -3545,15 +3999,16 @@ AC_DEFUN([CF_SHARED_OPTS],
AC_ARG_WITH(shlib-version,
[ --with-shlib-version=X Specify rel or abi version for shared libs],
[test -z "$withval" && withval=auto
- case $withval in #(vi
- yes) #(vi
+ case $withval in
+ (yes)
cf_cv_shlib_version=auto
;;
- rel|abi|auto|no) #(vi
+ (rel|abi|auto)
cf_cv_shlib_version=$withval
;;
- *)
- AC_MSG_ERROR([option value must be one of: rel, abi, auto or no])
+ (*)
+ AC_MSG_RESULT($withval)
+ AC_MSG_ERROR([option value must be one of: rel, abi, or auto])
;;
esac
],[cf_cv_shlib_version=auto])
@@ -3564,8 +4019,21 @@ AC_DEFUN([CF_SHARED_OPTS],
# Some less-capable ports of gcc support only -fpic
CC_SHARED_OPTS=
+
+ cf_try_fPIC=no
if test "$GCC" = yes
then
+ cf_try_fPIC=yes
+ else
+ case $cf_cv_system_name in
+ (*linux*) # e.g., PGI compiler
+ cf_try_fPIC=yes
+ ;;
+ esac
+ fi
+
+ if test "$cf_try_fPIC" = yes
+ then
AC_MSG_CHECKING(which $CC option to use)
cf_save_CFLAGS="$CFLAGS"
for CC_SHARED_OPTS in -fPIC -fpic ''
@@ -3579,28 +4047,30 @@ AC_DEFUN([CF_SHARED_OPTS],
cf_cv_shlib_version_infix=no
- case $cf_cv_system_name in #(vi
- aix4.[3-9]*|aix[[5-7]]*) #(vi
+ case $cf_cv_system_name in
+ (aix4.[3-9]*|aix[[5-7]]*)
if test "$GCC" = yes; then
- CC_SHARED_OPTS=
- MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ CC_SHARED_OPTS='-Wl,-brtl'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
else
- # CC_SHARED_OPTS='-qpic=large -G'
- # perhaps "-bM:SRE -bnoentry -bexpall"
- MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
+ CC_SHARED_OPTS='-brtl'
+ # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o [$]@'
fi
;;
- beos*) #(vi
- MK_SHARED_LIB='${CC} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
+ (beos*)
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $[@] -Xlinker -soname=`basename $[@]` -nostart -e 0'
;;
- cygwin*) #(vi
+ (cygwin*)
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cf_cv_shlib_version=cygdll
cf_cv_shlib_version_infix=cygdll
+ shlibdir=$bindir
+ MAKE_DLLS=
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\[$]1
IMPORT_LIB=\`echo "\[$]1" | sed -e 's/cyg/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
shift
@@ -3609,18 +4079,20 @@ AC_DEFUN([CF_SHARED_OPTS],
** SHARED_LIB \[$]SHARED_LIB
** IMPORT_LIB \[$]IMPORT_LIB
EOF
- exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+ exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- msys*) #(vi
+ (msys*)
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cf_cv_shlib_version=msysdll
cf_cv_shlib_version_infix=msysdll
+ shlibdir=$bindir
+ MAKE_DLLS=
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\[$]1
IMPORT_LIB=\`echo "\[$]1" | sed -e 's/msys-/lib/' -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
shift
@@ -3629,14 +4101,14 @@ CF_EOF
** SHARED_LIB \[$]SHARED_LIB
** IMPORT_LIB \[$]IMPORT_LIB
EOF
- exec \[$]* -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+ exec \[$]* ${LDFLAGS} -shared -Wl,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- darwin*) #(vi
+ (darwin*)
cf_try_cflags="no-cpp-precomp"
CC_SHARED_OPTS="-dynamic"
- MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $[@]` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $[@]'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
cf_cv_shlib_version_infix=yes
AC_CACHE_CHECK([if ld -search_paths_first works], cf_cv_ldflags_search_paths_first, [
@@ -3648,15 +4120,15 @@ CF_EOF
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
fi
;;
- hpux[[7-8]]*) #(vi
- # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
+ (hpux[[7-8]]*)
+ # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
if test "$GCC" != yes; then
CC_SHARED_OPTS='+Z'
fi
- MK_SHARED_LIB='${LD} -b -o $[@]'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $[@]'
INSTALL_LIB="-m 555"
;;
- hpux*) #(vi
+ (hpux*)
# (tested with gcc 2.7.2 -- I don't have c89)
if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
@@ -3664,35 +4136,35 @@ CF_EOF
CC_SHARED_OPTS='+Z'
LD_SHARED_OPTS='-Wl,+b,${libdir}'
fi
- MK_SHARED_LIB='${LD} +b ${libdir} -b -o $[@]'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $[@]'
# HP-UX shared libraries must be executable, and should be
# readonly to exploit a quirk in the memory manager.
INSTALL_LIB="-m 555"
;;
- interix*)
+ (interix*)
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
if test "$cf_cv_shlib_version" = rel; then
- cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
+ cf_shared_soname='`basename $[@] .${REL_VERSION}`.${ABI_VERSION}'
else
- cf_shared_soname='`basename $@`'
+ cf_shared_soname='`basename $[@]`'
fi
CC_SHARED_OPTS=
- MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $[@]'
;;
- irix*) #(vi
+ (irix*)
if test "$cf_cv_enable_rpath" = yes ; then
EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
fi
# tested with IRIX 5.2 and 'cc'.
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
- MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $[@]` -o $[@]'
else
- MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $[@]` -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $[@]` -o $[@]'
fi
cf_cv_rm_so_locs=yes
;;
- linux*|gnu*|k*bsd*-gnu) #(vi
+ (linux*|gnu*|k*bsd*-gnu)
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -3701,21 +4173,23 @@ CF_EOF
EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
- mingw*) #(vi
+ (mingw*)
cf_cv_shlib_version=mingw
cf_cv_shlib_version_infix=mingw
+ shlibdir=$bindir
+ MAKE_DLLS=
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-Wl,--enable-auto-import"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
fi
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh [$]@ [$]{CC} [$]{CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\[$]1
IMPORT_LIB=\`echo "\[$]1" | sed -e 's/[[0-9]]*\.dll[$]/.dll.a/'\`
shift
@@ -3724,11 +4198,11 @@ CF_EOF
** SHARED_LIB \[$]SHARED_LIB
** IMPORT_LIB \[$]IMPORT_LIB
EOF
- exec \[$]* -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
+ exec \[$]* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\[$]{IMPORT_LIB} -Wl,--export-all-symbols -o \[$]{SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- openbsd[[2-9]].*|mirbsd*) #(vi
+ (openbsd[[2-9]].*|mirbsd*)
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -3738,14 +4212,14 @@ CF_EOF
fi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
CF_SHARED_SONAME
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
- nto-qnx*|openbsd*|freebsd[[12]].*) #(vi
+ (nto-qnx*|openbsd*|freebsd[[12]].*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
- MK_SHARED_LIB='${LD} -Bshareable -o $[@]'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $[@]'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- dragonfly*|freebsd*) #(vi
+ (dragonfly*|freebsd*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
@@ -3753,9 +4227,9 @@ CF_EOF
EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
fi
CF_SHARED_SONAME
- MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $[@]` -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $[@]'
;;
- netbsd*) #(vi
+ (netbsd*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
@@ -3769,18 +4243,18 @@ CF_EOF
fi
fi
CF_SHARED_SONAME
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $[@]'
else
- MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $[@]'
fi
;;
- osf*|mls+*) #(vi
+ (osf*|mls+*)
# tested with OSF/1 V3.2 and 'cc'
# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
# link with shared libs).
- MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`'
- case $host_os in #(vi
- osf4*)
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $[@]`'
+ case $host_os in
+ (osf4*)
MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
;;
esac
@@ -3791,12 +4265,12 @@ CF_EOF
fi
cf_cv_rm_so_locs=yes
;;
- sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98
+ (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
# tested with osr5.0.5
if test "$GCC" != yes; then
CC_SHARED_OPTS='-belf -KPIC'
fi
- MK_SHARED_LIB='${LD} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $[@] .${REL_VERSION}`.${ABI_VERSION} -o [$]@'
if test "$cf_cv_enable_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
@@ -3805,15 +4279,15 @@ CF_EOF
LINK_PROGS='LD_RUN_PATH=${libdir}'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
- sunos4*) #(vi
+ (sunos4*)
# tested with SunOS 4.1.1 and gcc 2.7.0
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='${LD} -assert pure-text -o $[@]'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $[@]'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- solaris2*) #(vi
+ (solaris2*)
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
if test "$DFT_LWR_MODEL" = "shared" ; then
@@ -3833,32 +4307,32 @@ CF_EOF
done
CFLAGS="$cf_save_CFLAGS"
CC_SHARED_OPTS=$cf_shared_opts
- MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $[@]'
else
- MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $[@]'
fi
;;
- sysv5uw7*|unix_sv*) #(vi
+ (sysv5uw7*|unix_sv*)
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='${LD} -d y -G -o [$]@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o [$]@'
;;
- *)
+ (*)
CC_SHARED_OPTS='unknown'
MK_SHARED_LIB='echo unknown'
;;
esac
# This works if the last tokens in $MK_SHARED_LIB are the -o target.
- case "$cf_cv_shlib_version" in #(vi
- rel|abi)
- case "$MK_SHARED_LIB" in #(vi
- *'-o $[@]') #(vi
+ case "$cf_cv_shlib_version" in
+ (rel|abi)
+ case "$MK_SHARED_LIB" in
+ (*'-o $[@]')
test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
- *)
+ (*)
AC_MSG_WARN(ignored --with-shlib-version)
;;
esac
@@ -3936,7 +4410,120 @@ define([CF_SHARED_SONAME],
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF_SUBDIR_PATH version: 6 updated: 2010/04/21 06:20:50
+dnl CF_SIZECHANGE version: 14 updated: 2018/06/20 20:23:13
+dnl -------------
+dnl Check for definitions & structures needed for window size-changing
+dnl
+dnl https://stackoverflow.com/questions/18878141/difference-between-structures-ttysize-and-winsize/50769952#50769952
+AC_DEFUN([CF_SIZECHANGE],
+[
+AC_REQUIRE([CF_STRUCT_TERMIOS])
+AC_CACHE_CHECK(declaration of size-change, cf_cv_sizechange,[
+ cf_cv_sizechange=unknown
+ cf_save_CPPFLAGS="$CPPFLAGS"
+
+for cf_opts in "" "NEED_PTEM_H"
+do
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test -n "$cf_opts"
+ then
+ CF_APPEND_TEXT(CPPFLAGS,-D$cf_opts)
+ fi
+ AC_TRY_COMPILE([#include <sys/types.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#endif
+
+#ifdef NEED_PTEM_H
+/* This is a workaround for SCO: they neglected to define struct winsize in
+ * termios.h -- it's only in termio.h and ptem.h
+ */
+#include <sys/stream.h>
+#include <sys/ptem.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+],[
+#ifdef TIOCGSIZE
+ struct ttysize win; /* SunOS 3.0... */
+ int y = win.ts_lines;
+ int x = win.ts_cols;
+#else
+#ifdef TIOCGWINSZ
+ struct winsize win; /* everything else */
+ int y = win.ws_row;
+ int x = win.ws_col;
+#else
+ no TIOCGSIZE or TIOCGWINSZ
+#endif /* TIOCGWINSZ */
+#endif /* TIOCGSIZE */
+ ],
+ [cf_cv_sizechange=yes],
+ [cf_cv_sizechange=no])
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test "$cf_cv_sizechange" = yes ; then
+ echo "size-change succeeded ($cf_opts)" >&AC_FD_CC
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
+ break
+ fi
+done
+])
+if test "$cf_cv_sizechange" != no ; then
+ AC_DEFINE(HAVE_SIZECHANGE,1,[Define to 1 if sizechange declarations are provided])
+ case $cf_cv_sizechange in
+ (NEED*)
+ AC_DEFINE_UNQUOTED($cf_cv_sizechange )
+ ;;
+ esac
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_STRUCT_TERMIOS version: 9 updated: 2018/06/08 21:57:23
+dnl -----------------
+dnl Some machines require _POSIX_SOURCE to completely define struct termios.
+AC_DEFUN([CF_STRUCT_TERMIOS],[
+AC_REQUIRE([CF_XOPEN_SOURCE])
+
+AC_CHECK_HEADERS( \
+termio.h \
+termios.h \
+unistd.h \
+sys/ioctl.h \
+sys/termio.h \
+)
+
+if test "$ac_cv_header_termios_h" = yes ; then
+ case "$CFLAGS $CPPFLAGS" in
+ (*-D_POSIX_SOURCE*)
+ termios_bad=dunno ;;
+ (*) termios_bad=maybe ;;
+ esac
+ if test "$termios_bad" = maybe ; then
+ AC_MSG_CHECKING(whether termios.h needs _POSIX_SOURCE)
+ AC_TRY_COMPILE([#include <termios.h>],
+ [struct termios foo; int x = foo.c_iflag],
+ termios_bad=no, [
+ AC_TRY_COMPILE([
+#define _POSIX_SOURCE
+#include <termios.h>],
+ [struct termios foo; int x = foo.c_iflag],
+ termios_bad=unknown,
+ termios_bad=yes AC_DEFINE(_POSIX_SOURCE,1,[Define to 1 if we must define _POSIX_SOURCE]))
+ ])
+ AC_MSG_RESULT($termios_bad)
+ fi
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_SUBDIR_PATH version: 7 updated: 2014/12/04 04:33:06
dnl --------------
dnl Construct a search-list for a nonstandard header/lib-file
dnl $1 = the variable to return as result
@@ -3946,25 +4533,32 @@ AC_DEFUN([CF_SUBDIR_PATH],
[
$1=
-CF_ADD_SUBDIR_PATH($1,$2,$3,/usr,$prefix)
CF_ADD_SUBDIR_PATH($1,$2,$3,$prefix,NONE)
-CF_ADD_SUBDIR_PATH($1,$2,$3,/usr/local,$prefix)
-CF_ADD_SUBDIR_PATH($1,$2,$3,/opt,$prefix)
-CF_ADD_SUBDIR_PATH($1,$2,$3,[$]HOME,$prefix)
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ [$]HOME
+do
+ CF_ADD_SUBDIR_PATH($1,$2,$3,$cf_subdir_prefix,$prefix)
+done
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_TERM_HEADER version: 3 updated: 2012/10/06 08:57:51
+dnl CF_TERM_HEADER version: 4 updated: 2015/04/15 19:08:48
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,
dnl but some packagers change this, breaking various applications.
AC_DEFUN([CF_TERM_HEADER],[
AC_CACHE_CHECK(for terminfo header, cf_cv_term_header,[
-case ${cf_cv_ncurses_header} in #(vi
-*/ncurses.h|*/ncursesw.h) #(vi
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[[^.]]*\.h$%term.h%'`
;;
-*)
+(*)
cf_term_header=term.h
;;
esac
@@ -3984,23 +4578,66 @@ done
# Set definitions to allow ifdef'ing to accommodate subdirectories
-case $cf_cv_term_header in # (vi
-*term.h)
+case $cf_cv_term_header in
+(*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
+case $cf_cv_term_header in
+(ncurses/term.h)
AC_DEFINE(HAVE_NCURSES_TERM_H,1,[Define to 1 if we have ncurses/term.h])
;;
-ncursesw/term.h)
+(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_XOPEN_SOURCE version: 1 updated: 2011/10/30 17:09:50
+dnl CF_TRIM_X_LIBS version: 3 updated: 2015/04/12 15:39:00
+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.
+dnl
+dnl $1 = package name
+dnl $2 = extra logic to use, if any, after updating CFLAGS and LIBS
+dnl $3 = logic to use if pkg-config does not have the package
+AC_DEFUN([CF_TRY_PKG_CONFIG],[
+AC_REQUIRE([CF_PKG_CONFIG])
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $1; then
+ CF_VERBOSE(found package $1)
+ cf_pkgconfig_incs="`$PKG_CONFIG --cflags $1 2>/dev/null`"
+ cf_pkgconfig_libs="`$PKG_CONFIG --libs $1 2>/dev/null`"
+ CF_VERBOSE(package $1 CFLAGS: $cf_pkgconfig_incs)
+ CF_VERBOSE(package $1 LIBS: $cf_pkgconfig_libs)
+ CF_ADD_CFLAGS($cf_pkgconfig_incs)
+ 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: 2 updated: 2018/06/20 20:23:13
dnl -------------------
dnl If _XOPEN_SOURCE is not defined in the compile environment, check if we
dnl can define it successfully.
@@ -4016,7 +4653,7 @@ make an error
#endif],
[cf_cv_xopen_source=no],
[cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+ CF_APPEND_TEXT(CPPFLAGS,-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE)
AC_TRY_COMPILE([
#include <stdlib.h>
#include <string.h>
@@ -4128,7 +4765,7 @@ AC_DEFUN([CF_VERBOSE],
CF_MSG_LOG([$1])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_VERSION_INFO version: 6 updated: 2013/06/16 10:25:53
+dnl CF_VERSION_INFO version: 7 updated: 2015/04/17 21:13:04
dnl ---------------
dnl Define several useful symbols derived from the VERSION file. A separate
dnl file is preferred to embedding the version numbers in various scripts.
@@ -4178,12 +4815,12 @@ if test -f $srcdir/VERSION ; then
AC_MSG_CHECKING(for package patch date)
VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[[^-]]*-//'`
case .$VERSION_PATCH in
- .)
+ (.)
AC_MSG_ERROR(missing patch-date $VERSION_PATCH)
;;
- .[[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]])
+ (.[[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]][[0-9]])
;;
- *)
+ (*)
AC_MSG_ERROR(illegal patch-date $VERSION_PATCH)
;;
esac
@@ -4247,7 +4884,54 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_ABI_VERSION version: 1 updated: 2003/09/20 18:12:49
+dnl CF_WIDEC_CURSES version: 5 updated: 2012/11/08 20:57:52
+dnl ---------------
+dnl Check for curses implementations that can handle wide-characters
+AC_DEFUN([CF_WIDEC_CURSES],
+[
+AC_CACHE_CHECK(if curses supports wide characters,cf_cv_widec_curses,[
+AC_TRY_LINK([
+#include <stdlib.h>
+#include <${cf_cv_ncurses_header:-curses.h}>],[
+ wchar_t temp[2];
+ wchar_t wch = 'A';
+ temp[0] = wch;
+ waddnwstr(stdscr, temp, 1);
+],
+[cf_cv_widec_curses=yes],
+[cf_cv_widec_curses=no])
+])
+
+if test "$cf_cv_widec_curses" = yes ; then
+ AC_DEFINE(WIDEC_CURSES,1,[Define to 1 if curses supports wide characters])
+
+ # This is needed on Tru64 5.0 to declare mbstate_t
+ AC_CACHE_CHECK(if we must include wchar.h to declare mbstate_t,cf_cv_widec_mbstate,[
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <${cf_cv_ncurses_header:-curses.h}>],
+[mbstate_t state],
+[cf_cv_widec_mbstate=no],
+[AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <wchar.h>
+#include <${cf_cv_ncurses_header:-curses.h}>],
+[mbstate_t state],
+[cf_cv_widec_mbstate=yes],
+[cf_cv_widec_mbstate=unknown])])])
+
+if test "$cf_cv_widec_mbstate" = yes ; then
+ AC_DEFINE(NEED_WCHAR_H,1,[Define to 1 if we must include wchar.h])
+fi
+
+if test "$cf_cv_widec_mbstate" != unknown ; then
+ AC_DEFINE(HAVE_MBSTATE_T,1,[Define to 1 if we have mbstate_t type])
+fi
+
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ABI_VERSION version: 3 updated: 2015/06/06 16:10:11
dnl -------------------
dnl Allow library's ABI to be overridden. Generally this happens when a
dnl packager has incremented the ABI past that used in the original package,
@@ -4258,10 +4942,21 @@ dnl symbol.
AC_DEFUN([CF_WITH_ABI_VERSION],[
test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
AC_ARG_WITH(abi-version,
-[ --with-abi-version=XXX override derived ABI version],
-[AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
- cf_cv_abi_version=$withval])
- CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
+[ --with-abi-version=XXX override derived ABI version],[
+ if test "x$cf_cv_abi_version" != "x$withval"
+ then
+ AC_MSG_WARN(overriding ABI version $cf_cv_abi_version to $withval)
+ case $cf_cv_rel_version in
+ (5.*)
+ cf_cv_rel_version=$withval.0
+ ;;
+ (6.*)
+ cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
+ ;;
+ esac
+ fi
+ cf_cv_abi_version=$withval])
+ CF_NUMBER_SYNTAX($cf_cv_abi_version,ABI version)
ifelse($1,,,[
$1_ABI=$cf_cv_abi_version
])
@@ -4321,7 +5016,52 @@ if test "$with_dmalloc" = yes ; then
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL version: 30 updated: 2013/09/07 13:54:05
+dnl CF_WITH_EXPORT_SYMS version: 3 updated: 2014/12/20 19:16:08
+dnl -------------------
+dnl Use this with libtool to specify the list of symbols that may be exported.
+dnl The input file contains one symbol per line; comments work with "#".
+dnl
+dnl $1 = basename of the ".sym" file (default $PACKAGE)
+AC_DEFUN([CF_WITH_EXPORT_SYMS],
+[
+AC_MSG_CHECKING(if exported-symbols file should be used)
+AC_ARG_WITH(export-syms,
+ [ --with-export-syms=XXX limit exported symbols using libtool],
+ [with_export_syms=$withval],
+ [with_export_syms=no])
+if test "x$with_export_syms" = xyes
+then
+ with_export_syms='${top_srcdir}/package/ifelse($1,,${PACKAGE},[$1]).sym'
+ AC_SUBST(PACKAGE)
+fi
+AC_MSG_RESULT($with_export_syms)
+if test "x$with_export_syms" != xno
+then
+ EXPORT_SYMS="-export-symbols $with_export_syms"
+ AC_SUBST(EXPORT_SYMS)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_INSTALL_PREFIX version: 4 updated: 2010/10/23 15:52:32
+dnl ----------------------
+dnl Configure-script option to give a default value for the poorly-chosen name
+dnl $(DESTDIR).
+AC_DEFUN([CF_WITH_INSTALL_PREFIX],
+[
+AC_MSG_CHECKING(for install-prefix)
+AC_ARG_WITH(install-prefix,
+ [ --with-install-prefix=XXX sets DESTDIR, useful for packaging],
+ [cf_opt_with_install_prefix=$withval],
+ [cf_opt_with_install_prefix=${DESTDIR:-no}])
+AC_MSG_RESULT($cf_opt_with_install_prefix)
+if test "$cf_opt_with_install_prefix" != no ; then
+ CF_PATH_SYNTAX(cf_opt_with_install_prefix)
+ DESTDIR=$cf_opt_with_install_prefix
+fi
+AC_SUBST(DESTDIR)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_LIBTOOL version: 35 updated: 2017/08/12 07:58:51
dnl ---------------
dnl Provide a configure option to incorporate libtool. Define several useful
dnl symbols for the makefile rules.
@@ -4345,7 +5085,7 @@ dnl
dnl LOCAL=aclocal.m4
dnl ORIG=aclocal.m4.orig
dnl
-dnl trap "mv $ORIG $LOCAL" 0 1 2 5 15
+dnl trap "mv $ORIG $LOCAL" 0 1 2 3 15
dnl rm -f $ORIG
dnl mv $LOCAL $ORIG
dnl
@@ -4404,7 +5144,7 @@ ifdef([AC_PROG_LIBTOOL],[
AC_MSG_ERROR(Cannot find libtool)
fi
])dnl
- LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
+ LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
LIB_OBJECT='${OBJECTS:.o=.lo}'
LIB_SUFFIX=.la
LIB_CLEAN='${LIBTOOL} --mode=clean'
@@ -4418,20 +5158,20 @@ ifdef([AC_PROG_LIBTOOL],[
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
- case "$cf_cv_system_name" in #(vi
- cygwin*|msys*|mingw32*|uwin*|aix[[4-7]]) #(vi
+ case "$cf_cv_system_name" in
+ (cygwin*|msys*|mingw32*|os2*|uwin*|aix[[4-7]])
LT_UNDEF=-no-undefined
;;
esac
AC_SUBST([LT_UNDEF])
# special hack to add --tag option for C++ compiler
- case $cf_cv_libtool_version in #(vi
- 1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*) #(vi
+ case $cf_cv_libtool_version in
+ (1.[[5-9]]*|[[2-9]].[[0-9.a-z]]*)
LIBTOOL_CXX="$LIBTOOL --tag=CXX"
LIBTOOL="$LIBTOOL --tag=CC"
;;
- *)
+ (*)
LIBTOOL_CXX="$LIBTOOL"
;;
esac
@@ -4459,7 +5199,7 @@ AC_SUBST(LIB_UNINSTALL)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_LIBTOOL_OPTS version: 2 updated: 2007/04/08 18:14:54
+dnl CF_WITH_LIBTOOL_OPTS version: 4 updated: 2015/04/17 21:13:04
dnl --------------------
dnl Allow user to pass additional libtool options into the library creation
dnl and link steps. The main use for this is to do something like
@@ -4475,17 +5215,243 @@ AC_ARG_WITH(libtool-opts,
AC_MSG_RESULT($with_libtool_opts)
case .$with_libtool_opts in
-.yes|.no|.)
+(.yes|.no|.)
;;
-*)
- LIBTOOL_OPTS=$with_libtool_opts
+(*)
+ LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
;;
esac
AC_SUBST(LIBTOOL_OPTS)
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_NO_LEAKS version: 2 updated: 2012/10/06 08:57:51
+dnl CF_WITH_MAN2HTML version: 7 updated: 2018/01/07 13:16:19
+dnl ----------------
+dnl Check for man2html and groff. Prefer man2html over groff, but use groff
+dnl as a fallback. See
+dnl
+dnl http://invisible-island.net/scripts/man2html.html
+dnl
+dnl Generate a shell script which hides the differences between the two.
+dnl
+dnl We name that "man2html.tmp".
+dnl
+dnl The shell script can be removed later, e.g., using "make distclean".
+AC_DEFUN([CF_WITH_MAN2HTML],[
+AC_REQUIRE([CF_PROG_GROFF])
+
+case "x${with_man2html}" in
+(xno)
+ cf_man2html=no
+ ;;
+(x|xyes)
+ AC_PATH_PROG(cf_man2html,man2html,no)
+ case "x$cf_man2html" in
+ (x/*)
+ AC_MSG_CHECKING(for the modified Earl Hood script)
+ if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
+ then
+ cf_man2html_ok=yes
+ else
+ cf_man2html=no
+ cf_man2html_ok=no
+ fi
+ AC_MSG_RESULT($cf_man2html_ok)
+ ;;
+ (*)
+ cf_man2html=no
+ ;;
+ esac
+esac
+
+AC_MSG_CHECKING(for program to convert manpage to html)
+AC_ARG_WITH(man2html,
+ [ --with-man2html=XXX use XXX rather than groff],
+ [cf_man2html=$withval],
+ [cf_man2html=$cf_man2html])
+
+cf_with_groff=no
+
+case $cf_man2html in
+(yes)
+ AC_MSG_RESULT(man2html)
+ AC_PATH_PROG(cf_man2html,man2html,no)
+ ;;
+(no|groff|*/groff*)
+ cf_with_groff=yes
+ cf_man2html=$GROFF_PATH
+ AC_MSG_RESULT($cf_man2html)
+ ;;
+(*)
+ AC_MSG_RESULT($cf_man2html)
+ ;;
+esac
+
+MAN2HTML_TEMP="man2html.tmp"
+ cat >$MAN2HTML_TEMP <<CF_EOF
+#!$SHELL
+# Temporary script generated by CF_WITH_MAN2HTML
+# Convert inputs to html, sending result to standard output.
+#
+# Parameters:
+# \${1} = rootname of file to convert
+# \${2} = suffix of file to convert, e.g., "1"
+# \${3} = macros to use, e.g., "man"
+#
+ROOT=\[$]1
+TYPE=\[$]2
+MACS=\[$]3
+
+unset LANG
+unset LC_ALL
+unset LC_CTYPE
+unset LANGUAGE
+GROFF_NO_SGR=stupid
+export GROFF_NO_SGR
+
+CF_EOF
+
+if test "x$cf_with_groff" = xyes
+then
+ MAN2HTML_NOTE="$GROFF_NOTE"
+ MAN2HTML_PATH="$GROFF_PATH"
+ cat >>$MAN2HTML_TEMP <<CF_EOF
+$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
+CF_EOF
+else
+ MAN2HTML_NOTE=""
+ CF_PATH_SYNTAX(cf_man2html)
+ MAN2HTML_PATH="$cf_man2html"
+ AC_MSG_CHECKING(for $cf_man2html top/bottom margins)
+
+ # for this example, expect 3 lines of content, the remainder is head/foot
+ cat >conftest.in <<CF_EOF
+.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
+.SH SECTION
+MARKER
+CF_EOF
+
+ LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
+
+ cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
+ cf_man2html_top=`expr $cf_man2html_1st - 2`
+ cf_man2html_bot=`wc -l conftest.out |sed -e 's/[[^0-9]]//g'`
+ cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
+ cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
+
+ AC_MSG_RESULT($cf_man2html_top_bot)
+
+ AC_MSG_CHECKING(for pagesize to use)
+ for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ do
+ cat >>conftest.in <<CF_EOF
+.nf
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+CF_EOF
+ done
+
+ LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
+ cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[[^0-9]]*://' -e 's/:.*//'`
+ test -z "$cf_man2html_page" && cf_man2html_page=99999
+ test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
+
+ rm -rf conftest*
+ AC_MSG_RESULT($cf_man2html_page)
+
+ cat >>$MAN2HTML_TEMP <<CF_EOF
+: \${MAN2HTML_PATH=$MAN2HTML_PATH}
+MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
+case \${TYPE} in
+(ms)
+ $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
+ ;;
+(*)
+ $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
+ ;;
+esac
+CF_EOF
+fi
+
+chmod 700 $MAN2HTML_TEMP
+
+AC_SUBST(MAN2HTML_NOTE)
+AC_SUBST(MAN2HTML_PATH)
+AC_SUBST(MAN2HTML_TEMP)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_NCURSES_ETC version: 5 updated: 2016/02/20 19:23:20
+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(screen,
+ [ --with-screen=XXX use specified curses-libraries],
+ [cf_cv_screen=$withval],[
+
+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
+(curses|curses_*)
+ CF_CURSES_CONFIG
+ ;;
+(ncursesw*)
+ CF_UTF8_LIB
+ CF_NCURSES_CONFIG($cf_cv_screen)
+ ;;
+(ncurses*)
+ CF_NCURSES_CONFIG($cf_cv_screen)
+ ;;
+(pdcurses)
+ CF_PDCURSES_X11
+ ;;
+(*)
+ AC_MSG_ERROR(unexpected screen-value: $cf_cv_screen)
+ ;;
+esac
+
+CF_NCURSES_PTHREADS($cf_cv_screen)
+
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_NO_LEAKS version: 3 updated: 2015/05/10 19:52:14
dnl ----------------
AC_DEFUN([CF_WITH_NO_LEAKS],[
@@ -4499,9 +5465,9 @@ AC_ARG_WITH(no-leaks,
[ --with-no-leaks test: free permanent memory, analyze leaks],
[AC_DEFINE(NO_LEAKS,1,[Define to 1 to enable leak-checking])
cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
- case ${cf_doalloc} in #(vi
- *yes*) ;;
- *) AC_DEFINE(DOALLOC,10000,[Define to size of malloc-array]) ;;
+ case ${cf_doalloc} in
+ (*yes*) ;;
+ (*) AC_DEFINE(DOALLOC,10000,[Define to size of malloc-array]) ;;
esac
with_no_leaks=yes],
[with_no_leaks=])
@@ -4543,7 +5509,7 @@ ifelse($1,,[
])
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_WITH_SHARED_OR_LIBTOOL version: 5 updated: 2013/09/02 09:17:44
+dnl CF_WITH_SHARED_OR_LIBTOOL version: 7 updated: 2014/11/02 16:11:49
dnl -------------------------
dnl Provide shared libraries using either autoconf macros (--with-shared) or
dnl using the external libtool script (--with-libtool).
@@ -4570,6 +5536,10 @@ LIBTOOL_MAKE="#"
MAKE_NORMAL=
MAKE_STATIC=
MAKE_SHARED="#"
+MAKE_DLLS="#"
+
+shlibdir=$libdir
+AC_SUBST(shlibdir)
CF_WITH_LIBTOOL
@@ -4581,6 +5551,7 @@ if test "$with_libtool" = "yes" ; then
DFT_LWR_MODEL=$LIB_MODEL
LIBTOOL_MAKE=
CF_WITH_LIBTOOL_OPTS
+ CF_WITH_EXPORT_SYMS
MAKE_NORMAL="#"
MAKE_STATIC="#"
MAKE_SHARED=
@@ -4595,6 +5566,7 @@ else
LIB_MODEL=shared
DFT_LWR_MODEL=$LIB_MODEL
CF_SHARED_OPTS
+ CF_WITH_VERSIONED_SYMS
LIB_PREP=:
LIB_CREATE="[$]MK_SHARED_LIB"
CFLAGS="$CFLAGS $CC_SHARED_OPTS"
@@ -4615,6 +5587,7 @@ AC_SUBST(LIB_MODEL)
AC_SUBST(LIBTOOL_MAKE)
+AC_SUBST(MAKE_DLLS)
AC_SUBST(MAKE_NORMAL)
AC_SUBST(MAKE_SHARED)
AC_SUBST(MAKE_STATIC)
@@ -4628,6 +5601,133 @@ CF_NO_LEAKS_OPTION(valgrind,
[USE_VALGRIND])
])dnl
dnl ---------------------------------------------------------------------------
+dnl CF_WITH_VERSIONED_SYMS version: 7 updated: 2015/10/24 20:50:26
+dnl ----------------------
+dnl Use this when building shared library with ELF, to markup symbols with the
+dnl version identifier from the given input file. Generally that identifier is
+dnl the same as the SONAME at which the symbol was first introduced.
+dnl
+dnl $1 = basename of the ".map" file (default $PACKAGE)
+AC_DEFUN([CF_WITH_VERSIONED_SYMS],
+[
+AC_MSG_CHECKING(if versioned-symbols file should be used)
+AC_ARG_WITH(versioned-syms,
+ [ --with-versioned-syms=X markup versioned symbols using ld],
+ [with_versioned_syms=$withval],
+ [with_versioned_syms=no])
+if test "x$with_versioned_syms" = xyes
+then
+ with_versioned_syms='${top_srcdir}/package/ifelse($1,,${PACKAGE},[$1]).map'
+ AC_SUBST(PACKAGE)
+fi
+AC_MSG_RESULT($with_versioned_syms)
+
+RESULTING_SYMS=
+VERSIONED_SYMS=
+WILDCARD_SYMS=
+
+if test "x$with_versioned_syms" != xno
+then
+ RESULTING_SYMS=$with_versioned_syms
+ case "x$MK_SHARED_LIB" in
+ (*-Wl,*)
+ VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
+ MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\[$]{VERSIONED_SYMS} -Wl,%"`
+ CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB)
+ ;;
+ (*-dy\ *)
+ VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
+ MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\[$]{VERSIONED_SYMS} -dy%"`
+ CF_VERBOSE(MK_SHARED_LIB: $MK_SHARED_LIB)
+ ;;
+ (*)
+ AC_MSG_WARN(this system does not support versioned-symbols)
+ ;;
+ esac
+
+ # Linux ld can selectively override scope, e.g., of symbols beginning with
+ # "_" by first declaring some as global, and then using a wildcard to
+ # declare the others as local. Some other loaders cannot do this. Check
+ # by constructing a (very) simple shared library and inspecting its
+ # symbols.
+ if test "x$VERSIONED_SYMS" != "x"
+ then
+ AC_MSG_CHECKING(if wildcards can be used to selectively omit symbols)
+ WILDCARD_SYMS=no
+
+ # make sources
+ rm -f conftest.*
+
+ cat >conftest.ver <<EOF
+module_1.0 {
+global:
+ globalf1;
+local:
+ localf1;
+};
+module_2.0 {
+global:
+ globalf2;
+local:
+ localf2;
+ _*;
+} module_1.0;
+submodule_1.0 {
+global:
+ subglobalf1;
+ _ismissing;
+local:
+ sublocalf1;
+};
+submodule_2.0 {
+global:
+ subglobalf2;
+local:
+ sublocalf2;
+ _*;
+} submodule_1.0;
+EOF
+ cat >conftest.$ac_ext <<EOF
+#line __oline__ "configure"
+int _ismissing(void) { return 1; }
+int _localf1(void) { return 1; }
+int _localf2(void) { return 2; }
+int globalf1(void) { return 1; }
+int globalf2(void) { return 2; }
+int _sublocalf1(void) { return 1; }
+int _sublocalf2(void) { return 2; }
+int subglobalf1(void) { return 1; }
+int subglobalf2(void) { return 2; }
+EOF
+ cat >conftest.mk <<EOF
+CC=${CC}
+CFLAGS=${CFLAGS}
+CPPFLAGS=${CPPFLAGS}
+LDFLAGS=${LDFLAGS}
+LIBS=${LIBS}
+VERSIONED_SYMS=${VERSIONED_SYMS}
+RESULTING_SYMS=conftest.ver
+MK_SHARED_LIB=${MK_SHARED_LIB}
+conftest.so: conftest.$ac_cv_objext
+ \$(MK_SHARED_LIB) conftest.$ac_cv_objext
+EOF
+
+ # compile source, make library
+ if make -f conftest.mk 2>&AC_FD_CC >/dev/null
+ then
+ # test for missing symbol in either Data or Text section
+ cf_missing=`nm -P conftest.so 2>&AC_FD_CC |fgrep _ismissing | egrep '[[ ]][[DT]][[ ]]'`
+ test -n "$cf_missing" && WILDCARD_SYMS=yes
+ fi
+ AC_MSG_RESULT($WILDCARD_SYMS)
+ rm -f conftest.*
+ fi
+fi
+AC_SUBST(RESULTING_SYMS)
+AC_SUBST(VERSIONED_SYMS)
+AC_SUBST(WILDCARD_SYMS)
+])dnl
+dnl ---------------------------------------------------------------------------
dnl CF_WITH_WARNINGS version: 5 updated: 2004/07/23 14:40:34
dnl ----------------
dnl Combine the checks for gcc features into a configure-script option
@@ -4651,7 +5751,7 @@ fi
fi
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_CURSES version: 11 updated: 2011/01/18 18:15:30
+dnl CF_XOPEN_CURSES version: 14 updated: 2018/06/20 20:23:13
dnl ---------------
dnl Test if we should define X/Open source for curses, needed on Digital Unix
dnl 4.x, to see the extended functions, but breaks on IRIX 6.x.
@@ -4661,7 +5761,8 @@ dnl as getbegy(). The latter is better design, but the former is standard.
AC_DEFUN([CF_XOPEN_CURSES],
[
AC_REQUIRE([CF_CURSES_CPPFLAGS])dnl
-AC_CACHE_CHECK(if we must define _XOPEN_SOURCE_EXTENDED,cf_cv_need_xopen_extension,[
+AC_CACHE_CHECK(definition to turn on extended curses functions,cf_cv_need_xopen_extension,[
+cf_cv_need_xopen_extension=unknown
AC_TRY_LINK([
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>],[
@@ -4670,14 +5771,6 @@ AC_TRY_LINK([
make an error
#endif
#endif
- long x = winnstr(stdscr, "", 0);
- int x1, y1;
- getbegyx(stdscr, y1, x1)],
- [cf_cv_need_xopen_extension=no],
- [AC_TRY_LINK([
-#define _XOPEN_SOURCE_EXTENDED
-#include <stdlib.h>
-#include <${cf_cv_ncurses_header:-curses.h}>],[
#ifdef NCURSES_VERSION
cchar_t check;
int check2 = curs_set((int)sizeof(check));
@@ -4685,12 +5778,35 @@ AC_TRY_LINK([
long x = winnstr(stdscr, "", 0);
int x1, y1;
getbegyx(stdscr, y1, x1)],
- [cf_cv_need_xopen_extension=yes],
- [cf_cv_need_xopen_extension=unknown])])])
-test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
+ [cf_cv_need_xopen_extension=none],
+ [
+ for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
+ do
+ AC_TRY_LINK([
+#define $cf_try_xopen_extension 1
+#include <stdlib.h>
+#include <${cf_cv_ncurses_header:-curses.h}>],[
+#ifdef NCURSES_VERSION
+ cchar_t check;
+ int check2 = curs_set((int)sizeof(check));
+#endif
+ long x = winnstr(stdscr, "", 0);
+ int x1, y1;
+ getbegyx(stdscr, y1, x1)],
+ [cf_cv_need_xopen_extension=$cf_try_xopen_extension; break])
+ done
+ ])
+])
+
+case $cf_cv_need_xopen_extension in
+(*_*)
+ CF_APPEND_TEXT(CPPFLAGS,-D$cf_cv_need_xopen_extension)
+ ;;
+esac
+
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF_XOPEN_SOURCE version: 45 updated: 2013/09/07 14:06:25
+dnl CF_XOPEN_SOURCE version: 53 updated: 2018/06/16 18:58:58
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,
@@ -4706,21 +5822,21 @@ cf_XOPEN_SOURCE=ifelse([$1],,500,[$1])
cf_POSIX_C_SOURCE=ifelse([$2],,199506L,[$2])
cf_xopen_source=
-case $host_os in #(vi
-aix[[4-7]]*) #(vi
+case $host_os in
+(aix[[4-7]]*)
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin|msys) #(vi
+(msys)
cf_XOPEN_SOURCE=600
;;
-darwin[[0-8]].*) #(vi
+(darwin[[0-8]].*)
cf_xopen_source="-D_APPLE_C_SOURCE"
;;
-darwin*) #(vi
+(darwin*)
cf_xopen_source="-D_DARWIN_C_SOURCE"
cf_XOPEN_SOURCE=
;;
-freebsd*|dragonfly*) #(vi
+(freebsd*|dragonfly*)
# 5.x headers associate
# _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
# _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
@@ -4728,55 +5844,63 @@ freebsd*|dragonfly*) #(vi
cf_XOPEN_SOURCE=600
cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
;;
-hpux11*) #(vi
+(hpux11*)
cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
;;
-hpux*) #(vi
+(hpux*)
cf_xopen_source="-D_HPUX_SOURCE"
;;
-irix[[56]].*) #(vi
+(irix[[56]].*)
cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE=
;;
-linux*|gnu*|mint*|k*bsd*-gnu) #(vi
- CF_GNU_SOURCE
+(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+ CF_GNU_SOURCE($cf_XOPEN_SOURCE)
;;
-mirbsd*) #(vi
+(minix*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
+ ;;
+(mirbsd*)
# 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
+(netbsd*)
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
+(openbsd[[4-9]]*)
# 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
+(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
-osf[[45]]*) #(vi
+(osf[[45]]*)
cf_xopen_source="-D_OSF_SOURCE"
;;
-nto-qnx*) #(vi
+(nto-qnx*)
cf_xopen_source="-D_QNX_SOURCE"
;;
-sco*) #(vi
+(sco*)
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.*) #(vi
+(solaris2.*)
cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
;;
-*)
+(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
+ cf_XOPEN_SOURCE=
+ cf_POSIX_C_SOURCE=
+ ;;
+(*)
CF_TRY_XOPEN_SOURCE
CF_POSIX_C_SOURCE($cf_POSIX_C_SOURCE)
;;
esac
if test -n "$cf_xopen_source" ; then
- CF_ADD_CFLAGS($cf_xopen_source)
+ CF_ADD_CFLAGS($cf_xopen_source,true)
fi
dnl In anything but the default case, we may have system-specific setting
@@ -4809,7 +5933,339 @@ make an error
fi
])
dnl ---------------------------------------------------------------------------
-dnl CF__ADD_SHLIB_RULES version: 4 updated: 2013/07/22 18:49:24
+dnl CF_X_ATHENA version: 23 updated: 2015/04/12 15:39:00
+dnl -----------
+dnl Check for Xaw (Athena) libraries
+dnl
+dnl Sets $cf_x_athena according to the flavor of Xaw which is used.
+AC_DEFUN([CF_X_ATHENA],
+[
+cf_x_athena=${cf_x_athena:-Xaw}
+
+AC_MSG_CHECKING(if you want to link with Xaw 3d library)
+withval=
+AC_ARG_WITH(Xaw3d,
+ [ --with-Xaw3d link with Xaw 3d library])
+if test "$withval" = yes ; then
+ cf_x_athena=Xaw3d
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if you want to link with Xaw 3d xft library)
+withval=
+AC_ARG_WITH(Xaw3dxft,
+ [ --with-Xaw3dxft link with Xaw 3d xft library])
+if test "$withval" = yes ; then
+ cf_x_athena=Xaw3dxft
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if you want to link with neXT Athena library)
+withval=
+AC_ARG_WITH(neXtaw,
+ [ --with-neXtaw link with neXT Athena library])
+if test "$withval" = yes ; then
+ cf_x_athena=neXtaw
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+AC_MSG_CHECKING(if you want to link with Athena-Plus library)
+withval=
+AC_ARG_WITH(XawPlus,
+ [ --with-XawPlus link with Athena-Plus library])
+if test "$withval" = yes ; then
+ cf_x_athena=XawPlus
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+
+cf_x_athena_lib=""
+
+if test "$PKG_CONFIG" != none ; then
+ cf_athena_list=
+ test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
+ for cf_athena_pkg in \
+ $cf_athena_list \
+ ${cf_x_athena} \
+ ${cf_x_athena}-devel \
+ lib${cf_x_athena} \
+ lib${cf_x_athena}-devel
+ do
+ CF_TRY_PKG_CONFIG($cf_athena_pkg,[
+ cf_x_athena_lib="$cf_pkgconfig_libs"
+ 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>
+],[
+int check = XmuCompareISOLatin1("big", "small")
+],[cf_cv_xaw_compat=yes],[cf_cv_xaw_compat=no])])
+
+ if test "$cf_cv_xaw_compat" = no
+ then
+ # workaround for broken ".pc" files...
+ case "$cf_x_athena_lib" in
+ (*-lXmu*)
+ ;;
+ (*)
+ CF_VERBOSE(work around broken package)
+ 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
+
+ break])
+ done
+fi
+
+if test -z "$cf_x_athena_lib" ; then
+ CF_X_EXT
+ CF_X_TOOLKIT
+ CF_X_ATHENA_CPPFLAGS($cf_x_athena)
+ CF_X_ATHENA_LIBS($cf_x_athena)
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_X_ATHENA_CPPFLAGS version: 6 updated: 2018/06/20 20:23:13
+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.
+AC_DEFUN([CF_X_ATHENA_CPPFLAGS],
+[
+cf_x_athena_root=ifelse([$1],,Xaw,[$1])
+cf_x_athena_inc=""
+
+for cf_path in default \
+ /usr/contrib/X11R6 \
+ /usr/contrib/X11R5 \
+ /usr/lib/X11R5 \
+ /usr/local
+do
+ if test -z "$cf_x_athena_inc" ; then
+ cf_save="$CPPFLAGS"
+ cf_test=X11/$cf_x_athena_root/SimpleMenu.h
+ if test $cf_path != default ; then
+ CPPFLAGS="$cf_save"
+ CF_APPEND_TEXT(CPPFLAGS,-I$cf_path/include)
+ AC_MSG_CHECKING(for $cf_test in $cf_path)
+ else
+ AC_MSG_CHECKING(for $cf_test)
+ fi
+ AC_TRY_COMPILE([
+#include <X11/Intrinsic.h>
+#include <$cf_test>],[],
+ [cf_result=yes],
+ [cf_result=no])
+ AC_MSG_RESULT($cf_result)
+ if test "$cf_result" = yes ; then
+ cf_x_athena_inc=$cf_path
+ break
+ else
+ CPPFLAGS="$cf_save"
+ fi
+ fi
+done
+
+if test -z "$cf_x_athena_inc" ; then
+ AC_MSG_WARN(
+[Unable to successfully find Athena header files with test program])
+elif test "$cf_x_athena_inc" != default ; then
+ CF_APPEND_TEXT(CPPFLAGS,-I$cf_x_athena_inc)
+fi
+])
+dnl ---------------------------------------------------------------------------
+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.
+AC_DEFUN([CF_X_ATHENA_LIBS],
+[AC_REQUIRE([CF_X_TOOLKIT])
+cf_x_athena_root=ifelse([$1],,Xaw,[$1])
+cf_x_athena_lib=""
+
+for cf_path in default \
+ /usr/contrib/X11R6 \
+ /usr/contrib/X11R5 \
+ /usr/lib/X11R5 \
+ /usr/local
+do
+ for cf_lib in \
+ ${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_libs)
+ AC_MSG_CHECKING(for $cf_libs in $cf_path)
+ else
+ CF_ADD_LIBS($cf_libs)
+ AC_MSG_CHECKING(for $cf_test in $cf_libs)
+ fi
+ AC_TRY_LINK([
+#include <X11/Intrinsic.h>
+#include <X11/$cf_x_athena_root/SimpleMenu.h>
+],[
+$cf_test((XtAppContext) 0)],
+ [cf_result=yes],
+ [cf_result=no])
+ AC_MSG_RESULT($cf_result)
+ if test "$cf_result" = yes ; then
+ cf_x_athena_lib="$cf_libs"
+ break
+ fi
+ LIBS="$cf_save"
+ fi
+ done # cf_libs
+ test -n "$cf_x_athena_lib" && break
+ done # cf_lib
+done
+
+if test -z "$cf_x_athena_lib" ; then
+ AC_MSG_ERROR(
+[Unable to successfully link Athena library (-l$cf_x_athena_root) with test program])
+fi
+
+CF_UPPER(cf_x_athena_LIBS,HAVE_LIB_$cf_x_athena)
+AC_DEFINE_UNQUOTED($cf_x_athena_LIBS)
+])
+dnl ---------------------------------------------------------------------------
+dnl CF_X_EXT version: 3 updated: 2010/06/02 05:03:05
+dnl --------
+AC_DEFUN([CF_X_EXT],[
+CF_TRY_PKG_CONFIG(Xext,,[
+ AC_CHECK_LIB(Xext,XextCreateExtension,
+ [CF_ADD_LIB(Xext)])])
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_X_TOOLKIT version: 23 updated: 2015/04/12 15:39:00
+dnl ------------
+dnl Check for X Toolkit libraries
+AC_DEFUN([CF_X_TOOLKIT],
+[
+AC_REQUIRE([AC_PATH_XTRA])
+AC_REQUIRE([CF_CHECK_CACHE])
+
+# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
+# in some cases has installed dummy files in the former, other cases replaced
+# it with a link to the new location). This complicates the configure script.
+# Check for that pitfall, and recover using pkg-config
+#
+# If none of these are set, the configuration is almost certainly broken.
+if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
+then
+ CF_TRY_PKG_CONFIG(x11,,[AC_MSG_WARN(unable to find X11 library)])
+ CF_TRY_PKG_CONFIG(ice,,[AC_MSG_WARN(unable to find ICE library)])
+ CF_TRY_PKG_CONFIG(sm,,[AC_MSG_WARN(unable to find SM library)])
+ CF_TRY_PKG_CONFIG(xt,,[AC_MSG_WARN(unable to find Xt library)])
+fi
+
+cf_have_X_LIBS=no
+
+CF_TRY_PKG_CONFIG(xt,[
+
+ case "x$LIBS" in
+ (*-lX11*)
+ ;;
+ (*)
+# we have an "xt" package, but it may omit Xt's dependency on X11
+AC_CACHE_CHECK(for usable X dependency,cf_cv_xt_x11_compat,[
+AC_TRY_LINK([
+#include <X11/Xlib.h>
+],[
+ int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
+ int rc2 = XClearWindow((Display*) 0, (Window) 0);
+ int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
+ int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
+],[cf_cv_xt_x11_compat=yes],[cf_cv_xt_x11_compat=no])])
+ if test "$cf_cv_xt_x11_compat" = no
+ then
+ CF_VERBOSE(work around broken X11 dependency)
+ # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
+ CF_TRY_PKG_CONFIG(x11,,[CF_ADD_LIB_AFTER(-lXt,-lX11)])
+ fi
+ ;;
+ esac
+
+AC_CACHE_CHECK(for usable X Toolkit package,cf_cv_xt_ice_compat,[
+AC_TRY_LINK([
+#include <X11/Shell.h>
+],[int num = IceConnectionNumber(0)
+],[cf_cv_xt_ice_compat=yes],[cf_cv_xt_ice_compat=no])])
+
+ if test "$cf_cv_xt_ice_compat" = no
+ then
+ # workaround for broken ".pc" files used for X Toolkit.
+ case "x$X_PRE_LIBS" in
+ (*-lICE*)
+ case "x$LIBS" in
+ (*-lICE*)
+ ;;
+ (*)
+ CF_VERBOSE(work around broken ICE dependency)
+ CF_TRY_PKG_CONFIG(ice,
+ [CF_TRY_PKG_CONFIG(sm)],
+ [CF_ADD_LIB_AFTER(-lXt,$X_PRE_LIBS)])
+ ;;
+ esac
+ ;;
+ esac
+ fi
+
+ cf_have_X_LIBS=yes
+],[
+
+ LDFLAGS="$X_LIBS $LDFLAGS"
+ CF_CHECK_CFLAGS($X_CFLAGS)
+
+ AC_CHECK_FUNC(XOpenDisplay,,[
+ AC_CHECK_LIB(X11,XOpenDisplay,
+ [CF_ADD_LIB(X11)],,
+ [$X_PRE_LIBS $LIBS $X_EXTRA_LIBS])])
+
+ AC_CHECK_FUNC(XtAppInitialize,,[
+ AC_CHECK_LIB(Xt, XtAppInitialize,
+ [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])])
+])
+
+if test $cf_have_X_LIBS = no ; then
+ AC_MSG_WARN(
+[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.])
+fi
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF__ADD_SHLIB_RULES version: 6 updated: 2016/04/21 21:07:50
dnl -------------------
dnl Append rules for creating, installing, uninstalling and cleaning library.
dnl In particular, this is needed for shared libraries since there are symbolic
@@ -4830,10 +6286,10 @@ define([CF__ADD_SHLIB_RULES],[
CF__DEFINE_LIB_TARGET
case x$2 in
-xlibtool|xshared) #(vi
+(xlibtool|xshared)
cf_libdeps="ifelse($4,,,[$4])"
;;
-x*)
+(x*)
cf_libdeps=
;;
esac
@@ -4887,7 +6343,7 @@ fi
if test x$2 = xshared
then
cat >>$1 <<CF_EOF
- - test -z "\$(DESTDIR)" && /sbin/ldconfig
+ - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
CF_EOF
fi
@@ -4950,27 +6406,7 @@ char * XCursesProgramName = "test";
#endif
])
dnl ---------------------------------------------------------------------------
-dnl CF__CURSES_HEAD version: 2 updated: 2010/10/23 15:54:49
-dnl ---------------
-dnl Define a reusable chunk which includes <curses.h> and <term.h> when they
-dnl are both available.
-define([CF__CURSES_HEAD],[
-#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
-])
-dnl ---------------------------------------------------------------------------
-dnl CF__DEFINE_LIB_TARGET version: 1 updated: 2013/07/22 18:27:50
+dnl CF__DEFINE_LIB_TARGET version: 2 updated: 2015/05/10 19:52:14
dnl ---------------------
define([CF__DEFINE_LIB_TARGET],[
cf_libname=\${LIB_BASENAME}
@@ -4979,12 +6415,12 @@ cf_libroot=$cf_libname
if test "x$cf_cv_do_symlinks" = xyes
then
- case "x$cf_cv_shlib_version" in #(vi
- xrel) #(vi
+ case "x$cf_cv_shlib_version" in
+ (xrel)
cf_liblink="\${LIB_ABI_NAME}"
cf_libname="\${LIB_REL_NAME}"
;;
- xabi)
+ (xabi)
cf_liblink="\${LIB_REL_NAME}"
cf_libname="\${LIB_ABI_NAME}"
;;
@@ -4993,12 +6429,12 @@ fi
LIB_TARGET=$cf_libname
])dnl
dnl ---------------------------------------------------------------------------
-dnl CF__DEFINE_SHLIB_VARS version: 2 updated: 2013/07/27 17:38:32
+dnl CF__DEFINE_SHLIB_VARS version: 4 updated: 2015/09/28 17:49:10
dnl ---------------------
dnl Substitute makefile variables useful for CF__ADD_SHLIB_RULES.
dnl
dnl The substitution requires these variables:
-dnl LIB_PREFI - "lib"
+dnl LIB_PREFIX - "lib"
dnl LIB_ROOTNAME - "foo"
dnl LIB_SUFFIX - ".so"
dnl REL_VERSION - "5.0"
@@ -5006,7 +6442,7 @@ dnl ABI_VERSION - "4.2.4"
define([CF__DEFINE_SHLIB_VARS],[
CF__DEFINE_LIB_TARGET
SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
-LIB_BASENAME = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
+LIB_BASENAME = \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}\\
LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}\\
LIB_TARGET = $LIB_TARGET\\
@@ -5049,15 +6485,17 @@ cf_cv_do_symlinks="$cf_cv_do_symlinks"
cf_cv_shlib_version="$cf_cv_shlib_version"
])
dnl ---------------------------------------------------------------------------
-dnl CF__INTL_BODY version: 1 updated: 2007/07/26 17:35:47
+dnl CF__INTL_BODY version: 3 updated: 2017/07/10 20:13:33
dnl -------------
dnl Test-code needed for libintl compile-checks
dnl $1 = parameter 2 from AM_WITH_NLS
define([CF__INTL_BODY],[
- bindtextdomain ("", "");
- return (int) gettext ("")
- ifelse([$1], need-ngettext, [ + (int) ngettext ("", "", 0)], [])
- [ + _nl_msg_cat_cntr]
+ bindtextdomain ("", "");
+ return (int) gettext ("")
+ ifelse([$1], need-ngettext, [ + (int) ngettext ("", "", 0)], [])
+#ifndef IGNORE_MSGFMT_HACK
+ [ + _nl_msg_cat_cntr]
+#endif
])
dnl ---------------------------------------------------------------------------
dnl CF__INTL_HEAD version: 1 updated: 2007/07/26 17:35:47
@@ -5068,7 +6506,7 @@ define([CF__INTL_HEAD],[
extern int _nl_msg_cat_cntr;
])dnl
dnl ---------------------------------------------------------------------------
-dnl jm_GLIBC21 version: 3 updated: 2002/10/27 23:21:42
+dnl jm_GLIBC21 version: 4 updated: 2015/05/10 19:52:14
dnl ----------
dnl Inserted as requested by gettext 0.10.40
dnl File from /usr/share/aclocal
@@ -5079,10 +6517,10 @@ dnl
dnl Test for the GNU C Library, version 2.1 or newer.
dnl From Bruno Haible.
AC_DEFUN([jm_GLIBC21],
- [
- AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
- ac_cv_gnu_library_2_1,
- [AC_EGREP_CPP([Lucky GNU user],
+[
+AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
[
#include <features.h>
#ifdef __GNU_LIBRARY__
@@ -5092,10 +6530,7 @@ AC_DEFUN([jm_GLIBC21],
#endif
],
ac_cv_gnu_library_2_1=yes,
- ac_cv_gnu_library_2_1=no)
- ]
- )
- AC_SUBST(GLIBC21)
- GLIBC21="$ac_cv_gnu_library_2_1"
- ]
-)
+ ac_cv_gnu_library_2_1=no)])
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+])
diff --git a/contrib/dialog/argv.c b/contrib/dialog/argv.c
index 7416054543be..46acfa6c7bea 100644
--- a/contrib/dialog/argv.c
+++ b/contrib/dialog/argv.c
@@ -1,9 +1,9 @@
/*
- * $Id: argv.c,v 1.2 2012/11/30 20:28:23 tom Exp $
+ * $Id: argv.c,v 1.12 2018/06/12 22:47:23 tom Exp $
*
* argv - Reusable functions for argv-parsing.
*
- * Copyright 2011,2012 Thomas E. Dickey
+ * Copyright 2011-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -32,19 +32,42 @@
char **
dlg_string_to_argv(char *blob)
{
- size_t n;
+ size_t n, k;
int pass;
size_t length = strlen(blob);
char **result = 0;
+#ifdef HAVE_DLG_TRACE
+ if (dialog_state.trace_output) {
+ DLG_TRACE(("# dlg_string_to_argv:\n"));
+ DLG_TRACE(("# given:\n"));
+ for (n = k = 0; n < length; ++n) {
+ if (blob[n] == '\n') {
+ DLG_TRACE(("#%s\t%.*s\\n\n",
+ k ? "+" : "",
+ (int) (n - k), blob + k));
+ k = n + 1;
+ }
+ }
+ if (n > k) {
+ DLG_TRACE(("#%s\t%.*s\n",
+ k ? "+" : "",
+ (int) (n - k), blob + k));
+ }
+ DLG_TRACE(("# result:\n"));
+ }
+#endif
for (pass = 0; pass < 2; ++pass) {
bool inparm = FALSE;
bool quoted = FALSE;
+ bool escape = FALSE;
char *param = blob;
size_t count = 0;
for (n = 0; n < length; ++n) {
- if (quoted && blob[n] == '"') {
+ if (escape) {
+ ;
+ } else if (quoted && blob[n] == '"') {
quoted = FALSE;
} else if (blob[n] == '"') {
quoted = TRUE;
@@ -54,20 +77,32 @@ dlg_string_to_argv(char *blob)
++count;
inparm = TRUE;
}
- } else if (blob[n] == '\\') {
- if (quoted && !isspace(UCH(blob[n + 1]))) {
+ } else if (!quoted && isspace(UCH(blob[n]))) {
+ if (inparm) {
if (pass) {
- *param++ = blob[n];
- *param++ = blob[n + 1];
+ *param++ = '\0';
}
- }
- ++n;
- } else if (!quoted && isspace(UCH(blob[n]))) {
- inparm = FALSE;
- if (pass) {
- *param++ = '\0';
+ inparm = FALSE;
}
} else {
+ if (blob[n] == '\\') {
+ if (n + 1 == length) {
+ break; /* The string is terminated by a backslash */
+ } else if ((blob[n + 1] == '\\') ||
+ (blob[n + 1] == '"') ||
+ (!quoted && blob[n + 1] == '\n')) {
+ /* eat the backslash */
+ if (pass) {
+ --length;
+ for (k = n; k < length; ++k)
+ blob[k] = blob[k + 1];
+ blob[length] = '\0';
+ } else {
+ escape = TRUE;
+ continue;
+ }
+ }
+ }
if (!inparm) {
if (pass)
result[count] = param;
@@ -78,6 +113,7 @@ dlg_string_to_argv(char *blob)
*param++ = blob[n];
}
}
+ escape = FALSE;
}
if (!pass) {
@@ -91,6 +127,13 @@ dlg_string_to_argv(char *blob)
*param = '\0';
}
}
+#ifdef HAVE_DLG_TRACE
+ if (result != 0) {
+ for (n = 0; result[n] != 0; ++n) {
+ DLG_TRACE(("#\targv[%d] = %s\n", (int) n, result[n]));
+ }
+ }
+#endif
return result;
}
diff --git a/contrib/dialog/arrows.c b/contrib/dialog/arrows.c
index 44a90dfdcba4..28f681a0379b 100644
--- a/contrib/dialog/arrows.c
+++ b/contrib/dialog/arrows.c
@@ -1,9 +1,9 @@
/*
- * $Id: arrows.c,v 1.51 2013/09/02 15:10:09 tom Exp $
+ * $Id: arrows.c,v 1.52 2018/06/18 22:10:54 tom Exp $
*
* arrows.c -- draw arrows to indicate end-of-range for lists
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2013,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -125,11 +125,11 @@ dlg_draw_arrows2(WINDOW *win,
if (draw_top) {
(void) wmove(win, top, x);
if (top_arrow) {
- (void) wattrset(win, merge_colors(uarrow_attr, attr));
+ dlg_attrset(win, merge_colors(uarrow_attr, attr));
(void) add_acs(win, ACS_UARROW);
(void) waddstr(win, "(-)");
} else {
- (void) wattrset(win, attr);
+ dlg_attrset(win, attr);
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
}
}
@@ -137,11 +137,11 @@ dlg_draw_arrows2(WINDOW *win,
(void) wmove(win, bottom, x);
if (bottom_arrow) {
- (void) wattrset(win, merge_colors(darrow_attr, borderattr));
+ dlg_attrset(win, merge_colors(darrow_attr, borderattr));
(void) add_acs(win, ACS_DARROW);
(void) waddstr(win, "(+)");
} else {
- (void) wattrset(win, borderattr);
+ dlg_attrset(win, borderattr);
(void) whline(win, dlg_boxchar(ACS_HLINE), ON_LEFT);
}
mouse_mkbutton(bottom, x - 1, 6, KEY_NPAGE);
@@ -149,7 +149,7 @@ dlg_draw_arrows2(WINDOW *win,
(void) wmove(win, cur_y, cur_x);
wrefresh(win);
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
void
@@ -188,12 +188,12 @@ dlg_draw_scrollbar(WINDOW *win,
else if (percent > 100)
percent = 100;
- (void) wattrset(win, position_indicator_attr);
+ dlg_attrset(win, position_indicator_attr);
(void) sprintf(buffer, "%d%%", percent);
(void) wmove(win, bottom, right - 7);
(void) waddstr(win, buffer);
if ((len = dlg_count_columns(buffer)) < 4) {
- (void) wattrset(win, border_attr);
+ dlg_attrset(win, border_attr);
whline(win, dlg_boxchar(ACS_HLINE), 4 - len);
}
}
@@ -220,7 +220,7 @@ dlg_draw_scrollbar(WINDOW *win,
wmove(win, top + 1, right);
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
wvline(win, ACS_VLINE | A_REVERSE, all_high);
bar_y = ORDSIZE(this_data);
@@ -232,8 +232,8 @@ dlg_draw_scrollbar(WINDOW *win,
wmove(win, top + 1 + bar_y, right);
- (void) wattrset(win, position_indicator_attr);
- wattron(win, A_REVERSE);
+ dlg_attrset(win, position_indicator_attr);
+ dlg_attron(win, A_REVERSE);
#if defined(WACS_BLOCK) && defined(NCURSES_VERSION) && defined(USE_WIDE_CURSES)
wvline_set(win, WACS_BLOCK, bar_last - bar_y);
#else
@@ -251,7 +251,7 @@ dlg_draw_scrollbar(WINDOW *win,
attr,
borderattr);
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
wmove(win, oldy, oldx);
}
diff --git a/contrib/dialog/buildlist.c b/contrib/dialog/buildlist.c
index 2c3e1995bd62..639056ff25b6 100644
--- a/contrib/dialog/buildlist.c
+++ b/contrib/dialog/buildlist.c
@@ -1,9 +1,9 @@
/*
- * $Id: buildlist.c,v 1.59 2013/09/02 17:01:02 tom Exp $
+ * $Id: buildlist.c,v 1.83 2018/06/19 22:57:01 tom Exp $
*
* buildlist.c -- implements the buildlist dialog
*
- * Copyright 2012,2013 Thomas E. Dickey
+ * Copyright 2012-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -31,7 +31,6 @@
#define sLEFT (-2)
#define sRIGHT (-1)
-#define KEY_TOGGLE ' '
#define KEY_LEFTCOL '^'
#define KEY_RIGHTCOL '$'
@@ -43,10 +42,22 @@ typedef struct {
int box_x;
int top_index;
int cur_index;
+ DIALOG_LISTITEM **ip; /* pointers to items in this list */
} MY_DATA;
+#if 0
+#define TRACE(p) dlg_trace_msg p
+#else
+#define TRACE(p) /* nothing */
+#endif
+
+#define okIndex(all,index) ((index) >= 0 && (index) < (all)->item_no)
+
+#define myItem(p,n) ((p)->ip)[n]
+#define mySide(n) ((n)?"right":"left")
+
typedef struct {
- DIALOG_LISTITEM *items;
+ DIALOG_LISTITEM *items; /* all items in the widget */
int base_y; /* base for mouse coordinates */
int base_x;
int use_height; /* actual size of column box */
@@ -58,33 +69,81 @@ typedef struct {
} ALL_DATA;
/*
+ * Translate a choice from items[] to a row-number in an unbounded column,
+ * starting at zero.
+ */
+static int
+index2row(ALL_DATA * all, int choice, int selected)
+{
+ MY_DATA *data = all->list + selected;
+ int result = -1;
+ int row;
+
+ if (okIndex(all, choice)) {
+ for (row = 0; row < all->item_no; ++row) {
+ TRACE(("!... choice %d: %p vs row %d: %p\n",
+ choice, all->items + choice,
+ row, myItem(data, row)));
+ if (myItem(data, row) == all->items + choice) {
+ result = row;
+ break;
+ }
+ }
+ }
+ TRACE(("! index2row(choice %d, %s) = %d\n", choice, mySide(selected), result));
+ return result;
+}
+
+/*
+ * Convert a row-number back to an item number, i.e., index into items[].
+ */
+static int
+row2index(ALL_DATA * all, int row, int selected)
+{
+ MY_DATA *data = all->list + selected;
+ int result = -1;
+ int n;
+ for (n = 0; n < all->item_no; ++n) {
+ TRACE(("!... row %d: %p vs choice %d: %p\n",
+ row, myItem(data, row),
+ n, all->items + n));
+ if (myItem(data, row) == all->items + n) {
+ result = n;
+ break;
+ }
+ }
+ TRACE(("! row2index(row %d, %s) = %d\n", row, mySide(selected), result));
+ return result;
+}
+
+/*
* Print list item. The 'selected' parameter is true if 'choice' is the
* current item. That one is colored differently from the other items.
*/
static void
-print_item(ALL_DATA * data,
+print_item(ALL_DATA * all,
WINDOW *win,
DIALOG_LISTITEM * item,
- int choice,
+ int row,
int selected)
{
chtype save = dlg_get_attrs(win);
int i;
bool both = (!dialog_vars.no_tags && !dialog_vars.no_items);
bool first = TRUE;
- int climit = (data->item_x - data->check_x - 1);
+ int climit = (all->item_x - all->check_x - 1);
const char *show = (dialog_vars.no_items
? item->name
: item->text);
/* Clear 'residue' of last item */
- (void) wattrset(win, menubox_attr);
- (void) wmove(win, choice, 0);
+ dlg_attrset(win, menubox_attr);
+ (void) wmove(win, row, 0);
for (i = 0; i < getmaxx(win); i++)
(void) waddch(win, ' ');
- (void) wmove(win, choice, data->check_x);
- (void) wattrset(win, menubox_attr);
+ (void) wmove(win, row, all->check_x);
+ dlg_attrset(win, menubox_attr);
if (both) {
dlg_print_listitem(win, item->name, climit, first, selected);
@@ -92,44 +151,54 @@ print_item(ALL_DATA * data,
first = FALSE;
}
- (void) wmove(win, choice, data->item_x);
- climit = (getmaxx(win) - data->item_x + 1);
+ (void) wmove(win, row, all->item_x);
+ climit = (getmaxx(win) - all->item_x + 1);
dlg_print_listitem(win, show, climit, first, selected);
if (selected) {
dlg_item_help(item->help);
}
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
/*
* Prints either the left (unselected) or right (selected) list.
*/
static void
-print_1_list(ALL_DATA * data,
+print_1_list(ALL_DATA * all,
int choice,
int selected)
{
- MY_DATA *moi = data->list + selected;
- WINDOW *win = moi->win;
+ MY_DATA *data = all->list + selected;
+ DIALOG_LISTITEM *target = (okIndex(all, choice)
+ ? all->items + choice
+ : 0);
+ WINDOW *win = data->win;
int i, j;
int last = 0;
+ int top_row = index2row(all, data->top_index, selected);
int max_rows = getmaxy(win);
+ TRACE(("! print_1_list %d %s, top %d\n", choice, mySide(selected), top_row));
for (i = j = 0; j < max_rows; i++) {
- int ii = i + moi->top_index;
- if (ii >= data->item_no) {
- break;
- } else if (!(selected ^ (data->items[ii].state != 0))) {
- print_item(data,
+ int ii = i + top_row;
+ if (ii < 0) {
+ continue;
+ } else if (myItem(data, ii)) {
+ print_item(all,
win,
- &data->items[ii],
- j, ii == choice);
+ myItem(data, ii),
+ j, myItem(data, ii) == target);
last = ++j;
+ } else {
+ break;
+ }
+ }
+ if (wmove(win, last, 0) != ERR) {
+ while (waddch(win, ' ') != ERR) {
+ ;
}
}
- if (wmove(win, last, 0) != ERR)
- wclrtobot(win);
(void) wnoutrefresh(win);
}
@@ -138,17 +207,15 @@ print_1_list(ALL_DATA * data,
* further movement is possible, return the same choice as given.
*/
static int
-prev_item(ALL_DATA * data, int choice, int selected)
+prev_item(ALL_DATA * all, int choice, int selected)
{
int result = choice;
- int n;
-
- for (n = choice - 1; n >= 0; --n) {
- if ((data->items[n].state != 0) == selected) {
- result = n;
- break;
- }
+ int row = index2row(all, choice, selected);
+ if (row > 0) {
+ row--;
+ result = row2index(all, row, selected);
}
+ TRACE(("! prev_item choice %d, %s = %d\n", choice, mySide(selected), result));
return result;
}
@@ -156,9 +223,9 @@ prev_item(ALL_DATA * data, int choice, int selected)
* Return true if the given choice is on the first page in the current column.
*/
static bool
-stop_prev(ALL_DATA * data, int choice, int selected)
+stop_prev(ALL_DATA * all, int choice, int selected)
{
- return (prev_item(data, choice, selected) == choice);
+ return (prev_item(all, choice, selected) == choice);
}
static bool
@@ -182,37 +249,16 @@ check_hotkey(DIALOG_LISTITEM * items, int choice, int selected)
* further movement is possible, return the same choice as given.
*/
static int
-next_item(ALL_DATA * data, int choice, int selected)
+next_item(ALL_DATA * all, int choice, int selected)
{
+ MY_DATA *data = all->list + selected;
int result = choice;
- int n;
-
- for (n = choice + 1; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
- result = n;
- break;
- }
- }
- dlg_trace_msg("next_item(%d) ->%d\n", choice, result);
- return result;
-}
-
-/*
- * Translate a choice from items[] to a row-number in an unbounded column,
- * starting at zero.
- */
-static int
-index2row(ALL_DATA * data, int choice, int selected)
-{
- int result = -1;
- int n;
- for (n = 0; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
- ++result;
- }
- if (n == choice)
- break;
+ int row = index2row(all, choice, selected);
+ TRACE(("! given item %d, testing next-item on row %d\n", choice, row + 1));
+ if (myItem(data, row + 1)) {
+ result = row2index(all, row + 1, selected);
}
+ TRACE(("! next_item(%d, %s) ->%d\n", choice, mySide(selected), result));
return result;
}
@@ -220,17 +266,21 @@ index2row(ALL_DATA * data, int choice, int selected)
* Return the first choice from items[] for the given column.
*/
static int
-first_item(ALL_DATA * data, int selected)
+first_item(ALL_DATA * all, int selected)
{
+ MY_DATA *data = all->list + selected;
int result = -1;
int n;
- for (n = 0; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
- result = n;
- break;
+ if (myItem(data, 0) != 0) {
+ for (n = 0; n < all->item_no; ++n) {
+ if (myItem(data, 0) == &all->items[n]) {
+ result = n;
+ break;
+ }
}
}
+ TRACE(("! first_item %s = %d\n", mySide(selected), result));
return result;
}
@@ -238,62 +288,42 @@ first_item(ALL_DATA * data, int selected)
* Return the last choice from items[] for the given column.
*/
static int
-last_item(ALL_DATA * data, int selected)
+last_item(ALL_DATA * all, int selected)
{
+ MY_DATA *data = all->list + selected;
int result = -1;
int n;
- for (n = data->item_no - 1; n >= 0; --n) {
- if ((data->items[n].state != 0) == selected) {
- result = n;
- break;
- }
+ for (n = 0; myItem(data, n) != 0; ++n) {
+ result = n;
}
- return result;
-}
-
-/*
- * Convert a row-number back to an item number, i.e., index into items[].
- */
-static int
-row2index(ALL_DATA * data, int row, int selected)
-{
- int result = -1;
- int n;
- for (n = 0; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
- if (row-- <= 0) {
- result = n;
- break;
- }
- }
+ if (result >= 0) {
+ result = row2index(all, result, selected);
}
+ TRACE(("! last_item %s = %d\n", mySide(selected), result));
return result;
}
static int
-skip_rows(ALL_DATA * data, int row, int skip, int selected)
+skip_rows(ALL_DATA * all, int row, int skip, int selected)
{
- int choice = row2index(data, row, selected);
+ MY_DATA *data = all->list + selected;
int result = row;
int n;
+
if (skip > 0) {
- for (n = choice + 1; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
- ++result;
- if (--skip <= 0)
- break;
- }
+ for (n = row + 1; (n < all->item_no) && (n <= row + skip); ++n) {
+ if (myItem(data, n) == 0)
+ break;
+ result = n;
}
} else if (skip < 0) {
- for (n = choice - 1; n >= 0; --n) {
- if ((data->items[n].state != 0) == selected) {
- --result;
- if (++skip >= 0)
- break;
- }
- }
+ result -= skip;
+ if (result < 0)
+ result = 0;
}
+ TRACE(("! skip_rows row %d, skip %d, %s = %d\n",
+ row, skip, mySide(selected), result));
return result;
}
@@ -301,7 +331,7 @@ skip_rows(ALL_DATA * data, int row, int skip, int selected)
* Find the closest item in the given column starting with the given choice.
*/
static int
-closest_item(ALL_DATA * data, int choice, int selected)
+closest_item(ALL_DATA * all, int choice, int selected)
{
int prev = choice;
int next = choice;
@@ -309,13 +339,13 @@ closest_item(ALL_DATA * data, int choice, int selected)
int n;
for (n = choice; n >= 0; --n) {
- if ((data->items[n].state != 0) == selected) {
+ if ((all->items[n].state != 0) == selected) {
prev = n;
break;
}
}
- for (n = choice; n < data->item_no; ++n) {
- if ((data->items[n].state != 0) == selected) {
+ for (n = choice; n < all->item_no; ++n) {
+ if ((all->items[n].state != 0) == selected) {
next = n;
break;
}
@@ -330,37 +360,40 @@ closest_item(ALL_DATA * data, int choice, int selected)
} else if (next != choice) {
result = next;
}
+ TRACE(("! XXX closest item choice %d, %s = %d\n",
+ choice, mySide(selected), result));
return result;
}
static void
-print_both(ALL_DATA * data,
+print_both(ALL_DATA * all,
int choice)
{
int selected;
int cur_y, cur_x;
- WINDOW *dialog = wgetparent(data->list[0].win);
+ WINDOW *dialog = wgetparent(all->list[0].win);
+ TRACE(("! print_both %d\n", choice));
getyx(dialog, cur_y, cur_x);
for (selected = 0; selected < 2; ++selected) {
- MY_DATA *moi = data->list + selected;
- WINDOW *win = moi->win;
- int thumb_top = index2row(data, moi->top_index, selected);
- int thumb_max = index2row(data, -1, selected);
+ MY_DATA *data = all->list + selected;
+ WINDOW *win = data->win;
+ int thumb_top = index2row(all, data->top_index, selected);
+ int thumb_max = index2row(all, -1, selected);
int thumb_end = thumb_top + getmaxy(win);
- print_1_list(data, choice, selected);
+ print_1_list(all, choice, selected);
dlg_mouse_setcode(selected * KEY_MAX);
dlg_draw_scrollbar(dialog,
- (long) (moi->top_index),
+ (long) (data->top_index),
(long) (thumb_top),
(long) MIN(thumb_end, thumb_max),
(long) thumb_max,
- moi->box_x + data->check_x,
- moi->box_x + getmaxx(win),
- moi->box_y,
- moi->box_y + getmaxy(win) + 1,
+ data->box_x + all->check_x,
+ data->box_x + getmaxx(win),
+ data->box_y,
+ data->box_y + getmaxy(win) + 1,
menubox_border2_attr,
menubox_border_attr);
}
@@ -369,13 +402,13 @@ print_both(ALL_DATA * data,
}
static void
-set_top_item(ALL_DATA * data, int value, int selected)
+set_top_item(ALL_DATA * all, int choice, int selected)
{
- if (value != data->list[selected].top_index) {
- dlg_trace_msg("set top of %s column to %d\n",
- selected ? "right" : "left",
- value);
- data->list[selected].top_index = value;
+ if (choice != all->list[selected].top_index) {
+ DLG_TRACE(("# set top of %s column to %d\n",
+ mySide(selected),
+ choice));
+ all->list[selected].top_index = choice;
}
}
@@ -384,23 +417,82 @@ set_top_item(ALL_DATA * data, int value, int selected)
* visible.
*/
static void
-fix_top_item(ALL_DATA * data, int cur_item, int selected)
+fix_top_item(ALL_DATA * all, int cur_item, int selected)
{
- int top_item = data->list[selected].top_index;
- int cur_row = index2row(data, cur_item, selected);
- int top_row = index2row(data, top_item, selected);
+ int top_item = all->list[selected].top_index;
+ int cur_row = index2row(all, cur_item, selected);
+ int top_row = index2row(all, top_item, selected);
if (cur_row < top_row) {
top_item = cur_item;
- } else if ((cur_row - top_row) > data->use_height) {
- top_item = row2index(data, cur_row + 1 - data->use_height, selected);
+ } else if ((cur_row - top_row) >= all->use_height) {
+ top_item = row2index(all, cur_row + 1 - all->use_height, selected);
+ }
+ if (cur_row < all->use_height) {
+ top_item = row2index(all, 0, selected);
+ }
+ DLG_TRACE(("# fix_top_item(cur_item %d, %s) ->top_item %d\n",
+ cur_item, mySide(selected), top_item));
+ set_top_item(all, top_item, selected);
+}
+
+static void
+append_right_side(ALL_DATA * all, int choice)
+{
+ MY_DATA *data = &all->list[1];
+ int j;
+ for (j = 0; j < all->item_no; ++j) {
+ if (myItem(data, j) == 0) {
+ myItem(data, j) = &all->items[choice];
+ break;
+ }
+ }
+}
+
+static void
+amend_right_side(ALL_DATA * all, int choice)
+{
+ MY_DATA *data = &all->list[1];
+ int j, k;
+ for (j = 0; j < all->item_no; ++j) {
+ if (myItem(data, j) == &all->items[choice]) {
+ for (k = j; k < all->item_no; ++k) {
+ if ((myItem(data, k) = myItem(data, k + 1)) == 0)
+ break;
+ }
+ break;
+ }
+ }
+}
+
+static void
+fill_one_side(ALL_DATA * all, int selected)
+{
+ int i, j;
+ MY_DATA *data = all->list + selected;
+
+ for (i = j = 0; j < all->item_no; ++j) {
+ myItem(data, i) = 0;
+ if ((all->items[j].state != 0) == selected) {
+ myItem(data, i) = all->items + j;
+ TRACE(("! %s item[%d] %p = all[%d] %p\n",
+ mySide(selected),
+ i, myItem(data, i),
+ j, all->items + j));
+ ++i;
+ }
}
- if (cur_row < data->use_height) {
- top_item = row2index(data, 0, selected);
+ myItem(data, i) = 0;
+}
+
+static void
+fill_both_sides(ALL_DATA * all)
+{
+ int k;
+
+ for (k = 0; k < 2; ++k) {
+ fill_one_side(all, k);
}
- dlg_trace_msg("fix_top_item(cur_item %d, selected %d) ->top_item %d\n",
- cur_item, selected, top_item);
- set_top_item(data, top_item, selected);
}
/*
@@ -420,6 +512,7 @@ dlg_buildlist(const char *title,
int order_mode,
int *current_item)
{
+#define THIS_FUNC "dlg_buildlist"
/* *INDENT-OFF* */
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
@@ -445,6 +538,7 @@ dlg_buildlist(const char *title,
DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE+KEY_MAX) ),
DLG_KEYS_DATA( DLGK_GRID_LEFT, KEY_LEFTCOL ),
DLG_KEYS_DATA( DLGK_GRID_RIGHT, KEY_RIGHTCOL ),
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -466,11 +560,11 @@ dlg_buildlist(const char *title,
int num_states;
bool first = TRUE;
WINDOW *dialog;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
const char **buttons = dlg_ok_labels();
const char *widget_name = "buildlist";
- (void) order_mode;
+ dialog_state.plain_buttons = TRUE;
/*
* Unlike other uses of --visit-items, we have two windows to visit.
@@ -481,6 +575,10 @@ dlg_buildlist(const char *title,
memset(&all, 0, sizeof(all));
all.items = items;
all.item_no = item_no;
+ for (k = 0; k < 2; ++k) {
+ data[k].ip = dlg_calloc(DIALOG_LISTITEM *, (item_no + 2));
+ }
+ fill_both_sides(&all);
if (dialog_vars.default_item != 0) {
cur_item = dlg_default_listitem(items);
@@ -493,12 +591,14 @@ dlg_buildlist(const char *title,
: dlg_default_button());
dlg_does_output();
- dlg_tab_correct_str(prompt);
#ifdef KEY_RESIZE
retry:
#endif
+ prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(prompt);
+
all.use_height = list_height;
all.use_width = (2 * (dlg_calc_list_width(item_no, items)
+ 4
@@ -536,7 +636,7 @@ dlg_buildlist(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
list_width = (width - 6 * MARGIN - 2) / 2;
@@ -612,11 +712,12 @@ dlg_buildlist(const char *title,
/* ensure we are scrolled to show the current choice */
j = MIN(all.use_height, item_no);
for (i = 0; i < 2; ++i) {
- int top_item = 0;
if ((items[cur_item].state != 0) == i) {
- top_item = cur_item - j + 1;
+ int top_item = cur_item - j + 1;
if (top_item < 0)
top_item = 0;
+ while ((items[top_item].state != 0) != i)
+ ++top_item;
set_top_item(&all, top_item, i);
} else {
set_top_item(&all, 0, i);
@@ -642,11 +743,11 @@ dlg_buildlist(const char *title,
int at_end = index2row(&all, -1, which);
int at_bot = skip_rows(&all, at_top, all.use_height, which);
- dlg_trace_msg("\t** state %d:%d top %d (%d:%d:%d) %d\n",
- cur_item, item_no - 1,
- moi->top_index,
- at_top, at_bot, at_end,
- which);
+ DLG_TRACE(("# ** state %d:%d top %d (%d:%d:%d) %s\n",
+ cur_item, item_no - 1,
+ moi->top_index,
+ at_top, at_bot, at_end,
+ mySide(which)));
if (first) {
print_both(&all, cur_item);
@@ -663,7 +764,7 @@ dlg_buildlist(const char *title,
cur_y -= at_top;
cur_x = (data[which].box_x
+ all.check_x + 1);
- dlg_trace_msg("\t...visit row %d (%d,%d)\n", cur_row, cur_y, cur_x);
+ DLG_TRACE(("# ...visit row %d (%d,%d)\n", cur_row, cur_y, cur_x));
wmove(dialog, cur_y, cur_x);
}
@@ -681,7 +782,7 @@ dlg_buildlist(const char *title,
i = (key - 2 * KEY_MAX) % (1 + all.use_height);
j = (key - 2 * KEY_MAX) / (1 + all.use_height);
k = row2index(&all, i + at_top, j);
- dlg_trace_msg("MOUSE column %d, row %d ->item %d\n", j, i, k);
+ DLG_TRACE(("# MOUSE column %d, row %d ->item %d\n", j, i, k));
if (k >= 0 && j < 2) {
if (j != which) {
/*
@@ -695,7 +796,7 @@ dlg_buildlist(const char *title,
at_bot = skip_rows(&all, at_top, all.use_height, which);
cur_item = k;
print_both(&all, cur_item);
- key = KEY_TOGGLE; /* force the selected item to toggle */
+ key = DLGK_TOGGLE; /* force the selected item to toggle */
} else {
beep();
continue;
@@ -723,18 +824,29 @@ dlg_buildlist(const char *title,
* the next available item in the same column. But if there are no
* more items in the column, move the cursor to the other column.
*/
- if (key == KEY_TOGGLE) {
+ if (key == DLGK_TOGGLE) {
int new_choice;
int new_state = items[cur_item].state + 1;
if ((new_choice = next_item(&all, cur_item, which)) == cur_item) {
new_choice = prev_item(&all, cur_item, which);
}
- dlg_trace_msg("cur_item %d, new_choice:%d\n", cur_item, new_choice);
+ DLG_TRACE(("# cur_item %d, new_choice:%d\n", cur_item, new_choice));
+ /* FIXME - how to test and handle multiple states? */
if (new_state >= num_states)
new_state = 0;
items[cur_item].state = new_state;
+ if (order_mode) {
+ fill_one_side(&all, 0);
+ if (new_state) {
+ append_right_side(&all, cur_item);
+ } else {
+ amend_right_side(&all, cur_item);
+ }
+ } else {
+ fill_both_sides(&all);
+ }
if (cur_item == moi->top_index) {
set_top_item(&all, new_choice, which);
}
@@ -837,7 +949,11 @@ dlg_buildlist(const char *title,
fix_top_item(&all, i, 0);
break;
case DLGK_GRID_RIGHT:
- i = closest_item(&all, cur_item, 1);
+ if (order_mode) {
+ i = last_item(&all, 1);
+ } else {
+ i = closest_item(&all, cur_item, 1);
+ }
fix_top_item(&all, i, 1);
break;
case DLGK_PAGE_PREV:
@@ -895,11 +1011,11 @@ dlg_buildlist(const char *title,
int oops = item_no;
int old_item;
- dlg_trace_msg("<--CHOICE %d\n", i);
- dlg_trace_msg("<--topITM %d\n", moi->top_index);
- dlg_trace_msg("<--now_at %d\n", now_at);
- dlg_trace_msg("<--at_top %d\n", at_top);
- dlg_trace_msg("<--at_bot %d\n", at_bot);
+ DLG_TRACE(("# <--CHOICE %d\n", i));
+ DLG_TRACE(("# <--topITM %d\n", moi->top_index));
+ DLG_TRACE(("# <--now_at %d\n", now_at));
+ DLG_TRACE(("# <--at_top %d\n", at_top));
+ DLG_TRACE(("# <--at_bot %d\n", at_bot));
if (now_at >= at_bot) {
while (now_at >= at_bot) {
@@ -911,11 +1027,11 @@ dlg_buildlist(const char *title,
at_top = index2row(&all, moi->top_index, which);
at_bot = skip_rows(&all, at_top, all.use_height, which);
- dlg_trace_msg("...at_bot %d (now %d vs %d)\n",
- at_bot, now_at, at_end);
- dlg_trace_msg("...topITM %d\n", moi->top_index);
- dlg_trace_msg("...at_top %d (diff %d)\n", at_top,
- at_bot - at_top);
+ DLG_TRACE(("# ...at_bot %d (now %d vs %d)\n",
+ at_bot, now_at, at_end));
+ DLG_TRACE(("# ...topITM %d\n", moi->top_index));
+ DLG_TRACE(("# ...at_top %d (diff %d)\n", at_top,
+ at_bot - at_top));
if (at_bot >= at_end) {
/*
@@ -936,7 +1052,7 @@ dlg_buildlist(const char *title,
break;
}
if (--oops < 0) {
- dlg_trace_msg("OOPS-forward\n");
+ DLG_TRACE(("# OOPS-forward\n"));
break;
}
}
@@ -948,20 +1064,20 @@ dlg_buildlist(const char *title,
which);
at_top = index2row(&all, moi->top_index, which);
- dlg_trace_msg("...at_top %d (now %d)\n", at_top, now_at);
- dlg_trace_msg("...topITM %d\n", moi->top_index);
+ DLG_TRACE(("# ...at_top %d (now %d)\n", at_top, now_at));
+ DLG_TRACE(("# ...topITM %d\n", moi->top_index));
if (moi->top_index >= old_item)
break;
if (at_top <= now_at)
break;
if (--oops < 0) {
- dlg_trace_msg("OOPS-backward\n");
+ DLG_TRACE(("# OOPS-backward\n"));
break;
}
}
}
- dlg_trace_msg("-->now_at %d\n", now_at);
+ DLG_TRACE(("# -->now_at %d\n", now_at));
cur_item = i;
print_both(&all, cur_item);
}
@@ -976,14 +1092,16 @@ dlg_buildlist(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
- /* repaint */
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
+ first = TRUE;
goto retry;
#endif
default:
@@ -1000,12 +1118,50 @@ dlg_buildlist(const char *title,
}
}
+ /*
+ * If told to re-order the list, update it to reflect the current display:
+ * a) The left-side will be at the beginning, without gaps.
+ * b) The right-side will follow, in display-order.
+ */
+ if (order_mode) {
+ DIALOG_LISTITEM *redo;
+ int row;
+ int choice;
+ int new_item = cur_item;
+
+ redo = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
+ assert_ptr(redo, THIS_FUNC);
+
+ j = 0;
+ for (k = 0; k < 2; ++k) {
+ for (row = 0; row < item_no; ++row) {
+ if (myItem(all.list + k, row) == 0)
+ break;
+ choice = row2index(&all, row, k);
+ if (choice == cur_item)
+ new_item = j;
+ redo[j++] = items[choice];
+ }
+ }
+
+ cur_item = new_item;
+ memcpy(items, redo, sizeof(DIALOG_LISTITEM) * (size_t) (item_no + 1));
+
+ free(redo);
+ }
+
+ for (k = 0; k < 2; ++k) {
+ free(data[k].ip);
+ }
+
dialog_state.visit_cols = save_visit;
dlg_del_window(dialog);
dlg_mouse_free_regions();
free(prompt);
+
*current_item = cur_item;
return result;
+#undef THIS_FUNC
}
/*
@@ -1021,6 +1177,7 @@ dialog_buildlist(const char *title,
char **items,
int order_mode)
{
+#define THIS_FUNC "dialog_buildlist"
int result;
int i, j;
DIALOG_LISTITEM *listitems;
@@ -1029,8 +1186,18 @@ dialog_buildlist(const char *title,
int current = 0;
char *help_result;
+ DLG_TRACE(("# buildlist args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("lheight", list_height);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+ DLG_TRACE2N("order", order_mode != 0);
+
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
- assert_ptr(listitems, "dialog_buildlist");
+ assert_ptr(listitems, THIS_FUNC);
for (i = j = 0; i < item_no; ++i) {
listitems[i].name = items[j++];
@@ -1094,4 +1261,5 @@ dialog_buildlist(const char *title,
dlg_free_columns(&listitems[0].text, (int) sizeof(DIALOG_LISTITEM), item_no);
free(listitems);
return result;
+#undef THIS_FUNC
}
diff --git a/contrib/dialog/buttons.c b/contrib/dialog/buttons.c
index d37cfe50118f..b22f64158988 100644
--- a/contrib/dialog/buttons.c
+++ b/contrib/dialog/buttons.c
@@ -1,9 +1,9 @@
/*
- * $Id: buttons.c,v 1.94 2012/12/30 20:51:01 tom Exp $
+ * $Id: buttons.c,v 1.99 2018/06/18 22:11:16 tom Exp $
*
* buttons.c -- draw buttons, e.g., OK/Cancel
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -29,6 +29,7 @@
#endif
#define MIN_BUTTON (-dialog_state.visit_cols)
+#define CHR_BUTTON (!dialog_state.plain_buttons)
static void
center_label(char *buffer, int longest, const char *label)
@@ -160,6 +161,12 @@ get_hotkeys(const char **labels)
return result;
}
+typedef enum {
+ sFIND_KEY = 0
+ ,sHAVE_KEY = 1
+ ,sHAD_KEY = 2
+} HOTKEY;
+
/*
* Print a button
*/
@@ -167,7 +174,7 @@ static void
print_button(WINDOW *win, char *label, int hotkey, int y, int x, int selected)
{
int i;
- int state = 0;
+ HOTKEY state = sFIND_KEY;
const int *indx = dlg_index_wchars(label);
int limit = dlg_count_wchars(label);
chtype key_attr = (selected
@@ -178,18 +185,18 @@ print_button(WINDOW *win, char *label, int hotkey, int y, int x, int selected)
: button_label_inactive_attr);
(void) wmove(win, y, x);
- (void) wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ dlg_attrset(win, selected
+ ? button_active_attr
+ : button_inactive_attr);
(void) waddstr(win, "<");
- (void) wattrset(win, label_attr);
+ dlg_attrset(win, label_attr);
for (i = 0; i < limit; ++i) {
int check;
int first = indx[i];
int last = indx[i + 1];
switch (state) {
- case 0:
+ case sFIND_KEY:
check = UCH(label[first]);
#ifdef USE_WIDE_CURSES
if ((last - first) != 1) {
@@ -198,22 +205,24 @@ print_button(WINDOW *win, char *label, int hotkey, int y, int x, int selected)
}
#endif
if (check == hotkey) {
- (void) wattrset(win, key_attr);
- state = 1;
+ dlg_attrset(win, key_attr);
+ state = sHAVE_KEY;
}
break;
- case 1:
- wattrset(win, label_attr);
- state = 2;
+ case sHAVE_KEY:
+ dlg_attrset(win, label_attr);
+ state = sHAD_KEY;
+ break;
+ default:
break;
}
waddnstr(win, label + first, last - first);
}
- (void) wattrset(win, selected
- ? button_active_attr
- : button_inactive_attr);
+ dlg_attrset(win, selected
+ ? button_active_attr
+ : button_inactive_attr);
(void) waddstr(win, ">");
- (void) wmove(win, y, x + ((int) strspn(label, " ")) + 1);
+ (void) wmove(win, y, x + ((int) (strspn) (label, " ")) + 1);
}
/*
@@ -374,7 +383,9 @@ dlg_draw_buttons(WINDOW *win,
for (n = 0; labels[n] != 0; n++) {
center_label(buffer, longest, labels[n]);
mouse_mkbutton(y, x, dlg_count_columns(buffer), n);
- print_button(win, buffer, hotkeys[n], y, x,
+ print_button(win, buffer,
+ CHR_BUTTON ? hotkeys[n] : -1,
+ y, x,
(selected == n) || (n == 0 && selected < 0));
if (selected == n)
getyx(win, final_y, final_x);
@@ -389,7 +400,7 @@ dlg_draw_buttons(WINDOW *win,
}
(void) wmove(win, final_y, final_x);
wrefresh(win);
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
free(buffer);
free(hotkeys);
}
@@ -629,7 +640,7 @@ dlg_ok_buttoncode(int button)
} else if (dialog_vars.help_button && (button == n)) {
result = DLG_EXIT_HELP;
}
- dlg_trace_msg("# dlg_ok_buttoncode(%d) = %d\n", button, result);
+ DLG_TRACE(("# dlg_ok_buttoncode(%d) = %d\n", button, result));
return result;
}
@@ -679,7 +690,7 @@ dlg_defaultno_button(void)
while (dlg_ok_buttoncode(result) != DLG_EXIT_CANCEL)
++result;
}
- dlg_trace_msg("# dlg_defaultno_button() = %d\n", result);
+ DLG_TRACE(("# dlg_defaultno_button() = %d\n", result));
return result;
}
@@ -702,7 +713,7 @@ dlg_default_button(void)
}
}
}
- dlg_trace_msg("# dlg_default_button() = %d\n", result);
+ DLG_TRACE(("# dlg_default_button() = %d\n", result));
return result;
}
diff --git a/contrib/dialog/calendar.c b/contrib/dialog/calendar.c
index 0a7061adf80e..497533b3dbbd 100644
--- a/contrib/dialog/calendar.c
+++ b/contrib/dialog/calendar.c
@@ -1,9 +1,9 @@
/*
- * $Id: calendar.c,v 1.67 2013/03/17 15:03:41 tom Exp $
+ * $Id: calendar.c,v 1.97 2018/06/19 22:57:01 tom Exp $
*
* calendar.c -- implements the calendar box
*
- * Copyright 2001-2012,2013 Thomas E. Dickey
+ * Copyright 2001-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -26,6 +26,12 @@
#include <time.h>
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#else
+#define intptr_t long
+#endif
+
#define ONE_DAY (60 * 60 * 24)
#define MON_WIDE 4 /* width of a month-name */
@@ -35,7 +41,7 @@
#define BTN_HIGH 1 /* height of button-row excluding margin */
/* two more lines: titles for day-of-week and month/year boxes */
-#define MIN_HIGH (DAY_HIGH + 2 + HDR_HIGH + BTN_HIGH + (7 * MARGIN))
+#define MIN_HIGH (DAY_HIGH + 2 + HDR_HIGH + BTN_HIGH + (MAX_DAYS * MARGIN))
#define MIN_WIDE (DAY_WIDE + (4 * MARGIN))
typedef enum {
@@ -56,14 +62,20 @@ typedef struct _box {
int width;
int height;
BOX_DRAW box_draw;
+ int week_start;
} BOX;
+#define MAX_DAYS 7
+#define MAX_MONTHS 12
+
+static char *cached_days[MAX_DAYS];
+static char *cached_months[MAX_MONTHS];
+
static const char *
nameOfDayOfWeek(int n)
{
- static const char *table[7]
-#ifndef ENABLE_NLS
- =
+ static bool shown[MAX_DAYS];
+ static const char *posix_days[MAX_DAYS] =
{
"Sunday",
"Monday",
@@ -72,35 +84,49 @@ nameOfDayOfWeek(int n)
"Thursday",
"Friday",
"Saturday"
- }
-#endif
- ;
- const char *result = 0;
+ };
- if (n >= 0 && n < 7) {
+ while (n < 0) {
+ n += MAX_DAYS;
+ }
+ n %= MAX_DAYS;
#ifdef ENABLE_NLS
- if (table[n] == 0) {
- nl_item items[7] =
- {
- ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7
- };
- table[n] = nl_langinfo(items[n]);
- }
+ if (cached_days[n] == 0) {
+ const nl_item items[MAX_DAYS] =
+ {
+ ABDAY_1, ABDAY_2, ABDAY_3, ABDAY_4, ABDAY_5, ABDAY_6, ABDAY_7
+ };
+ cached_days[n] = dlg_strclone(nl_langinfo(items[n]));
+ memset(shown, 0, sizeof(shown));
+ }
#endif
- result = table[n];
+ if (cached_days[n] == 0) {
+ size_t len, limit = MON_WIDE - 1;
+ char *value = dlg_strclone(posix_days[n]);
+
+ /*
+ * POSIX does not actually say what the length of an abbreviated name
+ * is. Typically it is 2, which will fit into our layout. That also
+ * happens to work with CJK entries as seen in glibc, which are a
+ * double-width cell. For now (2016/01/26), handle too-long names only
+ * for POSIX values.
+ */
+ if ((len = strlen(value)) > limit)
+ value[limit] = '\0';
+ cached_days[n] = value;
}
- if (result == 0) {
- result = "?";
+ if (!shown[n]) {
+ DLG_TRACE(("# DAY(%d) = '%s'\n", n, cached_days[n]));
+ shown[n] = TRUE;
}
- return result;
+ return cached_days[n];
}
static const char *
nameOfMonth(int n)
{
- static const char *table[12]
-#ifndef ENABLE_NLS
- =
+ static bool shown[MAX_MONTHS];
+ static const char *posix_mons[MAX_MONTHS] =
{
"January",
"February",
@@ -114,70 +140,199 @@ nameOfMonth(int n)
"October",
"November",
"December"
- }
-#endif
- ;
- const char *result = 0;
+ };
- if (n >= 0 && n < 12) {
+ while (n < 0) {
+ n += MAX_MONTHS;
+ }
+ n %= MAX_MONTHS;
#ifdef ENABLE_NLS
- if (table[n] == 0) {
- nl_item items[12] =
- {
- MON_1, MON_2, MON_3, MON_4, MON_5, MON_6,
- MON_7, MON_8, MON_9, MON_10, MON_11, MON_12
- };
- table[n] = nl_langinfo(items[n]);
- }
+ if (cached_months[n] == 0) {
+ const nl_item items[MAX_MONTHS] =
+ {
+ MON_1, MON_2, MON_3, MON_4, MON_5, MON_6,
+ MON_7, MON_8, MON_9, MON_10, MON_11, MON_12
+ };
+ cached_months[n] = dlg_strclone(nl_langinfo(items[n]));
+ memset(shown, 0, sizeof(shown));
+ }
#endif
- result = table[n];
+ if (cached_months[n] == 0) {
+ cached_months[n] = dlg_strclone(posix_mons[n]);
}
- if (result == 0) {
- result = "?";
+ if (!shown[n]) {
+ DLG_TRACE(("# MON(%d) = '%s'\n", n, cached_months[n]));
+ shown[n] = TRUE;
}
- return result;
+ return cached_months[n];
}
+/*
+ * Algorithm for Gregorian calendar.
+ */
static int
-days_in_month(struct tm *current, int offset /* -1, 0, 1 */ )
+isleap(int y)
+{
+ return ((y % 4 == 0) &&
+ ((y % 100 != 0) ||
+ (y % 400 == 0))) ? 1 : 0;
+}
+
+static void
+adjust_year_month(int *year, int *month)
+{
+ while (*month < 0) {
+ *month += MAX_MONTHS;
+ *year -= 1;
+ }
+ while (*month >= MAX_MONTHS) {
+ *month -= MAX_MONTHS;
+ *year += 1;
+ }
+}
+
+static int
+days_per_month(int year, int month)
{
static const int nominal[] =
{
31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31
};
- int year = current->tm_year;
- int month = current->tm_mon + offset;
int result;
- while (month < 0) {
- month += 12;
- year -= 1;
- }
- while (month >= 12) {
- month -= 12;
- year += 1;
- }
+ adjust_year_month(&year, &month);
result = nominal[month];
if (month == 1)
- result += ((year % 4) == 0);
+ result += isleap(year);
return result;
}
static int
+days_in_month(struct tm *current, int offset /* -1, 0, 1 */ )
+{
+ int year = current->tm_year + 1900;
+ int month = current->tm_mon + offset;
+
+ adjust_year_month(&year, &month);
+ return days_per_month(year, month);
+}
+
+static int
+days_per_year(int year)
+{
+ return (isleap(year) ? 366 : 365);
+}
+
+static int
days_in_year(struct tm *current, int offset /* -1, 0, 1 */ )
{
- int year = current->tm_year + 1900 + offset;
+ return days_per_year(current->tm_year + 1900 + offset);
+}
- return ((year % 4) == 0) ? 366 : 365;
+/*
+ * Adapted from C FAQ
+ * "17.28: How can I find the day of the week given the date?"
+ * implementation by Tomohiko Sakamoto.
+ *
+ * d = day (0 to whatever)
+ * m = month (1 through 12)
+ * y = year (1752 and later, for Gregorian calendar)
+ */
+static int
+day_of_week(int y, int m, int d)
+{
+ static int t[] =
+ {
+ 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4
+ };
+ y -= (m < 3);
+ return (6 + (y + (y / 4) - (y / 100) + (y / 400) + t[m - 1] + d)) % MAX_DAYS;
+}
+
+static int
+day_in_year(int year, int month, int day)
+{
+ int result = day;
+ while (--month >= 1)
+ result += days_per_month(year, month);
+ return result;
+}
+
+static int
+iso_week(int year, int month, int day)
+{
+ int week = 1;
+ int dow;
+ int new_year_dow;
+ int diy;
+ int new_years_eve_dow;
+ static const int thursday = 3;
+
+ /* add the number weeks *between* date and newyear */
+ diy = day_in_year(year, month, day);
+ week += (diy - 1) / MAX_DAYS;
+
+ /* 0 = Monday */
+ dow = day_of_week(year, month, day);
+ new_year_dow = day_of_week(year, 1, 1);
+
+ /*
+ * If New Year falls on Friday, Saturday or Sunday, then New Years's week
+ * is the last week of the preceding year. In that case subtract one week.
+ */
+ if (new_year_dow > thursday)
+ --week;
+
+ /* Add one week if there is a Sunday to Monday transition. */
+ if (dow - new_year_dow < 0)
+ ++week;
+
+ /* Check if we are in the last week of the preceding year. */
+ if (week < 1) {
+ week = iso_week(--year, 12, 31);
+ }
+
+ /*
+ * If we are in the same week as New Year's eve, check if New Year's eve is
+ * in the first week of the next year.
+ */
+ new_years_eve_dow = (new_year_dow + 364 + isleap(year)) % MAX_DAYS;
+ if (365 + isleap(year) - diy < MAX_DAYS
+ && new_years_eve_dow >= dow
+ && new_years_eve_dow < thursday) {
+ ++year;
+ week = 1;
+ }
+ return week;
+}
+
+static int *
+getisoweeks(int year, int month)
+{
+ static int result[10];
+ int windx = 0;
+ int day;
+ int dpm = days_per_month(year, month);
+
+ for (day = 1; day <= dpm; day += MAX_DAYS)
+ result[windx++] = iso_week(year, month, day);
+ /*
+ * Ensure that there is a week number associated with the last day of the
+ * month, e.g., in case the last day of the month falls before Thursday,
+ * so that we have to show the week-number for the beginning of the
+ * following month.
+ */
+ result[windx] = iso_week(year, month, dpm);
+ return result;
}
static int
day_cell_number(struct tm *current)
{
int cell;
- cell = current->tm_mday - ((6 + current->tm_mday - current->tm_wday) % 7);
- if ((current->tm_mday - 1) % 7 != current->tm_wday)
+ cell = current->tm_mday - ((6 + current->tm_mday - current->tm_wday) % MAX_DAYS);
+ if ((current->tm_mday - 1) % MAX_DAYS != current->tm_wday)
cell += 6;
else
cell--;
@@ -191,13 +346,13 @@ next_or_previous(int key, int two_d)
switch (key) {
case DLGK_GRID_UP:
- result = two_d ? -7 : -1;
+ result = two_d ? -MAX_DAYS : -1;
break;
case DLGK_GRID_LEFT:
result = -1;
break;
case DLGK_GRID_DOWN:
- result = two_d ? 7 : 1;
+ result = two_d ? MAX_DAYS : 1;
break;
case DLGK_GRID_RIGHT:
result = 1;
@@ -220,7 +375,9 @@ draw_day(BOX * data, struct tm *current)
int save_y = 0, save_x = 0;
int day = current->tm_mday;
int mday;
- int week;
+ int week = 0;
+ int windx = 0;
+ int *weeks = 0;
int last = days_in_month(current, 0);
int prev = days_in_month(current, -1);
@@ -232,36 +389,43 @@ draw_day(BOX * data, struct tm *current)
menubox_border_attr,
menubox_border2_attr);
- (void) wattrset(data->window, menubox_attr); /* daynames headline */
- for (x = 0; x < 7; x++) {
+ dlg_attrset(data->window, menubox_attr); /* daynames headline */
+ for (x = 0; x < MAX_DAYS; x++) {
mvwprintw(data->window,
0, (x + 1) * cell_wide, "%*.*s ",
cell_wide - 1,
cell_wide - 1,
- nameOfDayOfWeek(x));
+ nameOfDayOfWeek(x + data->week_start));
}
- mday = ((6 + current->tm_mday - current->tm_wday) % 7) - 7;
- if (mday <= -7)
- mday += 7;
- /* mday is now in the range -6 to 0. */
- week = (current->tm_yday + 6 + mday - current->tm_mday) / 7;
+ mday = ((6 + current->tm_mday -
+ current->tm_wday +
+ data->week_start) % MAX_DAYS) - MAX_DAYS;
+ if (mday <= -MAX_DAYS)
+ mday += MAX_DAYS;
+
+ if (dialog_vars.iso_week) {
+ weeks = getisoweeks(current->tm_year + 1900, current->tm_mon + 1);
+ } else {
+ /* mday is now in the range -6 to 0. */
+ week = (current->tm_yday + 6 + mday - current->tm_mday) / MAX_DAYS;
+ }
for (y = 1; mday < last; y++) {
- (void) wattrset(data->window, menubox_attr); /* weeknumbers headline */
+ dlg_attrset(data->window, menubox_attr); /* weeknumbers headline */
mvwprintw(data->window,
y, 0,
"%*d ",
cell_wide - 1,
- ++week);
- for (x = 0; x < 7; x++) {
+ weeks ? weeks[windx++] : ++week);
+ for (x = 0; x < MAX_DAYS; x++) {
this_x = 1 + (x + 1) * cell_wide;
++mday;
if (wmove(data->window, y, this_x) == ERR)
continue;
- (void) wattrset(data->window, item_attr); /* not selected days */
+ dlg_attrset(data->window, item_attr); /* not selected days */
if (mday == day) {
- (void) wattrset(data->window, item_selected_attr); /* selected day */
+ dlg_attrset(data->window, item_selected_attr); /* selected day */
save_y = y;
save_x = this_x;
}
@@ -296,7 +460,7 @@ draw_month(BOX * data, struct tm *current)
month = current->tm_mon + 1;
- (void) wattrset(data->parent, dialog_attr); /* Headline "Month" */
+ dlg_attrset(data->parent, dialog_attr); /* Headline "Month" */
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Month"));
dlg_draw_box2(data->parent,
data->y - 1, data->x - 1,
@@ -304,7 +468,7 @@ draw_month(BOX * data, struct tm *current)
menubox_attr,
menubox_border_attr,
menubox_border2_attr);
- (void) wattrset(data->window, item_attr); /* color the month selection */
+ dlg_attrset(data->window, item_attr); /* color the month selection */
mvwprintw(data->window, 0, 0, "%s", nameOfMonth(month - 1));
wmove(data->window, 0, 0);
return 0;
@@ -318,7 +482,7 @@ draw_year(BOX * data, struct tm *current)
{
int year = current->tm_year + 1900;
- (void) wattrset(data->parent, dialog_attr); /* Headline "Year" */
+ dlg_attrset(data->parent, dialog_attr); /* Headline "Year" */
(void) mvwprintw(data->parent, data->y - 2, data->x - 1, _("Year"));
dlg_draw_box2(data->parent,
data->y - 1, data->x - 1,
@@ -326,7 +490,7 @@ draw_year(BOX * data, struct tm *current)
menubox_attr,
menubox_border_attr,
menubox_border2_attr);
- (void) wattrset(data->window, item_attr); /* color the year selection */
+ dlg_attrset(data->window, item_attr); /* color the year selection */
mvwprintw(data->window, 0, 0, "%4d", year);
wmove(data->window, 0, 0);
return 0;
@@ -338,6 +502,7 @@ init_object(BOX * data,
int x, int y,
int width, int height,
BOX_DRAW box_draw,
+ int key_offset,
int code)
{
data->parent = parent;
@@ -346,6 +511,7 @@ init_object(BOX * data,
data->width = width;
data->height = height;
data->box_draw = box_draw;
+ data->week_start = key_offset;
data->window = derwin(data->parent,
data->height, data->width,
@@ -357,7 +523,7 @@ init_object(BOX * data,
dlg_mouse_setbase(getbegx(parent), getbegy(parent));
if (code == 'D') {
dlg_mouse_mkbigregion(y + 1, x + MON_WIDE, height - 1, width - MON_WIDE,
- KEY_MAX, 1, MON_WIDE, 3);
+ KEY_MAX + key_offset, 1, MON_WIDE, 3);
} else {
dlg_mouse_mkregion(y, x, height, width, code);
}
@@ -365,9 +531,104 @@ init_object(BOX * data,
return 0;
}
+#if defined(ENABLE_NLS) && defined(HAVE_NL_LANGINFO_1STDAY)
+#elif defined(HAVE_DLG_GAUGE)
+static int
+read_locale_setting(const char *name, int which)
+{
+ FILE *fp;
+ char command[80];
+ int result = -1;
+
+ sprintf(command, "locale %s", name);
+ if ((fp = dlg_popen(command, "r")) != 0) {
+ int count = 0;
+ char buf[80];
+
+ while (fgets(buf, (int) sizeof(buf) - 1, fp) != 0) {
+ if (++count > which) {
+ char *next = 0;
+ long check = strtol(buf, &next, 0);
+ if (next != 0 &&
+ next != buf &&
+ *next == '\n') {
+ result = (int) check;
+ }
+ break;
+ }
+ }
+ pclose(fp);
+ }
+ return result;
+}
+#endif
+
+static int
+WeekStart(void)
+{
+ int result = 0;
+ char *option = dialog_vars.week_start;
+ if (option != 0) {
+ if (option[0]) {
+ char *next = 0;
+ long check = strtol(option, &next, 0);
+ if (next == 0 ||
+ next == option ||
+ *next != '\0') {
+ if (!strcmp(option, "locale")) {
+#if defined(ENABLE_NLS) && defined(HAVE_NL_LANGINFO_1STDAY)
+ /*
+ * glibc-specific.
+ */
+ int first_day = nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0];
+ char *basis_ptr = nl_langinfo(_NL_TIME_WEEK_1STDAY);
+ int basis_day = (int) (intptr_t) basis_ptr;
+#elif defined(HAVE_DLG_GAUGE)
+ /*
+ * probably Linux-specific, but harmless otherwise. When
+ * available, the locale program will return a single
+ * integer on one line.
+ */
+ int first_day = read_locale_setting("first_weekday", 0);
+ int basis_day = read_locale_setting("week-1stday", 0);
+#endif
+#if (defined(ENABLE_NLS) && defined(HAVE_NL_LANGINFO_1STDAY)) || defined(HAVE_DLG_GAUGE)
+ int week_1stday = -1;
+ if (basis_day == 19971130)
+ week_1stday = 0; /* Sun */
+ else if (basis_day == 19971201)
+ week_1stday = 1; /* Mon */
+ if (week_1stday >= 0) {
+ result = first_day - week_1stday - 1;
+ }
+#else
+ result = 0; /* Sun */
+#endif
+ } else {
+ int day;
+ size_t eql = strlen(option);
+ for (day = 0; day < MAX_DAYS; ++day) {
+ if (!strncmp(nameOfDayOfWeek(day), option, eql)) {
+ result = day;
+ break;
+ }
+ }
+ }
+ } else if (check < 0) {
+ result = -1;
+ } else {
+ result = (int) (check % MAX_DAYS);
+ }
+ }
+ }
+ return result;
+}
+
static int
CleanupResult(int code, WINDOW *dialog, char *prompt, DIALOG_VARS * save_vars)
{
+ int n;
+
if (dialog != 0)
dlg_del_window(dialog);
dlg_mouse_free_regions();
@@ -375,9 +636,35 @@ CleanupResult(int code, WINDOW *dialog, char *prompt, DIALOG_VARS * save_vars)
free(prompt);
dlg_restore_vars(save_vars);
+ for (n = 0; n < MAX_DAYS; ++n) {
+ free(cached_days[n]);
+ cached_days[n] = 0;
+ }
+ for (n = 0; n < MAX_MONTHS; ++n) {
+ free(cached_months[n]);
+ cached_months[n] = 0;
+ }
+
return code;
}
+static void
+trace_date(struct tm *current, struct tm *old)
+{
+ bool changed = (old == 0 ||
+ current->tm_mday != old->tm_mday ||
+ current->tm_mon != old->tm_mon ||
+ current->tm_year != old->tm_year);
+ if (changed) {
+ DLG_TRACE(("# current %04d/%02d/%02d\n",
+ current->tm_year + 1900,
+ current->tm_mon + 1,
+ current->tm_mday));
+ } else {
+ DLG_TRACE(("# current (unchanged)\n"));
+ }
+}
+
#define DrawObject(data) (data)->box_draw(data, &current)
/*
@@ -396,7 +683,7 @@ dialog_calendar(const char *title,
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ TOGGLEKEY_BINDINGS,
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
DLG_KEYS_DATA( DLGK_GRID_DOWN, 'j' ),
@@ -433,23 +720,51 @@ dialog_calendar(const char *title,
int step;
int button;
int result = DLG_EXIT_UNKNOWN;
+ int week_start;
WINDOW *dialog;
time_t now_time = time((time_t *) 0);
struct tm current;
int state = dlg_default_button();
const char **buttons = dlg_ok_labels();
- char *prompt = dlg_strclone(subtitle);
+ char *prompt;
int mincols = MIN_WIDE;
char buffer[MAX_LEN];
DIALOG_VARS save_vars;
+ DLG_TRACE(("# calendar args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", subtitle);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("day", day);
+ DLG_TRACE2N("month", month);
+ DLG_TRACE2N("year", year);
+
dlg_save_vars(&save_vars);
dialog_vars.separate_output = TRUE;
dlg_does_output();
+ /*
+ * Unless overrridden, the current time/date is our starting point.
+ */
now_time = time((time_t *) 0);
current = *localtime(&now_time);
+
+#if HAVE_MKTIME
+ current.tm_isdst = -1;
+ if (year >= 1900) {
+ current.tm_year = year - 1900;
+ }
+ if (month >= 1) {
+ current.tm_mon = month - 1;
+ }
+ if (day > 0 && day <= days_per_month(current.tm_year + 1900,
+ current.tm_mon + 1)) {
+ current.tm_mday = day;
+ }
+ now_time = mktime(&current);
+#else
if (day < 0)
day = current.tm_mday;
if (month < 0)
@@ -479,13 +794,17 @@ dialog_calendar(const char *title,
current = *localtime(&now_time);
}
}
+#endif
+
dlg_button_layout(buttons, &mincols);
#ifdef KEY_RESIZE
retry:
#endif
+ prompt = dlg_strclone(subtitle);
dlg_auto_size(title, prompt, &height, &width, 0, mincols);
+
height += MIN_HIGH - 1;
dlg_print_size(height, width);
dlg_ctl_size(height, width);
@@ -501,7 +820,7 @@ dialog_calendar(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr); /* text mainbox */
+ dlg_attrset(dialog, dialog_attr); /* text mainbox */
dlg_print_autowrap(dialog, prompt, height, width);
/* compute positions of day, month and year boxes */
@@ -509,15 +828,18 @@ dialog_calendar(const char *title,
memset(&mn_box, 0, sizeof(mn_box));
memset(&yr_box, 0, sizeof(yr_box));
- if (init_object(&dy_box,
+ if ((week_start = WeekStart()) < 0 ||
+ init_object(&dy_box,
dialog,
(width - DAY_WIDE) / 2,
1 + (height - (DAY_HIGH + BTN_HIGH + (5 * MARGIN))),
DAY_WIDE,
DAY_HIGH + 1,
draw_day,
- 'D') < 0
- || DrawObject(&dy_box) < 0) {
+ week_start,
+ 'D') < 0 ||
+ ((dy_box.week_start = WeekStart()) < 0) ||
+ DrawObject(&dy_box) < 0) {
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
}
@@ -528,6 +850,7 @@ dialog_calendar(const char *title,
(DAY_WIDE / 2) - MARGIN,
HDR_HIGH,
draw_month,
+ 0,
'M') < 0
|| DrawObject(&mn_box) < 0) {
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
@@ -540,6 +863,7 @@ dialog_calendar(const char *title,
mn_box.width,
mn_box.height,
draw_year,
+ 0,
'Y') < 0
|| DrawObject(&yr_box) < 0) {
return CleanupResult(DLG_EXIT_ERROR, dialog, prompt, &save_vars);
@@ -560,8 +884,9 @@ dialog_calendar(const char *title,
if (dlg_result_key(key, fkey, &result))
break;
+#define Mouse2Key(key) (key - M_EVENT)
if (fkey && (key >= DLGK_MOUSE(KEY_MIN) && key <= DLGK_MOUSE(KEY_MAX))) {
- key = dlg_lookup_key(dialog, key - M_EVENT, &fkey);
+ key = dlg_lookup_key(dialog, Mouse2Key(key), &fkey);
}
if ((key2 = dlg_char_to_button(key, buttons)) >= 0) {
@@ -578,6 +903,7 @@ dialog_calendar(const char *title,
case DLGK_MOUSE('Y'):
state = sYEAR;
break;
+ case DLGK_TOGGLE:
case DLGK_ENTER:
result = dlg_enter_buttoncode(button);
break;
@@ -589,21 +915,22 @@ dialog_calendar(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
- /* repaint */
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
goto retry;
#endif
default:
step = 0;
key2 = -1;
if (is_DLGK_MOUSE(key)) {
- if ((key2 = dlg_ok_buttoncode(key - M_EVENT)) >= 0) {
+ if ((key2 = dlg_ok_buttoncode(Mouse2Key(key))) >= 0) {
result = key2;
break;
} else if (key >= DLGK_MOUSE(KEY_MAX)) {
@@ -613,11 +940,13 @@ dialog_calendar(const char *title,
step = (key
- DLGK_MOUSE(KEY_MAX)
- day_cell_number(&current));
+ DLG_TRACE(("# mouseclick decoded %d\n", step));
}
}
if (obj != 0) {
- if (key2 < 0)
+ if (key2 < 0) {
step = next_or_previous(key, (obj == &dy_box));
+ }
if (step != 0) {
struct tm old = current;
@@ -642,6 +971,7 @@ dialog_calendar(const char *title,
current = *localtime(&now_time);
+ trace_date(&current, &old);
if (obj != &dy_box
&& (current.tm_mday != old.tm_mday
|| current.tm_mon != old.tm_mon
diff --git a/contrib/dialog/checklist.c b/contrib/dialog/checklist.c
index 1bb54db35279..778c4bb7332f 100644
--- a/contrib/dialog/checklist.c
+++ b/contrib/dialog/checklist.c
@@ -1,9 +1,9 @@
/*
- * $Id: checklist.c,v 1.153 2013/09/02 17:01:02 tom Exp $
+ * $Id: checklist.c,v 1.160 2018/06/19 22:57:01 tom Exp $
*
* checklist.c -- implements the checklist box
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -70,17 +70,17 @@ print_item(ALL_DATA * data,
: item->text);
/* Clear 'residue' of last item */
- (void) wattrset(win, menubox_attr);
+ dlg_attrset(win, menubox_attr);
(void) wmove(win, choice, 0);
for (i = 0; i < data->use_width; i++)
(void) waddch(win, ' ');
(void) wmove(win, choice, data->check_x);
- (void) wattrset(win, selected ? check_selected_attr : check_attr);
+ dlg_attrset(win, selected ? check_selected_attr : check_attr);
(void) wprintw(win,
(data->checkflag == FLAG_CHECK) ? "[%c]" : "(%c)",
states[item->state]);
- (void) wattrset(win, menubox_attr);
+ dlg_attrset(win, menubox_attr);
(void) waddch(win, ' ');
if (both) {
@@ -94,7 +94,7 @@ print_item(ALL_DATA * data,
if (selected) {
dlg_item_help(item->help);
}
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
static void
@@ -181,6 +181,7 @@ dlg_checklist(const char *title,
DLG_KEYS_DATA( DLGK_PAGE_NEXT, DLGK_MOUSE(KEY_NPAGE) ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE) ),
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -201,16 +202,29 @@ dlg_checklist(const char *title,
int result = DLG_EXIT_UNKNOWN;
int num_states;
WINDOW *dialog;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
const char **buttons = dlg_ok_labels();
const char *widget_name;
+ DLG_TRACE(("# %s args:\n", flag ? "checklist" : "radiolist"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("lheight", list_height);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+ DLG_TRACE2S("states", states);
+ DLG_TRACE2N("flag", flag);
+ DLG_TRACE2N("current", *current_item);
+
+ dialog_state.plain_buttons = TRUE;
+
memset(&all, 0, sizeof(all));
all.items = items;
all.item_no = item_no;
dlg_does_output();
- dlg_tab_correct_str(prompt);
/*
* If this is a radiobutton list, ensure that no more than one item is
@@ -237,6 +251,9 @@ dlg_checklist(const char *title,
retry:
#endif
+ prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(prompt);
+
all.use_height = list_height;
use_width = dlg_calc_list_width(item_no, items) + 10;
use_width = MAX(26, use_width);
@@ -275,7 +292,7 @@ dlg_checklist(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
all.use_width = width - 6;
@@ -381,7 +398,7 @@ dlg_checklist(const char *title,
choice = (key - KEY_MAX);
print_list(&all, choice, scrollamt, max_choice);
- key = ' '; /* force the selected item to toggle */
+ key = DLGK_TOGGLE; /* force the selected item to toggle */
} else {
beep();
continue;
@@ -396,7 +413,7 @@ dlg_checklist(const char *title,
* (any number of items can be selected) or radio list (zero or one
* items can be selected).
*/
- if (key == ' ') {
+ if (key == DLGK_TOGGLE) {
int current = scrollamt + choice;
int next = items[current].state + 1;
@@ -555,14 +572,15 @@ dlg_checklist(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
- /* repaint */
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
goto retry;
#endif
default:
diff --git a/contrib/dialog/config.guess b/contrib/dialog/config.guess
index b79252d6b103..883a6713bf03 100755
--- a/contrib/dialog/config.guess
+++ b/contrib/dialog/config.guess
@@ -1,8 +1,8 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2013-06-10'
+timestamp='2018-05-19'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2013-06-10'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -24,12 +24,12 @@ timestamp='2013-06-10'
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
-# Originally written by Per Bothner.
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -39,7 +39,7 @@ Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -50,7 +50,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -106,10 +106,10 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
+case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+ ,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
@@ -132,14 +132,14 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-case "${UNAME_SYSTEM}" in
+case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
- eval $set_cc_for_build
- cat <<-EOF > $dummy.c
+ eval "$set_cc_for_build"
+ cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
@@ -149,13 +149,20 @@ Linux|GNU|GNU/*)
LIBC=gnu
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
+
+ # If ldd exists, use it to detect musl libc.
+ if command -v ldd >/dev/null && \
+ ldd --version 2>&1 | grep -q ^musl
+ then
+ LIBC=musl
+ fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
@@ -168,21 +175,31 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ "/sbin/$sysctl" 2>/dev/null || \
+ "/usr/sbin/$sysctl" 2>/dev/null || \
+ echo unknown)`
+ case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ earmv*)
+ arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine="${arch}${endian}"-unknown
+ ;;
+ *) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
+ # to ELF recently (or will in the future) and ABI.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ os=netbsdelf
+ ;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
@@ -197,44 +214,67 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
os=netbsd
;;
esac
+ # Determine ABI tags.
+ case "$UNAME_MACHINE_ARCH" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+ ;;
+ esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
+ case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
+ echo "$machine-${os}${release}${abi-}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
+ exit ;;
+ *:LibertyBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+ echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
+ exit ;;
+ *:MidnightBSD:*:*)
+ echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
+ *:Sortix:*:*)
+ echo "$UNAME_MACHINE"-unknown-sortix
+ exit ;;
+ *:Redox:*:*)
+ echo "$UNAME_MACHINE"-unknown-redox
+ exit ;;
+ mips:OSF1:*.*)
+ echo mips-dec-osf1
+ exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
@@ -251,63 +291,54 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
+ UNAME_MACHINE=alpha ;;
"EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
+ UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
+ UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
+ UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
+ UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
+ UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
+ UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
+ UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
+ UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
+ UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
+ UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
- 21064:Windows_NT:50:3)
- echo alpha-dec-winnt3.5
- exit ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
+ echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
+ echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -319,7 +350,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
- echo arm-acorn-riscix${UNAME_RELEASE}
+ echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
@@ -346,38 +377,38 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
- echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
- echo i386-pc-auroraux${UNAME_RELEASE}
+ echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
+ eval "$set_cc_for_build"
+ SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
- SUN_ARCH="x86_64"
+ SUN_ARCH=x86_64
fi
fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
- echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
@@ -386,25 +417,25 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
- echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
- test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
- echo m68k-sun-sunos${UNAME_RELEASE}
+ echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
- echo sparc-sun-sunos${UNAME_RELEASE}
+ echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
- echo sparc-auspex-sunos${UNAME_RELEASE}
+ echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
@@ -415,44 +446,44 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
+ echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
+ echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
+ echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
+ echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
- echo powerpc-apple-machten${UNAME_RELEASE}
+ echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
- echo mips-dec-ultrix${UNAME_RELEASE}
+ echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
- echo vax-dec-ultrix${UNAME_RELEASE}
+ echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
- echo clipper-intergraph-clix${UNAME_RELEASE}
+ echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
@@ -461,23 +492,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
- printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
- printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
- printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+ dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
- echo mips-mips-riscos${UNAME_RELEASE}
+ echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
@@ -503,17 +534,17 @@ EOF
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
+ if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
+ [ "$TARGET_BINARY_INTERFACE"x = x ]
then
- echo m88k-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dgux"$UNAME_RELEASE"
else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
@@ -530,7 +561,7 @@ EOF
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
- echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
@@ -542,14 +573,14 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
@@ -560,7 +591,7 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
@@ -574,26 +605,27 @@ EOF
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
- echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
- ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
- echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
@@ -608,28 +640,28 @@ EOF
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- case "${UNAME_MACHINE}" in
- 9000/31? ) HP_ARCH=m68000 ;;
- 9000/[34]?? ) HP_ARCH=m68k ;;
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ case "$UNAME_MACHINE" in
+ 9000/31?) HP_ARCH=m68000 ;;
+ 9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ case "$sc_cpu_version" in
+ 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ case "$sc_kernel_bits" in
+ 32) HP_ARCH=hppa2.0n ;;
+ 64) HP_ARCH=hppa2.0w ;;
+ '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ if [ "$HP_ARCH" = "" ]; then
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -662,13 +694,13 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
+ if [ "$HP_ARCH" = hppa2.0w ]
then
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
@@ -679,23 +711,23 @@ EOF
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
- HP_ARCH="hppa2.0w"
+ HP_ARCH=hppa2.0w
else
- HP_ARCH="hppa64"
+ HP_ARCH=hppa64
fi
fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
+ HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
@@ -720,11 +752,11 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
- 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
@@ -733,7 +765,7 @@ EOF
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
- hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
@@ -741,9 +773,9 @@ EOF
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
- echo ${UNAME_MACHINE}-unknown-osf1mk
+ echo "$UNAME_MACHINE"-unknown-osf1mk
else
- echo ${UNAME_MACHINE}-unknown-osf1
+ echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
@@ -768,127 +800,109 @@ EOF
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
- echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+ FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
- echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
+ echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
- case ${UNAME_PROCESSOR} in
+ case "$UNAME_PROCESSOR" in
amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=x86_64 ;;
+ i386)
+ UNAME_PROCESSOR=i586 ;;
esac
+ echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
+ echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
- echo ${UNAME_MACHINE}-pc-mingw64
+ echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:MSYS*:*)
- echo ${UNAME_MACHINE}-pc-msys
+ echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ *:MSYS*:*)
+ echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
+ echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
- case ${UNAME_MACHINE} in
+ case "$UNAME_MACHINE" in
x86)
- echo i586-pc-interix${UNAME_RELEASE}
+ echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
- echo x86_64-unknown-interix${UNAME_RELEASE}
+ echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
+ echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- 8664:Windows_NT:*)
- echo x86_64-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
+ echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
- p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
prep*:SunOS:5.*:*)
- echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
+ echo "$UNAME_MACHINE"-pc-minix
exit ;;
aarch64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -901,58 +915,64 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
- echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
+ exit ;;
+ e2k:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
- echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
+ exit ;;
+ k1om:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ eval "$set_cc_for_build"
+ sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
@@ -966,64 +986,70 @@ EOF
#endif
#endif
EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
+ test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
- or1k:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ mips64el:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
- or32:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-"$LIBC"
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-${LIBC}
+ echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-${LIBC}
+ echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
- PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
- *) echo hppa-unknown-linux-${LIBC} ;;
+ PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
+ PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
+ *) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-${LIBC}
+ echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-${LIBC}
+ echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
- echo powerpc64le-unknown-linux-${LIBC}
+ echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
- echo powerpcle-unknown-linux-${LIBC}
+ echo powerpcle-unknown-linux-"$LIBC"
+ exit ;;
+ riscv32:Linux:*:* | riscv64:Linux:*:*)
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1037,34 +1063,34 @@ EOF
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
- echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
+ echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
+ echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
+ echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
+ echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
+ echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ i*86:*:4.*:*)
+ UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
@@ -1074,12 +1100,12 @@ EOF
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
- echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
@@ -1089,9 +1115,9 @@ EOF
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
- echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
- echo ${UNAME_MACHINE}-pc-sysv32
+ echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
@@ -1099,7 +1125,7 @@ EOF
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
+ # prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
@@ -1111,9 +1137,9 @@ EOF
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
- echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
- echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
@@ -1133,9 +1159,9 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
@@ -1144,28 +1170,28 @@ EOF
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
- echo m68k-unknown-lynxos${UNAME_RELEASE}
+ echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
- echo sparc-unknown-lynxos${UNAME_RELEASE}
+ echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
- echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
- echo mips-dde-sysv${UNAME_RELEASE}
+ echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
@@ -1176,7 +1202,7 @@ EOF
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- echo ${UNAME_MACHINE}-sni-sysv4
+ echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
@@ -1196,23 +1222,23 @@ EOF
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
+ echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
- echo m68k-apple-aux${UNAME_RELEASE}
+ echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv"$UNAME_RELEASE"
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
@@ -1231,67 +1257,93 @@ EOF
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
+ echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
+ echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
+ echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
+ echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
+ echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
+ echo sx8r-nec-superux"$UNAME_RELEASE"
+ exit ;;
+ SX-ACE:SUPER-UX:*:*)
+ echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- eval $set_cc_for_build
+ eval "$set_cc_for_build"
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- case $UNAME_PROCESSOR in
- i386) UNAME_PROCESSOR=x86_64 ;;
- powerpc) UNAME_PROCESSOR=powerpc64 ;;
- esac
+ if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
+ if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+ if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_PPC >/dev/null
+ then
+ UNAME_PROCESSOR=powerpc
+ fi
fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
fi
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
+ if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
- NEO-?:NONSTOP_KERNEL:*:*)
- echo neo-tandem-nsk${UNAME_RELEASE}
+ NEO-*:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
+ echo nse-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSR-*:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk"$UNAME_RELEASE"
exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
+ NSV-*:NONSTOP_KERNEL:*:*)
+ echo nsv-tandem-nsk"$UNAME_RELEASE"
+ exit ;;
+ NSX-*:NONSTOP_KERNEL:*:*)
+ echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
@@ -1300,18 +1352,18 @@ EOF
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
- if test "$cputype" = "386"; then
+ if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
- echo ${UNAME_MACHINE}-unknown-plan9
+ echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
@@ -1332,14 +1384,14 @@ EOF
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
+ case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
@@ -1348,182 +1400,48 @@ EOF
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
+ echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
+ echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
- echo ${UNAME_MACHINE}-unknown-esx
+ echo "$UNAME_MACHINE"-unknown-esx
+ exit ;;
+ amd64:Isilon\ OneFS:*:*)
+ echo x86_64-unknown-onefs
exit ;;
esac
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
-#ifdef _SEQUENT_
-# include <sys/types.h>
-# include <sys/utsname.h>
-#endif
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
- /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
- I don't know.... */
- printf ("mips-sony-bsd\n"); exit (0);
-#else
-#include <sys/param.h>
- printf ("m68k-sony-newsos%s\n",
-#ifdef NEWSOS4
- "4"
-#else
- ""
-#endif
- ); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
- printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
- int version;
- version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
- exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
- printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
- printf ("ns32k-encore-mach\n"); exit (0);
-#else
- printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
+echo "$0: unable to guess system type" >&2
-#if defined (__386BSD__)
- printf ("i386-pc-bsd\n"); exit (0);
-#endif
+case "$UNAME_MACHINE:$UNAME_SYSTEM" in
+ mips:Linux | mips64:Linux)
+ # If we got here on MIPS GNU/Linux, output extra information.
+ cat >&2 <<EOF
-#if defined (sequent)
-#if defined (i386)
- printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
- printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
- struct utsname un;
-
- uname(&un);
-
- if (strncmp(un.version, "V2", 2) == 0) {
- printf ("i386-sequent-ptx2\n"); exit (0);
- }
- if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
- printf ("i386-sequent-ptx1\n"); exit (0);
- }
- printf ("i386-sequent-ptx\n"); exit (0);
-
-#endif
-
-#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
-#endif
-
-#if defined (alliant) && defined (i860)
- printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
- exit (1);
-}
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
EOF
-
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
- case `getsysinfo -f cpu_type` in
- c1*)
- echo c1-convex-bsd
- exit ;;
- c2*)
- if getsysinfo -f scalar_acc
- then echo c32-convex-bsd
- else echo c2-convex-bsd
- fi
- exit ;;
- c34*)
- echo c34-convex-bsd
- exit ;;
- c38*)
- echo c38-convex-bsd
- exit ;;
- c4*)
- echo c4-convex-bsd
- exit ;;
- esac
-fi
+ ;;
+esac
cat >&2 <<EOF
-$0: unable to guess system type
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+ https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
config.guess timestamp = $timestamp
@@ -1542,16 +1460,16 @@ hostinfo = `(hostinfo) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/contrib/dialog/config.sub b/contrib/dialog/config.sub
index 85a159e57939..d1f5b5490349 100755
--- a/contrib/dialog/config.sub
+++ b/contrib/dialog/config.sub
@@ -1,8 +1,8 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright 1992-2013 Free Software Foundation, Inc.
+# Copyright 1992-2018 Free Software Foundation, Inc.
-timestamp='2013-09-05'
+timestamp='2018-05-24'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -15,7 +15,7 @@ timestamp='2013-09-05'
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -25,7 +25,7 @@ timestamp='2013-09-05'
# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -33,7 +33,7 @@ timestamp='2013-09-05'
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
-# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
@@ -53,12 +53,11 @@ timestamp='2013-09-05'
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
-Operation modes:
+Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
@@ -68,7 +67,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright 1992-2013 Free Software Foundation, Inc.
+Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -95,7 +94,7 @@ while test $# -gt 0 ; do
*local*)
# First pass through any local machine types.
- echo $1
+ echo "$1"
exit ;;
* )
@@ -111,134 +110,455 @@ case $# in
exit 1;;
esac
-# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
-# Here we must recognize all the valid KERNEL-OS combinations.
-maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
-case $maybe_os in
- nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
- knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
- os=-$maybe_os
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
- ;;
- android-linux)
- os=-linux-android
- basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
- ;;
- *)
- basic_machine=`echo $1 | sed 's/-[^-]*$//'`
- if [ $basic_machine != $1 ]
- then os=`echo $1 | sed 's/.*-/-/'`
- else os=; fi
- ;;
-esac
+# Split fields of configuration type
+IFS="-" read -r field1 field2 field3 field4 <<EOF
+$1
+EOF
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work. We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
- -sun*os*)
- # Prevent following clause from handling this invalid input.
- ;;
- -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
- -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
- -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
- -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
- -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
- -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze*)
- os=
- basic_machine=$1
- ;;
- -bluegene*)
- os=-cnk
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
- os=
- basic_machine=$1
- ;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
- -hiux*)
- os=-hiuxwe2
- ;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5)
- os=-sco3.2v5
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco4)
- os=-sco3.2v4
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2.[4-9]*)
- os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco3.2v[4-9]*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -sco*)
- os=-sco3.2v2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -isc)
- os=-isc2.2
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -clix*)
- basic_machine=clipper-intergraph
- ;;
- -isc*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
- -lynx*178)
- os=-lynxos178
- ;;
- -lynx*5)
- os=-lynxos5
- ;;
- -lynx*)
- os=-lynxos
+# Separate into logical components for further validation
+case $1 in
+ *-*-*-*-*)
+ echo Invalid configuration \`"$1"\': more than four components >&2
+ exit 1
;;
- -ptx*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ *-*-*-*)
+ basic_machine=$field1-$field2
+ os=$field3-$field4
;;
- -windowsnt*)
- os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ *-*-*)
+ # Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+ # parts
+ maybe_os=$field2-$field3
+ case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
+ | linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
+ | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+ | netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+ | storm-chaos* | os2-emx* | rtmk-nova*)
+ basic_machine=$field1
+ os=$maybe_os
+ ;;
+ android-linux)
+ basic_machine=$field1-unknown
+ os=linux-android
+ ;;
+ *)
+ basic_machine=$field1-$field2
+ os=$field3
+ ;;
+ esac
;;
- -psos*)
- os=-psos
+ *-*)
+ # Second component is usually, but not always the OS
+ case $field2 in
+ # Prevent following clause from handling this valid os
+ sun*os*)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ # Manufacturers
+ dec* | mips* | sequent* | encore* | pc532* | sgi* | sony* \
+ | att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+ | unicom* | ibm* | next | hp | isi* | apollo | altos* \
+ | convergent* | ncr* | news | 32* | 3600* | 3100* | hitachi* \
+ | c[123]* | convex* | sun | crds | omron* | dg | ultra | tti* \
+ | harris | dolphin | highlevel | gould | cbm | ns | masscomp \
+ | apple | axis | knuth | cray | microblaze* \
+ | sim | cisco | oki | wec | wrs | winbond)
+ basic_machine=$field1-$field2
+ os=
+ ;;
+ *)
+ basic_machine=$field1
+ os=$field2
+ ;;
+ esac
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ *)
+ # Convert single-component short-hands not valid as part of
+ # multi-component configurations.
+ case $field1 in
+ 386bsd)
+ basic_machine=i386-pc
+ os=bsd
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=scout
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=bsd
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=sysv
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=linux
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=cegcc
+ ;;
+ cray)
+ basic_machine=j90-cray
+ os=unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=unicosmp
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=msdosdjgpp
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=ebmon
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=ose
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=go32
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=sysv3
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=hpux
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=proelf
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=mach
+ ;;
+ vsta)
+ basic_machine=i386-unknown
+ os=vsta
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=linux
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=sysv
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=mingw32ce
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=msdos
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=sysv
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=nonstopux
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=os68k
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=linux
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=coff
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=seiux
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=sysv2
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=sysv4
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=solaris2
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=unicos
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=tops20
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=vms
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=vxworks
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=mingw32
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=unicos
+ ;;
+ *)
+ basic_machine=$1
+ os=
+ ;;
+ esac
;;
esac
@@ -253,18 +573,20 @@ case $basic_machine in
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
- | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
+ | ba \
| be32 | be64 \
| bfin \
- | c4x | c8051 | clipper \
+ | c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
- | epiphany \
- | fido | fr30 | frv \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
- | i370 | i860 | i960 | ia64 \
+ | i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
+ | k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
@@ -282,8 +604,10 @@ case $basic_machine in
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
@@ -293,16 +617,18 @@ case $basic_machine in
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
+ | nfp \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
- | open8 \
- | or1k | or32 \
- | pdp10 | pdp11 | pj | pjl \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pru \
| pyramid \
+ | riscv32 | riscv64 \
| rl78 | rx \
| score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -310,7 +636,8 @@ case $basic_machine in
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
- | we32k \
+ | visium \
+ | wasm32 \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
@@ -324,22 +651,28 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
+ ;;
+ m9s12z | m68hcs12z | hcs12z | s12z)
+ basic_machine=s12z-unknown
+ os=${os:-none}
;;
ms1)
basic_machine=mt-unknown
;;
-
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
- os=-none
+ os=${os:-none}
;;
xscaleeb)
basic_machine=armeb-unknown
@@ -355,11 +688,6 @@ case $basic_machine in
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
- # Object if more than one company name word.
- *-*-*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
- exit 1
- ;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
@@ -369,18 +697,20 @@ case $basic_machine in
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
+ | ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
- | c8051-* | clipper-* | craynv-* | cydra-* \
+ | c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
- | elxsi-* \
+ | e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
- | i*86-* | i860-* | i960-* | ia64-* \
+ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
+ | k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
@@ -400,8 +730,10 @@ case $basic_machine in
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
@@ -410,19 +742,23 @@ case $basic_machine in
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
+ | nfp-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
+ | or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pru-* \
| pyramid-* \
+ | riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
@@ -430,6 +766,8 @@ case $basic_machine in
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
+ | visium-* \
+ | wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
@@ -442,138 +780,77 @@ case $basic_machine in
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
abacus)
basic_machine=abacus-unknown
;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
- am29k)
- basic_machine=a29k-none
- os=-bsd
- ;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- amdahl)
- basic_machine=580-amdahl
- os=-sysv
+ basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
- amigaos | amigados)
- basic_machine=m68k-unknown
- os=-amigaos
- ;;
- amigaunix | amix)
- basic_machine=m68k-unknown
- os=-sysv4
- ;;
- apollo68)
- basic_machine=m68k-apollo
- os=-sysv
- ;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
- aux)
- basic_machine=m68k-apple
- os=-aux
- ;;
- balance)
- basic_machine=ns32k-sequent
- os=-dynix
- ;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
+ asmjs)
+ basic_machine=asmjs-unknown
;;
blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
bluegene*)
basic_machine=powerpc-ibm
- os=-cnk
+ os=cnk
;;
c54x-*)
- basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c55x-*)
- basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c6x-*)
- basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
+ os=${os:-unicos}
;;
convex-c1)
basic_machine=c1-convex
- os=-bsd
+ os=bsd
;;
convex-c2)
basic_machine=c2-convex
- os=-bsd
+ os=bsd
;;
convex-c32)
basic_machine=c32-convex
- os=-bsd
+ os=bsd
;;
convex-c34)
basic_machine=c34-convex
- os=-bsd
+ os=bsd
;;
convex-c38)
basic_machine=c38-convex
- os=-bsd
- ;;
- cray | j90)
- basic_machine=j90-cray
- os=-unicos
- ;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
+ os=bsd
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
- os=-elf
+ os=${os:-elf}
;;
crds | unos)
basic_machine=m68k-crds
@@ -586,7 +863,7 @@ case $basic_machine in
;;
crx)
basic_machine=crx-unknown
- os=-elf
+ os=${os:-elf}
;;
da30 | da30-*)
basic_machine=m68k-da30
@@ -596,50 +873,38 @@ case $basic_machine in
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
- os=-tops10
+ os=tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
- os=-tops20
+ os=tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
- delta88)
- basic_machine=m88k-motorola
- os=-sysv3
- ;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
- os=-bosx
+ os=${os:-bosx}
;;
- dpx2* | dpx2*-bull)
+ dpx2*)
basic_machine=m68k-bull
- os=-sysv3
+ os=sysv3
;;
- ebmon29k)
- basic_machine=a29k-amd
- os=-ebmon
+ e500v[12])
+ basic_machine=powerpc-unknown
+ os=$os"spe"
;;
- elxsi)
- basic_machine=elxsi-elxsi
- os=-bsd
+ e500v[12]-*)
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=$os"spe"
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=${os:-bsd}
;;
fx2800)
basic_machine=i860-alliant
@@ -647,45 +912,13 @@ case $basic_machine in
genix)
basic_machine=ns32k-ns
;;
- gmicro)
- basic_machine=tron-gmicro
- os=-sysv
- ;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- h8300hms)
- basic_machine=h8300-hitachi
- os=-hms
- ;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
- harris)
- basic_machine=m88k-harris
- os=-sysv3
+ os=hiuxwe2
;;
hp300-*)
basic_machine=m68k-hp
;;
- hp300bsd)
- basic_machine=m68k-hp
- os=-bsd
- ;;
- hp300hpux)
- basic_machine=m68k-hp
- os=-hpux
- ;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
@@ -715,193 +948,82 @@ case $basic_machine in
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
- hppa-next)
- os=-nextstep3
- ;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv32
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv32
;;
i*86v4*)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv4
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv4
;;
i*86v)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-sysv
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=sysv
;;
i*86sol2)
- basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
- os=-solaris2
+ basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
+ os=solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
+ j90 | j90-cray)
+ basic_machine=j90-cray
+ os=${os:-unicos}
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
- -irix*)
+ irix*)
;;
*)
- os=-irix4
+ os=irix4
;;
esac
;;
- isi68 | isi)
- basic_machine=m68k-isi
- os=-sysv
- ;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- m88k-omron*)
- basic_machine=m88k-omron
- ;;
- magnum | m3230)
- basic_machine=mips-mips
- os=-sysv
- ;;
- merlin)
- basic_machine=ns32k-utek
- os=-sysv
+ basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
- mingw64)
- basic_machine=x86_64-pc
- os=-mingw64
- ;;
- mingw32)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
basic_machine=m68000-convergent
;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
- os=-mint
+ os=mint
;;
mips3*-*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
- basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
- ;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
+ basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- msys)
- basic_machine=i686-pc
- os=-msys
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
- nacl)
- basic_machine=le32-unknown
- os=-nacl
- ;;
- ncr3000)
- basic_machine=i486-ncr
- os=-sysv4
- ;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
- news | news700 | news800 | news900)
- basic_machine=m68k-sony
- os=-newsos
- ;;
- news1000)
- basic_machine=m68030-sony
- os=-newsos
+ basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
news-3600 | risc-news)
basic_machine=mips-sony
- os=-newsos
- ;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
+ os=newsos
;;
- next | m*-next )
+ next | m*-next)
basic_machine=m68k-next
case $os in
- -nextstep* )
+ nextstep* )
;;
- -ns2*)
- os=-nextstep2
+ ns2*)
+ os=nextstep2
;;
*)
- os=-nextstep3
+ os=nextstep3
;;
esac
;;
- nh3000)
- basic_machine=m68k-harris
- os=-cxux
- ;;
- nh[45]000)
- basic_machine=m88k-harris
- os=-cxux
- ;;
- nindy960)
- basic_machine=i960-intel
- os=-nindy
- ;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
basic_machine=np1-gould
;;
@@ -914,40 +1036,26 @@ case $basic_machine in
nsr-tandem)
basic_machine=nsr-tandem
;;
+ nsv-tandem)
+ basic_machine=nsv-tandem
+ ;;
+ nsx-tandem)
+ basic_machine=nsx-tandem
+ ;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
- os=-proelf
+ os=proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
- os=-hiuxwe2
- ;;
- paragon)
- basic_machine=i860-intel
- os=-osf
- ;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
+ os=hiuxwe2
;;
parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
+ basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
+ os=linux
;;
pbd)
basic_machine=sparc-tti
@@ -962,7 +1070,7 @@ case $basic_machine in
basic_machine=i386-pc
;;
pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
@@ -977,16 +1085,16 @@ case $basic_machine in
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
- basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
@@ -996,43 +1104,27 @@ case $basic_machine in
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
- basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppcle | powerpclittle | ppc-le | powerpc-little)
+ ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
- basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos | rdos64)
- basic_machine=x86_64-pc
- os=-rdos
- ;;
- rdos32)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
rm[46]00)
basic_machine=mips-siemens
;;
@@ -1045,10 +1137,6 @@ case $basic_machine in
s390x | s390x-*)
basic_machine=s390x-ibm
;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
@@ -1057,32 +1145,17 @@ case $basic_machine in
;;
sde)
basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
+ os=${os:-elf}
;;
sequent)
basic_machine=i386-sequent
;;
- sh)
- basic_machine=sh-hitachi
- os=-hms
- ;;
sh5el)
basic_machine=sh5le-unknown
;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
+ simso-wrs)
basic_machine=sparclite-wrs
- os=-vxworks
- ;;
- sps7)
- basic_machine=m68k-bull
- os=-sysv2
+ os=vxworks
;;
spur)
basic_machine=spur-unknown
@@ -1090,44 +1163,12 @@ case $basic_machine in
st2000)
basic_machine=m68k-tandem
;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
strongarm-* | thumb-*)
- basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
- sun2os3)
- basic_machine=m68000-sun
- os=-sunos3
- ;;
- sun2os4)
- basic_machine=m68000-sun
- os=-sunos4
- ;;
- sun3os3)
- basic_machine=m68k-sun
- os=-sunos3
- ;;
- sun3os4)
- basic_machine=m68k-sun
- os=-sunos4
- ;;
- sun4os3)
- basic_machine=sparc-sun
- os=-sunos3
- ;;
- sun4os4)
- basic_machine=sparc-sun
- os=-sunos4
- ;;
- sun4sol2)
- basic_machine=sparc-sun
- os=-solaris2
- ;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
@@ -1137,25 +1178,9 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
- symmetry)
- basic_machine=i386-sequent
- os=-dynix
- ;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
tile*)
basic_machine=$basic_machine-unknown
- os=-linux-gnu
+ os=linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
@@ -1163,85 +1188,32 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
- udi29k)
- basic_machine=a29k-amd
- os=-udi
- ;;
- ultra3)
- basic_machine=a29k-nyu
- os=-sym1
- ;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
- vaxv)
- basic_machine=vax-dec
- os=-sysv
- ;;
- vms)
- basic_machine=vax-dec
- os=-vms
- ;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
- vxworks960)
- basic_machine=i960-wrs
- os=-vxworks
- ;;
- vxworks68)
- basic_machine=m68k-wrs
- os=-vxworks
- ;;
- vxworks29k)
- basic_machine=a29k-wrs
- os=-vxworks
- ;;
w65*)
basic_machine=w65-wdc
- os=-none
+ os=none
;;
w89k-*)
basic_machine=hppa1.1-winbond
- os=-proelf
+ os=proelf
;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
+ x64)
+ basic_machine=x86_64-pc
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
- basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
- ;;
- ymp)
- basic_machine=ymp-cray
- os=-unicos
- ;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
none)
basic_machine=none-none
- os=-none
+ os=${os:-none}
;;
# Here we handle the default manufacturer of certain CPU types. It is in
@@ -1267,10 +1239,6 @@ case $basic_machine in
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
@@ -1280,9 +1248,6 @@ case $basic_machine in
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
- basic_machine=sparc-sun
- ;;
cydra)
basic_machine=cydra-cydrome
;;
@@ -1302,7 +1267,7 @@ case $basic_machine in
# Make sure to match an already-canonicalized machine name.
;;
*)
- echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
@@ -1310,10 +1275,10 @@ esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
- basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
- basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
@@ -1321,197 +1286,246 @@ esac
# Decode manufacturer-specific aliases for certain operating systems.
-if [ x"$os" != x"" ]
+if [ x$os != x ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
- # -solaris* is a basic system type, with this one exception.
- -auroraux)
- os=-auroraux
+ # First match some system type aliases that might get confused
+ # with valid system types.
+ # solaris* is a basic system type, with this one exception.
+ auroraux)
+ os=auroraux
;;
- -solaris1 | -solaris1.*)
- os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ bluegene*)
+ os=cnk
;;
- -solaris)
- os=-solaris2
+ solaris1 | solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
- -svr4*)
- os=-sysv4
+ solaris)
+ os=solaris2
;;
- -unixware*)
- os=-sysv4.2uw
+ unixware*)
+ os=sysv4.2uw
;;
- -gnu/linux*)
+ gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
- # First accept the basic system types.
+ # es1800 is here to avoid being matched by es* (a different OS)
+ es1800*)
+ os=ose
+ ;;
+ # Some version numbers need modification
+ chorusos*)
+ os=chorusos
+ ;;
+ isc)
+ os=isc2.2
+ ;;
+ sco6)
+ os=sco5v6
+ ;;
+ sco5)
+ os=sco3.2v5
+ ;;
+ sco4)
+ os=sco3.2v4
+ ;;
+ sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ ;;
+ sco3.2v[4-9]* | sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ ;;
+ scout)
+ # Don't match below
+ ;;
+ sco*)
+ os=sco3.2v2
+ ;;
+ psos*)
+ os=psos
+ ;;
+ # Now accept the basic system types.
# The portable systems comes first.
- # Each alternative MUST END IN A *, to match a version number.
- # -sysv* is not here because it comes later, after sysvr4.
- -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
- | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* | -plan9* \
- | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
- | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
- | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -bitrig* | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
- | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
- | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-musl* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
+ # Each alternative MUST end in a * to match a version number.
+ # sysv* is not here because it comes later, after sysvr4.
+ gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
+ | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+ | sym* | kopensolaris* | plan9* \
+ | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+ | aos* | aros* | cloudabi* | sortix* \
+ | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+ | clix* | riscos* | uniplus* | iris* | rtu* | xenix* \
+ | knetbsd* | mirbsd* | netbsd* \
+ | bitrig* | openbsd* | solidbsd* | libertybsd* \
+ | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
+ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+ | udi* | eabi* | lites* | ieee* | go32* | aux* | hcos* \
+ | chorusrdb* | cegcc* | glidix* \
+ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+ | midipix* | mingw32* | mingw64* | linux-gnu* | linux-android* \
+ | linux-newlib* | linux-musl* | linux-uclibc* \
+ | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+ | interix* | uwin* | mks* | rhapsody* | darwin* \
+ | openstep* | oskit* | conix* | pw32* | nonstopux* \
+ | storm-chaos* | tops10* | tenex* | tops20* | its* \
+ | os2* | vos* | palmos* | uclinux* | nucleus* \
+ | morphos* | superux* | rtmk* | windiss* \
+ | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+ | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+ | midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
+ qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
- os=-nto$os
+ os=nto-$os
;;
esac
;;
- -nto-qnx*)
+ hiux*)
+ os=hiuxwe2
;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ nto-qnx*)
;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
+ sim | xray | os68k* | v88r* \
+ | windows* | osx | abug | netware* | os9* \
+ | macos* | mpw* | magic* | mmixware* | mon960* | lnews*)
;;
- -linux-dietlibc)
- os=-linux-dietlibc
+ linux-dietlibc)
+ os=linux-dietlibc
;;
- -linux*)
+ linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
- -sunos5*)
- os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ lynx*178)
+ os=lynxos178
+ ;;
+ lynx*5)
+ os=lynxos5
;;
- -sunos6*)
- os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ lynx*)
+ os=lynxos
;;
- -opened*)
- os=-openedition
+ mac*)
+ os=`echo "$os" | sed -e 's|mac|macos|'`
;;
- -os400*)
- os=-os400
+ opened*)
+ os=openedition
;;
- -wince*)
- os=-wince
+ os400*)
+ os=os400
;;
- -osfrose*)
- os=-osfrose
+ sunos5*)
+ os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
- -osf*)
- os=-osf
+ sunos6*)
+ os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
- -utek*)
- os=-bsd
+ wince*)
+ os=wince
;;
- -dynix*)
- os=-bsd
+ utek*)
+ os=bsd
;;
- -acis*)
- os=-aos
+ dynix*)
+ os=bsd
;;
- -atheos*)
- os=-atheos
+ acis*)
+ os=aos
;;
- -syllable*)
- os=-syllable
+ atheos*)
+ os=atheos
;;
- -386bsd)
- os=-bsd
+ syllable*)
+ os=syllable
+ ;;
+ 386bsd)
+ os=bsd
;;
- -ctix* | -uts*)
- os=-sysv
+ ctix* | uts*)
+ os=sysv
;;
- -nova*)
- os=-rtmk-nova
+ nova*)
+ os=rtmk-nova
;;
- -ns2 )
- os=-nextstep2
+ ns2)
+ os=nextstep2
;;
- -nsk*)
- os=-nsk
+ nsk*)
+ os=nsk
;;
# Preserve the version number of sinix5.
- -sinix5.*)
+ sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
- -sinix*)
- os=-sysv4
+ sinix*)
+ os=sysv4
;;
- -tpf*)
- os=-tpf
+ tpf*)
+ os=tpf
;;
- -triton*)
- os=-sysv3
+ triton*)
+ os=sysv3
;;
- -oss*)
- os=-sysv3
+ oss*)
+ os=sysv3
;;
- -svr4)
- os=-sysv4
+ svr4*)
+ os=sysv4
;;
- -svr3)
- os=-sysv3
+ svr3)
+ os=sysv3
;;
- -sysvr4)
- os=-sysv4
+ sysvr4)
+ os=sysv4
;;
- # This must come after -sysvr4.
- -sysv*)
+ # This must come after sysvr4.
+ sysv*)
;;
- -ose*)
- os=-ose
+ ose*)
+ os=ose
;;
- -es1800*)
- os=-ose
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+ os=mint
;;
- -xenix)
- os=-xenix
+ zvmoe)
+ os=zvmoe
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
+ dicos*)
+ os=dicos
;;
- -aros*)
- os=-aros
+ pikeos*)
+ # Until real need of OS specific support for
+ # particular features comes up, bare metal
+ # configurations are quite functional.
+ case $basic_machine in
+ arm*)
+ os=eabi
+ ;;
+ *)
+ os=elf
+ ;;
+ esac
;;
- -zvmoe)
- os=-zvmoe
+ nacl*)
;;
- -dicos*)
- os=-dicos
+ ios)
;;
- -nacl*)
+ none)
;;
- -none)
+ *-eabi)
;;
*)
- # Get rid of the `-' at the beginning of $os.
- os=`echo $os | sed 's/[^-]*-//'`
- echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
@@ -1529,179 +1543,179 @@ else
case $basic_machine in
score-*)
- os=-elf
+ os=elf
;;
spu-*)
- os=-elf
+ os=elf
;;
*-acorn)
- os=-riscix1.2
+ os=riscix1.2
;;
arm*-rebel)
- os=-linux
+ os=linux
;;
arm*-semi)
- os=-aout
+ os=aout
;;
c4x-* | tic4x-*)
- os=-coff
+ os=coff
;;
c8051-*)
- os=-elf
+ os=elf
+ ;;
+ clipper-intergraph)
+ os=clix
;;
hexagon-*)
- os=-elf
+ os=elf
;;
tic54x-*)
- os=-coff
+ os=coff
;;
tic55x-*)
- os=-coff
+ os=coff
;;
tic6x-*)
- os=-coff
+ os=coff
;;
# This must come before the *-dec entry.
pdp10-*)
- os=-tops20
+ os=tops20
;;
pdp11-*)
- os=-none
+ os=none
;;
*-dec | vax-*)
- os=-ultrix4.2
+ os=ultrix4.2
;;
m68*-apollo)
- os=-domain
+ os=domain
;;
i386-sun)
- os=-sunos4.0.2
+ os=sunos4.0.2
;;
m68000-sun)
- os=-sunos3
+ os=sunos3
;;
m68*-cisco)
- os=-aout
+ os=aout
;;
mep-*)
- os=-elf
+ os=elf
;;
mips*-cisco)
- os=-elf
+ os=elf
;;
mips*-*)
- os=-elf
- ;;
- or1k-*)
- os=-elf
+ os=elf
;;
or32-*)
- os=-coff
+ os=coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
- os=-sysv3
+ os=sysv3
;;
sparc-* | *-sun)
- os=-sunos4.1.1
+ os=sunos4.1.1
;;
- *-be)
- os=-beos
+ pru-*)
+ os=elf
;;
- *-haiku)
- os=-haiku
+ *-be)
+ os=beos
;;
*-ibm)
- os=-aix
+ os=aix
;;
*-knuth)
- os=-mmixware
+ os=mmixware
;;
*-wec)
- os=-proelf
+ os=proelf
;;
*-winbond)
- os=-proelf
+ os=proelf
;;
*-oki)
- os=-proelf
+ os=proelf
;;
*-hp)
- os=-hpux
+ os=hpux
;;
*-hitachi)
- os=-hiux
+ os=hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
- os=-sysv
+ os=sysv
;;
*-cbm)
- os=-amigaos
+ os=amigaos
;;
*-dg)
- os=-dgux
+ os=dgux
;;
*-dolphin)
- os=-sysv3
+ os=sysv3
;;
m68k-ccur)
- os=-rtu
+ os=rtu
;;
m88k-omron*)
- os=-luna
+ os=luna
;;
- *-next )
- os=-nextstep
+ *-next)
+ os=nextstep
;;
*-sequent)
- os=-ptx
+ os=ptx
;;
*-crds)
- os=-unos
+ os=unos
;;
*-ns)
- os=-genix
+ os=genix
;;
i370-*)
- os=-mvs
- ;;
- *-next)
- os=-nextstep3
+ os=mvs
;;
*-gould)
- os=-sysv
+ os=sysv
;;
*-highlevel)
- os=-bsd
+ os=bsd
;;
*-encore)
- os=-bsd
+ os=bsd
;;
*-sgi)
- os=-irix
+ os=irix
;;
*-siemens)
- os=-sysv4
+ os=sysv4
;;
*-masscomp)
- os=-rtu
+ os=rtu
;;
f30[01]-fujitsu | f700-fujitsu)
- os=-uxpv
+ os=uxpv
;;
*-rom68k)
- os=-coff
+ os=coff
;;
*-*bug)
- os=-coff
+ os=coff
;;
*-apple)
- os=-macos
+ os=macos
;;
*-atari*)
- os=-mint
+ os=mint
+ ;;
+ *-wrs)
+ os=vxworks
;;
*)
- os=-none
+ os=none
;;
esac
fi
@@ -1712,79 +1726,82 @@ vendor=unknown
case $basic_machine in
*-unknown)
case $os in
- -riscix*)
+ riscix*)
vendor=acorn
;;
- -sunos*)
+ sunos*)
vendor=sun
;;
- -cnk*|-aix*)
+ cnk*|-aix*)
vendor=ibm
;;
- -beos*)
+ beos*)
vendor=be
;;
- -hpux*)
+ hpux*)
vendor=hp
;;
- -mpeix*)
+ mpeix*)
vendor=hp
;;
- -hiux*)
+ hiux*)
vendor=hitachi
;;
- -unos*)
+ unos*)
vendor=crds
;;
- -dgux*)
+ dgux*)
vendor=dg
;;
- -luna*)
+ luna*)
vendor=omron
;;
- -genix*)
+ genix*)
vendor=ns
;;
- -mvs* | -opened*)
+ clix*)
+ vendor=intergraph
+ ;;
+ mvs* | opened*)
vendor=ibm
;;
- -os400*)
+ os400*)
vendor=ibm
;;
- -ptx*)
+ ptx*)
vendor=sequent
;;
- -tpf*)
+ tpf*)
vendor=ibm
;;
- -vxsim* | -vxworks* | -windiss*)
+ vxsim* | vxworks* | windiss*)
vendor=wrs
;;
- -aux*)
+ aux*)
vendor=apple
;;
- -hms*)
+ hms*)
vendor=hitachi
;;
- -mpw* | -macos*)
+ mpw* | macos*)
vendor=apple
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ *mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
vendor=atari
;;
- -vos*)
+ vos*)
vendor=stratus
;;
esac
- basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
-echo $basic_machine$os
+echo "$basic_machine-$os"
exit
# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
+# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
diff --git a/contrib/dialog/configure b/contrib/dialog/configure
index 282cc5d4329d..5b1b53de1533 100755
--- a/contrib/dialog/configure
+++ b/contrib/dialog/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by Autoconf 2.52.20121002.
+# Generated by Autoconf 2.52.20170501.
#
# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
@@ -668,6 +668,10 @@ Program names:
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST build programs to run on HOST [BUILD]
@@ -688,10 +692,12 @@ Optional Packages:
--disable-echo do not display "compiling" commands
--disable-largefile omit support for large files
+ --with-install-prefix=XXX sets DESTDIR, useful for packaging
--with-warnings test: turn on gcc warnings
--with-pkg-config{=path} enable/disable use of pkg-config
--with-package=XXX rename dialog to XXX, library to libXXX.a, etc
--enable-header-subdir install dlg_XXX headers to subdirectory
+ --with-man2html=XXX use XXX rather than groff
--with-libiconv-prefix=DIR
search for libiconv in DIR/include and DIR/lib
--enable-nls use Native Language Support
@@ -709,12 +715,23 @@ Optional Packages:
--disable-libtool-version enable to use libtool's incompatible naming scheme
--with-libtool generate libraries with libtool
--with-libtool-opts=XXX specify additional libtool options
+ --with-export-syms=XXX limit exported symbols using libtool
--with-shared generate shared-libraries
--with-shlib-version=X Specify rel or abi version for shared libs
+ --with-versioned-syms=X markup versioned symbols using ld
--with-curses-dir=DIR directory in which (n)curses is installed
--enable-rpath use rpath option when generating shared libraries
- --with-ncurses compile/link with ncurses library
- --with-ncursesw compile/link with wide-char ncurses library
+ --with-screen=XXX use specified curses-libraries
+ --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-Xaw3dxft link with Xaw 3d xft library
+ --with-neXtaw link with neXT Athena library
+ --with-XawPlus link with Athena-Plus library
+ --with-x use the X Window System
--disable-extras do not include extra dialogs
--disable-rc-file do not include config-file support
--disable-Xdialog do not include Xdialog-style dialogs (1.1)
@@ -796,7 +813,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.20121002. Invocation command line was
+generated by GNU Autoconf 2.52.20170501. Invocation command line was
$ $0 $@
@@ -920,7 +937,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:923: loading site script $ac_site_file" >&5
+ { echo "$as_me:940: 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"
@@ -931,7 +948,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:934: loading cache $cache_file" >&5
+ { echo "$as_me:951: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
@@ -939,7 +956,7 @@ echo "$as_me: loading cache $cache_file" >&6;}
esac
fi
else
- { echo "$as_me:942: creating cache $cache_file" >&5
+ { echo "$as_me:959: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
@@ -955,21 +972,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:958: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+ { echo "$as_me:975: 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:962: error: \`$ac_var' was not set in the previous run" >&5
+ { echo "$as_me:979: 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:968: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:985: 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:970: former value: $ac_old_val" >&5
+ { echo "$as_me:987: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:972: current value: $ac_new_val" >&5
+ { echo "$as_me:989: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
@@ -988,9 +1005,9 @@ echo "$as_me: current value: $ac_new_val" >&2;}
fi
done
if $ac_cache_corrupted; then
- { echo "$as_me:991: error: changes in the environment can compromise the build" >&5
+ { echo "$as_me:1008: 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:993: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+ { { echo "$as_me:1010: 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
@@ -1002,19 +1019,19 @@ 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
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
+case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
+ ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
echo "#! $SHELL" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
-if { (echo "$as_me:1014: PATH=\".;.\"; conftest.sh") >&5
+if { (echo "$as_me:1031: PATH=\".;.\"; conftest.sh") >&5
(PATH=".;."; conftest.sh) 2>&5
ac_status=$?
- echo "$as_me:1017: \$? = $ac_status" >&5
+ echo "$as_me:1034: \$? = $ac_status" >&5
(exit $ac_status); }; then
ac_path_separator=';'
else
@@ -1049,7 +1066,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:1052: checking for $ac_word" >&5
+echo "$as_me:1069: 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
@@ -1064,7 +1081,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:1067: found $ac_dir/$ac_word" >&5
+echo "$as_me:1084: found $ac_dir/$ac_word" >&5
break
done
@@ -1072,10 +1089,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1075: result: $CC" >&5
+ echo "$as_me:1092: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1078: result: no" >&5
+ echo "$as_me:1095: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1084,7 +1101,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:1087: checking for $ac_word" >&5
+echo "$as_me:1104: 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
@@ -1099,7 +1116,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:1102: found $ac_dir/$ac_word" >&5
+echo "$as_me:1119: found $ac_dir/$ac_word" >&5
break
done
@@ -1107,10 +1124,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1110: result: $ac_ct_CC" >&5
+ echo "$as_me:1127: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1113: result: no" >&5
+ echo "$as_me:1130: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1123,7 +1140,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:1126: checking for $ac_word" >&5
+echo "$as_me:1143: 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
@@ -1138,7 +1155,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:1141: found $ac_dir/$ac_word" >&5
+echo "$as_me:1158: found $ac_dir/$ac_word" >&5
break
done
@@ -1146,10 +1163,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1149: result: $CC" >&5
+ echo "$as_me:1166: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1152: result: no" >&5
+ echo "$as_me:1169: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1158,7 +1175,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:1161: checking for $ac_word" >&5
+echo "$as_me:1178: 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
@@ -1173,7 +1190,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:1176: found $ac_dir/$ac_word" >&5
+echo "$as_me:1193: found $ac_dir/$ac_word" >&5
break
done
@@ -1181,10 +1198,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1184: result: $ac_ct_CC" >&5
+ echo "$as_me:1201: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1187: result: no" >&5
+ echo "$as_me:1204: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1197,7 +1214,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:1200: checking for $ac_word" >&5
+echo "$as_me:1217: 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
@@ -1217,7 +1234,7 @@ if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
continue
fi
ac_cv_prog_CC="cc"
-echo "$as_me:1220: found $ac_dir/$ac_word" >&5
+echo "$as_me:1237: found $ac_dir/$ac_word" >&5
break
done
@@ -1239,10 +1256,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1242: result: $CC" >&5
+ echo "$as_me:1259: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1245: result: no" >&5
+ echo "$as_me:1262: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1253,7 +1270,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:1256: checking for $ac_word" >&5
+echo "$as_me:1273: 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
@@ -1268,7 +1285,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:1271: found $ac_dir/$ac_word" >&5
+echo "$as_me:1288: found $ac_dir/$ac_word" >&5
break
done
@@ -1276,10 +1293,10 @@ fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$as_me:1279: result: $CC" >&5
+ echo "$as_me:1296: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
- echo "$as_me:1282: result: no" >&5
+ echo "$as_me:1299: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1292,7 +1309,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:1295: checking for $ac_word" >&5
+echo "$as_me:1312: 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
@@ -1307,7 +1324,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:1310: found $ac_dir/$ac_word" >&5
+echo "$as_me:1327: found $ac_dir/$ac_word" >&5
break
done
@@ -1315,10 +1332,10 @@ fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
- echo "$as_me:1318: result: $ac_ct_CC" >&5
+ echo "$as_me:1335: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
- echo "$as_me:1321: result: no" >&5
+ echo "$as_me:1338: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -1330,36 +1347,36 @@ fi
fi
-test -z "$CC" && { { echo "$as_me:1333: error: no acceptable cc found in \$PATH" >&5
+test -z "$CC" && { { echo "$as_me:1350: 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:1338:" \
+echo "$as_me:1355:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:1341: \"$ac_compiler --version </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1358: \"$ac_compiler --version </dev/null >&5\"") >&5
(eval $ac_compiler --version </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1344: \$? = $ac_status" >&5
+ echo "$as_me:1361: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1346: \"$ac_compiler -v </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1363: \"$ac_compiler -v </dev/null >&5\"") >&5
(eval $ac_compiler -v </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1349: \$? = $ac_status" >&5
+ echo "$as_me:1366: \$? = $ac_status" >&5
(exit $ac_status); }
-{ (eval echo "$as_me:1351: \"$ac_compiler -V </dev/null >&5\"") >&5
+{ (eval echo "$as_me:1368: \"$ac_compiler -V </dev/null >&5\"") >&5
(eval $ac_compiler -V </dev/null >&5) 2>&5
ac_status=$?
- echo "$as_me:1354: \$? = $ac_status" >&5
+ echo "$as_me:1371: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line 1358 "configure"
+#line 1375 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
;
@@ -1371,13 +1388,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:1374: checking for C compiler default output" >&5
+echo "$as_me:1391: 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:1377: \"$ac_link_default\"") >&5
+if { (eval echo "$as_me:1394: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
- echo "$as_me:1380: \$? = $ac_status" >&5
+ echo "$as_me:1397: \$? = $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
@@ -1400,34 +1417,34 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1403: error: C compiler cannot create executables" >&5
+{ { echo "$as_me:1420: 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:1409: result: $ac_file" >&5
+echo "$as_me:1426: 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:1414: checking whether the C compiler works" >&5
+echo "$as_me:1431: 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:1420: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1437: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1423: \$? = $ac_status" >&5
+ echo "$as_me:1440: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
- { { echo "$as_me:1430: error: cannot run C compiled programs.
+ { { echo "$as_me:1447: 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;}
@@ -1435,24 +1452,24 @@ If you meant to cross compile, use \`--host'." >&2;}
fi
fi
fi
-echo "$as_me:1438: result: yes" >&5
+echo "$as_me:1455: 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:1445: checking whether we are cross compiling" >&5
+echo "$as_me:1462: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:1447: result: $cross_compiling" >&5
+echo "$as_me:1464: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
-echo "$as_me:1450: checking for executable suffix" >&5
+echo "$as_me:1467: checking for executable suffix" >&5
echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
-if { (eval echo "$as_me:1452: \"$ac_link\"") >&5
+if { (eval echo "$as_me:1469: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:1455: \$? = $ac_status" >&5
+ echo "$as_me:1472: \$? = $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
@@ -1468,29 +1485,29 @@ for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
esac
done
else
- { { echo "$as_me:1471: error: cannot compute EXEEXT: cannot compile and link" >&5
+ { { echo "$as_me:1488: 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:1477: result: $ac_cv_exeext" >&5
+echo "$as_me:1494: 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:1483: checking for object suffix" >&5
+echo "$as_me:1500: 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 1489 "configure"
+#line 1506 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
;
@@ -1498,10 +1515,10 @@ main ()
}
_ACEOF
rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:1501: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1518: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1504: \$? = $ac_status" >&5
+ echo "$as_me:1521: \$? = $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
@@ -1513,28 +1530,28 @@ done
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-{ { echo "$as_me:1516: error: cannot compute OBJEXT: cannot compile" >&5
+{ { echo "$as_me:1533: 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:1523: result: $ac_cv_objext" >&5
+echo "$as_me:1540: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
-echo "$as_me:1527: checking whether we are using the GNU C compiler" >&5
+echo "$as_me:1544: 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 1533 "configure"
+#line 1550 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
#ifndef __GNUC__
choke me
@@ -1545,16 +1562,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1548: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1565: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1551: \$? = $ac_status" >&5
+ echo "$as_me:1568: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1554: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1571: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1557: \$? = $ac_status" >&5
+ echo "$as_me:1574: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
@@ -1566,23 +1583,23 @@ rm -f conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
-echo "$as_me:1569: result: $ac_cv_c_compiler_gnu" >&5
+echo "$as_me:1586: 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:1575: checking whether $CC accepts -g" >&5
+echo "$as_me:1592: 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 1581 "configure"
+#line 1598 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
;
@@ -1590,16 +1607,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1593: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1610: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1596: \$? = $ac_status" >&5
+ echo "$as_me:1613: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1599: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1616: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1602: \$? = $ac_status" >&5
+ echo "$as_me:1619: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
@@ -1609,7 +1626,7 @@ ac_cv_prog_cc_g=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:1612: result: $ac_cv_prog_cc_g" >&5
+echo "$as_me:1629: 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
@@ -1636,16 +1653,16 @@ cat >conftest.$ac_ext <<_ACEOF
#endif
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1656: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1642: \$? = $ac_status" >&5
+ echo "$as_me:1659: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1645: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1662: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1648: \$? = $ac_status" >&5
+ echo "$as_me:1665: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
''\
@@ -1657,12 +1674,12 @@ if { (eval echo "$as_me:1639: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line 1660 "configure"
+#line 1677 "configure"
#include "confdefs.h"
#include <stdlib.h>
$ac_declaration
int
-main ()
+main (void)
{
exit (42);
;
@@ -1670,16 +1687,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1673: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1690: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1676: \$? = $ac_status" >&5
+ echo "$as_me:1693: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1679: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1696: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1682: \$? = $ac_status" >&5
+ echo "$as_me:1699: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -1689,11 +1706,11 @@ continue
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 1692 "configure"
+#line 1709 "configure"
#include "confdefs.h"
$ac_declaration
int
-main ()
+main (void)
{
exit (42);
;
@@ -1701,16 +1718,16 @@ exit (42);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1704: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1721: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1707: \$? = $ac_status" >&5
+ echo "$as_me:1724: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1710: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1727: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1713: \$? = $ac_status" >&5
+ echo "$as_me:1730: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -1740,15 +1757,15 @@ ac_main_return=return
GCC_VERSION=none
if test "$GCC" = yes ; then
- echo "$as_me:1743: checking version of $CC" >&5
+ echo "$as_me:1760: 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:1747: result: $GCC_VERSION" >&5
+ echo "$as_me:1764: result: $GCC_VERSION" >&5
echo "${ECHO_T}$GCC_VERSION" >&6
fi
-echo "$as_me:1751: checking for $CC option to accept ANSI C" >&5
+echo "$as_me:1768: 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
@@ -1756,7 +1773,7 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line 1759 "configure"
+#line 1776 "configure"
#include "confdefs.h"
#include <stdarg.h>
#include <stdio.h>
@@ -1787,7 +1804,7 @@ int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, i
int argc;
char **argv;
int
-main ()
+main (void)
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
@@ -1805,16 +1822,16 @@ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIO
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:1808: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:1825: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:1811: \$? = $ac_status" >&5
+ echo "$as_me:1828: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:1814: \"$ac_try\"") >&5
+ { (eval echo "$as_me:1831: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:1817: \$? = $ac_status" >&5
+ echo "$as_me:1834: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
@@ -1831,10 +1848,10 @@ fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
- echo "$as_me:1834: result: none needed" >&5
+ echo "$as_me:1851: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
- echo "$as_me:1837: result: $ac_cv_prog_cc_stdc" >&5
+ echo "$as_me:1854: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
@@ -1842,52 +1859,63 @@ esac
# This should have been defined by AC_PROG_CC
: ${CC:=cc}
-echo "$as_me:1845: checking \$CC variable" >&5
+echo "$as_me:1862: checking \$CC variable" >&5
echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
-case "$CC" in #(vi
-*[\ \ ]-[IUD]*)
- echo "$as_me:1849: result: broken" >&5
+case "$CC" in
+(*[\ \ ]-*)
+ echo "$as_me:1866: result: broken" >&5
echo "${ECHO_T}broken" >&6
- { echo "$as_me:1851: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
+ { echo "$as_me:1868: 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_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
+ cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
+ CC="$cf_prog"
+ for cf_arg in $cf_flags
+ do
+ case "x$cf_arg" in
+ (x-[IUDfgOW]*)
cf_fix_cppflags=no
cf_new_cflags=
cf_new_cppflags=
cf_new_extra_cppflags=
-for cf_add_cflags in $cf_flags
+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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -1896,21 +1924,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -1919,22 +1955,46 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
+ ;;
+ (*)
+ CC="$CC $cf_arg"
+ ;;
+ esac
+ done
+ test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
+
+echo "${as_me:-configure}:1985: testing resulting CC: '$CC' ..." 1>&5
+
+ test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
+
+echo "${as_me:-configure}:1989: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
+
+ test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
+
+echo "${as_me:-configure}:1993: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
+
;;
-*)
- echo "$as_me:1937: result: ok" >&5
+(*)
+ echo "$as_me:1997: result: ok" >&5
echo "${ECHO_T}ok" >&6
;;
esac
@@ -1945,7 +2005,7 @@ 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:1948: checking how to run the C preprocessor" >&5
+echo "$as_me:2008: 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
@@ -1966,18 +2026,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 1969 "configure"
+#line 2029 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:1974: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2034: \"$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:1980: \$? = $ac_status" >&5
+ echo "$as_me:2040: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2000,17 +2060,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 2003 "configure"
+#line 2063 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2007: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2067: \"$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:2013: \$? = $ac_status" >&5
+ echo "$as_me:2073: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2047,7 +2107,7 @@ fi
else
ac_cv_prog_CPP=$CPP
fi
-echo "$as_me:2050: result: $CPP" >&5
+echo "$as_me:2110: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
@@ -2057,18 +2117,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 2060 "configure"
+#line 2120 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax error
_ACEOF
-if { (eval echo "$as_me:2065: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2125: \"$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:2071: \$? = $ac_status" >&5
+ echo "$as_me:2131: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2091,17 +2151,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 2094 "configure"
+#line 2154 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
_ACEOF
-if { (eval echo "$as_me:2098: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:2158: \"$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:2104: \$? = $ac_status" >&5
+ echo "$as_me:2164: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -2129,7 +2189,7 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:2132: error: C preprocessor \"$CPP\" fails sanity check" >&5
+ { { echo "$as_me:2192: error: C preprocessor \"$CPP\" fails sanity check" >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2141,7 +2201,7 @@ 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
-echo "$as_me:2144: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "$as_me:2204: 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
@@ -2161,11 +2221,11 @@ fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
- echo "$as_me:2164: result: yes" >&5
+ echo "$as_me:2224: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
- echo "$as_me:2168: result: no" >&5
+ echo "$as_me:2228: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
@@ -2173,7 +2233,7 @@ fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:2176: checking for $ac_word" >&5
+echo "$as_me:2236: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2188,7 +2248,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_RANLIB="${ac_tool_prefix}ranlib"
-echo "$as_me:2191: found $ac_dir/$ac_word" >&5
+echo "$as_me:2251: found $ac_dir/$ac_word" >&5
break
done
@@ -2196,10 +2256,10 @@ fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
- echo "$as_me:2199: result: $RANLIB" >&5
+ echo "$as_me:2259: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
- echo "$as_me:2202: result: no" >&5
+ echo "$as_me:2262: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2208,7 +2268,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
-echo "$as_me:2211: checking for $ac_word" >&5
+echo "$as_me:2271: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2223,7 +2283,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_RANLIB="ranlib"
-echo "$as_me:2226: found $ac_dir/$ac_word" >&5
+echo "$as_me:2286: found $ac_dir/$ac_word" >&5
break
done
@@ -2232,10 +2292,10 @@ fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
- echo "$as_me:2235: result: $ac_ct_RANLIB" >&5
+ echo "$as_me:2295: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
- echo "$as_me:2238: result: no" >&5
+ echo "$as_me:2298: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2261,7 +2321,7 @@ for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
fi
done
if test -z "$ac_aux_dir"; then
- { { echo "$as_me:2264: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
+ { { echo "$as_me:2324: 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
@@ -2281,7 +2341,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# 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:2284: checking for a BSD compatible install" >&5
+echo "$as_me:2344: 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
@@ -2330,7 +2390,7 @@ fi
INSTALL=$ac_install_sh
fi
fi
-echo "$as_me:2333: result: $INSTALL" >&5
+echo "$as_me:2393: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
@@ -2341,18 +2401,18 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-echo "$as_me:2344: checking whether ln -s works" >&5
+echo "$as_me:2404: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
- echo "$as_me:2348: result: yes" >&5
+ echo "$as_me:2408: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
- echo "$as_me:2351: result: no, using $LN_S" >&5
+ echo "$as_me:2411: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi
-echo "$as_me:2355: checking if $LN_S -f options work" >&5
+echo "$as_me:2415: checking if $LN_S -f options work" >&5
echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
rm -f conf$$.src conf$$dst
@@ -2364,16 +2424,16 @@ else
cf_prog_ln_sf=no
fi
rm -f conf$$.dst conf$$src
-echo "$as_me:2367: result: $cf_prog_ln_sf" >&5
+echo "$as_me:2427: result: $cf_prog_ln_sf" >&5
echo "${ECHO_T}$cf_prog_ln_sf" >&6
test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
-for ac_prog in tdlint lint alint splint lclint
+for ac_prog in lint cppcheck splint
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:2376: checking for $ac_word" >&5
+echo "$as_me:2436: 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
@@ -2388,7 +2448,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:2391: found $ac_dir/$ac_word" >&5
+echo "$as_me:2451: found $ac_dir/$ac_word" >&5
break
done
@@ -2396,20 +2456,150 @@ fi
fi
LINT=$ac_cv_prog_LINT
if test -n "$LINT"; then
- echo "$as_me:2399: result: $LINT" >&5
+ echo "$as_me:2459: result: $LINT" >&5
echo "${ECHO_T}$LINT" >&6
else
- echo "$as_me:2402: result: no" >&5
+ echo "$as_me:2462: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$LINT" && break
done
+# Extract the first word of "groff", so it can be a program name with args.
+set dummy groff; ac_word=$2
+echo "$as_me:2471: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GROFF_PATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GROFF_PATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GROFF_PATH="$GROFF_PATH" # 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_GROFF_PATH="$ac_dir/$ac_word"
+ echo "$as_me:2488: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
+ ;;
+esac
+fi
+GROFF_PATH=$ac_cv_path_GROFF_PATH
+
+if test -n "$GROFF_PATH"; then
+ echo "$as_me:2500: result: $GROFF_PATH" >&5
+echo "${ECHO_T}$GROFF_PATH" >&6
+else
+ echo "$as_me:2503: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+for ac_prog in nroff mandoc
+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:2511: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_NROFF_PATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $NROFF_PATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_NROFF_PATH="$NROFF_PATH" # 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_NROFF_PATH="$ac_dir/$ac_word"
+ echo "$as_me:2528: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ ;;
+esac
+fi
+NROFF_PATH=$ac_cv_path_NROFF_PATH
+
+if test -n "$NROFF_PATH"; then
+ echo "$as_me:2539: result: $NROFF_PATH" >&5
+echo "${ECHO_T}$NROFF_PATH" >&6
+else
+ echo "$as_me:2542: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$NROFF_PATH" && break
+done
+test -n "$NROFF_PATH" || NROFF_PATH="no"
+
+# Extract the first word of "tbl", so it can be a program name with args.
+set dummy tbl; ac_word=$2
+echo "$as_me:2552: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_TBL_PATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $TBL_PATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_TBL_PATH="$TBL_PATH" # 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_TBL_PATH="$ac_dir/$ac_word"
+ echo "$as_me:2569: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
+ ;;
+esac
+fi
+TBL_PATH=$ac_cv_path_TBL_PATH
+
+if test -n "$TBL_PATH"; then
+ echo "$as_me:2581: result: $TBL_PATH" >&5
+echo "${ECHO_T}$TBL_PATH" >&6
+else
+ echo "$as_me:2584: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+if test "x$GROFF_PATH" = xno
+then
+ NROFF_NOTE=
+ GROFF_NOTE="#"
+else
+ NROFF_NOTE="#"
+ GROFF_NOTE=
+fi
+
+test -z "$GROFF_NOTE" && NROFF_NOTE=
+
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:2412: checking for $ac_word" >&5
+echo "$as_me:2602: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2424,7 +2614,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_AR="${ac_tool_prefix}ar"
-echo "$as_me:2427: found $ac_dir/$ac_word" >&5
+echo "$as_me:2617: found $ac_dir/$ac_word" >&5
break
done
@@ -2432,10 +2622,10 @@ fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
- echo "$as_me:2435: result: $AR" >&5
+ echo "$as_me:2625: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
- echo "$as_me:2438: result: no" >&5
+ echo "$as_me:2628: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2444,7 +2634,7 @@ if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
-echo "$as_me:2447: checking for $ac_word" >&5
+echo "$as_me:2637: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2459,7 +2649,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_AR="ar"
-echo "$as_me:2462: found $ac_dir/$ac_word" >&5
+echo "$as_me:2652: found $ac_dir/$ac_word" >&5
break
done
@@ -2468,10 +2658,10 @@ fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
- echo "$as_me:2471: result: $ac_ct_AR" >&5
+ echo "$as_me:2661: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
- echo "$as_me:2474: result: no" >&5
+ echo "$as_me:2664: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2480,7 +2670,66 @@ else
AR="$ac_cv_prog_AR"
fi
-echo "$as_me:2483: checking for makeflags variable" >&5
+echo "$as_me:2673: checking for options to update archives" >&5
+echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
+if test "${cf_cv_ar_flags+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_ar_flags=unknown
+ for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
+ do
+
+ # check if $ARFLAGS already contains this choice
+ if test "x$ARFLAGS" != "x" ; then
+ cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
+ if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
+ cf_cv_ar_flags=
+ break
+ fi
+ fi
+
+ rm -f conftest.$ac_cv_objext
+ rm -f conftest.a
+
+ cat >conftest.$ac_ext <<EOF
+#line 2696 "configure"
+int testdata[3] = { 123, 456, 789 };
+EOF
+ if { (eval echo "$as_me:2699: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:2702: \$? = $ac_status" >&5
+ (exit $ac_status); } ; then
+ echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
+ $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
+ if test -f conftest.a ; then
+ cf_cv_ar_flags=$cf_ar_flags
+ break
+ fi
+ else
+ test -n "$verbose" && echo " cannot compile test-program" 1>&6
+
+echo "${as_me:-configure}:2713: testing cannot compile test-program ..." 1>&5
+
+ break
+ fi
+ done
+ rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
+
+fi
+echo "$as_me:2721: result: $cf_cv_ar_flags" >&5
+echo "${ECHO_T}$cf_cv_ar_flags" >&6
+
+if test -n "$ARFLAGS" ; then
+ if test -n "$cf_cv_ar_flags" ; then
+ ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
+ fi
+else
+ ARFLAGS=$cf_cv_ar_flags
+fi
+
+echo "$as_me:2732: checking for makeflags variable" >&5
echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
if test "${cf_cv_makeflags+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -2490,45 +2739,49 @@ else
for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
do
cat >cf_makeflags.tmp <<CF_EOF
-SHELL = /bin/sh
+SHELL = $SHELL
all :
@ echo '.$cf_option'
CF_EOF
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ ]*$,,'`
case "$cf_result" in
- .*k)
+ (.*k|.*kw)
cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
case "$cf_result" in
- .*CC=*) cf_cv_makeflags=
+ (.*CC=*) cf_cv_makeflags=
;;
- *) cf_cv_makeflags=$cf_option
+ (*) cf_cv_makeflags=$cf_option
;;
esac
break
;;
- .-) ;;
- *) echo "given option \"$cf_option\", no match \"$cf_result\""
+ (.-)
+ ;;
+ (*)
+
+echo "${as_me:-configure}:2762: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
+
;;
esac
done
rm -f cf_makeflags.tmp
fi
-echo "$as_me:2517: result: $cf_cv_makeflags" >&5
+echo "$as_me:2770: result: $cf_cv_makeflags" >&5
echo "${ECHO_T}$cf_cv_makeflags" >&6
-echo "$as_me:2520: checking if filesystem supports mixed-case filenames" >&5
+echo "$as_me:2773: 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
else
if test "$cross_compiling" = yes ; then
- case $target_alias in #(vi
- *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw32*|*-uwin*) #(vi
+ case $target_alias in
+ (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
cf_cv_mixedcase=no
;;
- *)
+ (*)
cf_cv_mixedcase=yes
;;
esac
@@ -2544,7 +2797,7 @@ else
fi
fi
-echo "$as_me:2547: result: $cf_cv_mixedcase" >&5
+echo "$as_me:2800: result: $cf_cv_mixedcase" >&5
echo "${ECHO_T}$cf_cv_mixedcase" >&6
test "$cf_cv_mixedcase" = yes &&
cat >>confdefs.h <<\EOF
@@ -2555,7 +2808,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:2558: checking for $ac_word" >&5
+echo "$as_me:2811: 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
@@ -2570,7 +2823,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:2573: found $ac_dir/$ac_word" >&5
+echo "$as_me:2826: found $ac_dir/$ac_word" >&5
break
done
@@ -2578,10 +2831,10 @@ fi
fi
CTAGS=$ac_cv_prog_CTAGS
if test -n "$CTAGS"; then
- echo "$as_me:2581: result: $CTAGS" >&5
+ echo "$as_me:2834: result: $CTAGS" >&5
echo "${ECHO_T}$CTAGS" >&6
else
- echo "$as_me:2584: result: no" >&5
+ echo "$as_me:2837: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2592,7 +2845,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:2595: checking for $ac_word" >&5
+echo "$as_me:2848: 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
@@ -2607,7 +2860,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:2610: found $ac_dir/$ac_word" >&5
+echo "$as_me:2863: found $ac_dir/$ac_word" >&5
break
done
@@ -2615,10 +2868,10 @@ fi
fi
ETAGS=$ac_cv_prog_ETAGS
if test -n "$ETAGS"; then
- echo "$as_me:2618: result: $ETAGS" >&5
+ echo "$as_me:2871: result: $ETAGS" >&5
echo "${ECHO_T}$ETAGS" >&6
else
- echo "$as_me:2621: result: no" >&5
+ echo "$as_me:2874: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2627,7 +2880,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:2630: checking for $ac_word" >&5
+echo "$as_me:2883: 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
@@ -2642,7 +2895,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:2645: found $ac_dir/$ac_word" >&5
+echo "$as_me:2898: found $ac_dir/$ac_word" >&5
break
done
@@ -2651,17 +2904,17 @@ fi
fi
MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
if test -n "$MAKE_LOWER_TAGS"; then
- echo "$as_me:2654: result: $MAKE_LOWER_TAGS" >&5
+ echo "$as_me:2907: result: $MAKE_LOWER_TAGS" >&5
echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
else
- echo "$as_me:2657: result: no" >&5
+ echo "$as_me:2910: 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:2664: checking for $ac_word" >&5
+echo "$as_me:2917: 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
@@ -2676,7 +2929,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:2679: found $ac_dir/$ac_word" >&5
+echo "$as_me:2932: found $ac_dir/$ac_word" >&5
break
done
@@ -2685,10 +2938,10 @@ fi
fi
MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
if test -n "$MAKE_UPPER_TAGS"; then
- echo "$as_me:2688: result: $MAKE_UPPER_TAGS" >&5
+ echo "$as_me:2941: result: $MAKE_UPPER_TAGS" >&5
echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
else
- echo "$as_me:2691: result: no" >&5
+ echo "$as_me:2944: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -2708,50 +2961,50 @@ else
MAKE_LOWER_TAGS="#"
fi
-echo "$as_me:2711: checking if you want to see long compiling messages" >&5
+echo "$as_me:2964: 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
+ if test "$enableval" != "yes" ; then
- ECHO_LT='--silent'
- ECHO_LD='@echo linking $@;'
- RULE_CC='@echo compiling $<'
- SHOW_CC='@echo compiling $@'
- ECHO_CC='@'
+ ECHO_LT='--silent'
+ ECHO_LD='@echo linking $@;'
+ RULE_CC='@echo compiling $<'
+ SHOW_CC='@echo compiling $@'
+ ECHO_CC='@'
- else
+ else
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC=''
- SHOW_CC=''
- ECHO_CC=''
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
- fi
+ fi
else
enableval=yes
- ECHO_LT=''
- ECHO_LD=''
- RULE_CC=''
- SHOW_CC=''
- ECHO_CC=''
+ ECHO_LT=''
+ ECHO_LD=''
+ RULE_CC=''
+ SHOW_CC=''
+ ECHO_CC=''
fi;
-echo "$as_me:2745: result: $enableval" >&5
+echo "$as_me:2998: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:2750: error: cannot run $ac_config_sub" >&5
+ { { echo "$as_me:3003: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
-echo "$as_me:2754: checking build system type" >&5
+echo "$as_me:3007: 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
@@ -2760,16 +3013,16 @@ else
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
- { { echo "$as_me:2763: error: cannot guess build type; you must specify one" >&5
+ { { echo "$as_me:3016: 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:2767: error: $ac_config_sub $ac_cv_build_alias failed." >&5
+ { { echo "$as_me:3020: 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:2772: result: $ac_cv_build" >&5
+echo "$as_me:3025: 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/'`
@@ -2777,7 +3030,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:2780: checking host system type" >&5
+ echo "$as_me:3033: 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
@@ -2786,12 +3039,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:2789: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+ { { echo "$as_me:3042: 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:2794: result: $ac_cv_host" >&5
+echo "$as_me:3047: 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/'`
@@ -2817,26 +3070,29 @@ else
fi
test -z "$system_name" && system_name="$cf_cv_system_name"
-test -n "$cf_cv_system_name" && echo "$as_me:2820: result: Configuring for $cf_cv_system_name" >&5
+test -n "$cf_cv_system_name" && echo "$as_me:3073: 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:2824: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
+ echo "$as_me:3077: 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:2826: error: \"Please remove config.cache and try again.\"" >&5
+ { { echo "$as_me:3079: 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
case $cf_cv_system_name in
-os2*)
- CFLAGS="$CFLAGS -Zmt"
- CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
- CXXFLAGS="$CXXFLAGS -Zmt"
- # autoconf's macro sets -Zexe and suffix both, which conflict:w
- LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
- ac_cv_exeext=.exe
- ;;
+(os2*)
+ CFLAGS="$CFLAGS -Zmt"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
+
+ CXXFLAGS="$CXXFLAGS -Zmt"
+ # autoconf's macro sets -Zexe and suffix both, which conflict:w
+ LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
+ ac_cv_exeext=.exe
+ ;;
esac
PROG_EXT="$EXEEXT"
@@ -2846,43 +3102,47 @@ cat >>confdefs.h <<EOF
#define PROG_EXT "$PROG_EXT"
EOF
- echo "$as_me:2849: checking for PATH separator" >&5
+ echo "$as_me:3105: checking for PATH separator" >&5
echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
case $cf_cv_system_name in
- os2*) PATH_SEPARATOR=';' ;;
- *) ${PATH_SEPARATOR:=':'} ;;
+ (os2*) PATH_SEPARATOR=';' ;;
+ (*) ${PATH_SEPARATOR:=':'} ;;
esac
- echo "$as_me:2856: result: $PATH_SEPARATOR" >&5
+ echo "$as_me:3112: result: $PATH_SEPARATOR" >&5
echo "${ECHO_T}$PATH_SEPARATOR" >&6
- case $cf_cv_system_name in #(vi
- OS/2*|os2*) #(vi
- LIB_PREFIX=''
- ;;
- *) LIB_PREFIX='lib'
- ;;
+ case $cf_cv_system_name in
+ (OS/2*|os2*)
+ if test "$DFT_LWR_MODEL" = libtool; then
+ LIB_PREFIX='lib'
+ else
+ LIB_PREFIX=''
+ fi
+ ;;
+ (*) LIB_PREFIX='lib'
+ ;;
esac
cf_XOPEN_SOURCE=500
cf_POSIX_C_SOURCE=199506L
cf_xopen_source=
-case $host_os in #(vi
-aix[4-7]*) #(vi
+case $host_os in
+(aix[4-7]*)
cf_xopen_source="-D_ALL_SOURCE"
;;
-cygwin|msys) #(vi
+(msys)
cf_XOPEN_SOURCE=600
;;
-darwin[0-8].*) #(vi
+(darwin[0-8].*)
cf_xopen_source="-D_APPLE_C_SOURCE"
;;
-darwin*) #(vi
+(darwin*)
cf_xopen_source="-D_DARWIN_C_SOURCE"
cf_XOPEN_SOURCE=
;;
-freebsd*|dragonfly*) #(vi
+(freebsd*|dragonfly*)
# 5.x headers associate
# _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
# _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
@@ -2890,83 +3150,443 @@ freebsd*|dragonfly*) #(vi
cf_XOPEN_SOURCE=600
cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
;;
-hpux11*) #(vi
+(hpux11*)
cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
;;
-hpux*) #(vi
+(hpux*)
cf_xopen_source="-D_HPUX_SOURCE"
;;
-irix[56].*) #(vi
+(irix[56].*)
cf_xopen_source="-D_SGI_SOURCE"
cf_XOPEN_SOURCE=
;;
-linux*|gnu*|mint*|k*bsd*-gnu) #(vi
+(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
+
+cf_gnu_xopen_source=$cf_XOPEN_SOURCE
+
+echo "$as_me:3167: checking if this is the GNU C library" >&5
+echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
+if test "${cf_cv_gnu_library+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 3174 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main (void)
+{
+
+ #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
+ return 0;
+ #else
+ # error not GNU C library
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3191: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3194: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3197: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3200: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_library=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_library=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3211: result: $cf_cv_gnu_library" >&5
+echo "${ECHO_T}$cf_cv_gnu_library" >&6
+
+if test x$cf_cv_gnu_library = xyes; then
+
+ # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
+ # was changed to help a little...
+ echo "$as_me:3218: checking if _DEFAULT_SOURCE can be used as a basis" >&5
+echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
+if test "${cf_cv_gnu_library_219+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_save="$CPPFLAGS"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3230 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main (void)
+{
+
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
+ return 0;
+ #else
+ # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3247: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3250: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3253: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3256: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_library_219=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_library_219=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$cf_save"
+
+fi
+echo "$as_me:3268: result: $cf_cv_gnu_library_219" >&5
+echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
+
+ if test "x$cf_cv_gnu_library_219" = xyes; then
+ cf_save="$CPPFLAGS"
+ echo "$as_me:3273: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
+echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
-echo "$as_me:2905: checking if we must define _GNU_SOURCE" >&5
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3378 "configure"
+#include "confdefs.h"
+
+ #include <limits.h>
+ #include <sys/types.h>
+
+int
+main (void)
+{
+
+ #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
+ return 0;
+ #else
+ # error GNU C library is too old
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3398: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3401: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3404: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3407: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_gnu_dftsrc_219=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_gnu_dftsrc_219=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3418: result: $cf_cv_gnu_dftsrc_219" >&5
+echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
+ test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
+ else
+ cf_cv_gnu_dftsrc_219=maybe
+ fi
+
+ if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
+
+ echo "$as_me:3427: 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 2912 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3434 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
-#ifndef _XOPEN_SOURCE
-make an error
-#endif
+ #ifndef _XOPEN_SOURCE
+ #error expected _XOPEN_SOURCE to be defined
+ #endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2927: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3449: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2930: \$? = $ac_status" >&5
+ echo "$as_me:3452: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2933: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3455: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2936: \$? = $ac_status" >&5
+ echo "$as_me:3458: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
- cat >conftest.$ac_ext <<_ACEOF
-#line 2945 "configure"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -D_GNU_SOURCE
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3565 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
-#ifdef _XOPEN_SOURCE
-make an error
-#endif
+ #ifdef _XOPEN_SOURCE
+ #error expected _XOPEN_SOURCE to be undefined
+ #endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:2960: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3580: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:2963: \$? = $ac_status" >&5
+ echo "$as_me:3583: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:2966: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3586: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:2969: \$? = $ac_status" >&5
+ echo "$as_me:3589: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_gnu_source=no
else
@@ -2975,18 +3595,81 @@ cat conftest.$ac_ext >&5
cf_cv_gnu_source=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- CPPFLAGS="$cf_save"
+ CPPFLAGS="$cf_save"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:2984: result: $cf_cv_gnu_source" >&5
+echo "$as_me:3604: 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"
+ if test "$cf_cv_gnu_source" = yes
+ then
+ echo "$as_me:3609: checking if we should also define _DEFAULT_SOURCE" >&5
+echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
+if test "${cf_cv_default_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 3619 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+int
+main (void)
+{
+
+ #ifdef _DEFAULT_SOURCE
+ #error expected _DEFAULT_SOURCE to be undefined
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:3634: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:3637: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:3640: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:3643: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_default_source=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_default_source=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:3654: result: $cf_cv_default_source" >&5
+echo "${ECHO_T}$cf_cv_default_source" >&6
+ if test "$cf_cv_default_source" = yes
+ then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
+
+ fi
+ fi
+ fi
+
+fi
+
+ ;;
+(minix*)
+ cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
;;
-mirbsd*) #(vi
+(mirbsd*)
# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
cf_XOPEN_SOURCE=
@@ -3003,20 +3686,20 @@ 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:3006: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:3689: 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}:3012: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:3695: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3015 "configure"
+#line 3698 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _POSIX_C_SOURCE
@@ -3027,41 +3710,41 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3030: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3713: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3033: \$? = $ac_status" >&5
+ echo "$as_me:3716: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3036: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3719: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3039: \$? = $ac_status" >&5
+ echo "$as_me:3722: \$? = $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
+ case .$cf_POSIX_C_SOURCE in
+ (.[12]??*)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
;;
- .2) #(vi
+ (.2)
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 3060 "configure"
+#line 3743 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifdef _POSIX_SOURCE
@@ -3072,16 +3755,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3075: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3758: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3078: \$? = $ac_status" >&5
+ echo "$as_me:3761: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3081: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3764: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3084: \$? = $ac_status" >&5
+ echo "$as_me:3767: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3092,19 +3775,22 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me:-configure}:3095: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:3778: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
-echo "${as_me:-configure}:3100: testing if the second compile does not leave our definition intact error ..." 1>&5
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
+
+echo "${as_me:-configure}:3786: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3103 "configure"
+#line 3789 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _POSIX_C_SOURCE
@@ -3115,16 +3801,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3804: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3121: \$? = $ac_status" >&5
+ echo "$as_me:3807: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3124: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3810: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3127: \$? = $ac_status" >&5
+ echo "$as_me:3813: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3140,7 +3826,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3143: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:3829: 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
@@ -3155,32 +3841,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -3189,21 +3881,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -3212,55 +3912,66 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
fi
;;
-netbsd*) #(vi
+(netbsd*)
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
+(openbsd[4-9]*)
# 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
+(openbsd*)
# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
;;
-osf[45]*) #(vi
+(osf[45]*)
cf_xopen_source="-D_OSF_SOURCE"
;;
-nto-qnx*) #(vi
+(nto-qnx*)
cf_xopen_source="-D_QNX_SOURCE"
;;
-sco*) #(vi
+(sco*)
# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
;;
-solaris2.*) #(vi
+(solaris2.*)
cf_xopen_source="-D__EXTENSIONS__"
+ cf_cv_xopen_source=broken
;;
-*)
+(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
+ cf_XOPEN_SOURCE=
+ cf_POSIX_C_SOURCE=
+ ;;
+(*)
-echo "$as_me:3256: checking if we should define _XOPEN_SOURCE" >&5
+echo "$as_me:3967: 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 3263 "configure"
+#line 3974 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -3268,7 +3979,7 @@ else
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _XOPEN_SOURCE
@@ -3279,25 +3990,28 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3282: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:3993: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3285: \$? = $ac_status" >&5
+ echo "$as_me:3996: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3288: \"$ac_try\"") >&5
+ { (eval echo "$as_me:3999: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3291: \$? = $ac_status" >&5
+ echo "$as_me:4002: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 3300 "configure"
+#line 4014 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -3305,7 +4019,7 @@ cf_save="$CPPFLAGS"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifdef _XOPEN_SOURCE
@@ -3316,16 +4030,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3319: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4033: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3322: \$? = $ac_status" >&5
+ echo "$as_me:4036: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3325: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4039: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3328: \$? = $ac_status" >&5
+ echo "$as_me:4042: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3340,7 +4054,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3343: result: $cf_cv_xopen_source" >&5
+echo "$as_me:4057: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
if test "$cf_cv_xopen_source" != no ; then
@@ -3363,32 +4077,38 @@ cf_new_extra_cppflags=
for cf_add_cflags in $cf_temp_xopen_source
do
case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -3397,21 +4117,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -3420,17 +4148,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
fi
@@ -3448,20 +4182,20 @@ 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:3451: checking if we should define _POSIX_C_SOURCE" >&5
+echo "$as_me:4185: 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}:3457: testing if the symbol is already defined go no further ..." 1>&5
+echo "${as_me:-configure}:4191: testing if the symbol is already defined go no further ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3460 "configure"
+#line 4194 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _POSIX_C_SOURCE
@@ -3472,41 +4206,41 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4209: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3478: \$? = $ac_status" >&5
+ echo "$as_me:4212: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3481: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4215: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3484: \$? = $ac_status" >&5
+ echo "$as_me:4218: \$? = $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
+ case .$cf_POSIX_C_SOURCE in
+ (.[12]??*)
cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
;;
- .2) #(vi
+ (.2)
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 3505 "configure"
+#line 4239 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifdef _POSIX_SOURCE
@@ -3517,16 +4251,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3520: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4254: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3523: \$? = $ac_status" >&5
+ echo "$as_me:4257: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3526: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4260: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3529: \$? = $ac_status" >&5
+ echo "$as_me:4263: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3537,19 +4271,22 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "${as_me:-configure}:3540: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
+echo "${as_me:-configure}:4274: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
CFLAGS="$cf_trim_CFLAGS"
- CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
+ CPPFLAGS="$cf_trim_CPPFLAGS"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
-echo "${as_me:-configure}:3545: testing if the second compile does not leave our definition intact error ..." 1>&5
+echo "${as_me:-configure}:4282: testing if the second compile does not leave our definition intact error ..." 1>&5
cat >conftest.$ac_ext <<_ACEOF
-#line 3548 "configure"
+#line 4285 "configure"
#include "confdefs.h"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _POSIX_C_SOURCE
@@ -3560,16 +4297,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4300: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3566: \$? = $ac_status" >&5
+ echo "$as_me:4303: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3569: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4306: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3572: \$? = $ac_status" >&5
+ echo "$as_me:4309: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -3585,7 +4322,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3588: result: $cf_cv_posix_c_source" >&5
+echo "$as_me:4325: 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
@@ -3600,32 +4337,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -3634,21 +4377,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -3657,17 +4408,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
fi
@@ -3685,32 +4442,38 @@ cf_new_extra_cppflags=
for cf_add_cflags in $cf_xopen_source
do
case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -3719,21 +4482,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -3741,31 +4512,46 @@ esac
done
if test -n "$cf_new_cflags" ; then
+ test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
+
+echo "${as_me:-configure}:4517: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
- CFLAGS="$CFLAGS $cf_new_cflags"
fi
if test -n "$cf_new_cppflags" ; then
+ test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
+
+echo "${as_me:-configure}:4527: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
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}:4537: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
fi
fi
if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
- echo "$as_me:3761: checking if _XOPEN_SOURCE really is set" >&5
+ echo "$as_me:4547: 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 3764 "configure"
+#line 4550 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
-main ()
+main (void)
{
#ifndef _XOPEN_SOURCE
@@ -3776,16 +4562,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3779: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4565: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3782: \$? = $ac_status" >&5
+ echo "$as_me:4568: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3785: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4571: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3788: \$? = $ac_status" >&5
+ echo "$as_me:4574: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_XOPEN_SOURCE_set=yes
else
@@ -3794,16 +4580,16 @@ cat conftest.$ac_ext >&5
cf_XOPEN_SOURCE_set=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:3797: result: $cf_XOPEN_SOURCE_set" >&5
+ echo "$as_me:4583: 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 3802 "configure"
+#line 4588 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
-main ()
+main (void)
{
#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
@@ -3814,16 +4600,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3817: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4603: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3820: \$? = $ac_status" >&5
+ echo "$as_me:4606: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3823: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4609: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3826: \$? = $ac_status" >&5
+ echo "$as_me:4612: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_XOPEN_SOURCE_set_ok=yes
else
@@ -3834,19 +4620,19 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
if test $cf_XOPEN_SOURCE_set_ok = no
then
- { echo "$as_me:3837: WARNING: _XOPEN_SOURCE is lower than requested" >&5
+ { echo "$as_me:4623: WARNING: _XOPEN_SOURCE is lower than requested" >&5
echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
fi
else
-echo "$as_me:3842: checking if we should define _XOPEN_SOURCE" >&5
+echo "$as_me:4628: 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 3849 "configure"
+#line 4635 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -3854,7 +4640,7 @@ else
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifndef _XOPEN_SOURCE
@@ -3865,25 +4651,28 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3868: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4654: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3871: \$? = $ac_status" >&5
+ echo "$as_me:4657: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3874: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4660: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3877: \$? = $ac_status" >&5
+ echo "$as_me:4663: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
cf_save="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 3886 "configure"
+#line 4675 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -3891,7 +4680,7 @@ cf_save="$CPPFLAGS"
#include <sys/types.h>
int
-main ()
+main (void)
{
#ifdef _XOPEN_SOURCE
@@ -3902,16 +4691,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:3905: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4694: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:3908: \$? = $ac_status" >&5
+ echo "$as_me:4697: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:3911: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4700: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:3914: \$? = $ac_status" >&5
+ echo "$as_me:4703: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_xopen_source=no
else
@@ -3926,7 +4715,7 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:3929: result: $cf_cv_xopen_source" >&5
+echo "$as_me:4718: result: $cf_cv_xopen_source" >&5
echo "${ECHO_T}$cf_cv_xopen_source" >&6
if test "$cf_cv_xopen_source" != no ; then
@@ -3949,32 +4738,38 @@ cf_new_extra_cppflags=
for cf_add_cflags in $cf_temp_xopen_source
do
case $cf_fix_cppflags in
-no)
- case $cf_add_cflags in #(vi
- -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -3983,21 +4778,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -4006,17 +4809,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
fi
@@ -4031,7 +4840,7 @@ if test "${enable_largefile+set}" = set; then
fi;
if test "$enable_largefile" != no; then
- echo "$as_me:4034: checking for special C compiler options needed for large files" >&5
+ echo "$as_me:4843: checking for special C compiler options needed for large files" >&5
echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4043,7 +4852,7 @@ else
# IRIX 6.2 and later do not support large files by default,
# so use the C compiler's -n32 option if that helps.
cat >conftest.$ac_ext <<_ACEOF
-#line 4046 "configure"
+#line 4855 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4055,7 +4864,7 @@ else
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
@@ -4063,16 +4872,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4066: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4875: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4069: \$? = $ac_status" >&5
+ echo "$as_me:4878: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4072: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4881: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4075: \$? = $ac_status" >&5
+ echo "$as_me:4884: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4082,16 +4891,16 @@ fi
rm -f conftest.$ac_objext
CC="$CC -n32"
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4085: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4894: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4088: \$? = $ac_status" >&5
+ echo "$as_me:4897: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4091: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4900: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4094: \$? = $ac_status" >&5
+ echo "$as_me:4903: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_CC=' -n32'; break
else
@@ -4105,13 +4914,13 @@ rm -f conftest.$ac_objext
rm -f conftest.$ac_ext
fi
fi
-echo "$as_me:4108: result: $ac_cv_sys_largefile_CC" >&5
+echo "$as_me:4917: result: $ac_cv_sys_largefile_CC" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
if test "$ac_cv_sys_largefile_CC" != no; then
CC=$CC$ac_cv_sys_largefile_CC
fi
- echo "$as_me:4114: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+ echo "$as_me:4923: checking for _FILE_OFFSET_BITS value needed for large files" >&5
echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_file_offset_bits+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4119,7 +4928,7 @@ else
while :; do
ac_cv_sys_file_offset_bits=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4122 "configure"
+#line 4931 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4131,7 +4940,7 @@ else
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
@@ -4139,16 +4948,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4142: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4951: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4145: \$? = $ac_status" >&5
+ echo "$as_me:4954: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4148: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4957: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4151: \$? = $ac_status" >&5
+ echo "$as_me:4960: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4157,7 +4966,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4160 "configure"
+#line 4969 "configure"
#include "confdefs.h"
#define _FILE_OFFSET_BITS 64
#include <sys/types.h>
@@ -4170,7 +4979,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
@@ -4178,16 +4987,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4181: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:4990: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4184: \$? = $ac_status" >&5
+ echo "$as_me:4993: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4187: \"$ac_try\"") >&5
+ { (eval echo "$as_me:4996: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4190: \$? = $ac_status" >&5
+ echo "$as_me:4999: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_file_offset_bits=64; break
else
@@ -4198,7 +5007,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4201: result: $ac_cv_sys_file_offset_bits" >&5
+echo "$as_me:5010: result: $ac_cv_sys_file_offset_bits" >&5
echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
if test "$ac_cv_sys_file_offset_bits" != no; then
@@ -4208,7 +5017,7 @@ EOF
fi
rm -rf conftest*
- echo "$as_me:4211: checking for _LARGE_FILES value needed for large files" >&5
+ echo "$as_me:5020: checking for _LARGE_FILES value needed for large files" >&5
echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_large_files+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4216,7 +5025,7 @@ else
while :; do
ac_cv_sys_large_files=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4219 "configure"
+#line 5028 "configure"
#include "confdefs.h"
#include <sys/types.h>
/* Check that off_t can represent 2**63 - 1 correctly.
@@ -4228,7 +5037,7 @@ else
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
@@ -4236,16 +5045,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4239: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5048: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4242: \$? = $ac_status" >&5
+ echo "$as_me:5051: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4245: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5054: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4248: \$? = $ac_status" >&5
+ echo "$as_me:5057: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4254,7 +5063,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4257 "configure"
+#line 5066 "configure"
#include "confdefs.h"
#define _LARGE_FILES 1
#include <sys/types.h>
@@ -4267,7 +5076,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
&& LARGE_OFF_T % 2147483647 == 1)
? 1 : -1];
int
-main ()
+main (void)
{
;
@@ -4275,16 +5084,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4278: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5087: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4281: \$? = $ac_status" >&5
+ echo "$as_me:5090: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4284: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5093: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4287: \$? = $ac_status" >&5
+ echo "$as_me:5096: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_large_files=1; break
else
@@ -4295,7 +5104,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4298: result: $ac_cv_sys_large_files" >&5
+echo "$as_me:5107: result: $ac_cv_sys_large_files" >&5
echo "${ECHO_T}$ac_cv_sys_large_files" >&6
if test "$ac_cv_sys_large_files" != no; then
@@ -4307,8 +5116,8 @@ fi
rm -rf conftest*
fi
- if test "$enable_largefile" != no ; then
- echo "$as_me:4311: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+ if test "$enable_largefile" != no ; then
+ echo "$as_me:5120: checking for _LARGEFILE_SOURCE value needed for large files" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
if test "${ac_cv_sys_largefile_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -4316,11 +5125,11 @@ else
while :; do
ac_cv_sys_largefile_source=no
cat >conftest.$ac_ext <<_ACEOF
-#line 4319 "configure"
+#line 5128 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
return !fseeko;
;
@@ -4328,16 +5137,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4331: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5140: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4334: \$? = $ac_status" >&5
+ echo "$as_me:5143: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4337: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5146: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4340: \$? = $ac_status" >&5
+ echo "$as_me:5149: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -4346,12 +5155,12 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line 4349 "configure"
+#line 5158 "configure"
#include "confdefs.h"
#define _LARGEFILE_SOURCE 1
#include <stdio.h>
int
-main ()
+main (void)
{
return !fseeko;
;
@@ -4359,16 +5168,16 @@ return !fseeko;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4362: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4365: \$? = $ac_status" >&5
+ echo "$as_me:5174: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4368: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5177: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4371: \$? = $ac_status" >&5
+ echo "$as_me:5180: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_sys_largefile_source=1; break
else
@@ -4379,7 +5188,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
break
done
fi
-echo "$as_me:4382: result: $ac_cv_sys_largefile_source" >&5
+echo "$as_me:5191: result: $ac_cv_sys_largefile_source" >&5
echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
if test "$ac_cv_sys_largefile_source" != no; then
@@ -4393,17 +5202,17 @@ rm -rf conftest*
# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
# in glibc 2.1.3, but that breaks too many other things.
# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-echo "$as_me:4396: checking for fseeko" >&5
+echo "$as_me:5205: checking for fseeko" >&5
echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
if test "${ac_cv_func_fseeko+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4402 "configure"
+#line 5211 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
return fseeko && fseeko (stdin, 0, 0);
;
@@ -4411,16 +5220,16 @@ return fseeko && fseeko (stdin, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:4414: \"$ac_link\"") >&5
+if { (eval echo "$as_me:5223: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:4417: \$? = $ac_status" >&5
+ echo "$as_me:5226: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:4420: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5229: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4423: \$? = $ac_status" >&5
+ echo "$as_me:5232: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_fseeko=yes
else
@@ -4430,7 +5239,7 @@ ac_cv_func_fseeko=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:4433: result: $ac_cv_func_fseeko" >&5
+echo "$as_me:5242: result: $ac_cv_func_fseeko" >&5
echo "${ECHO_T}$ac_cv_func_fseeko" >&6
if test $ac_cv_func_fseeko = yes; then
@@ -4447,25 +5256,44 @@ fi
# header files by themselves before looking at the body files it is
# told to compile. For ncurses, those header files do not include
# the config.h
- test "$ac_cv_sys_large_files" != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
- test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
- test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
+ if test "$ac_cv_sys_large_files" != no
+ then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
+
+ fi
+ if test "$ac_cv_sys_largefile_source" != no
+ then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
+
+ fi
+ if test "$ac_cv_sys_file_offset_bits" != no
+ then
- echo "$as_me:4454: checking whether to use struct dirent64" >&5
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+
+ fi
+
+ echo "$as_me:5281: checking whether to use struct dirent64" >&5
echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
if test "${cf_cv_struct_dirent64+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 4461 "configure"
+#line 5288 "configure"
#include "confdefs.h"
+#pragma GCC diagnostic error "-Wincompatible-pointer-types"
#include <sys/types.h>
#include <dirent.h>
int
-main ()
+main (void)
{
/* if transitional largefile support is setup, this is true */
@@ -4479,16 +5307,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4482: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5310: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4485: \$? = $ac_status" >&5
+ echo "$as_me:5313: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4488: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5316: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4491: \$? = $ac_status" >&5
+ echo "$as_me:5319: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_struct_dirent64=yes
else
@@ -4499,18 +5327,66 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:4502: result: $cf_cv_struct_dirent64" >&5
+echo "$as_me:5330: result: $cf_cv_struct_dirent64" >&5
echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
test "$cf_cv_struct_dirent64" = yes &&
cat >>confdefs.h <<\EOF
#define HAVE_STRUCT_DIRENT64 1
EOF
- fi
+ fi
+
+echo "$as_me:5339: checking for install-prefix" >&5
+echo $ECHO_N "checking for install-prefix... $ECHO_C" >&6
+
+# Check whether --with-install-prefix or --without-install-prefix was given.
+if test "${with_install_prefix+set}" = set; then
+ withval="$with_install_prefix"
+ cf_opt_with_install_prefix=$withval
+else
+ cf_opt_with_install_prefix=${DESTDIR:-no}
+fi;
+echo "$as_me:5349: result: $cf_opt_with_install_prefix" >&5
+echo "${ECHO_T}$cf_opt_with_install_prefix" >&6
+if test "$cf_opt_with_install_prefix" != no ; then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$cf_opt_with_install_prefix" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval cf_opt_with_install_prefix="$cf_opt_with_install_prefix"
+ case ".$cf_opt_with_install_prefix" in
+ (.NONE/*)
+ cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ cf_opt_with_install_prefix=`echo $cf_opt_with_install_prefix | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:5378: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&5
+echo "$as_me: error: expected a pathname, not \"$cf_opt_with_install_prefix\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ DESTDIR=$cf_opt_with_install_prefix
+fi
if ( test "$GCC" = yes || test "$GXX" = yes )
then
-echo "$as_me:4513: checking if you want to check for gcc warnings" >&5
+echo "$as_me:5389: checking if you want to check for gcc warnings" >&5
echo $ECHO_N "checking if you want to check for gcc warnings... $ECHO_C" >&6
# Check whether --with-warnings or --without-warnings was given.
@@ -4520,7 +5396,7 @@ if test "${with_warnings+set}" = set; then
else
cf_opt_with_warnings=no
fi;
-echo "$as_me:4523: result: $cf_opt_with_warnings" >&5
+echo "$as_me:5399: result: $cf_opt_with_warnings" >&5
echo "${ECHO_T}$cf_opt_with_warnings" >&6
if test "$cf_opt_with_warnings" != no ; then
@@ -4542,10 +5418,10 @@ cat > conftest.i <<EOF
EOF
if test "$GCC" = yes
then
- { echo "$as_me:4545: checking for $CC __attribute__ directives..." >&5
+ { echo "$as_me:5421: checking for $CC __attribute__ directives..." >&5
echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
cat > conftest.$ac_ext <<EOF
-#line 4548 "${as_me:-configure}"
+#line 5424 "${as_me:-configure}"
#include "confdefs.h"
#include "conftest.h"
#include "conftest.i"
@@ -4574,43 +5450,43 @@ cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFG
cf_directive="__attribute__(($cf_attribute))"
echo "checking for $CC $cf_directive" 1>&5
- case $cf_attribute in #(vi
- printf) #(vi
+ case $cf_attribute in
+ (printf)
cf_printf_attribute=yes
cat >conftest.h <<EOF
#define GCC_$cf_ATTRIBUTE 1
EOF
;;
- scanf) #(vi
+ (scanf)
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:4597: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:5473: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4600: \$? = $ac_status" >&5
+ echo "$as_me:5476: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4602: result: ... $cf_attribute" >&5
+ test -n "$verbose" && echo "$as_me:5478: result: ... $cf_attribute" >&5
echo "${ECHO_T}... $cf_attribute" >&6
cat conftest.h >>confdefs.h
- case $cf_attribute in #(vi
- noreturn) #(vi
+ case $cf_attribute in
+ (noreturn)
cat >>confdefs.h <<EOF
#define GCC_NORETURN $cf_directive
EOF
;;
- printf) #(vi
+ (printf)
cf_value='/* nothing */'
if test "$cf_printf_attribute" != no ; then
cf_value='__attribute__((format(printf,fmt,var)))'
@@ -4626,7 +5502,7 @@ cat >>confdefs.h <<EOF
EOF
;;
- scanf) #(vi
+ (scanf)
cf_value='/* nothing */'
if test "$cf_scanf_attribute" != no ; then
cf_value='__attribute__((format(scanf,fmt,var)))'
@@ -4642,7 +5518,7 @@ cat >>confdefs.h <<EOF
EOF
;;
- unused) #(vi
+ (unused)
cat >>confdefs.h <<EOF
#define GCC_UNUSED $cf_directive
@@ -4662,17 +5538,17 @@ INTEL_COMPILER=no
if test "$GCC" = yes ; then
case $host_os in
- linux*|gnu*)
- echo "$as_me:4666: checking if this is really Intel C compiler" >&5
+ (linux*|gnu*)
+ echo "$as_me:5542: 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 4671 "configure"
+#line 5547 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
#ifdef __INTEL_COMPILER
@@ -4685,19 +5561,19 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4688: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5564: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4691: \$? = $ac_status" >&5
+ echo "$as_me:5567: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4694: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5570: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4697: \$? = $ac_status" >&5
+ echo "$as_me:5573: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
INTEL_COMPILER=yes
-cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
+cf_save_CFLAGS="$cf_save_CFLAGS -we147"
else
echo "$as_me: failed program was:" >&5
@@ -4705,7 +5581,7 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:4708: result: $INTEL_COMPILER" >&5
+ echo "$as_me:5584: result: $INTEL_COMPILER" >&5
echo "${ECHO_T}$INTEL_COMPILER" >&6
;;
esac
@@ -4714,16 +5590,16 @@ fi
CLANG_COMPILER=no
if test "$GCC" = yes ; then
- echo "$as_me:4717: checking if this is really Clang C compiler" >&5
+ echo "$as_me:5593: 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 4722 "configure"
+#line 5598 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
#ifdef __clang__
@@ -4736,16 +5612,16 @@ make an error
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:4739: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:5615: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4742: \$? = $ac_status" >&5
+ echo "$as_me:5618: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:4745: \"$ac_try\"") >&5
+ { (eval echo "$as_me:5621: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:4748: \$? = $ac_status" >&5
+ echo "$as_me:5624: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
CLANG_COMPILER=yes
cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
@@ -4756,12 +5632,12 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CFLAGS="$cf_save_CFLAGS"
- echo "$as_me:4759: result: $CLANG_COMPILER" >&5
+ echo "$as_me:5635: result: $CLANG_COMPILER" >&5
echo "${ECHO_T}$CLANG_COMPILER" >&6
fi
cat > conftest.$ac_ext <<EOF
-#line 4764 "${as_me:-configure}"
+#line 5640 "${as_me:-configure}"
int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
EOF
@@ -4778,7 +5654,7 @@ then
# remark #981: operands are evaluated in unspecified order
# warning #279: controlling expression is constant
- { echo "$as_me:4781: checking for $CC warning options..." >&5
+ { echo "$as_me:5657: checking for $CC warning options..." >&5
echo "$as_me: checking for $CC warning options..." >&6;}
cf_save_CFLAGS="$CFLAGS"
EXTRA_CFLAGS="-Wall"
@@ -4794,12 +5670,12 @@ echo "$as_me: checking for $CC warning options..." >&6;}
wd981
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4797: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4800: \$? = $ac_status" >&5
+ echo "$as_me:5676: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4802: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:5678: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
fi
@@ -4808,16 +5684,20 @@ echo "${ECHO_T}... -$cf_opt" >&6
elif test "$GCC" = yes
then
- { echo "$as_me:4811: checking for $CC warning options..." >&5
+ { echo "$as_me:5687: 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 \
@@ -4825,36 +5705,39 @@ echo "$as_me: checking for $CC warning options..." >&6;}
Wpointer-arith \
Wshadow \
Wstrict-prototypes \
- Wundef $cf_warn_CONST
+ Wundef $cf_gcc_warnings $cf_warn_CONST
do
CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
- if { (eval echo "$as_me:4831: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:5711: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:4834: \$? = $ac_status" >&5
+ echo "$as_me:5714: \$? = $ac_status" >&5
(exit $ac_status); }; then
- test -n "$verbose" && echo "$as_me:4836: result: ... -$cf_opt" >&5
+ test -n "$verbose" && echo "$as_me:5716: result: ... -$cf_opt" >&5
echo "${ECHO_T}... -$cf_opt" >&6
- case $cf_opt in #(vi
- Wcast-qual) #(vi
- CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
+ case $cf_opt in
+ (Wcast-qual)
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
+
;;
- Winline) #(vi
+ (Winline)
case $GCC_VERSION in
- [34].*)
+ ([34].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-echo "${as_me:-configure}:4847: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:5730: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
continue;;
esac
;;
- Wpointer-arith) #(vi
+ (Wpointer-arith)
case $GCC_VERSION in
- [12].*)
+ ([12].*)
test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
-echo "${as_me:-configure}:4857: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
+echo "${as_me:-configure}:5740: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
continue;;
esac
@@ -4870,7 +5753,7 @@ rm -rf conftest*
fi
fi
-echo "$as_me:4873: checking if you want to use pkg-config" >&5
+echo "$as_me:5756: 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.
@@ -4880,19 +5763,19 @@ if test "${with_pkg_config+set}" = set; then
else
cf_pkg_config=yes
fi;
-echo "$as_me:4883: result: $cf_pkg_config" >&5
+echo "$as_me:5766: result: $cf_pkg_config" >&5
echo "${ECHO_T}$cf_pkg_config" >&6
-case $cf_pkg_config in #(vi
-no) #(vi
+case $cf_pkg_config in
+(no)
PKG_CONFIG=none
;;
-yes) #(vi
+(yes)
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:4895: checking for $ac_word" >&5
+echo "$as_me:5778: 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
@@ -4909,7 +5792,7 @@ for ac_dir in $ac_dummy; do
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:4912: found $ac_dir/$ac_word" >&5
+ echo "$as_me:5795: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -4920,10 +5803,10 @@ fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
- echo "$as_me:4923: result: $PKG_CONFIG" >&5
+ echo "$as_me:5806: result: $PKG_CONFIG" >&5
echo "${ECHO_T}$PKG_CONFIG" >&6
else
- echo "$as_me:4926: result: no" >&5
+ echo "$as_me:5809: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -4932,7 +5815,7 @@ 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:4935: checking for $ac_word" >&5
+echo "$as_me:5818: 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
@@ -4949,7 +5832,7 @@ for ac_dir in $ac_dummy; do
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:4952: found $ac_dir/$ac_word" >&5
+ echo "$as_me:5835: found $ac_dir/$ac_word" >&5
break
fi
done
@@ -4961,10 +5844,10 @@ fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
- echo "$as_me:4964: result: $ac_pt_PKG_CONFIG" >&5
+ echo "$as_me:5847: result: $ac_pt_PKG_CONFIG" >&5
echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
else
- echo "$as_me:4967: result: no" >&5
+ echo "$as_me:5850: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -4974,7 +5857,7 @@ else
fi
;;
-*)
+(*)
PKG_CONFIG=$withval
;;
esac
@@ -4983,39 +5866,42 @@ test -z "$PKG_CONFIG" && PKG_CONFIG=none
if test "$PKG_CONFIG" != none ; then
if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
+ cf_path_syntax="$prefix"
else
- cf_path_syntax="$ac_default_prefix"
+ cf_path_syntax="$ac_default_prefix"
fi
-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:5010: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
+case ".$PKG_CONFIG" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval PKG_CONFIG="$PKG_CONFIG"
+ case ".$PKG_CONFIG" in
+ (.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:5893: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
{ (exit 1); exit 1; }; }
- ;;
+ ;;
esac
+elif test "x$cf_pkg_config" != xno ; then
+ { echo "$as_me:5900: WARNING: pkg-config is not installed" >&5
+echo "$as_me: WARNING: pkg-config is not installed" >&2;}
fi
-echo "$as_me:5018: checking for this package's name" >&5
+echo "$as_me:5904: checking for this package's name" >&5
echo $ECHO_N "checking for this package's name... $ECHO_C" >&6
# Check whether --with-package or --without-package was given.
@@ -5025,11 +5911,11 @@ if test "${with_package+set}" = set; then
else
PACKAGE=dialog
fi;
-echo "$as_me:5028: result: $PACKAGE" >&5
+echo "$as_me:5914: result: $PACKAGE" >&5
echo "${ECHO_T}$PACKAGE" >&6
if test -f $srcdir/VERSION ; then
- echo "$as_me:5032: checking for package version" >&5
+ echo "$as_me:5918: checking for package version" >&5
echo $ECHO_N "checking for package version... $ECHO_C" >&6
# if there are not enough fields, cut returns the last one...
@@ -5041,39 +5927,39 @@ echo $ECHO_N "checking for package version... $ECHO_C" >&6
VERSION="$cf_field1"
VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
- test -z "$VERSION_MAJOR" && { { echo "$as_me:5044: error: missing major-version" >&5
+ test -z "$VERSION_MAJOR" && { { echo "$as_me:5930: error: missing major-version" >&5
echo "$as_me: error: missing major-version" >&2;}
{ (exit 1); exit 1; }; }
VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
- test -z "$VERSION_MINOR" && { { echo "$as_me:5049: error: missing minor-version" >&5
+ test -z "$VERSION_MINOR" && { { echo "$as_me:5935: error: missing minor-version" >&5
echo "$as_me: error: missing minor-version" >&2;}
{ (exit 1); exit 1; }; }
- echo "$as_me:5053: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
+ echo "$as_me:5939: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
- echo "$as_me:5056: checking for package patch date" >&5
+ echo "$as_me:5942: checking for package patch date" >&5
echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
case .$VERSION_PATCH in
- .)
- { { echo "$as_me:5061: error: missing patch-date $VERSION_PATCH" >&5
+ (.)
+ { { echo "$as_me:5947: error: missing patch-date $VERSION_PATCH" >&5
echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
- .[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
+ (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
;;
- *)
- { { echo "$as_me:5068: error: illegal patch-date $VERSION_PATCH" >&5
+ (*)
+ { { echo "$as_me:5954: error: illegal patch-date $VERSION_PATCH" >&5
echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
- echo "$as_me:5073: result: $VERSION_PATCH" >&5
+ echo "$as_me:5959: result: $VERSION_PATCH" >&5
echo "${ECHO_T}$VERSION_PATCH" >&6
else
- { { echo "$as_me:5076: error: did not find $srcdir/VERSION" >&5
+ { { echo "$as_me:5962: error: did not find $srcdir/VERSION" >&5
echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -5081,19 +5967,19 @@ fi
# show the actual data that we have for versions:
test -n "$verbose" && echo " ABI VERSION $VERSION" 1>&6
-echo "${as_me:-configure}:5084: testing ABI VERSION $VERSION ..." 1>&5
+echo "${as_me:-configure}:5970: testing ABI VERSION $VERSION ..." 1>&5
test -n "$verbose" && echo " VERSION_MAJOR $VERSION_MAJOR" 1>&6
-echo "${as_me:-configure}:5088: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
+echo "${as_me:-configure}:5974: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
test -n "$verbose" && echo " VERSION_MINOR $VERSION_MINOR" 1>&6
-echo "${as_me:-configure}:5092: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
+echo "${as_me:-configure}:5978: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
test -n "$verbose" && echo " VERSION_PATCH $VERSION_PATCH" 1>&6
-echo "${as_me:-configure}:5096: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
+echo "${as_me:-configure}:5982: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
cf_PACKAGE=dialog
PACKAGE=$PACKAGE
@@ -5116,7 +6002,7 @@ CFG_ROOTNAME=$PACKAGE
HDR_ROOTNAME=$PACKAGE
LIB_ROOTNAME=$PACKAGE
-echo "$as_me:5119: checking if we should install dlg_XXX headers to subdirectory" >&5
+echo "$as_me:6005: checking if we should install dlg_XXX headers to subdirectory" >&5
echo $ECHO_N "checking if we should install dlg_XXX headers to subdirectory... $ECHO_C" >&6
# Check whether --enable-header-subdir or --disable-header-subdir was given.
@@ -5126,18 +6012,280 @@ if test "${enable_header_subdir+set}" = set; then
else
SUB_INC=no
fi;
-echo "$as_me:5129: result: $SUB_INC" >&5
+echo "$as_me:6015: result: $SUB_INC" >&5
echo "${ECHO_T}$SUB_INC" >&6
+case "x${with_man2html}" in
+(xno)
+ cf_man2html=no
+ ;;
+(x|xyes)
+ # Extract the first word of "man2html", so it can be a program name with args.
+set dummy man2html; ac_word=$2
+echo "$as_me:6025: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_cf_man2html+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $cf_man2html in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_cf_man2html="$cf_man2html" # 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_cf_man2html="$ac_dir/$ac_word"
+ echo "$as_me:6042: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
+ ;;
+esac
+fi
+cf_man2html=$ac_cv_path_cf_man2html
+
+if test -n "$cf_man2html"; then
+ echo "$as_me:6054: result: $cf_man2html" >&5
+echo "${ECHO_T}$cf_man2html" >&6
+else
+ echo "$as_me:6057: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ case "x$cf_man2html" in
+ (x/*)
+ echo "$as_me:6063: checking for the modified Earl Hood script" >&5
+echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
+ if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
+ then
+ cf_man2html_ok=yes
+ else
+ cf_man2html=no
+ cf_man2html_ok=no
+ fi
+ echo "$as_me:6072: result: $cf_man2html_ok" >&5
+echo "${ECHO_T}$cf_man2html_ok" >&6
+ ;;
+ (*)
+ cf_man2html=no
+ ;;
+ esac
+esac
+
+echo "$as_me:6081: checking for program to convert manpage to html" >&5
+echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
+
+# Check whether --with-man2html or --without-man2html was given.
+if test "${with_man2html+set}" = set; then
+ withval="$with_man2html"
+ cf_man2html=$withval
+else
+ cf_man2html=$cf_man2html
+fi;
+
+cf_with_groff=no
+
+case $cf_man2html in
+(yes)
+ echo "$as_me:6096: result: man2html" >&5
+echo "${ECHO_T}man2html" >&6
+ # Extract the first word of "man2html", so it can be a program name with args.
+set dummy man2html; ac_word=$2
+echo "$as_me:6100: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_cf_man2html+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $cf_man2html in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_cf_man2html="$cf_man2html" # 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_cf_man2html="$ac_dir/$ac_word"
+ echo "$as_me:6117: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
+ ;;
+esac
+fi
+cf_man2html=$ac_cv_path_cf_man2html
+
+if test -n "$cf_man2html"; then
+ echo "$as_me:6129: result: $cf_man2html" >&5
+echo "${ECHO_T}$cf_man2html" >&6
+else
+ echo "$as_me:6132: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ ;;
+(no|groff|*/groff*)
+ cf_with_groff=yes
+ cf_man2html=$GROFF_PATH
+ echo "$as_me:6140: result: $cf_man2html" >&5
+echo "${ECHO_T}$cf_man2html" >&6
+ ;;
+(*)
+ echo "$as_me:6144: result: $cf_man2html" >&5
+echo "${ECHO_T}$cf_man2html" >&6
+ ;;
+esac
+
+MAN2HTML_TEMP="man2html.tmp"
+ cat >$MAN2HTML_TEMP <<CF_EOF
+#!$SHELL
+# Temporary script generated by CF_WITH_MAN2HTML
+# Convert inputs to html, sending result to standard output.
+#
+# Parameters:
+# \${1} = rootname of file to convert
+# \${2} = suffix of file to convert, e.g., "1"
+# \${3} = macros to use, e.g., "man"
+#
+ROOT=\$1
+TYPE=\$2
+MACS=\$3
+
+unset LANG
+unset LC_ALL
+unset LC_CTYPE
+unset LANGUAGE
+GROFF_NO_SGR=stupid
+export GROFF_NO_SGR
+
+CF_EOF
+
+if test "x$cf_with_groff" = xyes
+then
+ MAN2HTML_NOTE="$GROFF_NOTE"
+ MAN2HTML_PATH="$GROFF_PATH"
+ cat >>$MAN2HTML_TEMP <<CF_EOF
+$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
+CF_EOF
+else
+ MAN2HTML_NOTE=""
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$cf_man2html" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval cf_man2html="$cf_man2html"
+ case ".$cf_man2html" in
+ (.NONE/*)
+ cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:6208: error: expected a pathname, not \"$cf_man2html\"" >&5
+echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ MAN2HTML_PATH="$cf_man2html"
+ echo "$as_me:6215: checking for $cf_man2html top/bottom margins" >&5
+echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
+
+ # for this example, expect 3 lines of content, the remainder is head/foot
+ cat >conftest.in <<CF_EOF
+.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
+.SH SECTION
+MARKER
+CF_EOF
+
+ LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
+
+ cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
+ cf_man2html_top=`expr $cf_man2html_1st - 2`
+ cf_man2html_bot=`wc -l conftest.out |sed -e 's/[^0-9]//g'`
+ cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
+ cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
+
+ echo "$as_me:6233: result: $cf_man2html_top_bot" >&5
+echo "${ECHO_T}$cf_man2html_top_bot" >&6
+
+ echo "$as_me:6236: checking for pagesize to use" >&5
+echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
+ for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+ do
+ cat >>conftest.in <<CF_EOF
+.nf
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+CF_EOF
+ done
+
+ LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
+ cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
+ test -z "$cf_man2html_page" && cf_man2html_page=99999
+ test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
+
+ rm -rf conftest*
+ echo "$as_me:6261: result: $cf_man2html_page" >&5
+echo "${ECHO_T}$cf_man2html_page" >&6
+
+ cat >>$MAN2HTML_TEMP <<CF_EOF
+: \${MAN2HTML_PATH=$MAN2HTML_PATH}
+MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
+case \${TYPE} in
+(ms)
+ $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
+ ;;
+(*)
+ $TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
+ ;;
+esac
+CF_EOF
+fi
+
+chmod 700 $MAN2HTML_TEMP
+
EXTRAOBJS=""
-echo "$as_me:5134: checking for ANSI C header files" >&5
+echo "$as_me:6282: 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 5140 "configure"
+#line 6288 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -5145,13 +6293,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:5148: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:6296: \"$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:5154: \$? = $ac_status" >&5
+ echo "$as_me:6302: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5173,7 +6321,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 5176 "configure"
+#line 6324 "configure"
#include "confdefs.h"
#include <string.h>
@@ -5191,7 +6339,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 5194 "configure"
+#line 6342 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -5212,7 +6360,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5215 "configure"
+#line 6363 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -5227,7 +6375,7 @@ else
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
-main ()
+main (void)
{
int i;
for (i = 0; i < 256; i++)
@@ -5238,15 +6386,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5241: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6389: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5244: \$? = $ac_status" >&5
+ echo "$as_me:6392: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5246: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6394: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5249: \$? = $ac_status" >&5
+ echo "$as_me:6397: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -5259,7 +6407,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:5262: result: $ac_cv_header_stdc" >&5
+echo "$as_me:6410: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -5269,7 +6417,7 @@ EOF
fi
-echo "$as_me:5272: checking for inline" >&5
+echo "$as_me:6420: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5277,7 +6425,7 @@ else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
-#line 5280 "configure"
+#line 6428 "configure"
#include "confdefs.h"
#ifndef __cplusplus
static $ac_kw int static_foo () {return 0; }
@@ -5286,16 +6434,16 @@ $ac_kw int foo () {return 0; }
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5289: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6437: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5292: \$? = $ac_status" >&5
+ echo "$as_me:6440: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5295: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6443: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5298: \$? = $ac_status" >&5
+ echo "$as_me:6446: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
@@ -5306,7 +6454,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:5309: result: $ac_cv_c_inline" >&5
+echo "$as_me:6457: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
inline | yes) ;;
@@ -5327,28 +6475,28 @@ 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:5330: checking for $ac_header" >&5
+echo "$as_me:6478: 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 5336 "configure"
+#line 6484 "configure"
#include "confdefs.h"
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5342: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6490: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5345: \$? = $ac_status" >&5
+ echo "$as_me:6493: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5348: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6496: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5351: \$? = $ac_status" >&5
+ echo "$as_me:6499: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -5358,7 +6506,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5361: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:6509: 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
@@ -5368,17 +6516,17 @@ EOF
fi
done
-echo "$as_me:5371: checking for off_t" >&5
+echo "$as_me:6519: checking for off_t" >&5
echo $ECHO_N "checking for off_t... $ECHO_C" >&6
if test "${ac_cv_type_off_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5377 "configure"
+#line 6525 "configure"
#include "confdefs.h"
$ac_includes_default
int
-main ()
+main (void)
{
if ((off_t *) 0)
return 0;
@@ -5389,16 +6537,16 @@ if (sizeof (off_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5392: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6540: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5395: \$? = $ac_status" >&5
+ echo "$as_me:6543: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5398: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6546: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5401: \$? = $ac_status" >&5
+ echo "$as_me:6549: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_off_t=yes
else
@@ -5408,7 +6556,7 @@ ac_cv_type_off_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5411: result: $ac_cv_type_off_t" >&5
+echo "$as_me:6559: result: $ac_cv_type_off_t" >&5
echo "${ECHO_T}$ac_cv_type_off_t" >&6
if test $ac_cv_type_off_t = yes; then
:
@@ -5420,17 +6568,17 @@ EOF
fi
-echo "$as_me:5423: checking for size_t" >&5
+echo "$as_me:6571: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5429 "configure"
+#line 6577 "configure"
#include "confdefs.h"
$ac_includes_default
int
-main ()
+main (void)
{
if ((size_t *) 0)
return 0;
@@ -5441,16 +6589,16 @@ if (sizeof (size_t))
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:5444: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:6592: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:5447: \$? = $ac_status" >&5
+ echo "$as_me:6595: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:5450: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6598: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5453: \$? = $ac_status" >&5
+ echo "$as_me:6601: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
@@ -5460,7 +6608,7 @@ ac_cv_type_size_t=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:5463: result: $ac_cv_type_size_t" >&5
+echo "$as_me:6611: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
:
@@ -5474,17 +6622,17 @@ fi
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
-echo "$as_me:5477: checking for working alloca.h" >&5
+echo "$as_me:6625: checking for working alloca.h" >&5
echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
if test "${ac_cv_working_alloca_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5483 "configure"
+#line 6631 "configure"
#include "confdefs.h"
#include <alloca.h>
int
-main ()
+main (void)
{
char *p = (char *) alloca (2 * sizeof (int));
;
@@ -5492,16 +6640,16 @@ char *p = (char *) alloca (2 * sizeof (int));
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5495: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6643: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5498: \$? = $ac_status" >&5
+ echo "$as_me:6646: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5501: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6649: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5504: \$? = $ac_status" >&5
+ echo "$as_me:6652: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_working_alloca_h=yes
else
@@ -5511,7 +6659,7 @@ ac_cv_working_alloca_h=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5514: result: $ac_cv_working_alloca_h" >&5
+echo "$as_me:6662: result: $ac_cv_working_alloca_h" >&5
echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
if test $ac_cv_working_alloca_h = yes; then
@@ -5521,13 +6669,13 @@ EOF
fi
-echo "$as_me:5524: checking for alloca" >&5
+echo "$as_me:6672: checking for alloca" >&5
echo $ECHO_N "checking for alloca... $ECHO_C" >&6
if test "${ac_cv_func_alloca_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5530 "configure"
+#line 6678 "configure"
#include "confdefs.h"
#ifdef __GNUC__
# define alloca __builtin_alloca
@@ -5551,7 +6699,7 @@ char *alloca ();
#endif
int
-main ()
+main (void)
{
char *p = (char *) alloca (1);
;
@@ -5559,16 +6707,16 @@ char *p = (char *) alloca (1);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5562: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6710: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5565: \$? = $ac_status" >&5
+ echo "$as_me:6713: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5568: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6716: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5571: \$? = $ac_status" >&5
+ echo "$as_me:6719: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_alloca_works=yes
else
@@ -5578,7 +6726,7 @@ ac_cv_func_alloca_works=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5581: result: $ac_cv_func_alloca_works" >&5
+echo "$as_me:6729: result: $ac_cv_func_alloca_works" >&5
echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
if test $ac_cv_func_alloca_works = yes; then
@@ -5599,13 +6747,13 @@ cat >>confdefs.h <<\EOF
#define C_ALLOCA 1
EOF
-echo "$as_me:5602: checking whether \`alloca.c' needs Cray hooks" >&5
+echo "$as_me:6750: checking whether \`alloca.c' needs Cray hooks" >&5
echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
if test "${ac_cv_os_cray+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5608 "configure"
+#line 6756 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -5623,18 +6771,18 @@ fi
rm -rf conftest*
fi
-echo "$as_me:5626: result: $ac_cv_os_cray" >&5
+echo "$as_me:6774: result: $ac_cv_os_cray" >&5
echo "${ECHO_T}$ac_cv_os_cray" >&6
if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5631: checking for $ac_func" >&5
+echo "$as_me:6779: 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 5637 "configure"
+#line 6785 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5649,7 +6797,7 @@ char $ac_func ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -5665,16 +6813,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5668: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6816: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5671: \$? = $ac_status" >&5
+ echo "$as_me:6819: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5674: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6822: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5677: \$? = $ac_status" >&5
+ echo "$as_me:6825: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5684,7 +6832,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5687: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:6835: 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
@@ -5698,7 +6846,7 @@ fi
done
fi
-echo "$as_me:5701: checking stack direction for C alloca" >&5
+echo "$as_me:6849: checking stack direction for C alloca" >&5
echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
if test "${ac_cv_c_stack_direction+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5707,10 +6855,10 @@ else
ac_cv_c_stack_direction=0
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5710 "configure"
+#line 6858 "configure"
#include "confdefs.h"
int
-find_stack_direction ()
+find_stack_direction (void)
{
static char *addr = 0;
auto char dummy;
@@ -5724,21 +6872,21 @@ find_stack_direction ()
}
int
-main ()
+main (void)
{
$ac_main_return (find_stack_direction () < 0);
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:5733: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6881: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5736: \$? = $ac_status" >&5
+ echo "$as_me:6884: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:5738: \"$ac_try\"") >&5
+ { (eval echo "$as_me:6886: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5741: \$? = $ac_status" >&5
+ echo "$as_me:6889: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_stack_direction=1
else
@@ -5750,7 +6898,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:5753: result: $ac_cv_c_stack_direction" >&5
+echo "$as_me:6901: result: $ac_cv_c_stack_direction" >&5
echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
cat >>confdefs.h <<EOF
@@ -5762,23 +6910,23 @@ fi
for ac_header in stdlib.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:5765: checking for $ac_header" >&5
+echo "$as_me:6913: 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 5771 "configure"
+#line 6919 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:5775: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:6923: \"$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:5781: \$? = $ac_status" >&5
+ echo "$as_me:6929: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -5797,7 +6945,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:5800: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:6948: 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
@@ -5810,13 +6958,13 @@ done
for ac_func in getpagesize
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:5813: checking for $ac_func" >&5
+echo "$as_me:6961: 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 5819 "configure"
+#line 6967 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -5831,7 +6979,7 @@ char $ac_func ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -5847,16 +6995,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:5850: \"$ac_link\"") >&5
+if { (eval echo "$as_me:6998: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:5853: \$? = $ac_status" >&5
+ echo "$as_me:7001: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:5856: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7004: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:5859: \$? = $ac_status" >&5
+ echo "$as_me:7007: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -5866,7 +7014,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:5869: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7017: 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
@@ -5876,7 +7024,7 @@ EOF
fi
done
-echo "$as_me:5879: checking for working mmap" >&5
+echo "$as_me:7027: checking for working mmap" >&5
echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -5885,7 +7033,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line 5888 "configure"
+#line 7036 "configure"
#include "confdefs.h"
$ac_includes_default
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -5955,7 +7103,7 @@ char *malloc ();
#endif /* no HAVE_GETPAGESIZE */
int
-main ()
+main (void)
{
char *data, *data2, *data3;
int i, pagesize;
@@ -6012,15 +7160,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:6015: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7163: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6018: \$? = $ac_status" >&5
+ echo "$as_me:7166: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:6020: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7168: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6023: \$? = $ac_status" >&5
+ echo "$as_me:7171: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_mmap_fixed_mapped=yes
else
@@ -6032,7 +7180,7 @@ fi
rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
-echo "$as_me:6035: result: $ac_cv_func_mmap_fixed_mapped" >&5
+echo "$as_me:7183: result: $ac_cv_func_mmap_fixed_mapped" >&5
echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
if test $ac_cv_func_mmap_fixed_mapped = yes; then
@@ -6043,13 +7191,13 @@ EOF
fi
rm -f conftest.mmap
- echo "$as_me:6046: checking whether we are using the GNU C Library 2.1 or newer" >&5
+echo "$as_me:7194: checking whether we are using the GNU C Library 2.1 or newer" >&5
echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
if test "${ac_cv_gnu_library_2_1+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6052 "configure"
+#line 7200 "configure"
#include "confdefs.h"
#include <features.h>
@@ -6069,10 +7217,10 @@ fi
rm -rf conftest*
fi
-echo "$as_me:6072: result: $ac_cv_gnu_library_2_1" >&5
+echo "$as_me:7220: result: $ac_cv_gnu_library_2_1" >&5
echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
- GLIBC21="$ac_cv_gnu_library_2_1"
+ GLIBC21="$ac_cv_gnu_library_2_1"
cf_makefile=makefile
@@ -6082,7 +7230,7 @@ test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && ec
: ${CONFIG_H:=config.h}
if test -z "$PACKAGE" ; then
- { { echo "$as_me:6085: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
+ { { echo "$as_me:7233: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -6099,23 +7247,23 @@ for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
stdlib.h string.h unistd.h sys/param.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:6102: checking for $ac_header" >&5
+echo "$as_me:7250: 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 6108 "configure"
+#line 7256 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:6112: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:7260: \"$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:6118: \$? = $ac_status" >&5
+ echo "$as_me:7266: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -6134,7 +7282,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:6137: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:7285: 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
@@ -6149,13 +7297,13 @@ getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
strdup strtoul tsearch __argz_count __argz_stringify __argz_next
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:6152: checking for $ac_func" >&5
+echo "$as_me:7300: 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 6158 "configure"
+#line 7306 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -6170,7 +7318,7 @@ char $ac_func ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -6186,16 +7334,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7337: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6192: \$? = $ac_status" >&5
+ echo "$as_me:7340: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6195: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7343: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6198: \$? = $ac_status" >&5
+ echo "$as_me:7346: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -6205,7 +7353,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:6208: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:7356: 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
@@ -6219,12 +7367,12 @@ done
if test "${with_libiconv_prefix+set}" = set; then
withval="$with_libiconv_prefix"
- case "$withval" in #(vi
- no) #(vi
- ;;
- yes) #(vi
- ;;
- *)
+case "$withval" in
+(no)
+ ;;
+(yes)
+ ;;
+(*)
for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
if test -d $cf_searchpath/include; then
@@ -6251,13 +7399,16 @@ if test -n "$cf_searchpath/include" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 6256 "configure"
+#line 7407 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -6265,16 +7416,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7419: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6271: \$? = $ac_status" >&5
+ echo "$as_me:7422: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6274: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7425: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6277: \$? = $ac_status" >&5
+ echo "$as_me:7428: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6291,7 +7442,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}:6294: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7445: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6301,6 +7452,8 @@ echo "${as_me:-configure}:6294: testing adding $cf_add_incdir to include-path ..
else
break
fi
+ else
+ break
fi
done
done
@@ -6330,13 +7483,16 @@ if test -n "$cf_searchpath/../include" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 6335 "configure"
+#line 7491 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -6344,16 +7500,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6347: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7503: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6350: \$? = $ac_status" >&5
+ echo "$as_me:7506: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6353: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7509: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6356: \$? = $ac_status" >&5
+ echo "$as_me:7512: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -6370,7 +7526,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}:6373: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:7529: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -6380,87 +7536,89 @@ echo "${as_me:-configure}:6373: testing adding $cf_add_incdir to include-path ..
else
break
fi
+ else
+ break
fi
done
done
fi
else
-{ { echo "$as_me:6389: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:7547: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
if test -d $cf_searchpath/lib; then
if test -n "$cf_searchpath/lib" ; then
- for cf_add_libdir in $cf_searchpath/lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_searchpath/lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6414: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7572: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
fi
elif test -d $cf_searchpath ; then
if test -n "$cf_searchpath" ; then
- for cf_add_libdir in $cf_searchpath
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_searchpath
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:6443: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:7601: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
fi
else
-{ { echo "$as_me:6452: error: cannot find libiconv under $withval" >&5
+{ { echo "$as_me:7610: error: cannot find libiconv under $withval" >&5
echo "$as_me: error: cannot find libiconv under $withval" >&2;}
{ (exit 1); exit 1; }; }
fi
done
- ;;
- esac
+ ;;
+esac
fi;
- echo "$as_me:6463: checking for iconv" >&5
+ echo "$as_me:7621: checking for iconv" >&5
echo $ECHO_N "checking for iconv... $ECHO_C" >&6
if test "${am_cv_func_iconv+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -6471,19 +7629,19 @@ else
cf_cv_header_path_iconv=
cf_cv_library_path_iconv=
-echo "${as_me:-configure}:6474: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:7632: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6479 "configure"
+#line 7637 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
@@ -6495,16 +7653,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6498: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7656: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6501: \$? = $ac_status" >&5
+ echo "$as_me:7659: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6504: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7662: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6507: \$? = $ac_status" >&5
+ echo "$as_me:7665: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -6518,14 +7676,14 @@ cat conftest.$ac_ext >&5
LIBS="-liconv $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 6521 "configure"
+#line 7679 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
@@ -6537,16 +7695,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6540: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7698: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6543: \$? = $ac_status" >&5
+ echo "$as_me:7701: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6546: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7704: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6549: \$? = $ac_status" >&5
+ echo "$as_me:7707: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_iconv=yes
@@ -6561,14 +7719,14 @@ cat conftest.$ac_ext >&5
cf_cv_find_linkage_iconv=no
LIBS="$cf_save_LIBS"
- test -n "$verbose" && echo " find linkage for iconv library" 1>&6
+ test -n "$verbose" && echo " find linkage for iconv library" 1>&6
-echo "${as_me:-configure}:6566: testing find linkage for iconv library ..." 1>&5
+echo "${as_me:-configure}:7724: testing find linkage for iconv library ..." 1>&5
-echo "${as_me:-configure}:6568: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:7726: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
- cf_save_CPPFLAGS="$CPPFLAGS"
- cf_test_CPPFLAGS="$CPPFLAGS"
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
cf_search=
@@ -6577,11 +7735,11 @@ cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
for cf_header_path in $CPPFLAGS $CFLAGS
do
- case $cf_header_path in #(vi
- -I*)
+ case $cf_header_path in
+ (-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"
@@ -6602,18 +7760,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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/iconv && cf_search="$cf_search /usr/include/iconv"
- test -d /usr/include/iconv/include && cf_search="$cf_search /usr/include/iconv/include"
- test -d /usr/iconv/include && cf_search="$cf_search /usr/iconv/include"
- test -d /usr/iconv/include/iconv && cf_search="$cf_search /usr/iconv/include/iconv"
-}
-
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $prefix"
@@ -6624,38 +7771,27 @@ test -d "$prefix" && \
test -d $prefix/iconv/include/iconv && cf_search="$cf_search $prefix/iconv/include/iconv"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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/iconv && cf_search="$cf_search /usr/local/include/iconv"
- test -d /usr/local/include/iconv/include && cf_search="$cf_search /usr/local/include/iconv/include"
- test -d /usr/local/iconv/include && cf_search="$cf_search /usr/local/iconv/include"
- test -d /usr/local/iconv/include/iconv && cf_search="$cf_search /usr/local/iconv/include/iconv"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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/iconv && cf_search="$cf_search /opt/include/iconv"
- test -d /opt/include/iconv/include && cf_search="$cf_search /opt/include/iconv/include"
- test -d /opt/iconv/include && cf_search="$cf_search /opt/iconv/include"
- test -d /opt/iconv/include/iconv && cf_search="$cf_search /opt/iconv/include/iconv"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/iconv && cf_search="$cf_search $cf_subdir_prefix/include/iconv"
+ test -d $cf_subdir_prefix/include/iconv/include && cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
+ test -d $cf_subdir_prefix/iconv/include && cf_search="$cf_search $cf_subdir_prefix/iconv/include"
+ test -d $cf_subdir_prefix/iconv/include/iconv && cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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/iconv && cf_search="$cf_search $HOME/include/iconv"
- test -d $HOME/include/iconv/include && cf_search="$cf_search $HOME/include/iconv/include"
- test -d $HOME/iconv/include && cf_search="$cf_search $HOME/iconv/include"
- test -d $HOME/iconv/include/iconv && cf_search="$cf_search $HOME/iconv/include/iconv"
-}
+done
test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
@@ -6673,23 +7809,27 @@ test -d "$oldincludedir" && {
cf_search="$cf_search $cf_header_path_list"
- for cf_cv_header_path_iconv in $cf_search
- do
- if test -d $cf_cv_header_path_iconv ; then
- test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
+ for cf_cv_header_path_iconv in $cf_search
+ do
+ if test -d $cf_cv_header_path_iconv ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_header_path_iconv" 1>&6
+
+echo "${as_me:-configure}:7817: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
-echo "${as_me:-configure}:6681: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
- CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_iconv"
- cat >conftest.$ac_ext <<_ACEOF
-#line 6685 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7825 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
@@ -6701,55 +7841,55 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6704: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:7844: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6707: \$? = $ac_status" >&5
+ echo "$as_me:7847: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6710: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7850: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6713: \$? = $ac_status" >&5
+ echo "$as_me:7853: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
+ test -n "$verbose" && echo " ... found iconv headers in $cf_cv_header_path_iconv" 1>&6
-echo "${as_me:-configure}:6718: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
+echo "${as_me:-configure}:7858: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
- cf_cv_find_linkage_iconv=maybe
- cf_test_CPPFLAGS="$CPPFLAGS"
- break
+ cf_cv_find_linkage_iconv=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- done
+ fi
+ done
- if test "$cf_cv_find_linkage_iconv" = maybe ; then
+ if test "$cf_cv_find_linkage_iconv" = maybe ; then
-echo "${as_me:-configure}:6736: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
+echo "${as_me:-configure}:7876: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
- cf_save_LIBS="$LIBS"
- cf_save_LDFLAGS="$LDFLAGS"
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
- if test "$cf_cv_find_linkage_iconv" != yes ; then
+ if test "$cf_cv_find_linkage_iconv" != yes ; then
cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
for cf_library_path in $LDFLAGS $LIBS
do
- case $cf_library_path in #(vi
- -L*)
+ case $cf_library_path in
+ (-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"
@@ -6768,18 +7908,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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/iconv && cf_search="$cf_search /usr/lib/iconv"
- test -d /usr/lib/iconv/lib && cf_search="$cf_search /usr/lib/iconv/lib"
- test -d /usr/iconv/lib && cf_search="$cf_search /usr/iconv/lib"
- test -d /usr/iconv/lib/iconv && cf_search="$cf_search /usr/iconv/lib/iconv"
-}
-
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
@@ -6790,60 +7919,49 @@ test -d "$prefix" && \
test -d $prefix/iconv/lib/iconv && cf_search="$cf_search $prefix/iconv/lib/iconv"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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/iconv && cf_search="$cf_search /usr/local/lib/iconv"
- test -d /usr/local/lib/iconv/lib && cf_search="$cf_search /usr/local/lib/iconv/lib"
- test -d /usr/local/iconv/lib && cf_search="$cf_search /usr/local/iconv/lib"
- test -d /usr/local/iconv/lib/iconv && cf_search="$cf_search /usr/local/iconv/lib/iconv"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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/iconv && cf_search="$cf_search /opt/lib/iconv"
- test -d /opt/lib/iconv/lib && cf_search="$cf_search /opt/lib/iconv/lib"
- test -d /opt/iconv/lib && cf_search="$cf_search /opt/iconv/lib"
- test -d /opt/iconv/lib/iconv && cf_search="$cf_search /opt/iconv/lib/iconv"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/iconv && cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
+ test -d $cf_subdir_prefix/lib/iconv/lib && cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
+ test -d $cf_subdir_prefix/iconv/lib && cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
+ test -d $cf_subdir_prefix/iconv/lib/iconv && cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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/iconv && cf_search="$cf_search $HOME/lib/iconv"
- test -d $HOME/lib/iconv/lib && cf_search="$cf_search $HOME/lib/iconv/lib"
- test -d $HOME/iconv/lib && cf_search="$cf_search $HOME/iconv/lib"
- test -d $HOME/iconv/lib/iconv && cf_search="$cf_search $HOME/iconv/lib/iconv"
-}
+done
cf_search="$cf_library_path_list $cf_search"
- for cf_cv_library_path_iconv in $cf_search
- do
- if test -d $cf_cv_library_path_iconv ; then
- test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
+ for cf_cv_library_path_iconv in $cf_search
+ do
+ if test -d $cf_cv_library_path_iconv ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6833: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:7951: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
- CPPFLAGS="$cf_test_CPPFLAGS"
- LIBS="-liconv $cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
- cat >conftest.$ac_ext <<_ACEOF
-#line 6839 "configure"
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-liconv $cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 7957 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <iconv.h>
int
-main ()
+main (void)
{
iconv_t cd = iconv_open("","");
@@ -6855,44 +7973,44 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:6858: \"$ac_link\"") >&5
+if { (eval echo "$as_me:7976: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:6861: \$? = $ac_status" >&5
+ echo "$as_me:7979: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:6864: \"$ac_try\"") >&5
+ { (eval echo "$as_me:7982: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6867: \$? = $ac_status" >&5
+ echo "$as_me:7985: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
+ test -n "$verbose" && echo " ... found iconv library in $cf_cv_library_path_iconv" 1>&6
-echo "${as_me:-configure}:6872: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
+echo "${as_me:-configure}:7990: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
- cf_cv_find_linkage_iconv=yes
- cf_cv_library_file_iconv="-liconv"
- break
+ cf_cv_find_linkage_iconv=yes
+ cf_cv_library_file_iconv="-liconv"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
- LIBS="$cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- done
- CPPFLAGS="$cf_save_CPPFLAGS"
- LDFLAGS="$cf_save_LDFLAGS"
- fi
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
- else
- cf_cv_find_linkage_iconv=no
- fi
+ else
+ cf_cv_find_linkage_iconv=no
+ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -6909,7 +8027,7 @@ am_cv_func_iconv="no, consider installing GNU libiconv"
fi
fi
-echo "$as_me:6912: result: $am_cv_func_iconv" >&5
+echo "$as_me:8030: result: $am_cv_func_iconv" >&5
echo "${ECHO_T}$am_cv_func_iconv" >&6
if test "$am_cv_func_iconv" = yes; then
@@ -6918,14 +8036,14 @@ cat >>confdefs.h <<\EOF
#define HAVE_ICONV 1
EOF
- echo "$as_me:6921: checking if the declaration of iconv() needs const." >&5
+ echo "$as_me:8039: checking if the declaration of iconv() needs const." >&5
echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
if test "${am_cv_proto_iconv_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 6928 "configure"
+#line 8046 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -6942,7 +8060,7 @@ size_t iconv();
#endif
int
-main ()
+main (void)
{
;
@@ -6950,16 +8068,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:6953: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8071: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:6956: \$? = $ac_status" >&5
+ echo "$as_me:8074: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:6959: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8077: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:6962: \$? = $ac_status" >&5
+ echo "$as_me:8080: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_proto_iconv_const=no
else
@@ -6969,7 +8087,7 @@ am_cv_proto_iconv_const=yes
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:6972: result: $am_cv_proto_iconv_const" >&5
+echo "$as_me:8090: result: $am_cv_proto_iconv_const" >&5
echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
if test "$am_cv_proto_iconv_const" = yes ; then
@@ -7009,13 +8127,16 @@ if test -n "$cf_cv_header_path_iconv" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 7014 "configure"
+#line 8135 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -7023,16 +8144,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7026: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8147: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7029: \$? = $ac_status" >&5
+ echo "$as_me:8150: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7032: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8153: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7035: \$? = $ac_status" >&5
+ echo "$as_me:8156: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -7049,7 +8170,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}:7052: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:8173: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -7059,6 +8180,8 @@ echo "${as_me:-configure}:7052: testing adding $cf_add_incdir to include-path ..
else
break
fi
+ else
+ break
fi
done
done
@@ -7068,46 +8191,46 @@ fi
LIBICONV="-liconv"
if test -n "$cf_cv_library_path_iconv" ; then
- for cf_add_libdir in $cf_cv_library_path_iconv
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_cv_library_path_iconv
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:7089: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:8212: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
fi
fi
fi
- echo "$as_me:7100: checking for nl_langinfo and CODESET" >&5
+echo "$as_me:8223: checking for nl_langinfo and CODESET" >&5
echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
if test "${am_cv_langinfo_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7106 "configure"
+#line 8229 "configure"
#include "confdefs.h"
#include <langinfo.h>
int
-main ()
+main (void)
{
char* cs = nl_langinfo(CODESET);
;
@@ -7115,16 +8238,16 @@ char* cs = nl_langinfo(CODESET);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7118: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8241: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7121: \$? = $ac_status" >&5
+ echo "$as_me:8244: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7124: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8247: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7127: \$? = $ac_status" >&5
+ echo "$as_me:8250: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_langinfo_codeset=yes
else
@@ -7135,28 +8258,28 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7138: result: $am_cv_langinfo_codeset" >&5
+echo "$as_me:8261: result: $am_cv_langinfo_codeset" >&5
echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
- if test $am_cv_langinfo_codeset = yes; then
+ if test $am_cv_langinfo_codeset = yes; then
cat >>confdefs.h <<\EOF
#define HAVE_LANGINFO_CODESET 1
EOF
- fi
+ fi
if test $ac_cv_header_locale_h = yes; then
- echo "$as_me:7149: checking for LC_MESSAGES" >&5
+ echo "$as_me:8272: checking for LC_MESSAGES" >&5
echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
if test "${am_cv_val_LC_MESSAGES+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 7155 "configure"
+#line 8278 "configure"
#include "confdefs.h"
#include <locale.h>
int
-main ()
+main (void)
{
return LC_MESSAGES
;
@@ -7164,16 +8287,16 @@ return LC_MESSAGES
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7167: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8290: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7170: \$? = $ac_status" >&5
+ echo "$as_me:8293: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7173: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8296: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7176: \$? = $ac_status" >&5
+ echo "$as_me:8299: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
am_cv_val_LC_MESSAGES=yes
else
@@ -7183,17 +8306,17 @@ am_cv_val_LC_MESSAGES=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7186: result: $am_cv_val_LC_MESSAGES" >&5
+echo "$as_me:8309: result: $am_cv_val_LC_MESSAGES" >&5
echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
- if test $am_cv_val_LC_MESSAGES = yes; then
+ if test $am_cv_val_LC_MESSAGES = yes; then
cat >>confdefs.h <<\EOF
#define HAVE_LC_MESSAGES 1
EOF
- fi
- fi
- echo "$as_me:7196: checking whether NLS is requested" >&5
+ fi
+fi
+ echo "$as_me:8319: checking whether NLS is requested" >&5
echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
# Check whether --enable-nls or --disable-nls was given.
@@ -7203,7 +8326,7 @@ if test "${enable_nls+set}" = set; then
else
USE_NLS=no
fi;
- echo "$as_me:7206: result: $USE_NLS" >&5
+ echo "$as_me:8329: result: $USE_NLS" >&5
echo "${ECHO_T}$USE_NLS" >&6
BUILD_INCLUDED_LIBINTL=no
@@ -7211,12 +8334,13 @@ echo "${ECHO_T}$USE_NLS" >&6
INTLLIBS=
if test "$USE_NLS" = "yes"; then
+ POSUB=po
cat >>confdefs.h <<\EOF
#define ENABLE_NLS 1
EOF
- echo "$as_me:7219: checking whether included gettext is requested" >&5
+ echo "$as_me:8343: checking whether included gettext is requested" >&5
echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
# Check whether --with-included-gettext or --without-included-gettext was given.
@@ -7226,61 +8350,292 @@ if test "${with_included_gettext+set}" = set; then
else
nls_cv_force_use_gnu_gettext=no
fi;
- echo "$as_me:7229: result: $nls_cv_force_use_gnu_gettext" >&5
+ echo "$as_me:8353: result: $nls_cv_force_use_gnu_gettext" >&5
echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
CATOBJEXT=NONE
- cf_save_LIBS_1="$LIBS"
- LIBS="$LIBICONV $LIBS"
- echo "$as_me:7238: checking for libintl.h and gettext()" >&5
-echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
-if test "${cf_cv_func_gettext+set}" = set; then
+ cf_save_msgfmt_path="$MSGFMT"
+ cf_save_xgettext_path="$XGETTEXT"
+
+ # Extract the first word of "msgfmt", so it can be a program name with args.
+
+set dummy msgfmt; ac_word=$2
+echo "$as_me:8366: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case "$MSGFMT" in
+ ([\\/]*|?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ (*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word$ac_exeext; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ echo "$as_me:8393: result: $MSGFMT" >&5
+echo "${ECHO_T}$MSGFMT" >&6
+else
+ echo "$as_me:8396: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+echo "$as_me:8402: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$ac_dir/$ac_word"
+ echo "$as_me:8419: found $ac_dir/$ac_word" >&5
+ break
+fi
+done
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+
+if test -n "$GMSGFMT"; then
+ echo "$as_me:8431: result: $GMSGFMT" >&5
+echo "${ECHO_T}$GMSGFMT" >&6
+else
+ echo "$as_me:8434: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "xgettext", so it can be a program name with args.
+
+set dummy xgettext; ac_word=$2
+echo "$as_me:8441: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ case "$XGETTEXT" in
+ ([\\/]*|?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ (*)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word$ac_exeext; then
+ if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ echo "$as_me:8468: result: $XGETTEXT" >&5
+echo "${ECHO_T}$XGETTEXT" >&6
+else
+ echo "$as_me:8471: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ cf_save_OPTS_1="$CPPFLAGS"
+ if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
+ test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in -DIGNORE_MSGFMT_HACK
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+ fi
+
+ cf_save_LIBS_1="$LIBS"
+
+cf_add_libs="$LIBICONV"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
# will be set on completion of the AC_TRY_LINK below.
cf_cv_header_path_intl=
cf_cv_library_path_intl=
-echo "${as_me:-configure}:7249: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:8602: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7254 "configure"
+#line 8607 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int
-main ()
+main (void)
{
- bindtextdomain ("", "");
- return (int) gettext ("")
+ bindtextdomain ("", "");
+ return (int) gettext ("")
- + _nl_msg_cat_cntr
+#ifndef IGNORE_MSGFMT_HACK
+ + _nl_msg_cat_cntr
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7274: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8629: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7277: \$? = $ac_status" >&5
+ echo "$as_me:8632: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7280: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8635: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7283: \$? = $ac_status" >&5
+ echo "$as_me:8638: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -7294,36 +8649,38 @@ cat conftest.$ac_ext >&5
LIBS="-lintl $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 7297 "configure"
+#line 8652 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int
-main ()
+main (void)
{
- bindtextdomain ("", "");
- return (int) gettext ("")
+ bindtextdomain ("", "");
+ return (int) gettext ("")
- + _nl_msg_cat_cntr
+#ifndef IGNORE_MSGFMT_HACK
+ + _nl_msg_cat_cntr
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7317: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8674: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7320: \$? = $ac_status" >&5
+ echo "$as_me:8677: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7323: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8680: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7326: \$? = $ac_status" >&5
+ echo "$as_me:8683: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_intl=yes
@@ -7338,14 +8695,14 @@ cat conftest.$ac_ext >&5
cf_cv_find_linkage_intl=no
LIBS="$cf_save_LIBS"
- test -n "$verbose" && echo " find linkage for intl library" 1>&6
+ test -n "$verbose" && echo " find linkage for intl library" 1>&6
-echo "${as_me:-configure}:7343: testing find linkage for intl library ..." 1>&5
+echo "${as_me:-configure}:8700: testing find linkage for intl library ..." 1>&5
-echo "${as_me:-configure}:7345: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:8702: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
- cf_save_CPPFLAGS="$CPPFLAGS"
- cf_test_CPPFLAGS="$CPPFLAGS"
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
cf_search=
@@ -7354,11 +8711,11 @@ cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
for cf_header_path in $CPPFLAGS $CFLAGS
do
- case $cf_header_path in #(vi
- -I*)
+ case $cf_header_path in
+ (-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"
@@ -7379,18 +8736,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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/intl && cf_search="$cf_search /usr/include/intl"
- test -d /usr/include/intl/include && cf_search="$cf_search /usr/include/intl/include"
- test -d /usr/intl/include && cf_search="$cf_search /usr/intl/include"
- test -d /usr/intl/include/intl && cf_search="$cf_search /usr/intl/include/intl"
-}
-
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for include-directories under $prefix"
@@ -7401,38 +8747,27 @@ test -d "$prefix" && \
test -d $prefix/intl/include/intl && cf_search="$cf_search $prefix/intl/include/intl"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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/intl && cf_search="$cf_search /usr/local/include/intl"
- test -d /usr/local/include/intl/include && cf_search="$cf_search /usr/local/include/intl/include"
- test -d /usr/local/intl/include && cf_search="$cf_search /usr/local/intl/include"
- test -d /usr/local/intl/include/intl && cf_search="$cf_search /usr/local/intl/include/intl"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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/intl && cf_search="$cf_search /opt/include/intl"
- test -d /opt/include/intl/include && cf_search="$cf_search /opt/include/intl/include"
- test -d /opt/intl/include && cf_search="$cf_search /opt/intl/include"
- test -d /opt/intl/include/intl && cf_search="$cf_search /opt/intl/include/intl"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/intl && cf_search="$cf_search $cf_subdir_prefix/include/intl"
+ test -d $cf_subdir_prefix/include/intl/include && cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
+ test -d $cf_subdir_prefix/intl/include && cf_search="$cf_search $cf_subdir_prefix/intl/include"
+ test -d $cf_subdir_prefix/intl/include/intl && cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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/intl && cf_search="$cf_search $HOME/include/intl"
- test -d $HOME/include/intl/include && cf_search="$cf_search $HOME/include/intl/include"
- test -d $HOME/intl/include && cf_search="$cf_search $HOME/intl/include"
- test -d $HOME/intl/include/intl && cf_search="$cf_search $HOME/intl/include/intl"
-}
+done
test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
@@ -7450,84 +8785,90 @@ test -d "$oldincludedir" && {
cf_search="$cf_search $cf_header_path_list"
- for cf_cv_header_path_intl in $cf_search
- do
- if test -d $cf_cv_header_path_intl ; then
- test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
+ for cf_cv_header_path_intl in $cf_search
+ do
+ if test -d $cf_cv_header_path_intl ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_header_path_intl" 1>&6
+
+echo "${as_me:-configure}:8793: testing ... testing $cf_cv_header_path_intl ..." 1>&5
-echo "${as_me:-configure}:7458: testing ... testing $cf_cv_header_path_intl ..." 1>&5
+ CPPFLAGS="$cf_save_CPPFLAGS"
- CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_intl"
- cat >conftest.$ac_ext <<_ACEOF
-#line 7462 "configure"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8801 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int
-main ()
+main (void)
{
- bindtextdomain ("", "");
- return (int) gettext ("")
+ bindtextdomain ("", "");
+ return (int) gettext ("")
- + _nl_msg_cat_cntr
+#ifndef IGNORE_MSGFMT_HACK
+ + _nl_msg_cat_cntr
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7482: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:8823: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7485: \$? = $ac_status" >&5
+ echo "$as_me:8826: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7488: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8829: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7491: \$? = $ac_status" >&5
+ echo "$as_me:8832: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
+ test -n "$verbose" && echo " ... found intl headers in $cf_cv_header_path_intl" 1>&6
-echo "${as_me:-configure}:7496: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
+echo "${as_me:-configure}:8837: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
- cf_cv_find_linkage_intl=maybe
- cf_test_CPPFLAGS="$CPPFLAGS"
- break
+ cf_cv_find_linkage_intl=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- done
+ fi
+ done
- if test "$cf_cv_find_linkage_intl" = maybe ; then
+ if test "$cf_cv_find_linkage_intl" = maybe ; then
-echo "${as_me:-configure}:7514: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
+echo "${as_me:-configure}:8855: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
- cf_save_LIBS="$LIBS"
- cf_save_LDFLAGS="$LDFLAGS"
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
- if test "$cf_cv_find_linkage_intl" != yes ; then
+ if test "$cf_cv_find_linkage_intl" != yes ; then
cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
for cf_library_path in $LDFLAGS $LIBS
do
- case $cf_library_path in #(vi
- -L*)
+ case $cf_library_path in
+ (-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"
@@ -7546,18 +8887,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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/intl && cf_search="$cf_search /usr/lib/intl"
- test -d /usr/lib/intl/lib && cf_search="$cf_search /usr/lib/intl/lib"
- test -d /usr/intl/lib && cf_search="$cf_search /usr/intl/lib"
- test -d /usr/intl/lib/intl && cf_search="$cf_search /usr/intl/lib/intl"
-}
-
-test "$prefix" != "NONE" && \
+test "x$prefix" != "xNONE" && \
test -d "$prefix" && \
{
test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
@@ -7568,110 +8898,101 @@ test -d "$prefix" && \
test -d $prefix/intl/lib/intl && cf_search="$cf_search $prefix/intl/lib/intl"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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/intl && cf_search="$cf_search /usr/local/lib/intl"
- test -d /usr/local/lib/intl/lib && cf_search="$cf_search /usr/local/lib/intl/lib"
- test -d /usr/local/intl/lib && cf_search="$cf_search /usr/local/intl/lib"
- test -d /usr/local/intl/lib/intl && cf_search="$cf_search /usr/local/intl/lib/intl"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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/intl && cf_search="$cf_search /opt/lib/intl"
- test -d /opt/lib/intl/lib && cf_search="$cf_search /opt/lib/intl/lib"
- test -d /opt/intl/lib && cf_search="$cf_search /opt/intl/lib"
- test -d /opt/intl/lib/intl && cf_search="$cf_search /opt/intl/lib/intl"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/intl && cf_search="$cf_search $cf_subdir_prefix/lib/intl"
+ test -d $cf_subdir_prefix/lib/intl/lib && cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
+ test -d $cf_subdir_prefix/intl/lib && cf_search="$cf_search $cf_subdir_prefix/intl/lib"
+ test -d $cf_subdir_prefix/intl/lib/intl && cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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/intl && cf_search="$cf_search $HOME/lib/intl"
- test -d $HOME/lib/intl/lib && cf_search="$cf_search $HOME/lib/intl/lib"
- test -d $HOME/intl/lib && cf_search="$cf_search $HOME/intl/lib"
- test -d $HOME/intl/lib/intl && cf_search="$cf_search $HOME/intl/lib/intl"
-}
+done
cf_search="$cf_library_path_list $cf_search"
- for cf_cv_library_path_intl in $cf_search
- do
- if test -d $cf_cv_library_path_intl ; then
- test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
+ for cf_cv_library_path_intl in $cf_search
+ do
+ if test -d $cf_cv_library_path_intl ; then
+ test -n "$verbose" && echo " ... testing $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:7611: testing ... testing $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:8930: testing ... testing $cf_cv_library_path_intl ..." 1>&5
- CPPFLAGS="$cf_test_CPPFLAGS"
- LIBS="-lintl $cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
- cat >conftest.$ac_ext <<_ACEOF
-#line 7617 "configure"
+ CPPFLAGS="$cf_test_CPPFLAGS"
+ LIBS="-lintl $cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 8936 "configure"
#include "confdefs.h"
#include <libintl.h>
extern int _nl_msg_cat_cntr;
int
-main ()
+main (void)
{
- bindtextdomain ("", "");
- return (int) gettext ("")
+ bindtextdomain ("", "");
+ return (int) gettext ("")
- + _nl_msg_cat_cntr
+#ifndef IGNORE_MSGFMT_HACK
+ + _nl_msg_cat_cntr
+#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7637: \"$ac_link\"") >&5
+if { (eval echo "$as_me:8958: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7640: \$? = $ac_status" >&5
+ echo "$as_me:8961: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7643: \"$ac_try\"") >&5
+ { (eval echo "$as_me:8964: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7646: \$? = $ac_status" >&5
+ echo "$as_me:8967: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
+ test -n "$verbose" && echo " ... found intl library in $cf_cv_library_path_intl" 1>&6
-echo "${as_me:-configure}:7651: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
+echo "${as_me:-configure}:8972: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
- cf_cv_find_linkage_intl=yes
- cf_cv_library_file_intl="-lintl"
- break
+ cf_cv_find_linkage_intl=yes
+ cf_cv_library_file_intl="-lintl"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
- LIBS="$cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- done
- CPPFLAGS="$cf_save_CPPFLAGS"
- LDFLAGS="$cf_save_LDFLAGS"
- fi
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
- else
- cf_cv_find_linkage_intl=no
- fi
+ else
+ cf_cv_find_linkage_intl=no
+ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -7687,10 +9008,13 @@ else
cf_cv_func_gettext=no
fi
-fi
-echo "$as_me:7691: result: $cf_cv_func_gettext" >&5
+ echo "$as_me:9011: checking for libintl.h and gettext()" >&5
+echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
+ echo "$as_me:9013: result: $cf_cv_func_gettext" >&5
echo "${ECHO_T}$cf_cv_func_gettext" >&6
+
LIBS="$cf_save_LIBS_1"
+ CPPFLAGS="$cf_save_OPTS_1"
if test "$cf_cv_func_gettext" = yes ; then
@@ -7726,13 +9050,16 @@ if test -n "$cf_cv_header_path_intl" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 7731 "configure"
+#line 9058 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -7740,16 +9067,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:7743: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:9070: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:7746: \$? = $ac_status" >&5
+ echo "$as_me:9073: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:7749: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9076: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7752: \$? = $ac_status" >&5
+ echo "$as_me:9079: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -7766,7 +9093,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}:7769: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:9096: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -7776,6 +9103,8 @@ echo "${as_me:-configure}:7769: testing adding $cf_add_incdir to include-path ..
else
break
fi
+ else
+ break
fi
done
done
@@ -7785,30 +9114,30 @@ fi
INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
if test -n "$cf_cv_library_path_intl" ; then
- for cf_add_libdir in $cf_cv_library_path_intl
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_cv_library_path_intl
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:7806: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:9135: testing adding $cf_add_libdir to library-path ..." 1>&5
- INTLLIBS="-L$cf_add_libdir $INTLLIBS"
- fi
- fi
- done
+ INTLLIBS="-L$cf_add_libdir $INTLLIBS"
+ fi
+ fi
+ done
fi
fi
@@ -7819,13 +9148,13 @@ fi
for ac_func in dcgettext
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:7822: checking for $ac_func" >&5
+echo "$as_me:9151: 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 7828 "configure"
+#line 9157 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -7840,7 +9169,7 @@ char $ac_func ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -7856,16 +9185,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:7859: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9188: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:7862: \$? = $ac_status" >&5
+ echo "$as_me:9191: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:7865: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9194: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:7868: \$? = $ac_status" >&5
+ echo "$as_me:9197: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -7875,7 +9204,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:7878: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:9207: 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
@@ -7887,288 +9216,77 @@ done
LIBS="$gt_save_LIBS"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-
-set dummy msgfmt; ac_word=$2
-echo "$as_me:7893: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- [\\/]*|?:[\\/]*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word$ac_exeext; then
- if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != ":"; then
- echo "$as_me:7920: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:7923: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:7929: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:7946: found $ac_dir/$ac_word" >&5
- break
-fi
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:7958: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:7961: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-
-set dummy xgettext; ac_word=$2
-echo "$as_me:7968: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- [\\/]*|?:[\\/]*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word$ac_exeext; then
- if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
- echo "$as_me:7995: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:7998: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
CATOBJEXT=.gmo
fi
+ elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
+ { echo "$as_me:9222: WARNING: disabling NLS feature" >&5
+echo "$as_me: WARNING: disabling NLS feature" >&2;}
+ sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
+ mv confdefs.tmp confdefs.h
+ ALL_LINGUAS=
+ CATOBJEXT=.ignored
+ MSGFMT=":"
+ GMSGFMT=":"
+ XGETTEXT=":"
+ POSUB=
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ USE_NLS=no
+ nls_cv_use_gnu_gettext=no
fi
if test "$CATOBJEXT" = "NONE"; then
- nls_cv_use_gnu_gettext=yes
+ nls_cv_use_gnu_gettext=maybe
fi
fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- if test ! -d $srcdir/intl ; then
- { { echo "$as_me:8013: error: no NLS library is packaged with this application" >&5
-echo "$as_me: error: no NLS library is packaged with this application" >&2;}
- { (exit 1); exit 1; }; }
- fi
- INTLOBJS="\$(GETTOBJS)"
- # Extract the first word of "msgfmt", so it can be a program name with args.
-
-set dummy msgfmt; ac_word=$2
-echo "$as_me:8021: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_MSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$MSGFMT" in
- [\\/]*|?:[\\/]*)
- ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word$ac_exeext; then
- if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
- ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
- ;;
-esac
-fi
-MSGFMT="$ac_cv_path_MSGFMT"
-if test "$MSGFMT" != ":"; then
- echo "$as_me:8048: result: $MSGFMT" >&5
-echo "${ECHO_T}$MSGFMT" >&6
-else
- echo "$as_me:8051: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "gmsgfmt", so it can be a program name with args.
-set dummy gmsgfmt; ac_word=$2
-echo "$as_me:8057: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_GMSGFMT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case $GMSGFMT in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_GMSGFMT="$GMSGFMT" # 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_GMSGFMT="$ac_dir/$ac_word"
- echo "$as_me:8074: found $ac_dir/$ac_word" >&5
- break
-fi
-done
-
- test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
- ;;
-esac
-fi
-GMSGFMT=$ac_cv_path_GMSGFMT
-
-if test -n "$GMSGFMT"; then
- echo "$as_me:8086: result: $GMSGFMT" >&5
-echo "${ECHO_T}$GMSGFMT" >&6
-else
- echo "$as_me:8089: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- # Extract the first word of "xgettext", so it can be a program name with args.
-
-set dummy xgettext; ac_word=$2
-echo "$as_me:8096: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_XGETTEXT+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- case "$XGETTEXT" in
- [\\/]*|?:[\\/]*)
- ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
- for ac_dir in $PATH; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word$ac_exeext; then
- if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
- ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
- test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
- ;;
-esac
-fi
-XGETTEXT="$ac_cv_path_XGETTEXT"
-if test "$XGETTEXT" != ":"; then
- echo "$as_me:8123: result: $XGETTEXT" >&5
-echo "${ECHO_T}$XGETTEXT" >&6
-else
- echo "$as_me:8126: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
- BUILD_INCLUDED_LIBINTL=yes
- USE_INCLUDED_LIBINTL=yes
+ if test "$nls_cv_use_gnu_gettext" != "no"; then
CATOBJEXT=.gmo
- INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
- LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ if test -f $srcdir/intl/libintl.h ; then
+ INTLOBJS="\$(GETTOBJS)"
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ elif test "$nls_cv_use_gnu_gettext" = "yes"; then
+ nls_cv_use_gnu_gettext=no
+ { echo "$as_me:9253: WARNING: no NLS library is packaged with this application" >&5
+echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
+ fi
fi
- if test "$GMSGFMT" != ":"; then
- if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:8141: result: found msgfmt program is not GNU msgfmt; ignore it" >&5
-echo "${ECHO_T}found msgfmt program is not GNU msgfmt; ignore it" >&6
- GMSGFMT=":"
+ { echo "$as_me:9262: WARNING: found msgfmt program is not GNU msgfmt" >&5
+echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
fi
fi
- if test "$XGETTEXT" != ":"; then
- if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
: ;
else
- echo "$as_me:8151: result: found xgettext program is not GNU xgettext; ignore it" >&5
-echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6
- XGETTEXT=":"
+ { echo "$as_me:9271: WARNING: found xgettext program is not GNU xgettext" >&5
+echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
fi
fi
-
- POSUB=po
fi
- ac_config_commands="$ac_config_commands default-1"
+ if test "$XGETTEXT" != ":"; then
+ ac_config_commands="$ac_config_commands default-1"
- if test "$PACKAGE" = gettext; then
- BUILD_INCLUDED_LIBINTL=yes
- fi
+ if test "$PACKAGE" = gettext; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
- if test "$nls_cv_use_gnu_gettext" = "yes"; then
- for ac_prog in bison
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ for ac_prog in bison
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:8171: checking for $ac_word" >&5
+echo "$as_me:9289: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_INTLBISON+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -8183,7 +9301,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_INTLBISON="$ac_prog"
-echo "$as_me:8186: found $ac_dir/$ac_word" >&5
+echo "$as_me:9304: found $ac_dir/$ac_word" >&5
break
done
@@ -8191,40 +9309,41 @@ fi
fi
INTLBISON=$ac_cv_prog_INTLBISON
if test -n "$INTLBISON"; then
- echo "$as_me:8194: result: $INTLBISON" >&5
+ echo "$as_me:9312: result: $INTLBISON" >&5
echo "${ECHO_T}$INTLBISON" >&6
else
- echo "$as_me:8197: result: no" >&5
+ echo "$as_me:9315: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$INTLBISON" && break
done
- if test -z "$INTLBISON"; then
- ac_verc_fail=yes
- else
- echo "$as_me:8207: checking version of bison" >&5
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ echo "$as_me:9325: checking version of bison" >&5
echo $ECHO_N "checking version of bison... $ECHO_C" >&6
- ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
- case $ac_prog_version in
- '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
- 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
- ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
- *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
- esac
- echo "$as_me:8216: result: $ac_prog_version" >&5
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ echo "$as_me:9334: result: $ac_prog_version" >&5
echo "${ECHO_T}$ac_prog_version" >&6
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
fi
- if test $ac_verc_fail = yes; then
- INTLBISON=:
- fi
- fi
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+ fi
nls_cv_header_intl=
nls_cv_header_libgt=
@@ -8239,7 +9358,7 @@ echo "${ECHO_T}$ac_prog_version" >&6
if test "x$ALL_LINGUAS" = "x"; then
LINGUAS=
else
- echo "$as_me:8242: checking for catalogs to be installed" >&5
+ echo "$as_me:9361: checking for catalogs to be installed" >&5
echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
NEW_LINGUAS=
for presentlang in $ALL_LINGUAS; do
@@ -8251,7 +9370,7 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
- "$presentlang"*) useit=yes;;
+ ("$presentlang"*) useit=yes;;
esac
done
if test $useit = yes; then
@@ -8259,7 +9378,7 @@ echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
fi
done
LINGUAS=$NEW_LINGUAS
- echo "$as_me:8262: result: $LINGUAS" >&5
+ echo "$as_me:9381: result: $LINGUAS" >&5
echo "${ECHO_T}$LINGUAS" >&6
fi
@@ -8295,7 +9414,7 @@ cf_makefile=makefile
use_our_messages=no
if test "$USE_NLS" = yes ; then
if test -d $srcdir/po ; then
-echo "$as_me:8298: checking if we should use included message-library" >&5
+echo "$as_me:9417: checking if we should use included message-library" >&5
echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
# Check whether --enable-included-msgs or --disable-included-msgs was given.
@@ -8306,7 +9425,7 @@ else
use_our_messages=yes
fi;
fi
-echo "$as_me:8309: result: $use_our_messages" >&5
+echo "$as_me:9428: result: $use_our_messages" >&5
echo "${ECHO_T}$use_our_messages" >&6
fi
@@ -8318,7 +9437,7 @@ then
fi
if test "$USE_INCLUDED_LIBINTL" = yes ; then
- if test "$nls_cv_force_use_gnu_gettext" = yes ; then
+ if test "$nls_cv_force_use_gnu_gettext" = yes ; then
:
elif test "$nls_cv_use_gnu_gettext" = yes ; then
:
@@ -8348,23 +9467,23 @@ else
for ac_header in libintl.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:8351: checking for $ac_header" >&5
+echo "$as_me:9470: 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 8357 "configure"
+#line 9476 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:8361: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9480: \"$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:8367: \$? = $ac_status" >&5
+ echo "$as_me:9486: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8383,7 +9502,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8386: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:9505: 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
@@ -8397,7 +9516,10 @@ done
fi
if test -z "$INTLDIR_MAKE" ; then
- CPPFLAGS="$CPPFLAGS -I../intl"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I../intl"
+
fi
if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
@@ -8431,21 +9553,22 @@ EOF
fi
fi
-echo "$as_me:8434: checking if -lm needed for math functions" >&5
+echo "$as_me:9556: 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 8441 "configure"
+#line 9563 "configure"
#include "confdefs.h"
#include <stdio.h>
+ #include <stdlib.h>
#include <math.h>
int
-main ()
+main (void)
{
double x = rand(); printf("result = %g\n", sqrt(x))
;
@@ -8453,16 +9576,16 @@ double x = rand(); printf("result = %g\n", sqrt(x))
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8456: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9579: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8459: \$? = $ac_status" >&5
+ echo "$as_me:9582: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8462: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9585: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8465: \$? = $ac_status" >&5
+ echo "$as_me:9588: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_need_libm=no
else
@@ -8472,16 +9595,30 @@ cf_cv_need_libm=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:8475: result: $cf_cv_need_libm" >&5
+echo "$as_me:9598: result: $cf_cv_need_libm" >&5
echo "${ECHO_T}$cf_cv_need_libm" >&6
if test "$cf_cv_need_libm" = yes
then
- LIBS="-lm $LIBS"
+cf_add_libs="-lm"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
fi
-echo "$as_me:8484: checking if you want to use dmalloc for testing" >&5
+echo "$as_me:9621: 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.
@@ -8498,15 +9635,15 @@ EOF
else
with_dmalloc=
fi;
-echo "$as_me:8501: result: ${with_dmalloc:-no}" >&5
+echo "$as_me:9638: result: ${with_dmalloc:-no}" >&5
echo "${ECHO_T}${with_dmalloc:-no}" >&6
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
+case .$with_cflags in
+(.*-g*)
+ case .$CFLAGS in
+ (.*-g*)
;;
- *)
+ (*)
cf_fix_cppflags=no
cf_new_cflags=
@@ -8516,32 +9653,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -8550,21 +9693,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -8573,17 +9724,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
;;
@@ -8592,23 +9749,23 @@ fi
esac
if test "$with_dmalloc" = yes ; then
- echo "$as_me:8595: checking for dmalloc.h" >&5
+ echo "$as_me:9752: 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 8601 "configure"
+#line 9758 "configure"
#include "confdefs.h"
#include <dmalloc.h>
_ACEOF
-if { (eval echo "$as_me:8605: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9762: \"$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:8611: \$? = $ac_status" >&5
+ echo "$as_me:9768: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8627,11 +9784,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8630: result: $ac_cv_header_dmalloc_h" >&5
+echo "$as_me:9787: 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:8634: checking for dmalloc_debug in -ldmalloc" >&5
+echo "$as_me:9791: 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
@@ -8639,7 +9796,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8642 "configure"
+#line 9799 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8650,7 +9807,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char dmalloc_debug ();
int
-main ()
+main (void)
{
dmalloc_debug ();
;
@@ -8658,16 +9815,16 @@ dmalloc_debug ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:9818: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8664: \$? = $ac_status" >&5
+ echo "$as_me:9821: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8667: \"$ac_try\"") >&5
+ { (eval echo "$as_me:9824: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8670: \$? = $ac_status" >&5
+ echo "$as_me:9827: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dmalloc_dmalloc_debug=yes
else
@@ -8678,7 +9835,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8681: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
+echo "$as_me:9838: 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
@@ -8693,7 +9850,7 @@ fi
fi
-echo "$as_me:8696: checking if you want to use dbmalloc for testing" >&5
+echo "$as_me:9853: 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.
@@ -8710,15 +9867,15 @@ EOF
else
with_dbmalloc=
fi;
-echo "$as_me:8713: result: ${with_dbmalloc:-no}" >&5
+echo "$as_me:9870: result: ${with_dbmalloc:-no}" >&5
echo "${ECHO_T}${with_dbmalloc:-no}" >&6
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
+case .$with_cflags in
+(.*-g*)
+ case .$CFLAGS in
+ (.*-g*)
;;
- *)
+ (*)
cf_fix_cppflags=no
cf_new_cflags=
@@ -8728,32 +9885,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -8762,21 +9925,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -8785,17 +9956,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
;;
@@ -8804,23 +9981,23 @@ fi
esac
if test "$with_dbmalloc" = yes ; then
- echo "$as_me:8807: checking for dbmalloc.h" >&5
+ echo "$as_me:9984: 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 8813 "configure"
+#line 9990 "configure"
#include "confdefs.h"
#include <dbmalloc.h>
_ACEOF
-if { (eval echo "$as_me:8817: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:9994: \"$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:8823: \$? = $ac_status" >&5
+ echo "$as_me:10000: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -8839,11 +10016,11 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:8842: result: $ac_cv_header_dbmalloc_h" >&5
+echo "$as_me:10019: 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:8846: checking for debug_malloc in -ldbmalloc" >&5
+echo "$as_me:10023: 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
@@ -8851,7 +10028,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldbmalloc $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 8854 "configure"
+#line 10031 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -8862,7 +10039,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char debug_malloc ();
int
-main ()
+main (void)
{
debug_malloc ();
;
@@ -8870,16 +10047,16 @@ debug_malloc ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:8873: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10050: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:8876: \$? = $ac_status" >&5
+ echo "$as_me:10053: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:8879: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10056: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:8882: \$? = $ac_status" >&5
+ echo "$as_me:10059: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dbmalloc_debug_malloc=yes
else
@@ -8890,7 +10067,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:8893: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
+echo "$as_me:10070: 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
@@ -8905,7 +10082,7 @@ fi
fi
-echo "$as_me:8908: checking if you want to use purify for testing" >&5
+echo "$as_me:10085: checking if you want to use purify for testing" >&5
echo $ECHO_N "checking if you want to use purify for testing... $ECHO_C" >&6
# Check whether --with-purify or --without-purify was given.
@@ -8922,15 +10099,15 @@ EOF
else
with_purify=
fi;
-echo "$as_me:8925: result: ${with_purify:-no}" >&5
+echo "$as_me:10102: result: ${with_purify:-no}" >&5
echo "${ECHO_T}${with_purify:-no}" >&6
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
+case .$with_cflags in
+(.*-g*)
+ case .$CFLAGS in
+ (.*-g*)
;;
- *)
+ (*)
cf_fix_cppflags=no
cf_new_cflags=
@@ -8940,32 +10117,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -8974,21 +10157,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -8997,17 +10188,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
;;
@@ -9015,7 +10212,7 @@ fi
;;
esac
-echo "$as_me:9018: checking if you want to use valgrind for testing" >&5
+echo "$as_me:10215: 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.
@@ -9032,15 +10229,15 @@ EOF
else
with_valgrind=
fi;
-echo "$as_me:9035: result: ${with_valgrind:-no}" >&5
+echo "$as_me:10232: result: ${with_valgrind:-no}" >&5
echo "${ECHO_T}${with_valgrind:-no}" >&6
-case .$with_cflags in #(vi
-.*-g*)
- case .$CFLAGS in #(vi
- .*-g*) #(vi
+case .$with_cflags in
+(.*-g*)
+ case .$CFLAGS in
+ (.*-g*)
;;
- *)
+ (*)
cf_fix_cppflags=no
cf_new_cflags=
@@ -9050,32 +10247,38 @@ 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
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
case $cf_add_cflags in
- -D*)
+ (-D*)
cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
- test "${cf_add_cflags}" != "${cf_tst_cflags}" \
+ test "x${cf_add_cflags}" != "x${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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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"
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
continue
fi
;;
esac
case "$CPPFLAGS" in
- *$cf_add_cflags) #(vi
+ (*$cf_add_cflags)
;;
- *) #(vi
- case $cf_add_cflags in #(vi
- -D*)
+ (*)
+ case $cf_add_cflags in
+ (-D*)
cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
CPPFLAGS=`echo "$CPPFLAGS" | \
@@ -9084,21 +10287,29 @@ CPPFLAGS=`echo "$CPPFLAGS" | \
;;
esac
- cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
;;
esac
;;
- *)
- cf_new_cflags="$cf_new_cflags $cf_add_cflags"
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-yes)
- cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ 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 "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
&& test -z "${cf_tst_cflags}" \
&& cf_fix_cppflags=no
;;
@@ -9107,17 +10318,23 @@ done
if test -n "$cf_new_cflags" ; then
- CFLAGS="$CFLAGS $cf_new_cflags"
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
if test -n "$cf_new_cppflags" ; then
- CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
fi
if test -n "$cf_new_extra_cppflags" ; then
- EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
fi
;;
@@ -9125,7 +10342,7 @@ fi
;;
esac
-echo "$as_me:9128: checking if you want to perform memory-leak testing" >&5
+echo "$as_me:10345: 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 --with-no-leaks or --without-no-leaks was given.
@@ -9137,9 +10354,9 @@ cat >>confdefs.h <<\EOF
EOF
cf_doalloc=".${with_dmalloc}${with_dbmalloc}${with_purify}${with_valgrind}"
- case ${cf_doalloc} in #(vi
- *yes*) ;;
- *)
+ case ${cf_doalloc} in
+ (*yes*) ;;
+ (*)
cat >>confdefs.h <<\EOF
#define DOALLOC 10000
EOF
@@ -9149,10 +10366,10 @@ EOF
else
with_no_leaks=
fi;
-echo "$as_me:9152: result: $with_no_leaks" >&5
+echo "$as_me:10369: result: $with_no_leaks" >&5
echo "${ECHO_T}$with_no_leaks" >&6
-echo "$as_me:9155: checking if you want --trace option" >&5
+echo "$as_me:10372: checking if you want --trace option" >&5
echo $ECHO_N "checking if you want --trace option... $ECHO_C" >&6
# Check whether --enable-trace or --disable-trace was given.
@@ -9162,7 +10379,7 @@ if test "${enable_trace+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:9165: result: $enableval" >&5
+echo "$as_me:10382: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS trace\$o"
@@ -9176,52 +10393,68 @@ else
fi
LD_RPATH_OPT=
-echo "$as_me:9179: checking for an rpath option" >&5
+echo "$as_me:10396: 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
+case $cf_cv_system_name in
+(irix*)
if test "$GCC" = yes; then
LD_RPATH_OPT="-Wl,-rpath,"
else
LD_RPATH_OPT="-rpath "
fi
;;
-linux*|gnu*|k*bsd*-gnu) #(vi
+(linux*|gnu*|k*bsd*-gnu|freebsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-openbsd[2-9].*|mirbsd*) #(vi
+(openbsd[2-9].*|mirbsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-dragonfly*|freebsd*) #(vi
+(dragonfly*)
LD_RPATH_OPT="-rpath "
;;
-netbsd*) #(vi
+(netbsd*)
LD_RPATH_OPT="-Wl,-rpath,"
;;
-osf*|mls+*) #(vi
+(osf*|mls+*)
LD_RPATH_OPT="-rpath "
;;
-solaris2*) #(vi
+(solaris2*)
LD_RPATH_OPT="-R"
;;
-*)
+(*)
;;
esac
-echo "$as_me:9210: result: $LD_RPATH_OPT" >&5
+echo "$as_me:10427: result: $LD_RPATH_OPT" >&5
echo "${ECHO_T}$LD_RPATH_OPT" >&6
-case "x$LD_RPATH_OPT" in #(vi
-x-R*)
- echo "$as_me:9215: checking if we need a space after rpath option" >&5
+case "x$LD_RPATH_OPT" in
+(x-R*)
+ echo "$as_me:10432: 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"
+
+cf_add_libs="${LD_RPATH_OPT}$libdir"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 9220 "configure"
+#line 10453 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
;
@@ -9229,16 +10462,16 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9232: \"$ac_link\"") >&5
+if { (eval echo "$as_me:10465: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9235: \$? = $ac_status" >&5
+ echo "$as_me:10468: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9238: \"$ac_try\"") >&5
+ { (eval echo "$as_me:10471: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9241: \$? = $ac_status" >&5
+ echo "$as_me:10474: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_rpath_space=no
else
@@ -9248,7 +10481,7 @@ cf_rpath_space=yes
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS="$cf_save_LIBS"
- echo "$as_me:9251: result: $cf_rpath_space" >&5
+ echo "$as_me:10484: result: $cf_rpath_space" >&5
echo "${ECHO_T}$cf_rpath_space" >&6
test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
;;
@@ -9263,7 +10496,7 @@ test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
# Check whether --with-rel-version or --without-rel-version was given.
if test "${with_rel_version+set}" = set; then
withval="$with_rel_version"
- { echo "$as_me:9266: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
+ { echo "$as_me:10499: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
cf_cv_rel_version=$withval
fi;
@@ -9272,33 +10505,33 @@ fi;
DIALOG_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
if test -n "$DIALOG_MAJOR" ; then
- case $DIALOG_MAJOR in #(vi
- [0-9]*) #(vi
+ case $DIALOG_MAJOR in
+ ([0-9]*)
;;
- *)
- { { echo "$as_me:9279: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
+ (*)
+ { { echo "$as_me:10512: error: Release major-version is not a number: $DIALOG_MAJOR" >&5
echo "$as_me: error: Release major-version is not a number: $DIALOG_MAJOR" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
- { { echo "$as_me:9285: error: Release major-version value is empty" >&5
+ { { echo "$as_me:10518: error: Release major-version value is empty" >&5
echo "$as_me: error: Release major-version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
if test -n "$DIALOG_MINOR" ; then
- case $DIALOG_MINOR in #(vi
- [0-9]*) #(vi
+ case $DIALOG_MINOR in
+ ([0-9]*)
;;
- *)
- { { echo "$as_me:9295: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
+ (*)
+ { { echo "$as_me:10528: error: Release minor-version is not a number: $DIALOG_MINOR" >&5
echo "$as_me: error: Release minor-version is not a number: $DIALOG_MINOR" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
- { { echo "$as_me:9301: error: Release minor-version value is empty" >&5
+ { { echo "$as_me:10534: error: Release minor-version value is empty" >&5
echo "$as_me: error: Release minor-version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9308,23 +10541,35 @@ test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
# Check whether --with-abi-version or --without-abi-version was given.
if test "${with_abi_version+set}" = set; then
withval="$with_abi_version"
- { echo "$as_me:9311: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
+
+ if test "x$cf_cv_abi_version" != "x$withval"
+ then
+ { echo "$as_me:10547: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
- cf_cv_abi_version=$withval
+ case $cf_cv_rel_version in
+ (5.*)
+ cf_cv_rel_version=$withval.0
+ ;;
+ (6.*)
+ cf_cv_rel_version=$withval.9 # FIXME: should be 10 as of 6.0 release
+ ;;
+ esac
+ fi
+ cf_cv_abi_version=$withval
fi;
if test -n "$cf_cv_abi_version" ; then
- case $cf_cv_abi_version in #(vi
- [0-9]*) #(vi
+ case $cf_cv_abi_version in
+ ([0-9]*)
;;
- *)
- { { echo "$as_me:9321: error: ABI version is not a number: $cf_cv_abi_version" >&5
+ (*)
+ { { echo "$as_me:10566: error: ABI version is not a number: $cf_cv_abi_version" >&5
echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
else
- { { echo "$as_me:9327: error: ABI version value is empty" >&5
+ { { echo "$as_me:10572: error: ABI version value is empty" >&5
echo "$as_me: error: ABI version value is empty" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -9337,31 +10582,58 @@ LIBTOOL_MAKE="#"
MAKE_NORMAL=
MAKE_STATIC=
MAKE_SHARED="#"
+MAKE_DLLS="#"
+
+shlibdir=$libdir
-echo "$as_me:9341: checking if libtool -version-number should be used" >&5
+echo "$as_me:10589: checking if libtool -version-number should be used" >&5
echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
# Check whether --enable-libtool-version or --disable-libtool-version was given.
if test "${enable_libtool_version+set}" = set; then
enableval="$enable_libtool_version"
test "$enableval" != no && enableval=yes
- if test "$enableval" != "yes" ; then
+ if test "$enableval" != "yes" ; then
cf_libtool_version=no
- else
- cf_libtool_version=yes
- fi
+ else
+ cf_libtool_version=yes
+ fi
else
enableval=yes
- cf_libtool_version=yes
+ cf_libtool_version=yes
fi;
-echo "$as_me:9358: result: $cf_libtool_version" >&5
+echo "$as_me:10606: result: $cf_libtool_version" >&5
echo "${ECHO_T}$cf_libtool_version" >&6
if test "$cf_libtool_version" = yes ; then
LIBTOOL_VERSION="-version-number"
else
LIBTOOL_VERSION="-version-info"
+ case "x$VERSION" in
+ (x)
+ { echo "$as_me:10615: WARNING: VERSION was not set" >&5
+echo "$as_me: WARNING: VERSION was not set" >&2;}
+ ;;
+ (x*.*.*)
+ ABI_VERSION="$VERSION"
+ test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
+
+echo "${as_me:-configure}:10622: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
+
+ ;;
+ (x*:*:*)
+ ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
+ test -n "$verbose" && echo " ABI_VERSION: $ABI_VERSION" 1>&6
+
+echo "${as_me:-configure}:10629: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
+
+ ;;
+ (*)
+ { echo "$as_me:10633: WARNING: unexpected VERSION value: $VERSION" >&5
+echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
+ ;;
+ esac
fi
LIBTOOL=
@@ -9380,7 +10652,7 @@ LIB_LINK='${CC}'
LIB_INSTALL=
LIB_UNINSTALL=
-echo "$as_me:9383: checking if you want to build libraries with libtool" >&5
+echo "$as_me:10655: checking if you want to build libraries with libtool" >&5
echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
# Check whether --with-libtool or --without-libtool was given.
@@ -9390,41 +10662,41 @@ if test "${with_libtool+set}" = set; then
else
with_libtool=no
fi;
-echo "$as_me:9393: result: $with_libtool" >&5
+echo "$as_me:10665: result: $with_libtool" >&5
echo "${ECHO_T}$with_libtool" >&6
if test "$with_libtool" != "no"; then
if test "$with_libtool" != "yes" ; then
if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
+ cf_path_syntax="$prefix"
else
- cf_path_syntax="$ac_default_prefix"
+ cf_path_syntax="$ac_default_prefix"
fi
-case ".$with_libtool" in #(vi
-.\$\(*\)*|.\'*\'*) #(vi
- ;;
-..|./*|.\\*) #(vi
- ;;
-.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
- ;;
-.\${*prefix}*|.\${*dir}*) #(vi
- eval with_libtool="$with_libtool"
- case ".$with_libtool" in #(vi
- .NONE/*)
- with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
- ;;
- esac
- ;; #(vi
-.no|.NONE/*)
- with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
- ;;
-*)
- { { echo "$as_me:9424: error: expected a pathname, not \"$with_libtool\"" >&5
+case ".$with_libtool" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval with_libtool="$with_libtool"
+ case ".$with_libtool" in
+ (.NONE/*)
+ with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:10696: error: expected a pathname, not \"$with_libtool\"" >&5
echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
{ (exit 1); exit 1; }; }
- ;;
+ ;;
esac
LIBTOOL=$with_libtool
@@ -9434,7 +10706,7 @@ esac
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:9437: checking for $ac_word" >&5
+echo "$as_me:10709: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9449,7 +10721,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_LIBTOOL="$ac_tool_prefix$ac_prog"
-echo "$as_me:9452: found $ac_dir/$ac_word" >&5
+echo "$as_me:10724: found $ac_dir/$ac_word" >&5
break
done
@@ -9457,10 +10729,10 @@ fi
fi
LIBTOOL=$ac_cv_prog_LIBTOOL
if test -n "$LIBTOOL"; then
- echo "$as_me:9460: result: $LIBTOOL" >&5
+ echo "$as_me:10732: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
- echo "$as_me:9463: result: no" >&5
+ echo "$as_me:10735: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -9473,7 +10745,7 @@ if test -z "$LIBTOOL"; 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:9476: checking for $ac_word" >&5
+echo "$as_me:10748: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9488,7 +10760,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_LIBTOOL="$ac_prog"
-echo "$as_me:9491: found $ac_dir/$ac_word" >&5
+echo "$as_me:10763: found $ac_dir/$ac_word" >&5
break
done
@@ -9496,10 +10768,10 @@ fi
fi
ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
if test -n "$ac_ct_LIBTOOL"; then
- echo "$as_me:9499: result: $ac_ct_LIBTOOL" >&5
+ echo "$as_me:10771: result: $ac_ct_LIBTOOL" >&5
echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
else
- echo "$as_me:9502: result: no" >&5
+ echo "$as_me:10774: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -9530,7 +10802,7 @@ unset LIBTOOL
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:9533: checking for $ac_word" >&5
+echo "$as_me:10805: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9545,7 +10817,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_LIBTOOL="$ac_tool_prefix$ac_prog"
-echo "$as_me:9548: found $ac_dir/$ac_word" >&5
+echo "$as_me:10820: found $ac_dir/$ac_word" >&5
break
done
@@ -9553,10 +10825,10 @@ fi
fi
LIBTOOL=$ac_cv_prog_LIBTOOL
if test -n "$LIBTOOL"; then
- echo "$as_me:9556: result: $LIBTOOL" >&5
+ echo "$as_me:10828: result: $LIBTOOL" >&5
echo "${ECHO_T}$LIBTOOL" >&6
else
- echo "$as_me:9559: result: no" >&5
+ echo "$as_me:10831: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -9569,7 +10841,7 @@ if test -z "$LIBTOOL"; 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:9572: checking for $ac_word" >&5
+echo "$as_me:10844: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9584,7 +10856,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_LIBTOOL="$ac_prog"
-echo "$as_me:9587: found $ac_dir/$ac_word" >&5
+echo "$as_me:10859: found $ac_dir/$ac_word" >&5
break
done
@@ -9592,10 +10864,10 @@ fi
fi
ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
if test -n "$ac_ct_LIBTOOL"; then
- echo "$as_me:9595: result: $ac_ct_LIBTOOL" >&5
+ echo "$as_me:10867: result: $ac_ct_LIBTOOL" >&5
echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
else
- echo "$as_me:9598: result: no" >&5
+ echo "$as_me:10870: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -9617,11 +10889,11 @@ test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
fi
fi
if test -z "$LIBTOOL" ; then
- { { echo "$as_me:9620: error: Cannot find libtool" >&5
+ { { echo "$as_me:10892: error: Cannot find libtool" >&5
echo "$as_me: error: Cannot find libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
- LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
+ LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
LIB_OBJECT='${OBJECTS:.o=.lo}'
LIB_SUFFIX=.la
LIB_CLEAN='${LIBTOOL} --mode=clean'
@@ -9633,7 +10905,7 @@ echo "$as_me: error: Cannot find libtool" >&2;}
if test -n "$LIBTOOL" && test "$LIBTOOL" != none
then
- echo "$as_me:9636: checking version of $LIBTOOL" >&5
+ echo "$as_me:10908: checking version of $LIBTOOL" >&5
echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
if test -n "$LIBTOOL" && test "$LIBTOOL" != none
@@ -9644,34 +10916,34 @@ else
fi
test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
- echo "$as_me:9647: result: $cf_cv_libtool_version" >&5
+ echo "$as_me:10919: result: $cf_cv_libtool_version" >&5
echo "${ECHO_T}$cf_cv_libtool_version" >&6
if test -z "$cf_cv_libtool_version" ; then
- { { echo "$as_me:9650: error: This is not GNU libtool" >&5
+ { { echo "$as_me:10922: error: This is not GNU libtool" >&5
echo "$as_me: error: This is not GNU libtool" >&2;}
{ (exit 1); exit 1; }; }
fi
else
- { { echo "$as_me:9655: error: GNU libtool has not been found" >&5
+ { { echo "$as_me:10927: error: GNU libtool has not been found" >&5
echo "$as_me: error: GNU libtool has not been found" >&2;}
{ (exit 1); exit 1; }; }
fi
# special hack to add -no-undefined (which libtool should do for itself)
LT_UNDEF=
- case "$cf_cv_system_name" in #(vi
- cygwin*|msys*|mingw32*|uwin*|aix[4-7]) #(vi
+ case "$cf_cv_system_name" in
+ (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
LT_UNDEF=-no-undefined
;;
esac
# special hack to add --tag option for C++ compiler
- case $cf_cv_libtool_version in #(vi
- 1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
+ case $cf_cv_libtool_version in
+ (1.[5-9]*|[2-9].[0-9.a-z]*)
LIBTOOL_CXX="$LIBTOOL --tag=CXX"
LIBTOOL="$LIBTOOL --tag=CC"
;;
- *)
+ (*)
LIBTOOL_CXX="$LIBTOOL"
;;
esac
@@ -9690,7 +10962,7 @@ if test "$with_libtool" = "yes" ; then
DFT_LWR_MODEL=$LIB_MODEL
LIBTOOL_MAKE=
-echo "$as_me:9693: checking for additional libtool options" >&5
+echo "$as_me:10965: checking for additional libtool options" >&5
echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
# Check whether --with-libtool-opts or --without-libtool-opts was given.
@@ -9700,22 +10972,45 @@ if test "${with_libtool_opts+set}" = set; then
else
with_libtool_opts=no
fi;
-echo "$as_me:9703: result: $with_libtool_opts" >&5
+echo "$as_me:10975: result: $with_libtool_opts" >&5
echo "${ECHO_T}$with_libtool_opts" >&6
case .$with_libtool_opts in
-.yes|.no|.)
+(.yes|.no|.)
;;
-*)
- LIBTOOL_OPTS=$with_libtool_opts
+(*)
+ LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
;;
esac
+echo "$as_me:10986: checking if exported-symbols file should be used" >&5
+echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
+
+# Check whether --with-export-syms or --without-export-syms was given.
+if test "${with_export_syms+set}" = set; then
+ withval="$with_export_syms"
+ with_export_syms=$withval
+else
+ with_export_syms=no
+fi;
+if test "x$with_export_syms" = xyes
+then
+ with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
+
+fi
+echo "$as_me:11001: result: $with_export_syms" >&5
+echo "${ECHO_T}$with_export_syms" >&6
+if test "x$with_export_syms" != xno
+then
+ EXPORT_SYMS="-export-symbols $with_export_syms"
+
+fi
+
MAKE_NORMAL="#"
MAKE_STATIC="#"
MAKE_SHARED=
else
- echo "$as_me:9718: checking if you want to build shared libraries" >&5
+ echo "$as_me:11013: checking if you want to build shared libraries" >&5
echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
# Check whether --with-shared or --without-shared was given.
@@ -9725,7 +11020,7 @@ if test "${with_shared+set}" = set; then
else
with_shared=no
fi;
- echo "$as_me:9728: result: $with_shared" >&5
+ echo "$as_me:11023: result: $with_shared" >&5
echo "${ECHO_T}$with_shared" >&6
if test "$with_shared" = "yes" ; then
LIB_MODEL=shared
@@ -9738,27 +11033,33 @@ echo "${ECHO_T}$with_shared" >&6
INSTALL_LIB="-m 644"
: ${rel_builddir:=.}
+ shlibdir=$libdir
+
+ MAKE_DLLS="#"
+
cf_cv_do_symlinks=no
cf_ld_rpath_opt=
test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
- echo "$as_me:9745: checking if release/abi version should be used for shared libs" >&5
+ echo "$as_me:11044: checking if release/abi version should be used for shared libs" >&5
echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
# Check whether --with-shlib-version or --without-shlib-version was given.
if test "${with_shlib_version+set}" = set; then
withval="$with_shlib_version"
test -z "$withval" && withval=auto
- case $withval in #(vi
- yes) #(vi
+ case $withval in
+ (yes)
cf_cv_shlib_version=auto
;;
- rel|abi|auto|no) #(vi
+ (rel|abi|auto)
cf_cv_shlib_version=$withval
;;
- *)
- { { echo "$as_me:9760: error: option value must be one of: rel, abi, auto or no" >&5
-echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
+ (*)
+ echo "$as_me:11059: result: $withval" >&5
+echo "${ECHO_T}$withval" >&6
+ { { echo "$as_me:11061: error: option value must be one of: rel, abi, or auto" >&5
+echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
@@ -9766,7 +11067,7 @@ echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
else
cf_cv_shlib_version=auto
fi;
- echo "$as_me:9769: result: $cf_cv_shlib_version" >&5
+ echo "$as_me:11070: result: $cf_cv_shlib_version" >&5
echo "${ECHO_T}$cf_cv_shlib_version" >&6
cf_cv_rm_so_locs=no
@@ -9774,20 +11075,33 @@ echo "${ECHO_T}$cf_cv_shlib_version" >&6
# Some less-capable ports of gcc support only -fpic
CC_SHARED_OPTS=
+
+ cf_try_fPIC=no
if test "$GCC" = yes
then
- echo "$as_me:9779: checking which $CC option to use" >&5
+ cf_try_fPIC=yes
+ else
+ case $cf_cv_system_name in
+ (*linux*) # e.g., PGI compiler
+ cf_try_fPIC=yes
+ ;;
+ esac
+ fi
+
+ if test "$cf_try_fPIC" = yes
+ then
+ echo "$as_me:11093: checking which $CC option to use" >&5
echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
cf_save_CFLAGS="$CFLAGS"
for CC_SHARED_OPTS in -fPIC -fpic ''
do
CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
cat >conftest.$ac_ext <<_ACEOF
-#line 9786 "configure"
+#line 11100 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
int x = 1
;
@@ -9795,16 +11109,16 @@ int x = 1
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11112: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:9801: \$? = $ac_status" >&5
+ echo "$as_me:11115: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:9804: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11118: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9807: \$? = $ac_status" >&5
+ echo "$as_me:11121: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -9813,35 +11127,37 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
- echo "$as_me:9816: result: $CC_SHARED_OPTS" >&5
+ echo "$as_me:11130: result: $CC_SHARED_OPTS" >&5
echo "${ECHO_T}$CC_SHARED_OPTS" >&6
CFLAGS="$cf_save_CFLAGS"
fi
cf_cv_shlib_version_infix=no
- case $cf_cv_system_name in #(vi
- aix4.3-9*|aix[5-7]*) #(vi
+ case $cf_cv_system_name in
+ (aix4.3-9*|aix[5-7]*)
if test "$GCC" = yes; then
- CC_SHARED_OPTS=
- MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ CC_SHARED_OPTS='-Wl,-brtl'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
else
- # CC_SHARED_OPTS='-qpic=large -G'
- # perhaps "-bM:SRE -bnoentry -bexpall"
- MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
+ CC_SHARED_OPTS='-brtl'
+ # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
fi
;;
- beos*) #(vi
- MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
+ (beos*)
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
;;
- cygwin*) #(vi
+ (cygwin*)
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cf_cv_shlib_version=cygdll
cf_cv_shlib_version_infix=cygdll
+ shlibdir=$bindir
+ MAKE_DLLS=
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\$1
IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
shift
@@ -9850,18 +11166,20 @@ echo "${ECHO_T}$CC_SHARED_OPTS" >&6
** SHARED_LIB \$SHARED_LIB
** IMPORT_LIB \$IMPORT_LIB
EOF
- exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+ exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- msys*) #(vi
+ (msys*)
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cf_cv_shlib_version=msysdll
cf_cv_shlib_version_infix=msysdll
+ shlibdir=$bindir
+ MAKE_DLLS=
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\$1
IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
shift
@@ -9870,17 +11188,17 @@ CF_EOF
** SHARED_LIB \$SHARED_LIB
** IMPORT_LIB \$IMPORT_LIB
EOF
- exec \$* -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+ exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- darwin*) #(vi
+ (darwin*)
cf_try_cflags="no-cpp-precomp"
CC_SHARED_OPTS="-dynamic"
- MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
cf_cv_shlib_version_infix=yes
- echo "$as_me:9883: checking if ld -search_paths_first works" >&5
+ echo "$as_me:11201: checking if ld -search_paths_first works" >&5
echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -9889,11 +11207,11 @@ else
cf_save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
cat >conftest.$ac_ext <<_ACEOF
-#line 9892 "configure"
+#line 11210 "configure"
#include "confdefs.h"
int
-main ()
+main (void)
{
int i;
;
@@ -9901,16 +11219,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:9904: \"$ac_link\"") >&5
+if { (eval echo "$as_me:11222: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:9907: \$? = $ac_status" >&5
+ echo "$as_me:11225: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:9910: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11228: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:9913: \$? = $ac_status" >&5
+ echo "$as_me:11231: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ldflags_search_paths_first=yes
else
@@ -9921,21 +11239,21 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LDFLAGS=$cf_save_LDFLAGS
fi
-echo "$as_me:9924: result: $cf_cv_ldflags_search_paths_first" >&5
+echo "$as_me:11242: result: $cf_cv_ldflags_search_paths_first" >&5
echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
if test $cf_cv_ldflags_search_paths_first = yes; then
LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
fi
;;
- hpux[7-8]*) #(vi
+ (hpux[7-8]*)
# HP-UX 8.07 ld lacks "+b" option used for libdir search-list
if test "$GCC" != yes; then
CC_SHARED_OPTS='+Z'
fi
- MK_SHARED_LIB='${LD} -b -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
INSTALL_LIB="-m 555"
;;
- hpux*) #(vi
+ (hpux*)
# (tested with gcc 2.7.2 -- I don't have c89)
if test "$GCC" = yes; then
LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
@@ -9943,35 +11261,35 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
CC_SHARED_OPTS='+Z'
LD_SHARED_OPTS='-Wl,+b,${libdir}'
fi
- MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
# HP-UX shared libraries must be executable, and should be
# readonly to exploit a quirk in the memory manager.
INSTALL_LIB="-m 555"
;;
- interix*)
+ (interix*)
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
if test "$cf_cv_shlib_version" = rel; then
- cf_shared_soname='`basename .${REL_VERSION}`.${ABI_VERSION}'
+ cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
else
- cf_shared_soname='`basename `'
+ cf_shared_soname='`basename $@`'
fi
CC_SHARED_OPTS=
- MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
;;
- irix*) #(vi
+ (irix*)
if test "$cf_cv_enable_rpath" = yes ; then
EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
fi
# tested with IRIX 5.2 and 'cc'.
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
- MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
else
- MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
fi
cf_cv_rm_so_locs=yes
;;
- linux*|gnu*|k*bsd*-gnu) #(vi
+ (linux*|gnu*|k*bsd*-gnu)
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -9987,21 +11305,23 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
;;
- mingw*) #(vi
+ (mingw*)
cf_cv_shlib_version=mingw
cf_cv_shlib_version_infix=mingw
+ shlibdir=$bindir
+ MAKE_DLLS=
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="-Wl,--enable-auto-import"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
fi
CC_SHARED_OPTS=
- MK_SHARED_LIB='sh '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
+ MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
cat >mk_shared_lib.sh <<-CF_EOF
- #!/bin/sh
+ #!$SHELL
SHARED_LIB=\$1
IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
shift
@@ -10010,11 +11330,11 @@ echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
** SHARED_LIB \$SHARED_LIB
** IMPORT_LIB \$IMPORT_LIB
EOF
- exec \$* -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
+ exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
CF_EOF
chmod +x mk_shared_lib.sh
;;
- openbsd[2-9].*|mirbsd*) #(vi
+ (openbsd[2-9].*|mirbsd*)
if test "$DFT_LWR_MODEL" = "shared" ; then
LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
@@ -10031,14 +11351,14 @@ CF_EOF
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
;;
- nto-qnx*|openbsd*|freebsd[12].*) #(vi
+ (nto-qnx*|openbsd*|freebsd[12].*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
- MK_SHARED_LIB='${LD} -Bshareable -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- dragonfly*|freebsd*) #(vi
+ (dragonfly*|freebsd*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
@@ -10053,9 +11373,9 @@ CF_EOF
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
;;
- netbsd*) #(vi
+ (netbsd*)
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
@@ -10076,18 +11396,18 @@ CF_EOF
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
else
- MK_SHARED_LIB='${CC} -Wl,-shared -Wl,-Bshareable -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -Wl,-shared -Wl,-Bshareable -o $@'
fi
;;
- osf*|mls+*) #(vi
+ (osf*|mls+*)
# tested with OSF/1 V3.2 and 'cc'
# tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
# link with shared libs).
- MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
- case $host_os in #(vi
- osf4*)
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
+ case $host_os in
+ (osf4*)
MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
;;
esac
@@ -10098,12 +11418,12 @@ CF_EOF
fi
cf_cv_rm_so_locs=yes
;;
- sco3.2v5*) # (also uw2* and UW7: hops 13-Apr-98
+ (sco3.2v5*) # also uw2* and UW7: hops 13-Apr-98
# tested with osr5.0.5
if test "$GCC" != yes; then
CC_SHARED_OPTS='-belf -KPIC'
fi
- MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
if test "$cf_cv_enable_rpath" = yes ; then
# only way is to set LD_RUN_PATH but no switch for it
RUN_PATH=$libdir
@@ -10112,15 +11432,15 @@ CF_EOF
LINK_PROGS='LD_RUN_PATH=${libdir}'
LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
;;
- sunos4*) #(vi
+ (sunos4*)
# tested with SunOS 4.1.1 and gcc 2.7.0
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='${LD} -assert pure-text -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
;;
- solaris2*) #(vi
+ (solaris2*)
# tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
# tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
if test "$DFT_LWR_MODEL" = "shared" ; then
@@ -10144,11 +11464,11 @@ CF_EOF
do
CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10147 "configure"
+#line 11467 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello\n");
;
@@ -10156,16 +11476,16 @@ printf("Hello\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10159: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11479: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10162: \$? = $ac_status" >&5
+ echo "$as_me:11482: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10165: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11485: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10168: \$? = $ac_status" >&5
+ echo "$as_me:11488: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
@@ -10176,33 +11496,33 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
CFLAGS="$cf_save_CFLAGS"
CC_SHARED_OPTS=$cf_shared_opts
- MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
else
- MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
+ MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
fi
;;
- sysv5uw7*|unix_sv*) #(vi
+ (sysv5uw7*|unix_sv*)
# tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
if test "$GCC" != yes; then
CC_SHARED_OPTS='-KPIC'
fi
- MK_SHARED_LIB='${LD} -d y -G -o $@'
+ MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
;;
- *)
+ (*)
CC_SHARED_OPTS='unknown'
MK_SHARED_LIB='echo unknown'
;;
esac
# This works if the last tokens in $MK_SHARED_LIB are the -o target.
- case "$cf_cv_shlib_version" in #(vi
- rel|abi)
- case "$MK_SHARED_LIB" in #(vi
- *'-o $@') #(vi
+ case "$cf_cv_shlib_version" in
+ (rel|abi)
+ case "$MK_SHARED_LIB" in
+ (*'-o $@')
test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
;;
- *)
- { echo "$as_me:10205: WARNING: ignored --with-shlib-version" >&5
+ (*)
+ { echo "$as_me:11525: WARNING: ignored --with-shlib-version" >&5
echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
;;
esac
@@ -10212,7 +11532,7 @@ echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
if test -n "$cf_try_cflags"
then
cat > conftest.$ac_ext <<EOF
-#line 10215 "${as_me:-configure}"
+#line 11535 "${as_me:-configure}"
#include <stdio.h>
int main(int argc, char *argv[])
{
@@ -10224,18 +11544,18 @@ EOF
for cf_opt in $cf_try_cflags
do
CFLAGS="$cf_save_CFLAGS -$cf_opt"
- echo "$as_me:10227: checking if CFLAGS option -$cf_opt works" >&5
+ echo "$as_me:11547: checking if CFLAGS option -$cf_opt works" >&5
echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
- if { (eval echo "$as_me:10229: \"$ac_compile\"") >&5
+ if { (eval echo "$as_me:11549: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10232: \$? = $ac_status" >&5
+ echo "$as_me:11552: \$? = $ac_status" >&5
(exit $ac_status); }; then
- echo "$as_me:10234: result: yes" >&5
+ echo "$as_me:11554: result: yes" >&5
echo "${ECHO_T}yes" >&6
cf_save_CFLAGS="$CFLAGS"
else
- echo "$as_me:10238: result: no" >&5
+ echo "$as_me:11558: result: no" >&5
echo "${ECHO_T}no" >&6
fi
done
@@ -10250,11 +11570,140 @@ echo "${ECHO_T}no" >&6
test -n "$verbose" && echo " CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
-echo "${as_me:-configure}:10253: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
+echo "${as_me:-configure}:11573: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
-echo "${as_me:-configure}:10257: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
+echo "${as_me:-configure}:11577: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
+
+echo "$as_me:11579: checking if versioned-symbols file should be used" >&5
+echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
+
+# Check whether --with-versioned-syms or --without-versioned-syms was given.
+if test "${with_versioned_syms+set}" = set; then
+ withval="$with_versioned_syms"
+ with_versioned_syms=$withval
+else
+ with_versioned_syms=no
+fi;
+if test "x$with_versioned_syms" = xyes
+then
+ with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
+
+fi
+echo "$as_me:11594: result: $with_versioned_syms" >&5
+echo "${ECHO_T}$with_versioned_syms" >&6
+
+RESULTING_SYMS=
+VERSIONED_SYMS=
+WILDCARD_SYMS=
+
+if test "x$with_versioned_syms" != xno
+then
+ RESULTING_SYMS=$with_versioned_syms
+ case "x$MK_SHARED_LIB" in
+ (*-Wl,*)
+ VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
+ MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
+ test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
+
+echo "${as_me:-configure}:11610: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
+
+ ;;
+ (*-dy\ *)
+ VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
+ MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
+ test -n "$verbose" && echo " MK_SHARED_LIB: $MK_SHARED_LIB" 1>&6
+
+echo "${as_me:-configure}:11618: testing MK_SHARED_LIB: $MK_SHARED_LIB ..." 1>&5
+
+ ;;
+ (*)
+ { echo "$as_me:11622: WARNING: this system does not support versioned-symbols" >&5
+echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
+ ;;
+ esac
+
+ # Linux ld can selectively override scope, e.g., of symbols beginning with
+ # "_" by first declaring some as global, and then using a wildcard to
+ # declare the others as local. Some other loaders cannot do this. Check
+ # by constructing a (very) simple shared library and inspecting its
+ # symbols.
+ if test "x$VERSIONED_SYMS" != "x"
+ then
+ echo "$as_me:11634: checking if wildcards can be used to selectively omit symbols" >&5
+echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
+ WILDCARD_SYMS=no
+
+ # make sources
+ rm -f conftest.*
+
+ cat >conftest.ver <<EOF
+module_1.0 {
+global:
+ globalf1;
+local:
+ localf1;
+};
+module_2.0 {
+global:
+ globalf2;
+local:
+ localf2;
+ _*;
+} module_1.0;
+submodule_1.0 {
+global:
+ subglobalf1;
+ _ismissing;
+local:
+ sublocalf1;
+};
+submodule_2.0 {
+global:
+ subglobalf2;
+local:
+ sublocalf2;
+ _*;
+} submodule_1.0;
+EOF
+ cat >conftest.$ac_ext <<EOF
+#line 11671 "configure"
+int _ismissing(void) { return 1; }
+int _localf1(void) { return 1; }
+int _localf2(void) { return 2; }
+int globalf1(void) { return 1; }
+int globalf2(void) { return 2; }
+int _sublocalf1(void) { return 1; }
+int _sublocalf2(void) { return 2; }
+int subglobalf1(void) { return 1; }
+int subglobalf2(void) { return 2; }
+EOF
+ cat >conftest.mk <<EOF
+CC=${CC}
+CFLAGS=${CFLAGS}
+CPPFLAGS=${CPPFLAGS}
+LDFLAGS=${LDFLAGS}
+LIBS=${LIBS}
+VERSIONED_SYMS=${VERSIONED_SYMS}
+RESULTING_SYMS=conftest.ver
+MK_SHARED_LIB=${MK_SHARED_LIB}
+conftest.so: conftest.$ac_cv_objext
+ \$(MK_SHARED_LIB) conftest.$ac_cv_objext
+EOF
+
+ # compile source, make library
+ if make -f conftest.mk 2>&5 >/dev/null
+ then
+ # test for missing symbol in either Data or Text section
+ cf_missing=`nm -P conftest.so 2>&5 |fgrep _ismissing | egrep '[ ][DT][ ]'`
+ test -n "$cf_missing" && WILDCARD_SYMS=yes
+ fi
+ echo "$as_me:11702: result: $WILDCARD_SYMS" >&5
+echo "${ECHO_T}$WILDCARD_SYMS" >&6
+ rm -f conftest.*
+ fi
+fi
LIB_PREP=:
LIB_CREATE="$MK_SHARED_LIB"
@@ -10267,62 +11716,65 @@ fi
LIB_SUFFIX=
- case X$LIB_MODEL in #(vi
- Xlibtool) #(vi
+ case X$LIB_MODEL in
+ (Xlibtool)
DFT_LIB_SUFFIX='.la'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- Xdebug) #(vi
+ (Xdebug)
DFT_LIB_SUFFIX='_g.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- Xprofile) #(vi
+ (Xprofile)
DFT_LIB_SUFFIX='_p.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- Xshared) #(vi
+ (Xshared)
case $cf_cv_system_name in
- aix[5-7]*) #(vi
- DFT_LIB_SUFFIX='.a'
+ (aix[5-7]*)
+ DFT_LIB_SUFFIX='.so'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- cygwin*|msys*|mingw*) #(vi
+ (cygwin*|msys*|mingw*)
DFT_LIB_SUFFIX='.dll'
DFT_DEP_SUFFIX='.dll.a'
;;
- darwin*) #(vi
+ (darwin*)
DFT_LIB_SUFFIX='.dylib'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- hpux*) #(vi
+ (hpux*)
case $target in
- ia64*) #(vi
+ (ia64*)
DFT_LIB_SUFFIX='.so'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
- *) #(vi
+ (*)
DFT_LIB_SUFFIX='.sl'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
esac
;;
- *) #(vi
+ (*)
DFT_LIB_SUFFIX='.so'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
esac
;;
- *)
+ (*)
DFT_LIB_SUFFIX='.a'
DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
;;
esac
- test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
- test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
+ if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
+ then
+ DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
+ DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
+ fi
LIB_SUFFIX=$DFT_LIB_SUFFIX
-echo "$as_me:10325: checking for specific curses-directory" >&5
+echo "$as_me:11777: 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.
@@ -10332,41 +11784,41 @@ if test "${with_curses_dir+set}" = set; then
else
cf_cv_curses_dir=no
fi;
-echo "$as_me:10335: result: $cf_cv_curses_dir" >&5
+echo "$as_me:11787: 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" )
then
if test "x$prefix" != xNONE; then
- cf_path_syntax="$prefix"
+ cf_path_syntax="$prefix"
else
- cf_path_syntax="$ac_default_prefix"
+ cf_path_syntax="$ac_default_prefix"
fi
-case ".$withval" in #(vi
-.\$\(*\)*|.\'*\'*) #(vi
- ;;
-..|./*|.\\*) #(vi
- ;;
-.[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
- ;;
-.\${*prefix}*|.\${*dir}*) #(vi
- eval withval="$withval"
- case ".$withval" in #(vi
- .NONE/*)
- withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
- ;;
- esac
- ;; #(vi
-.no|.NONE/*)
- withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
- ;;
-*)
- { { echo "$as_me:10366: error: expected a pathname, not \"$withval\"" >&5
+case ".$withval" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval withval="$withval"
+ case ".$withval" in
+ (.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:11818: error: expected a pathname, not \"$withval\"" >&5
echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
{ (exit 1); exit 1; }; }
- ;;
+ ;;
esac
if test -d "$cf_cv_curses_dir"
@@ -10394,13 +11846,16 @@ if test -n "$cf_cv_curses_dir/include" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 10399 "configure"
+#line 11854 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -10408,16 +11863,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10411: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:11866: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10414: \$? = $ac_status" >&5
+ echo "$as_me:11869: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10417: \"$ac_try\"") >&5
+ { (eval echo "$as_me:11872: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10420: \$? = $ac_status" >&5
+ echo "$as_me:11875: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -10434,7 +11889,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}:10437: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:11892: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -10444,42 +11899,44 @@ echo "${as_me:-configure}:10437: testing adding $cf_add_incdir to include-path .
else
break
fi
+ else
+ break
fi
done
done
fi
if test -n "$cf_cv_curses_dir/lib" ; then
- for cf_add_libdir in $cf_cv_curses_dir/lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_cv_curses_dir/lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:10471: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:11928: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
fi
fi
fi
-echo "$as_me:10482: checking if rpath option should be used" >&5
+echo "$as_me:11939: checking if rpath option should be used" >&5
echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
# Check whether --enable-rpath or --disable-rpath was given.
@@ -10489,27 +11946,1232 @@ if test "${enable_rpath+set}" = set; then
else
cf_cv_enable_rpath=no
fi;
-echo "$as_me:10492: result: $cf_cv_enable_rpath" >&5
+echo "$as_me:11949: result: $cf_cv_enable_rpath" >&5
echo "${ECHO_T}$cf_cv_enable_rpath" >&6
-use_ncurses=no
+echo "$as_me:11952: checking for specific curses-directory" >&5
+echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
-# Check whether --with-ncurses or --without-ncurses was given.
-if test "${with_ncurses+set}" = set; then
- withval="$with_ncurses"
- use_ncurses=ncurses
+# Check whether --with-curses-dir or --without-curses-dir was given.
+if test "${with_curses_dir+set}" = set; then
+ withval="$with_curses_dir"
+ cf_cv_curses_dir=$withval
+else
+ cf_cv_curses_dir=no
fi;
+echo "$as_me:11962: 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" )
+then
+
+if test "x$prefix" != xNONE; then
+ cf_path_syntax="$prefix"
+else
+ cf_path_syntax="$ac_default_prefix"
+fi
+
+case ".$withval" in
+(.\$\(*\)*|.\'*\'*)
+ ;;
+(..|./*|.\\*)
+ ;;
+(.[a-zA-Z]:[\\/]*) # OS/2 EMX
+ ;;
+(.\${*prefix}*|.\${*dir}*)
+ eval withval="$withval"
+ case ".$withval" in
+ (.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+ esac
+ ;;
+(.no|.NONE/*)
+ withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
+ ;;
+(*)
+ { { echo "$as_me:11993: error: expected a pathname, not \"$withval\"" >&5
+echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+ if test -d "$cf_cv_curses_dir"
+ then
+
+if test -n "$cf_cv_curses_dir/include" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12029 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main (void)
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12041: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12044: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12047: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12050: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:12067: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+if test -n "$cf_cv_curses_dir/lib" ; then
+ for cf_add_libdir in $cf_cv_curses_dir/lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:12103: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+ fi
+fi
+
+cf_cv_screen=curses
+
+echo "$as_me:12116: checking for specified curses library type" >&5
+echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
+
+# Check whether --with-screen or --without-screen was given.
+if test "${with_screen+set}" = set; then
+ withval="$with_screen"
+ cf_cv_screen=$withval
+else
# Check whether --with-ncursesw or --without-ncursesw was given.
if test "${with_ncursesw+set}" = set; then
withval="$with_ncursesw"
- use_ncurses=ncursesw
+ cf_cv_screen=ncursesw
+else
+
+# Check whether --with-ncurses or --without-ncurses was given.
+if test "${with_ncurses+set}" = set; then
+ withval="$with_ncurses"
+ cf_cv_screen=ncurses
+else
+
+# Check whether --with-pdcurses or --without-pdcurses was given.
+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;
-if test $use_ncurses != no ; then
- cf_wide_curses=yes
- if test $use_ncurses = ncursesw ; then
+fi;
+fi;
+
+echo "$as_me:12160: result: $cf_cv_screen" >&5
+echo "${ECHO_T}$cf_cv_screen" >&6
+
+case $cf_cv_screen in
+(curses|curses_*)
+
+echo "$as_me:12166: 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
+else
+
+cf_cv_curses_incdir=no
+case $host_os in
+(hpux10.*)
+ 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*)
+ 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:12192: result: $cf_cv_curses_incdir" >&5
+echo "${ECHO_T}$cf_cv_curses_incdir" >&6
+if test "$cf_cv_curses_incdir" != no
+then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
+
+fi
+
+echo "$as_me:12202: 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
+else
+
+cf_cv_ncurses_header=none
+for cf_header in \
+ ncurses.h \
+ curses.h ncurses/ncurses.h ncurses/curses.h
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 12214 "configure"
+#include "confdefs.h"
+#include <${cf_header}>
+int
+main (void)
+{
+initscr(); tgoto("?", 0,0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12226: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12229: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12232: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12235: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_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:12246: 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:12250: error: No curses header-files found" >&5
+echo "$as_me: error: No curses header-files found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
+
+for ac_header in $cf_cv_ncurses_header
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:12260: 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 12266 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:12270: \"$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:12276: \$? = $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:12295: 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:12305: 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
+else
+
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 12323 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main (void)
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:12338: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:12341: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:12344: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12347: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:12363: 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
+(*term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+echo "$as_me:12395: 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
+else
+
+ cf_cv_ncurses_version=no
+ cf_tempfile=out$$
+ rm -f $cf_tempfile
+ if test "$cross_compiling" = yes; then
+
+ # This will not work if the preprocessor splits the line after the
+ # Autoconf token. The 'unproto' program does that.
+ cat > conftest.$ac_ext <<EOF
+#include <${cf_cv_ncurses_header:-curses.h}>
+#undef Autoconf
+#ifdef NCURSES_VERSION
+Autoconf NCURSES_VERSION
+#else
+#ifdef __NCURSES_H
+Autoconf "old"
+#endif
+;
+#endif
+EOF
+ cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
+ { (eval echo "$as_me:12421: \"$cf_try\"") >&5
+ (eval $cf_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12424: \$? = $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%".*%%'`
+ test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
+ rm -f conftest.out
+ fi
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 12434 "configure"
+#include "confdefs.h"
+
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
+int main(void)
+{
+ FILE *fp = fopen("$cf_tempfile", "w");
+#ifdef NCURSES_VERSION
+# ifdef NCURSES_VERSION_PATCH
+ fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
+# else
+ fprintf(fp, "%s\n", NCURSES_VERSION);
+# endif
+#else
+# ifdef __NCURSES_H
+ fprintf(fp, "old\n");
+# else
+ make an error
+# endif
+#endif
+ ${cf_cv_main_return:-return}(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:12459: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12462: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:12464: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12467: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_ncurses_version=`cat $cf_tempfile`
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+ rm -f $cf_tempfile
+
+fi
+echo "$as_me:12481: result: $cf_cv_ncurses_version" >&5
+echo "${ECHO_T}$cf_cv_ncurses_version" >&6
+test "$cf_cv_ncurses_version" = no ||
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+echo "$as_me:12488: 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 12491 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr(); tgoto("?", 0,0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12503: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12506: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12509: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12512: \$? = $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
+echo "$as_me:12521: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+
+if test "$cf_result" = no ; then
+case $host_os in
+(freebsd*)
+ echo "$as_me:12527: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmytinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12535 "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 tgoto ();
+int
+main (void)
+{
+tgoto ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12554: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12557: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12560: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12563: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_mytinfo_tgoto=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_mytinfo_tgoto=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12574: 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_add_libs="-lmytinfo"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+fi
+
+ ;;
+(hpux10.*)
+ # 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:12604: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcur_colr $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12612 "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 initscr ();
+int
+main (void)
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12631: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12634: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12637: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12640: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_cur_colr_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_cur_colr_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12651: 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
+
+cf_add_libs="-lcur_colr"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ ac_cv_func_initscr=yes
+
+else
+
+ echo "$as_me:12675: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lHcurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12683 "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 initscr ();
+int
+main (void)
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:12702: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12705: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12708: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12711: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Hcurses_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_Hcurses_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:12722: 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.
+
+cf_add_libs="-lHcurses"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ 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)
+ if test -d /lib64
+ then
+
+if test -n "/lib64" ; then
+ for cf_add_libdir in /lib64
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:12780: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+ else
+
+if test -n "/lib" ; then
+ for cf_add_libdir in /lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:12809: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+ fi
+ ;;
+ (*)
+
+if test -n "/lib" ; then
+ for cf_add_libdir in /lib
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+
+echo "${as_me:-configure}:12840: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+ ;;
+ esac
+ ;;
+(sunos3*|sunos4*)
+ 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
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "$as_me:10512: checking for multibyte character support" >&5
+echo "${as_me:-configure}:12875: testing adding $cf_add_libdir to library-path ..." 1>&5
+
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
+fi
+
+cf_add_libs="-lcurses -ltermcap"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ fi
+ fi
+ ac_cv_func_initscr=yes
+ ;;
+esac
+
+if test ".$ac_cv_func_initscr" != .yes ; then
+ 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
+
+ # 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:12919: 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 12925 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char tgoto (); 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 tgoto ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_tgoto) || defined (__stub___tgoto)
+choke me
+#else
+f = tgoto; /* 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:12956: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:12959: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:12962: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:12965: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_tgoto=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_tgoto=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:12975: 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 otermcap termcap tinfo termlib unknown
+ do
+ as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
+echo "$as_me:12984: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$cf_term_lib $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 12992 "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 tgoto ();
+int
+main (void)
+{
+tgoto ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13011: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13014: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13017: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13020: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:13031: 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
+
+ : ${cf_nculib_root:=$cf_term_lib}
+ break
+
+fi
+
+ done
+
+fi
+
+ 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
+ LIBS="-l$cf_curs_lib $cf_save_LIBS"
+ if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
+ echo "$as_me:13054: 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 13057 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13069: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13072: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13075: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13078: \$? = $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
+ echo "$as_me:13087: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ test $cf_result = yes && break
+ elif test "$cf_curs_lib" = "$cf_term_lib" ; then
+ cf_result=no
+ elif test "$cf_term_lib" != predefined ; then
+ echo "$as_me:13093: 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 13096 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr(); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13108: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13111: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13114: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13117: \$? = $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 13126 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13138: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13141: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13144: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13147: \$? = $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=error
+fi
+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:13159: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ test $cf_result != error && break
+ fi
+ done
+ fi
+ test $cf_curs_lib = unknown && { { echo "$as_me:13165: error: no curses library found" >&5
+echo "$as_me: error: no curses library found" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+fi
+
+ ;;
+(ncursesw*)
+
+echo "$as_me:13174: 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
@@ -10517,12 +13179,12 @@ else
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10520 "configure"
+#line 13182 "configure"
#include "confdefs.h"
#include <stdlib.h>
int
-main ()
+main (void)
{
putwc(0,0);
;
@@ -10530,16 +13192,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10533: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13195: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10536: \$? = $ac_status" >&5
+ echo "$as_me:13198: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10539: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13201: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10542: \$? = $ac_status" >&5
+ echo "$as_me:13204: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_utf8_lib=yes
else
@@ -10551,17 +13213,17 @@ cat conftest.$ac_ext >&5
cf_cv_header_path_utf8=
cf_cv_library_path_utf8=
-echo "${as_me:-configure}:10554: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:13216: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
cf_save_LIBS="$LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10559 "configure"
+#line 13221 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
-main ()
+main (void)
{
putwc(0,0);
;
@@ -10569,16 +13231,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13234: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10575: \$? = $ac_status" >&5
+ echo "$as_me:13237: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10578: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13240: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10581: \$? = $ac_status" >&5
+ echo "$as_me:13243: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -10592,12 +13254,12 @@ cat conftest.$ac_ext >&5
LIBS="-lutf8 $cf_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 10595 "configure"
+#line 13257 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
-main ()
+main (void)
{
putwc(0,0);
;
@@ -10605,16 +13267,16 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10608: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13270: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10611: \$? = $ac_status" >&5
+ echo "$as_me:13273: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10614: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13276: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10617: \$? = $ac_status" >&5
+ echo "$as_me:13279: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_find_linkage_utf8=yes
@@ -10629,14 +13291,14 @@ cat conftest.$ac_ext >&5
cf_cv_find_linkage_utf8=no
LIBS="$cf_save_LIBS"
- test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
+ test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
-echo "${as_me:-configure}:10634: testing find linkage for utf8 library ..." 1>&5
+echo "${as_me:-configure}:13296: testing find linkage for utf8 library ..." 1>&5
-echo "${as_me:-configure}:10636: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:13298: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
- cf_save_CPPFLAGS="$CPPFLAGS"
- cf_test_CPPFLAGS="$CPPFLAGS"
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_test_CPPFLAGS="$CPPFLAGS"
cf_search=
@@ -10645,11 +13307,11 @@ cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
for cf_header_path in $CPPFLAGS $CFLAGS
do
- case $cf_header_path in #(vi
- -I*)
+ case $cf_header_path in
+ (-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"
@@ -10670,18 +13332,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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"
- test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
- test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
- 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"
@@ -10692,38 +13343,27 @@ test -d "$prefix" && \
test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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"
- test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
- test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
- test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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"
- test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
- test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
- test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
+ test -d $cf_subdir_prefix/include/utf8/include && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
+ test -d $cf_subdir_prefix/utf8/include && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
+ test -d $cf_subdir_prefix/utf8/include/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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"
- test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
- test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
- test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
-}
+done
test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
@@ -10741,21 +13381,25 @@ test -d "$oldincludedir" && {
cf_search="$cf_search $cf_header_path_list"
- for cf_cv_header_path_utf8 in $cf_search
- do
- if test -d $cf_cv_header_path_utf8 ; then
- test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
+ for cf_cv_header_path_utf8 in $cf_search
+ do
+ 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}:13389: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
-echo "${as_me:-configure}:10749: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
- CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
- cat >conftest.$ac_ext <<_ACEOF
-#line 10753 "configure"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13397 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
-main ()
+main (void)
{
putwc(0,0);
;
@@ -10763,55 +13407,55 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:10766: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13410: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:10769: \$? = $ac_status" >&5
+ echo "$as_me:13413: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:10772: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13416: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10775: \$? = $ac_status" >&5
+ echo "$as_me:13419: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
+ test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
-echo "${as_me:-configure}:10780: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:13424: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
- cf_cv_find_linkage_utf8=maybe
- cf_test_CPPFLAGS="$CPPFLAGS"
- break
+ cf_cv_find_linkage_utf8=maybe
+ cf_test_CPPFLAGS="$CPPFLAGS"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- fi
- done
+ fi
+ done
- if test "$cf_cv_find_linkage_utf8" = maybe ; then
+ if test "$cf_cv_find_linkage_utf8" = maybe ; then
-echo "${as_me:-configure}:10798: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
+echo "${as_me:-configure}:13442: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
- cf_save_LIBS="$LIBS"
- cf_save_LDFLAGS="$LDFLAGS"
+ cf_save_LIBS="$LIBS"
+ cf_save_LDFLAGS="$LDFLAGS"
- if test "$cf_cv_find_linkage_utf8" != yes ; then
+ if test "$cf_cv_find_linkage_utf8" != yes ; then
cf_search=
cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
for cf_library_path in $LDFLAGS $LIBS
do
- case $cf_library_path in #(vi
- -L*)
+ case $cf_library_path in
+ (-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"
@@ -10830,18 +13474,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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"
- test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
- test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
- 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"
@@ -10852,58 +13485,47 @@ test -d "$prefix" && \
test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
}
-test "/usr/local" != "$prefix" && \
-test -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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"
- test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
- test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
- test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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"
- test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
- test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
- test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
+ test -d $cf_subdir_prefix/lib/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
+ test -d $cf_subdir_prefix/utf8/lib && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
+ test -d $cf_subdir_prefix/utf8/lib/utf8 && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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"
- test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
- test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
- test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
-}
+done
cf_search="$cf_library_path_list $cf_search"
- for cf_cv_library_path_utf8 in $cf_search
- do
- if test -d $cf_cv_library_path_utf8 ; then
- test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
+ for cf_cv_library_path_utf8 in $cf_search
+ do
+ 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}:10895: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:13517: 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 10901 "configure"
+ 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 13523 "configure"
#include "confdefs.h"
#include <libutf8.h>
int
-main ()
+main (void)
{
putwc(0,0);
;
@@ -10911,44 +13533,44 @@ putwc(0,0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:10914: \"$ac_link\"") >&5
+if { (eval echo "$as_me:13536: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:10917: \$? = $ac_status" >&5
+ echo "$as_me:13539: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:10920: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13542: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:10923: \$? = $ac_status" >&5
+ echo "$as_me:13545: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
+ test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
-echo "${as_me:-configure}:10928: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
+echo "${as_me:-configure}:13550: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
- cf_cv_find_linkage_utf8=yes
- cf_cv_library_file_utf8="-lutf8"
- break
+ cf_cv_find_linkage_utf8=yes
+ cf_cv_library_file_utf8="-lutf8"
+ break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
- CPPFLAGS="$cf_save_CPPFLAGS"
- LIBS="$cf_save_LIBS"
- LDFLAGS="$cf_save_LDFLAGS"
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ LDFLAGS="$cf_save_LDFLAGS"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- fi
- done
- CPPFLAGS="$cf_save_CPPFLAGS"
- LDFLAGS="$cf_save_LDFLAGS"
- fi
+ fi
+ done
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LDFLAGS="$cf_save_LDFLAGS"
+ fi
- else
- cf_cv_find_linkage_utf8=no
- fi
+ else
+ cf_cv_find_linkage_utf8=no
+ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
@@ -10967,7 +13589,7 @@ fi
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:10970: result: $cf_cv_utf8_lib" >&5
+echo "$as_me:13592: 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
@@ -11000,13 +13622,16 @@ if test -n "$cf_cv_header_path_utf8" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 11005 "configure"
+#line 13630 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -11014,16 +13639,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11017: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:13642: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11020: \$? = $ac_status" >&5
+ echo "$as_me:13645: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11023: \"$ac_try\"") >&5
+ { (eval echo "$as_me:13648: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11026: \$? = $ac_status" >&5
+ echo "$as_me:13651: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11040,7 +13665,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}:11043: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:13668: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -11050,53 +13675,375 @@ echo "${as_me:-configure}:11043: testing adding $cf_add_incdir to include-path .
else
break
fi
+ else
+ break
fi
done
done
fi
if test -n "$cf_cv_library_path_utf8" ; then
- for cf_add_libdir in $cf_cv_library_path_utf8
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ for cf_add_libdir in $cf_cv_library_path_utf8
+ do
+ if test $cf_add_libdir = /usr/lib ; then
+ :
+ elif test -d $cf_add_libdir
+ then
+ cf_have_libdir=no
+ if test -n "$LDFLAGS$LIBS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_libdir in $LDFLAGS $LIBS ; do
+ if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
+ cf_have_libdir=yes; break
+ fi
+ done
+ fi
+ if test "$cf_have_libdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
-echo "${as_me:-configure}:11077: testing adding $cf_add_libdir to library-path ..." 1>&5
+echo "${as_me:-configure}:13704: testing adding $cf_add_libdir to library-path ..." 1>&5
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ LDFLAGS="-L$cf_add_libdir $LDFLAGS"
+ fi
+ fi
+ done
fi
- LIBS="$cf_cv_library_file_utf8 $LIBS"
+cf_add_libs="$cf_cv_library_file_utf8"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
fi
- fi
+cf_ncuconfig_root=$cf_cv_screen
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ echo "$as_me:13734: checking pkg-config for $cf_ncuconfig_root" >&5
+echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ echo "$as_me:13737: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ echo "$as_me:13740: checking if the $cf_ncuconfig_root package files work" >&5
+echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13862 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:13874: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13877: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:13880: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13883: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if test "$cross_compiling" = yes; then
+ cf_have_ncuconfig=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 13889 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:13896: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:13899: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:13901: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13904: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_have_ncuconfig=yes
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:13921: result: $cf_have_ncuconfig" >&5
+echo "${ECHO_T}$cf_have_ncuconfig" >&6
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+
+echo "$as_me:13937: 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
+else
+
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
+ ;;
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 13955 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main (void)
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:13970: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:13973: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:13976: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:13979: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:13995: result: $cf_cv_term_header" >&5
+echo "${ECHO_T}$cf_cv_term_header" >&6
+
+# Set definitions to allow ifdef'ing to accommodate subdirectories
-cf_ncuconfig_root=$use_ncurses
+case $cf_cv_term_header in
+(*term.h)
-echo "Looking for ${cf_ncuconfig_root}-config"
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+ fi
+
+ else
+ echo "$as_me:14030: result: no" >&5
+echo "${ECHO_T}no" >&6
+ NCURSES_CONFIG_PKG=none
+ fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
if test -n "$ac_tool_prefix"; then
- for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
+ for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${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:11099: checking for $ac_word" >&5
+echo "$as_me:14046: 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
@@ -11111,7 +14058,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_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
-echo "$as_me:11114: found $ac_dir/$ac_word" >&5
+echo "$as_me:14061: found $ac_dir/$ac_word" >&5
break
done
@@ -11119,10 +14066,10 @@ fi
fi
NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
if test -n "$NCURSES_CONFIG"; then
- echo "$as_me:11122: result: $NCURSES_CONFIG" >&5
+ echo "$as_me:14069: result: $NCURSES_CONFIG" >&5
echo "${ECHO_T}$NCURSES_CONFIG" >&6
else
- echo "$as_me:11125: result: no" >&5
+ echo "$as_me:14072: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -11131,11 +14078,11 @@ fi
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
+ for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${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:11138: checking for $ac_word" >&5
+echo "$as_me:14085: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -11150,7 +14097,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_NCURSES_CONFIG="$ac_prog"
-echo "$as_me:11153: found $ac_dir/$ac_word" >&5
+echo "$as_me:14100: found $ac_dir/$ac_word" >&5
break
done
@@ -11158,10 +14105,10 @@ fi
fi
ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
if test -n "$ac_ct_NCURSES_CONFIG"; then
- echo "$as_me:11161: result: $ac_ct_NCURSES_CONFIG" >&5
+ echo "$as_me:14108: result: $ac_ct_NCURSES_CONFIG" >&5
echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
else
- echo "$as_me:11164: result: no" >&5
+ echo "$as_me:14111: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -11172,32 +14119,141 @@ test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
fi
-if test "$NCURSES_CONFIG" != none ; then
+ if test "$NCURSES_CONFIG" != none ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in `$NCURSES_CONFIG --cflags`
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
-CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
-LIBS="`$NCURSES_CONFIG --libs` $LIBS"
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
-# even with config script, some packages use no-override for curses.h
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
-echo "$as_me:11182: checking if we have identified curses headers" >&5
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ # even with config script, some packages use no-override for curses.h
+
+echo "$as_me:14240: 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
else
cf_cv_ncurses_header=none
-for cf_header in \
- $use_ncurses/ncurses.h \
- $use_ncurses/curses.h \
- ncurses.h \
- curses.h
+for cf_header in \
+ ncurses.h $cf_cv_screen/ncurses.h \
+ curses.h $cf_cv_screen/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11196 "configure"
+#line 14252 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
-main ()
+main (void)
{
initscr(); tgoto("?", 0,0)
;
@@ -11205,16 +14261,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14264: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11211: \$? = $ac_status" >&5
+ echo "$as_me:14267: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11214: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14270: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11217: \$? = $ac_status" >&5
+ echo "$as_me:14273: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -11225,11 +14281,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:11228: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:14284: 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:11232: error: No curses header-files found" >&5
+ { { echo "$as_me:14288: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -11239,23 +14295,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:11242: checking for $ac_header" >&5
+echo "$as_me:14298: 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 11248 "configure"
+#line 14304 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:11252: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:14308: \"$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:11258: \$? = $ac_status" >&5
+ echo "$as_me:14314: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -11274,7 +14330,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:11277: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:14333: 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
@@ -11290,15 +14346,15 @@ EOF
cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
-cat >>confdefs.h <<EOF
+ cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF
-cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
-else
+ else
-cf_ncuhdr_root=$use_ncurses
+cf_ncuhdr_root=$cf_cv_screen
test -n "$cf_cv_curses_dir" && \
test "$cf_cv_curses_dir" != "no" && { \
@@ -11325,13 +14381,16 @@ if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 11330 "configure"
+#line 14389 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -11339,16 +14398,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11342: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11345: \$? = $ac_status" >&5
+ echo "$as_me:14404: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11348: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14407: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11351: \$? = $ac_status" >&5
+ echo "$as_me:14410: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11365,7 +14424,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}:11368: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:14427: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -11375,6 +14434,8 @@ echo "${as_me:-configure}:11368: testing adding $cf_add_incdir to include-path .
else
break
fi
+ else
+ break
fi
done
done
@@ -11382,7 +14443,7 @@ fi
}
-echo "$as_me:11385: checking for $cf_ncuhdr_root header in include-path" >&5
+echo "$as_me:14446: 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
@@ -11394,12 +14455,12 @@ else
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11397 "configure"
+#line 14458 "configure"
#include "confdefs.h"
#include <$cf_header>
int
-main ()
+main (void)
{
#ifdef NCURSES_VERSION
@@ -11418,16 +14479,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11421: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14482: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11424: \$? = $ac_status" >&5
+ echo "$as_me:14485: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11427: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14488: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11430: \$? = $ac_status" >&5
+ echo "$as_me:14491: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h=$cf_header
@@ -11442,14 +14503,14 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:11445: result: $cf_cv_ncurses_h" >&5
+echo "$as_me:14506: 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:11452: checking for $cf_ncuhdr_root include-path" >&5
+echo "$as_me:14513: 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
@@ -11464,11 +14525,11 @@ cf_header_path_list=""
if test -n "${CFLAGS}${CPPFLAGS}" ; then
for cf_header_path in $CPPFLAGS $CFLAGS
do
- case $cf_header_path in #(vi
- -I*)
+ case $cf_header_path in
+ (-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"
@@ -11489,18 +14550,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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"
- test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
- test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
- 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"
@@ -11511,38 +14561,27 @@ 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 -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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"
- test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
- test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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"
- test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
- test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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"
- test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
- test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
-}
+done
test "$includedir" != NONE && \
test "$includedir" != "/usr/include" && \
@@ -11587,13 +14626,16 @@ if test -n "$cf_incdir" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 11592 "configure"
+#line 14634 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -11601,16 +14643,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11604: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14646: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11607: \$? = $ac_status" >&5
+ echo "$as_me:14649: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11610: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14652: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11613: \$? = $ac_status" >&5
+ echo "$as_me:14655: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11627,7 +14669,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}:11630: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:14672: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -11637,6 +14679,8 @@ echo "${as_me:-configure}:11630: testing adding $cf_add_incdir to include-path .
else
break
fi
+ else
+ break
fi
done
done
@@ -11648,12 +14692,12 @@ fi
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11651 "configure"
+#line 14695 "configure"
#include "confdefs.h"
#include <$cf_header>
int
-main ()
+main (void)
{
#ifdef NCURSES_VERSION
@@ -11672,16 +14716,16 @@ printf("old\n");
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11675: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14719: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11678: \$? = $ac_status" >&5
+ echo "$as_me:14722: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11681: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14725: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11684: \$? = $ac_status" >&5
+ echo "$as_me:14728: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_h2=$cf_header
@@ -11702,12 +14746,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:11705: error: not found" >&5
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:14749: error: not found" >&5
echo "$as_me: error: not found" >&2;}
{ (exit 1); exit 1; }; }
fi
-echo "$as_me:11710: result: $cf_cv_ncurses_h2" >&5
+echo "$as_me:14754: 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%/[^/]*$%%'`
@@ -11738,13 +14782,16 @@ if test -n "$cf_1st_incdir" ; then
if test "$GCC" = yes
then
cf_save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
cat >conftest.$ac_ext <<_ACEOF
-#line 11743 "configure"
+#line 14790 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello")
;
@@ -11752,16 +14799,16 @@ printf("Hello")
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11755: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14802: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11758: \$? = $ac_status" >&5
+ echo "$as_me:14805: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11761: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14808: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11764: \$? = $ac_status" >&5
+ echo "$as_me:14811: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -11778,7 +14825,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}:11781: testing adding $cf_add_incdir to include-path ..." 1>&5
+echo "${as_me:-configure}:14828: testing adding $cf_add_incdir to include-path ..." 1>&5
CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
@@ -11788,6 +14835,8 @@ echo "${as_me:-configure}:11781: testing adding $cf_add_incdir to include-path .
else
break
fi
+ else
+ break
fi
done
done
@@ -11797,8 +14846,8 @@ fi
# Set definitions to allow ifdef'ing for ncurses.h
-case $cf_cv_ncurses_header in # (vi
-*ncurses.h)
+case $cf_cv_ncurses_header in
+(*ncurses.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_H 1
@@ -11807,15 +14856,15 @@ EOF
;;
esac
-case $cf_cv_ncurses_header in # (vi
-ncurses/curses.h|ncurses/ncurses.h)
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_NCURSES_H 1
EOF
;;
-ncursesw/curses.h|ncursesw/ncurses.h)
+(ncursesw/curses.h|ncursesw/ncurses.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_NCURSES_H 1
@@ -11824,17 +14873,17 @@ EOF
;;
esac
-echo "$as_me:11827: checking for terminfo header" >&5
+echo "$as_me:14876: 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
else
-case ${cf_cv_ncurses_header} in #(vi
-*/ncurses.h|*/ncursesw.h) #(vi
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
;;
-*)
+(*)
cf_term_header=term.h
;;
esac
@@ -11842,14 +14891,14 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 11845 "configure"
+#line 14894 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>
int
-main ()
+main (void)
{
int x = auto_left_margin
;
@@ -11857,16 +14906,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:11860: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:14909: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:11863: \$? = $ac_status" >&5
+ echo "$as_me:14912: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:11866: \"$ac_try\"") >&5
+ { (eval echo "$as_me:14915: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11869: \$? = $ac_status" >&5
+ echo "$as_me:14918: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -11882,13 +14931,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:11885: result: $cf_cv_term_header" >&5
+echo "$as_me:14934: 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)
+case $cf_cv_term_header in
+(*term.h)
cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
@@ -11897,15 +14946,15 @@ EOF
;;
esac
-case $cf_cv_term_header in # (vi
-ncurses/term.h) #(vi
+case $cf_cv_term_header in
+(ncurses/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
-ncursesw/term.h)
+(ncursesw/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
@@ -11920,7 +14969,7 @@ cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:11923: checking for ncurses version" >&5
+echo "$as_me:14972: 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
@@ -11946,10 +14995,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:11949: \"$cf_try\"") >&5
+ { (eval echo "$as_me:14998: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:11952: \$? = $ac_status" >&5
+ echo "$as_me:15001: \$? = $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%".*%%'`
@@ -11959,12 +15008,12 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 11962 "configure"
+#line 15011 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
-int main()
+int main(void)
{
FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
@@ -11984,15 +15033,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:11987: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15036: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:11990: \$? = $ac_status" >&5
+ echo "$as_me:15039: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:11992: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15041: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:11995: \$? = $ac_status" >&5
+ echo "$as_me:15044: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -12006,20 +15055,20 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:12009: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:15058: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no ||
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-cf_nculib_root=$use_ncurses
+cf_nculib_root=$cf_cv_screen
# This works, except for the special case where we find gpm, but
# ncurses is in a nonstandard location via $LIBS, and we really want
# to link gpm.
cf_ncurses_LIBS=""
cf_ncurses_SAVE="$LIBS"
-echo "$as_me:12022: checking for Gpm_Open in -lgpm" >&5
+echo "$as_me:15071: 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
@@ -12027,7 +15076,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12030 "configure"
+#line 15079 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12038,7 +15087,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char Gpm_Open ();
int
-main ()
+main (void)
{
Gpm_Open ();
;
@@ -12046,16 +15095,16 @@ Gpm_Open ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12049: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15098: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12052: \$? = $ac_status" >&5
+ echo "$as_me:15101: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12055: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15104: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12058: \$? = $ac_status" >&5
+ echo "$as_me:15107: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_Gpm_Open=yes
else
@@ -12066,10 +15115,10 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12069: result: $ac_cv_lib_gpm_Gpm_Open" >&5
+echo "$as_me:15118: 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:12072: checking for initscr in -lgpm" >&5
+ echo "$as_me:15121: 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
@@ -12077,7 +15126,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12080 "configure"
+#line 15129 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12088,7 +15137,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char initscr ();
int
-main ()
+main (void)
{
initscr ();
;
@@ -12096,16 +15145,16 @@ initscr ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12099: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15148: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12102: \$? = $ac_status" >&5
+ echo "$as_me:15151: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12105: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15154: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12108: \$? = $ac_status" >&5
+ echo "$as_me:15157: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_gpm_initscr=yes
else
@@ -12116,7 +15165,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12119: result: $ac_cv_lib_gpm_initscr" >&5
+echo "$as_me:15168: 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"
@@ -12126,12 +15175,12 @@ fi
fi
-case $host_os in #(vi
-freebsd*)
+case $host_os in
+(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:12134: checking for tgoto in -lmytinfo" >&5
+ echo "$as_me:15183: 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
@@ -12139,7 +15188,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12142 "configure"
+#line 15191 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12150,7 +15199,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char tgoto ();
int
-main ()
+main (void)
{
tgoto ();
;
@@ -12158,16 +15207,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12161: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15210: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12164: \$? = $ac_status" >&5
+ echo "$as_me:15213: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12167: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15216: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12170: \$? = $ac_status" >&5
+ echo "$as_me:15219: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -12178,7 +15227,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12181: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:15230: 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"
@@ -12188,22 +15237,52 @@ fi
;;
esac
-LIBS="$cf_ncurses_LIBS $LIBS"
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
then
- LIBS="-l$cf_nculib_root $LIBS"
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
else
eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
cf_libdir=""
- echo "$as_me:12200: checking for initscr" >&5
+ echo "$as_me:15279: 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 12206 "configure"
+#line 15285 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char initscr (); below. */
@@ -12218,7 +15297,7 @@ char initscr ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -12234,16 +15313,16 @@ f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12237: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15316: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12240: \$? = $ac_status" >&5
+ echo "$as_me:15319: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12243: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15322: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12246: \$? = $ac_status" >&5
+ echo "$as_me:15325: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_initscr=yes
else
@@ -12253,22 +15332,22 @@ ac_cv_func_initscr=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:12256: result: $ac_cv_func_initscr" >&5
+echo "$as_me:15335: 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:12263: checking for initscr in -l$cf_nculib_root" >&5
+ echo "$as_me:15342: 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 12267 "configure"
+#line 15346 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
initscr()
;
@@ -12276,25 +15355,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12279: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12282: \$? = $ac_status" >&5
+ echo "$as_me:15361: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12285: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15364: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12288: \$? = $ac_status" >&5
+ echo "$as_me:15367: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:12290: result: yes" >&5
+ echo "$as_me:15369: 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:12297: result: no" >&5
+echo "$as_me:15376: result: no" >&5
echo "${ECHO_T}no" >&6
cf_search=
@@ -12302,11 +15381,11 @@ cf_library_path_list=""
if test -n "${LDFLAGS}${LIBS}" ; then
for cf_library_path in $LDFLAGS $LIBS
do
- case $cf_library_path in #(vi
- -L*)
+ case $cf_library_path in
+ (-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"
@@ -12325,18 +15404,7 @@ fi
cf_search=
-test "/usr" != "$prefix" && \
-test -d "/usr" && \
-(test $prefix = NONE || test "/usr" != "$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"
- test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
- test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
- 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"
@@ -12347,52 +15415,41 @@ 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 -d "/usr/local" && \
-(test $prefix = NONE || test "/usr/local" != "$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"
- test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
- test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
-}
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
-test "/opt" != "$prefix" && \
-test -d "/opt" && \
-(test $prefix = NONE || test "/opt" != "$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"
- test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
- test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
}
-test "$HOME" != "$prefix" && \
-test -d "$HOME" && \
-(test $prefix = NONE || test "$HOME" != "$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"
- test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
- test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
-}
+done
cf_search="$cf_library_path_list $cf_search"
for cf_libdir in $cf_search
do
- echo "$as_me:12387: checking for -l$cf_nculib_root in $cf_libdir" >&5
+ echo "$as_me:15444: 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 12391 "configure"
+#line 15448 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
initscr()
;
@@ -12400,25 +15457,25 @@ initscr()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12403: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15460: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12406: \$? = $ac_status" >&5
+ echo "$as_me:15463: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12409: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15466: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12412: \$? = $ac_status" >&5
+ echo "$as_me:15469: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:12414: result: yes" >&5
+ echo "$as_me:15471: 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:12421: result: no" >&5
+echo "$as_me:15478: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_save_LIBS"
fi
@@ -12433,7 +15490,7 @@ fi
eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
if test $cf_found_library = no ; then
- { { echo "$as_me:12436: error: Cannot link $cf_nculib_root library" >&5
+ { { echo "$as_me:15493: error: Cannot link $cf_nculib_root library" >&5
echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -12441,7 +15498,7 @@ fi
fi
if test -n "$cf_ncurses_LIBS" ; then
- echo "$as_me:12444: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
+ echo "$as_me:15501: 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
@@ -12451,11 +15508,11 @@ echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS..
fi
done
cat >conftest.$ac_ext <<_ACEOF
-#line 12454 "configure"
+#line 15511 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
;
@@ -12463,23 +15520,23 @@ initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12466: \"$ac_link\"") >&5
+if { (eval echo "$as_me:15523: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12469: \$? = $ac_status" >&5
+ echo "$as_me:15526: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12472: \"$ac_try\"") >&5
+ { (eval echo "$as_me:15529: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12475: \$? = $ac_status" >&5
+ echo "$as_me:15532: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- echo "$as_me:12477: result: yes" >&5
+ echo "$as_me:15534: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-echo "$as_me:12482: result: no" >&5
+echo "$as_me:15539: result: no" >&5
echo "${ECHO_T}no" >&6
LIBS="$cf_ncurses_SAVE"
fi
@@ -12492,58 +15549,541 @@ cat >>confdefs.h <<EOF
#define $cf_nculib_ROOT 1
EOF
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+
+ ;;
+(ncurses*)
+
+cf_ncuconfig_root=$cf_cv_screen
+cf_have_ncuconfig=no
+
+if test "x${PKG_CONFIG:=none}" != xnone; then
+ echo "$as_me:15564: checking pkg-config for $cf_ncuconfig_root" >&5
+echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
+ if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
+ echo "$as_me:15567: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+ echo "$as_me:15570: checking if the $cf_ncuconfig_root package files work" >&5
+echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
+ cf_have_ncuconfig=unknown
+
+ cf_save_CPPFLAGS="$CPPFLAGS"
+ cf_save_LIBS="$LIBS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in `$PKG_CONFIG --cflags $cf_ncuconfig_root`
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
fi
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15692 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:15704: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15707: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:15710: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15713: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ if test "$cross_compiling" = yes; then
+ cf_have_ncuconfig=maybe
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line 15719 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+ int main(void)
+ { char *xx = curses_version(); return (xx == 0); }
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:15726: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:15729: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:15731: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15734: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_have_ncuconfig=yes
else
- cf_wide_curses=no
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_ncuconfig=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ echo "$as_me:15751: result: $cf_have_ncuconfig" >&5
+echo "${ECHO_T}$cf_have_ncuconfig" >&6
+ test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
+ if test "$cf_have_ncuconfig" != "yes"
+ then
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ LIBS="$cf_save_LIBS"
+ NCURSES_CONFIG_PKG=none
+ else
-echo "$as_me:12500: 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
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+ NCURSES_CONFIG_PKG=$cf_ncuconfig_root
+
+echo "$as_me:15767: 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
else
-cf_cv_curses_incdir=no
-case $host_os in #(vi
-hpux10.*) #(vi
- 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
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
+ cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
;;
-sunos3*|sunos4*)
- if test "x$cf_cv_screen" = "xcurses_5lib"
- then
- test -d /usr/5lib && \
- test -d /usr/5include && \
- cf_cv_curses_incdir="-I/usr/5include"
+(*)
+ cf_term_header=term.h
+ ;;
+esac
+
+for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
+do
+cat >conftest.$ac_ext <<_ACEOF
+#line 15785 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+#include <$cf_test>
+
+int
+main (void)
+{
+int x = auto_left_margin
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:15800: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:15803: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:15806: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:15809: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cf_cv_term_header="$cf_test"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cf_cv_term_header=unknown
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ test "$cf_cv_term_header" != unknown && break
+done
+
+fi
+echo "$as_me:15825: 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
+(*term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_TERM_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_term_header in
+(ncurses/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_TERM_H 1
+EOF
+
+ ;;
+(ncursesw/term.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_TERM_H 1
+EOF
+
+ ;;
+esac
+
+ fi
+
+ else
+ echo "$as_me:15860: result: no" >&5
+echo "${ECHO_T}no" >&6
+ NCURSES_CONFIG_PKG=none
fi
+else
+ NCURSES_CONFIG_PKG=none
+fi
+
+if test "x$cf_have_ncuconfig" = "xno"; then
+ cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
+
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${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:15876: 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:15891: 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:15899: result: $NCURSES_CONFIG" >&5
+echo "${ECHO_T}$NCURSES_CONFIG" >&6
+else
+ echo "$as_me:15902: 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_ncurses_config} ${cf_ncuconfig_root}6-config ${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:15915: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
+echo "$as_me:15930: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
+if test -n "$ac_ct_NCURSES_CONFIG"; then
+ echo "$as_me:15938: result: $ac_ct_NCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
+else
+ echo "$as_me:15941: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_NCURSES_CONFIG" && break
+done
+test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
+
+ NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
+fi
+
+ if test "$NCURSES_CONFIG" != none ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in `$NCURSES_CONFIG --cflags`
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
;;
esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
fi
-echo "$as_me:12526: 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:12530: checking if we have identified curses headers" >&5
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="`$NCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ # even with config script, some packages use no-override for curses.h
+
+echo "$as_me:16070: 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
else
cf_cv_ncurses_header=none
-for cf_header in \
- ncurses.h \
- curses.h ncurses/ncurses.h ncurses/curses.h
+for cf_header in \
+ ncurses.h $cf_cv_screen/ncurses.h \
+ curses.h $cf_cv_screen/curses.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12542 "configure"
+#line 16082 "configure"
#include "confdefs.h"
#include <${cf_header}>
int
-main ()
+main (void)
{
initscr(); tgoto("?", 0,0)
;
@@ -12551,16 +16091,16 @@ initscr(); tgoto("?", 0,0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12554: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16094: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12557: \$? = $ac_status" >&5
+ echo "$as_me:16097: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12560: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16100: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12563: \$? = $ac_status" >&5
+ echo "$as_me:16103: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_header=$cf_header; break
else
@@ -12571,11 +16111,11 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:12574: result: $cf_cv_ncurses_header" >&5
+echo "$as_me:16114: 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:12578: error: No curses header-files found" >&5
+ { { echo "$as_me:16118: error: No curses header-files found" >&5
echo "$as_me: error: No curses header-files found" >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -12585,23 +16125,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:12588: checking for $ac_header" >&5
+echo "$as_me:16128: 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 12594 "configure"
+#line 16134 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:12598: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:16138: \"$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:12604: \$? = $ac_status" >&5
+ echo "$as_me:16144: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -12620,7 +16160,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:12623: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:16163: 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
@@ -12630,17 +16170,550 @@ EOF
fi
done
-echo "$as_me:12633: checking for terminfo header" >&5
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+ cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
+
+ else
+
+cf_ncuhdr_root=$cf_cv_screen
+
+test -n "$cf_cv_curses_dir" && \
+test "$cf_cv_curses_dir" != "no" && { \
+
+if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
+ for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16219 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main (void)
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16231: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16234: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16237: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16240: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:16257: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+}
+
+echo "$as_me:16276: 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
+else
+
+ cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
+ ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
+ for cf_header in $cf_header_list
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16288 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main (void)
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16312: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16315: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16318: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16321: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ test "$cf_cv_ncurses_h" != no && break
+ done
+
+fi
+echo "$as_me:16336: 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:16343: 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
+else
+
+ test -n "$verbose" && echo
+
+cf_search=
+
+# collect the current set of include-directories from compiler flags
+cf_header_path_list=""
+if test -n "${CFLAGS}${CPPFLAGS}" ; then
+ for cf_header_path in $CPPFLAGS $CFLAGS
+ do
+ case $cf_header_path in
+ (-I*)
+ cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
+
+test "x$cf_header_path" != "xNONE" && \
+test -d "$cf_header_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
+ test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
+ test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
+ test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
+ test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+ cf_header_path_list="$cf_header_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+# add the variations for the package we are looking for
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for include-directories under $prefix"
+ test -d $prefix/include && cf_search="$cf_search $prefix/include"
+ test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
+ test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
+ test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/include && cf_search="$cf_search $cf_subdir_prefix/include"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
+ test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
+ test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
+}
+
+done
+
+test "$includedir" != NONE && \
+test "$includedir" != "/usr/include" && \
+test -d "$includedir" && {
+ test -d $includedir && cf_search="$cf_search $includedir"
+ test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
+}
+
+test "$oldincludedir" != NONE && \
+test "$oldincludedir" != "/usr/include" && \
+test -d "$oldincludedir" && {
+ test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
+ test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
+}
+
+cf_search="$cf_search $cf_header_path_list"
+
+ test -n "$verbose" && echo search path $cf_search
+ cf_save2_CPPFLAGS="$CPPFLAGS"
+ for cf_incdir in $cf_search
+ do
+
+if test -n "$cf_incdir" ; then
+ for cf_add_incdir in $cf_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16464 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main (void)
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16479: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16482: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16485: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:16502: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+ for cf_header in \
+ ncurses.h \
+ curses.h
+ do
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16525 "configure"
+#include "confdefs.h"
+
+#include <$cf_header>
+int
+main (void)
+{
+
+#ifdef NCURSES_VERSION
+
+printf("%s\n", NCURSES_VERSION);
+#else
+#ifdef __NCURSES_H
+printf("old\n");
+#else
+ make an error
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16549: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16552: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16555: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16558: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_ncurses_h2=$cf_header
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_ncurses_h2=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ if test "$cf_cv_ncurses_h2" != no ; then
+ cf_cv_ncurses_h2=$cf_incdir/$cf_header
+ test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
+ break
+ fi
+ test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
+ done
+ CPPFLAGS="$cf_save2_CPPFLAGS"
+ test "$cf_cv_ncurses_h2" != no && break
+ done
+ test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:16579: error: not found" >&5
+echo "$as_me: error: not found" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:16584: 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%/[^/]*$%%'`
+ cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
+ if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
+ cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
+ fi
+
+if test -n "$cf_1st_incdir" ; then
+ for cf_add_incdir in $cf_1st_incdir
+ do
+ while test $cf_add_incdir != /usr/include
+ do
+ if test -d $cf_add_incdir
+ then
+ cf_have_incdir=no
+ if test -n "$CFLAGS$CPPFLAGS" ; then
+ # a loop is needed to ensure we can add subdirs of existing dirs
+ for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
+ if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
+ cf_have_incdir=yes; break
+ fi
+ done
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ if test "$cf_add_incdir" = /usr/local/include ; then
+ if test "$GCC" = yes
+ then
+ cf_save_CPPFLAGS=$CPPFLAGS
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 16620 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main (void)
+{
+printf("Hello")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:16632: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:16635: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:16638: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16641: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_have_incdir=yes
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS=$cf_save_CPPFLAGS
+ fi
+ fi
+ fi
+
+ if test "$cf_have_incdir" = no ; then
+ test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
+
+echo "${as_me:-configure}:16658: testing adding $cf_add_incdir to include-path ..." 1>&5
+
+ CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
+
+ cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
+ test "$cf_top_incdir" = "$cf_add_incdir" && break
+ cf_add_incdir="$cf_top_incdir"
+ else
+ break
+ fi
+ else
+ break
+ fi
+ done
+ done
+fi
+
+fi
+
+# Set definitions to allow ifdef'ing for ncurses.h
+
+case $cf_cv_ncurses_header in
+(*ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+case $cf_cv_ncurses_header in
+(ncurses/curses.h|ncurses/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSES_NCURSES_H 1
+EOF
+
+ ;;
+(ncursesw/curses.h|ncursesw/ncurses.h)
+
+cat >>confdefs.h <<\EOF
+#define HAVE_NCURSESW_NCURSES_H 1
+EOF
+
+ ;;
+esac
+
+echo "$as_me:16706: 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
else
-case ${cf_cv_ncurses_header} in #(vi
-*/ncurses.h|*/ncursesw.h) #(vi
+case ${cf_cv_ncurses_header} in
+(*/ncurses.h|*/ncursesw.h)
cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
;;
-*)
+(*)
cf_term_header=term.h
;;
esac
@@ -12648,14 +16721,14 @@ esac
for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
do
cat >conftest.$ac_ext <<_ACEOF
-#line 12651 "configure"
+#line 16724 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <${cf_cv_ncurses_header:-curses.h}>
#include <$cf_test>
int
-main ()
+main (void)
{
int x = auto_left_margin
;
@@ -12663,16 +16736,16 @@ int x = auto_left_margin
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:12666: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:16739: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:12669: \$? = $ac_status" >&5
+ echo "$as_me:16742: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:12672: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16745: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12675: \$? = $ac_status" >&5
+ echo "$as_me:16748: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header="$cf_test"
@@ -12688,13 +16761,13 @@ rm -f conftest.$ac_objext conftest.$ac_ext
done
fi
-echo "$as_me:12691: result: $cf_cv_term_header" >&5
+echo "$as_me:16764: 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)
+case $cf_cv_term_header in
+(*term.h)
cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
@@ -12703,15 +16776,15 @@ EOF
;;
esac
-case $cf_cv_term_header in # (vi
-ncurses/term.h) #(vi
+case $cf_cv_term_header in
+(ncurses/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
-ncursesw/term.h)
+(ncursesw/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
@@ -12720,7 +16793,13 @@ EOF
;;
esac
-echo "$as_me:12723: checking for ncurses version" >&5
+# some applications need this, but should check for NCURSES_VERSION
+
+cat >>confdefs.h <<\EOF
+#define NCURSES 1
+EOF
+
+echo "$as_me:16802: 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
@@ -12746,10 +16825,10 @@ Autoconf "old"
#endif
EOF
cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
- { (eval echo "$as_me:12749: \"$cf_try\"") >&5
+ { (eval echo "$as_me:16828: \"$cf_try\"") >&5
(eval $cf_try) 2>&5
ac_status=$?
- echo "$as_me:12752: \$? = $ac_status" >&5
+ echo "$as_me:16831: \$? = $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%".*%%'`
@@ -12759,12 +16838,12 @@ EOF
else
cat >conftest.$ac_ext <<_ACEOF
-#line 12762 "configure"
+#line 16841 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
#include <stdio.h>
-int main()
+int main(void)
{
FILE *fp = fopen("$cf_tempfile", "w");
#ifdef NCURSES_VERSION
@@ -12784,15 +16863,15 @@ int main()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16866: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12790: \$? = $ac_status" >&5
+ echo "$as_me:16869: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:12792: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16871: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12795: \$? = $ac_status" >&5
+ echo "$as_me:16874: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_ncurses_version=`cat $cf_tempfile`
@@ -12806,53 +16885,132 @@ fi
rm -f $cf_tempfile
fi
-echo "$as_me:12809: result: $cf_cv_ncurses_version" >&5
+echo "$as_me:16888: result: $cf_cv_ncurses_version" >&5
echo "${ECHO_T}$cf_cv_ncurses_version" >&6
test "$cf_cv_ncurses_version" = no ||
cat >>confdefs.h <<\EOF
#define NCURSES 1
EOF
-echo "$as_me:12816: checking if we have identified curses libraries" >&5
-echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
+cf_nculib_root=$cf_cv_screen
+ # This works, except for the special case where we find gpm, but
+ # ncurses is in a nonstandard location via $LIBS, and we really want
+ # to link gpm.
+cf_ncurses_LIBS=""
+cf_ncurses_SAVE="$LIBS"
+echo "$as_me:16901: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12819 "configure"
+#line 16909 "configure"
#include "confdefs.h"
-#include <${cf_cv_ncurses_header:-curses.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 Gpm_Open ();
int
-main ()
+main (void)
{
-initscr(); tgoto("?", 0,0)
+Gpm_Open ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12831: \"$ac_link\"") >&5
+if { (eval echo "$as_me:16928: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12834: \$? = $ac_status" >&5
+ echo "$as_me:16931: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12837: \"$ac_try\"") >&5
+ { (eval echo "$as_me:16934: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12840: \$? = $ac_status" >&5
+ echo "$as_me:16937: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_result=yes
+ ac_cv_lib_gpm_Gpm_Open=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-cf_result=no
+ac_cv_lib_gpm_Gpm_Open=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:12849: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:16948: 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:16951: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgpm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 16959 "configure"
+#include "confdefs.h"
-if test "$cf_result" = no ; then
-case $host_os in #(vi
-freebsd*) #(vi
- echo "$as_me:12855: checking for tgoto in -lmytinfo" >&5
+/* 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 initscr ();
+int
+main (void)
+{
+initscr ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:16978: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:16981: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:16984: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:16987: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_gpm_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_gpm_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:16998: 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"
+else
+ cf_ncurses_LIBS="-lgpm"
+fi
+
+fi
+
+case $host_os in
+(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:17013: 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
@@ -12860,7 +17018,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lmytinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12863 "configure"
+#line 17021 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12871,7 +17029,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char tgoto ();
int
-main ()
+main (void)
{
tgoto ();
;
@@ -12879,16 +17037,16 @@ tgoto ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17040: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12885: \$? = $ac_status" >&5
+ echo "$as_me:17043: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12888: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17046: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12891: \$? = $ac_status" >&5
+ echo "$as_me:17049: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_mytinfo_tgoto=yes
else
@@ -12899,29 +17057,707 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12902: result: $ac_cv_lib_mytinfo_tgoto" >&5
+echo "$as_me:17060: 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"
+ cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
fi
- ;;
-hpux10.*) #(vi
- # 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:12916: 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
+ fi
+ ;;
+esac
+
+cf_add_libs="$cf_ncurses_LIBS"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
+then
+
+cf_add_libs="-l$cf_nculib_root"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+else
+
+ eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
+ cf_libdir=""
+ echo "$as_me:17109: 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 17115 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char initscr (); 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 initscr ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_initscr) || defined (__stub___initscr)
+choke me
+#else
+f = initscr; /* 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:17146: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17149: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17152: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17155: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_initscr=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_initscr=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:17165: 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:17172: 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 17176 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17188: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17191: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17194: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17197: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:17199: 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:17206: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cf_search=
+cf_library_path_list=""
+if test -n "${LDFLAGS}${LIBS}" ; then
+ for cf_library_path in $LDFLAGS $LIBS
+ do
+ case $cf_library_path in
+ (-L*)
+ cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
+
+test "x$cf_library_path" != "xNONE" && \
+test -d "$cf_library_path" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
+ test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
+ test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
+ test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
+ test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+ cf_library_path_list="$cf_library_path_list $cf_search"
+ ;;
+ esac
+ done
+fi
+
+cf_search=
+
+test "x$prefix" != "xNONE" && \
+test -d "$prefix" && \
+ {
+ test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
+ test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
+ test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
+ test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
+ test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+for cf_subdir_prefix in \
+ /usr \
+ /usr/local \
+ /usr/pkg \
+ /opt \
+ /opt/local \
+ $HOME
+do
+
+test "x$cf_subdir_prefix" != "x$prefix" && \
+test -d "$cf_subdir_prefix" && \
+(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
+ test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
+ test -d $cf_subdir_prefix/lib && cf_search="$cf_search $cf_subdir_prefix/lib"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
+ test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
+ test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
+}
+
+done
+
+cf_search="$cf_library_path_list $cf_search"
+
+ for cf_libdir in $cf_search
+ do
+ echo "$as_me:17274: 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 17278 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17290: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17293: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17296: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17299: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:17301: 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:17308: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_save_LIBS"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
+
+if test $cf_found_library = no ; then
+ { { echo "$as_me:17323: error: Cannot link $cf_nculib_root library" >&5
+echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+if test -n "$cf_ncurses_LIBS" ; then
+ echo "$as_me:17331: 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
+ q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
+ if test "$q" != "$LIBS" ; then
+ LIBS="$q"
+ fi
+ done
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17341 "configure"
+#include "confdefs.h"
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17353: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17356: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17359: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17362: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:17364: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:17369: result: no" >&5
+echo "${ECHO_T}no" >&6
+ LIBS="$cf_ncurses_SAVE"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+cat >>confdefs.h <<EOF
+#define $cf_nculib_ROOT 1
+EOF
+
+ fi
+else
+ NCURSES_CONFIG=none
+fi
+
+ ;;
+(pdcurses)
+ echo "$as_me:17389: checking for X" >&5
+echo $ECHO_N "checking for X... $ECHO_C" >&6
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+ withval="$with_x"
+
+fi;
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+ # Both variables are already set.
+ have_x=yes
+ else
+ if test "${ac_cv_have_x+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -fr conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+ cat >Imakefile <<'EOF'
+acfindx:
+ @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+ if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib dll; do
+ if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+ test -f $ac_im_libdir/libX11.$ac_extension; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /lib) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -fr conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+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 17486 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+_ACEOF
+if { (eval echo "$as_me:17490: \"$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:17496: \$? = $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
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Intrinsic.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lXt $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17529 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+int
+main (void)
+{
+XtMalloc (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17541: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17544: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17547: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17550: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib dll; do
+ if test -r $ac_dir/libXt.$ac_extension; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
+ # Didn't find X anywhere. Cache the known absence of X.
+ ac_cv_have_x="have_x=no"
+else
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes \
+ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+fi
+
+ fi
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ echo "$as_me:17588: result: $have_x" >&5
+echo "${ECHO_T}$have_x" >&6
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # 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:17598: result: libraries $x_libraries, headers $x_includes" >&5
+echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+
+cat >>confdefs.h <<\EOF
+#define X_DISPLAY_MISSING 1
+EOF
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ case `(uname -sr) 2>/dev/null` in
+ "SunOS 5"*)
+ echo "$as_me:17622: 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 17626 "configure"
+#include "confdefs.h"
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17638: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17641: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17644: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17647: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_R_nospace=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+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:17657: 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 17663 "configure"
+#include "confdefs.h"
+
+int
+main (void)
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17675: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17678: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17681: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17684: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_R_space=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+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:17694: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ X_LIBS="$X_LIBS -R $x_libraries"
+ else
+ echo "$as_me:17698: result: neither works" >&5
+echo "${ECHO_T}neither works" >&6
+ fi
+ fi
+ LIBS=$ac_xsave_LIBS
+ esac
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn Johnson says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And Karl Berry says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat >conftest.$ac_ext <<_ACEOF
+#line 17718 "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 XOpenDisplay ();
+int
+main (void)
+{
+XOpenDisplay ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17737: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17740: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17743: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17746: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+echo "$as_me:17752: 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
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lcur_colr $LIBS"
+LIBS="-ldnet $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12924 "configure"
+#line 17760 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12930,54 +17766,178 @@ 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 initscr ();
+char dnet_ntoa ();
int
-main ()
+main (void)
{
-initscr ();
+dnet_ntoa ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12943: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17779: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:12946: \$? = $ac_status" >&5
+ echo "$as_me:17782: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:12949: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17785: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:12952: \$? = $ac_status" >&5
+ echo "$as_me:17788: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_cur_colr_initscr=yes
+ ac_cv_lib_dnet_dnet_ntoa=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_lib_cur_colr_initscr=no
+ac_cv_lib_dnet_dnet_ntoa=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:12963: 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
+echo "$as_me:17799: 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
- LIBS="-lcur_colr $LIBS"
- ac_cv_func_initscr=yes
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ echo "$as_me:17806: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 17814 "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 dnet_ntoa ();
+int
+main (void)
+{
+dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:17833: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17836: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17839: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17842: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:17853: 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"
+fi
- echo "$as_me:12972: 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
+ fi
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_xsave_LIBS"
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # 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:17872: 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 17878 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); 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 gethostbyname ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+f = gethostbyname; /* 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:17909: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:17912: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:17915: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:17918: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_gethostbyname=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:17928: 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:17932: 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
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lHcurses $LIBS"
+LIBS="-lnsl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 12980 "configure"
+#line 17940 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -12986,210 +17946,2623 @@ 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 initscr ();
+char gethostbyname ();
int
-main ()
+main (void)
{
-initscr ();
+gethostbyname ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:12999: \"$ac_link\"") >&5
+if { (eval echo "$as_me:17959: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13002: \$? = $ac_status" >&5
+ echo "$as_me:17962: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13005: \"$ac_try\"") >&5
+ { (eval echo "$as_me:17965: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13008: \$? = $ac_status" >&5
+ echo "$as_me:17968: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_lib_Hcurses_initscr=yes
+ ac_cv_lib_nsl_gethostbyname=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_lib_Hcurses_initscr=no
+ac_cv_lib_nsl_gethostbyname=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:13019: 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
+echo "$as_me:17979: 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
- # 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
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ echo "$as_me:17986: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 17994 "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 gethostbyname ();
+int
+main (void)
+{
+gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18013: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18016: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18019: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18022: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_bsd_gethostbyname=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:18033: 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"
+fi
+
+ fi
+ fi
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says Simon Leinen: it contains gethostby*
+ # 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:18049: 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 18055 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); 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 connect ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_connect) || defined (__stub___connect)
+choke me
+#else
+f = connect; /* 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:18086: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18089: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18092: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18095: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_connect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:18105: 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:18109: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 18117 "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 connect ();
+int
+main (void)
+{
+connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18136: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18139: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18142: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18145: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_connect=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_socket_connect=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:18156: 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"
fi
- fi
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ echo "$as_me:18165: 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 18171 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove (); 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 remove ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_remove) || defined (__stub___remove)
+choke me
+#else
+f = remove; /* 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:18202: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18205: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18208: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18211: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_remove=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_remove=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:18221: 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:18225: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 18233 "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 remove ();
+int
+main (void)
+{
+remove ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18252: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18255: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18258: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18261: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_posix_remove=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_posix_remove=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:18272: 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"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ echo "$as_me:18281: 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 18287 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat (); 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 shmat ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_shmat) || defined (__stub___shmat)
+choke me
+#else
+f = shmat; /* 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:18318: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18321: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18324: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18327: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shmat=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_shmat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:18337: 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:18341: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 18349 "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 shmat ();
+int
+main (void)
+{
+shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18368: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18371: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18374: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18377: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ipc_shmat=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ipc_shmat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:18388: 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"
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS=$LDFLAGS
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # 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:18406: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 18414 "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 IceConnectionNumber ();
+int
+main (void)
+{
+IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18433: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18436: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18439: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18442: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:18453: 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"
+fi
+
+ LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+cf_x_athena=${cf_x_athena:-Xaw}
+
+echo "$as_me:18465: 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=
+
+# Check whether --with-Xaw3d or --without-Xaw3d was given.
+if test "${with_Xaw3d+set}" = set; then
+ withval="$with_Xaw3d"
+
+fi;
+if test "$withval" = yes ; then
+ cf_x_athena=Xaw3d
+ echo "$as_me:18476: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:18479: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:18483: checking if you want to link with Xaw 3d xft library" >&5
+echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
+withval=
+
+# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
+if test "${with_Xaw3dxft+set}" = set; then
+ withval="$with_Xaw3dxft"
+
+fi;
+if test "$withval" = yes ; then
+ cf_x_athena=Xaw3dxft
+ echo "$as_me:18494: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:18497: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:18501: 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=
+
+# Check whether --with-neXtaw or --without-neXtaw was given.
+if test "${with_neXtaw+set}" = set; then
+ withval="$with_neXtaw"
+
+fi;
+if test "$withval" = yes ; then
+ cf_x_athena=neXtaw
+ echo "$as_me:18512: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:18515: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+echo "$as_me:18519: 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=
+
+# Check whether --with-XawPlus or --without-XawPlus was given.
+if test "${with_XawPlus+set}" = set; then
+ withval="$with_XawPlus"
+
+fi;
+if test "$withval" = yes ; then
+ cf_x_athena=XawPlus
+ echo "$as_me:18530: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me:18533: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+cf_x_athena_lib=""
+
+if test "$PKG_CONFIG" != none ; then
+ cf_athena_list=
+ test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
+ for cf_athena_pkg in \
+ $cf_athena_list \
+ ${cf_x_athena} \
+ ${cf_x_athena}-devel \
+ lib${cf_x_athena} \
+ lib${cf_x_athena}-devel
+ do
+
+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}:18553: 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}:18559: 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}:18563: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
;;
-linux*)
- case `arch 2>/dev/null` in
- x86_64)
- if test -d /lib64
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
-if test -n "/lib64" ; then
- for cf_add_libdir in /lib64
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ cf_x_athena_lib="$cf_pkgconfig_libs"
-echo "${as_me:-configure}:13059: testing adding $cf_add_libdir to library-path ..." 1>&5
+cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
+ cat >>confdefs.h <<EOF
+#define $cf_x_athena_LIBS 1
+EOF
+
+ 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}:18694: testing ..trimmed $LIBS ..." 1>&5
+
+ ;;
+ esac
+ done
+
+echo "$as_me:18700: 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 18707 "configure"
+#include "confdefs.h"
+
+#include <X11/Xmu/CharSet.h>
+
+int
+main (void)
+{
+
+int check = XmuCompareISOLatin1("big", "small")
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:18723: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:18726: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:18729: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:18732: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xaw_compat=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xaw_compat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
+echo "$as_me:18742: result: $cf_cv_xaw_compat" >&5
+echo "${ECHO_T}$cf_cv_xaw_compat" >&6
- else
+ if test "$cf_cv_xaw_compat" = no
+ then
+ # workaround for broken ".pc" files...
+ case "$cf_x_athena_lib" in
+ (*-lXmu*)
+ ;;
+ (*)
+ test -n "$verbose" && echo " work around broken package" 1>&6
-if test -n "/lib" ; then
- for cf_add_libdir in /lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+echo "${as_me:-configure}:18754: testing work around broken package ..." 1>&5
-echo "${as_me:-configure}:13088: testing adding $cf_add_libdir to library-path ..." 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}:18762: 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}:18768: 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}:18772: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
fi
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ LIBS="$cf_save_xmu"
+
+test -n "$verbose" && echo " ...before $LIBS" 1>&6
+
+echo "${as_me:-configure}:18892: 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}:18897: testing ...after $LIBS ..." 1>&5
+
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+
+test -n "$verbose" && echo " ...before $LIBS" 1>&6
+
+echo "${as_me:-configure}:18905: testing ...before $LIBS ..." 1>&5
+
+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}:18910: 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}:18921: testing ..trimmed $LIBS ..." 1>&5
+
+ ;;
+ esac
+ done
+
+ ;;
+ esac
+ fi
+
+ break
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+ :
+fi
+
+ done
+fi
+
+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}:18946: 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}:18952: 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}:18956: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
;;
- *)
+ (*)
-if test -n "/lib" ; then
- for cf_add_libdir in /lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
-echo "${as_me:-configure}:13119: testing adding $cf_add_libdir to library-path ..." 1>&5
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+
+ echo "$as_me:19077: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 19085 "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 XextCreateExtension ();
+int
+main (void)
+{
+XextCreateExtension ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:19104: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:19107: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:19110: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:19113: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_Xext_XextCreateExtension=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_Xext_XextCreateExtension=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:19124: 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
+
+cf_add_libs="-lXext"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+fi
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
fi
+# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
+# in some cases has installed dummy files in the former, other cases replaced
+# it with a link to the new location). This complicates the configure script.
+# Check for that pitfall, and recover using pkg-config
+#
+# If none of these are set, the configuration is almost certainly broken.
+if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
+then
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
+ test -n "$verbose" && echo " found package x11" 1>&6
+
+echo "${as_me:-configure}:19160: 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}:19166: 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}:19170: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
;;
esac
;;
-sunos3*|sunos4*)
- if test "x$cf_cv_screen" = "xcurses_5lib"
- then
- if test -d /usr/5lib ; then
+(yes)
-if test -n "/usr/5lib" ; then
- for cf_add_libdir in /usr/5lib
- do
- if test $cf_add_libdir = /usr/lib ; then
- :
- elif test -d $cf_add_libdir
- then
- cf_have_libdir=no
- if test -n "$LDFLAGS$LIBS" ; then
- # a loop is needed to ensure we can add subdirs of existing dirs
- for cf_test_libdir in $LDFLAGS $LIBS ; do
- if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
- cf_have_libdir=yes; break
- fi
- done
- fi
- if test "$cf_have_libdir" = no ; then
- test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
-echo "${as_me:-configure}:13154: testing adding $cf_add_libdir to library-path ..." 1>&5
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
- LDFLAGS="-L$cf_add_libdir $LDFLAGS"
- fi
- fi
- done
fi
- LIBS="-lcurses -ltermcap $LIBS"
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
fi
- fi
- ac_cv_func_initscr=yes
- ;;
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+ { echo "$as_me:19290: WARNING: unable to find X11 library" >&5
+echo "$as_me: WARNING: unable to find X11 library" >&2;}
+fi
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
+ test -n "$verbose" && echo " found package ice" 1>&6
+
+echo "${as_me:-configure}:19297: 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}:19303: 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}:19307: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
esac
+done
-if test ".$ac_cv_func_initscr" != .yes ; then
- cf_save_LIBS="$LIBS"
+if test -n "$cf_new_cflags" ; then
- if test ".${cf_cv_ncurses_version:-no}" != .no
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+ { echo "$as_me:19427: WARNING: unable to find ICE library" >&5
+echo "$as_me: WARNING: unable to find ICE library" >&2;}
+fi
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
+ test -n "$verbose" && echo " found package sm" 1>&6
+
+echo "${as_me:-configure}:19434: 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}:19440: 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}:19444: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+ { echo "$as_me:19564: WARNING: unable to find SM library" >&5
+echo "$as_me: WARNING: unable to find SM library" >&2;}
+fi
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
+ test -n "$verbose" && echo " found package xt" 1>&6
+
+echo "${as_me:-configure}:19571: 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}:19577: 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}:19581: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+ { echo "$as_me:19701: WARNING: unable to find Xt library" >&5
+echo "$as_me: WARNING: unable to find Xt library" >&2;}
+fi
+
+fi
+
+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}:19712: 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}:19718: 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}:19722: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ case "x$LIBS" in
+ (*-lX11*)
+ ;;
+ (*)
+# we have an "xt" package, but it may omit Xt's dependency on X11
+echo "$as_me:19843: 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 19850 "configure"
+#include "confdefs.h"
+
+#include <X11/Xlib.h>
+
+int
+main (void)
+{
+
+ int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
+ int rc2 = XClearWindow((Display*) 0, (Window) 0);
+ int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
+ int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:19869: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:19872: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:19875: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:19878: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xt_x11_compat=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xt_x11_compat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:19888: 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}:19894: 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}:19901: 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}:19907: 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}:19911: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ :
+else
+ cf_pkgconfig_incs=
+ cf_pkgconfig_libs=
+
+test -n "$verbose" && echo " ...before $LIBS" 1>&6
+
+echo "${as_me:-configure}:20034: testing ...before $LIBS ..." 1>&5
+
+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}:20039: testing ...after $LIBS ..." 1>&5
+
+fi
+
+ fi
+ ;;
+ esac
+
+echo "$as_me:20047: 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 20054 "configure"
+#include "confdefs.h"
+
+#include <X11/Shell.h>
+
+int
+main (void)
+{
+int num = IceConnectionNumber(0)
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:20069: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:20072: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:20075: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:20078: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_xt_ice_compat=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_xt_ice_compat=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:20088: result: $cf_cv_xt_ice_compat" >&5
+echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
+
+ if test "$cf_cv_xt_ice_compat" = no
then
- cf_check_list="ncurses curses cursesX"
- else
- cf_check_list="cursesX curses ncurses"
+ # workaround for broken ".pc" files used for X Toolkit.
+ case "x$X_PRE_LIBS" in
+ (*-lICE*)
+ case "x$LIBS" in
+ (*-lICE*)
+ ;;
+ (*)
+ test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
+
+echo "${as_me:-configure}:20102: 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}:20107: 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}:20113: 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}:20117: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
+ test -n "$verbose" && echo " found package sm" 1>&6
+
+echo "${as_me:-configure}:20236: 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}:20242: 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}:20246: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $cf_pkgconfig_incs
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="$cf_pkgconfig_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_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}:20375: testing ...before $LIBS ..." 1>&5
+
+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}:20380: testing ...after $LIBS ..." 1>&5
+
+fi
+
+ ;;
+ esac
+ ;;
+ esac
fi
- # 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:13183: checking for tgoto" >&5
-echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
-if test "${ac_cv_func_tgoto+set}" = set; then
+ 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}:20400: testing checking additions to CFLAGS ..." 1>&5
+
+cf_check_cflags="$CFLAGS"
+cf_check_cppflags="$CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $X_CFLAGS
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+ test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
+
+echo "${as_me:-configure}:20485: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+ test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
+
+echo "${as_me:-configure}:20495: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+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}:20505: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+if test "x$cf_check_cflags" != "x$CFLAGS" ; then
+cat >conftest.$ac_ext <<_ACEOF
+#line 20514 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int
+main (void)
+{
+printf("Hello world");
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:20526: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:20529: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:20532: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:20535: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
+
+echo "${as_me:-configure}:20543: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
+
+ if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
+ test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
+
+echo "${as_me:-configure}:20548: testing but keeping change to \$CPPFLAGS ..." 1>&5
+
+ fi
+ CFLAGS="$cf_check_flags"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+ echo "$as_me:20556: 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 13189 "configure"
+#line 20562 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char tgoto (); below. */
+ which can conflict with char XOpenDisplay (); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -13197,19 +20570,19 @@ 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 tgoto ();
+char XOpenDisplay ();
char (*f) ();
int
-main ()
+main (void)
{
/* 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_tgoto) || defined (__stub___tgoto)
+#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
choke me
#else
-f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
+f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
#endif
;
@@ -13217,43 +20590,40 @@ f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13220: \"$ac_link\"") >&5
+if { (eval echo "$as_me:20593: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13223: \$? = $ac_status" >&5
+ echo "$as_me:20596: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13226: \"$ac_try\"") >&5
+ { (eval echo "$as_me:20599: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13229: \$? = $ac_status" >&5
+ echo "$as_me:20602: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_func_tgoto=yes
+ ac_cv_func_XOpenDisplay=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-ac_cv_func_tgoto=no
+ac_cv_func_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:13239: 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
+echo "$as_me:20612: result: $ac_cv_func_XOpenDisplay" >&5
+echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
+if test $ac_cv_func_XOpenDisplay = yes; then
+ :
else
- 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:13248: 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 "$as_me:20618: 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
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$cf_term_lib $LIBS"
+LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 13256 "configure"
+#line 20626 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -13262,64 +20632,131 @@ 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 tgoto ();
+char XOpenDisplay ();
int
-main ()
+main (void)
{
-tgoto ();
+XOpenDisplay ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13275: \"$ac_link\"") >&5
+if { (eval echo "$as_me:20645: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13278: \$? = $ac_status" >&5
+ echo "$as_me:20648: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13281: \"$ac_try\"") >&5
+ { (eval echo "$as_me:20651: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13284: \$? = $ac_status" >&5
+ echo "$as_me:20654: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_Lib=yes"
+ ac_cv_lib_X11_XOpenDisplay=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-eval "$as_ac_Lib=no"
+ac_cv_lib_X11_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:13295: 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
+echo "$as_me:20665: 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
- done
+cf_add_libs="-lX11"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
fi
- fi
+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:13314: 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 "$as_me:20689: 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 20695 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char XtAppInitialize (); 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 XtAppInitialize ();
+char (*f) ();
+
+int
+main (void)
+{
+/* 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_XtAppInitialize) || defined (__stub___XtAppInitialize)
+choke me
+#else
+f = XtAppInitialize; /* 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:20726: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:20729: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:20732: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:20735: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_XtAppInitialize=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_XtAppInitialize=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:20745: 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:20751: 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
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$cf_curs_lib $LIBS"
+LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 13322 "configure"
+#line 20759 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -13328,75 +20765,229 @@ 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 initscr ();
+char XtAppInitialize ();
int
-main ()
+main (void)
{
-initscr ();
+XtAppInitialize ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13341: \"$ac_link\"") >&5
+if { (eval echo "$as_me:20778: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13344: \$? = $ac_status" >&5
+ echo "$as_me:20781: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13347: \"$ac_try\"") >&5
+ { (eval echo "$as_me:20784: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13350: \$? = $ac_status" >&5
+ echo "$as_me:20787: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- eval "$as_ac_Lib=yes"
+ ac_cv_lib_Xt_XtAppInitialize=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-eval "$as_ac_Lib=no"
+ac_cv_lib_Xt_XtAppInitialize=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:13361: 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
+echo "$as_me:20798: 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
+#define HAVE_LIBXT 1
+EOF
+
+ cf_have_X_LIBS=Xt
+ LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
fi
- done
- fi
- test $cf_curs_lib = unknown && { { echo "$as_me:13369: error: no curses library found" >&5
-echo "$as_me: error: no curses library found" >&2;}
- { (exit 1); exit 1; }; }
+fi
- LIBS="-l$cf_curs_lib $cf_save_LIBS"
- if test "$cf_term_lib" = unknown ; then
- echo "$as_me:13375: 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
+fi
+
+if test $cf_have_X_LIBS = no ; then
+ { echo "$as_me:20815: 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
+test program. You will have to check and add the proper libraries by hand
+to makefile." >&2;}
+fi
+
+cf_x_athena_root=$cf_x_athena
+cf_x_athena_inc=""
+
+for cf_path in default \
+ /usr/contrib/X11R6 \
+ /usr/contrib/X11R5 \
+ /usr/lib/X11R5 \
+ /usr/local
+do
+ if test -z "$cf_x_athena_inc" ; then
+ cf_save="$CPPFLAGS"
+ cf_test=X11/$cf_x_athena_root/SimpleMenu.h
+ if test $cf_path != default ; then
+ CPPFLAGS="$cf_save"
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
+
+ echo "$as_me:20841: 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:20844: checking for $cf_test" >&5
+echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
+ fi
cat >conftest.$ac_ext <<_ACEOF
-#line 13378 "configure"
+#line 20848 "configure"
#include "confdefs.h"
-#include <${cf_cv_ncurses_header:-curses.h}>
+
+#include <X11/Intrinsic.h>
+#include <$cf_test>
int
-main ()
+main (void)
{
-initscr()
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:20862: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:20865: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:20868: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:20871: \$? = $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_ext
+ echo "$as_me:20880: result: $cf_result" >&5
+echo "${ECHO_T}$cf_result" >&6
+ if test "$cf_result" = yes ; then
+ cf_x_athena_inc=$cf_path
+ break
+ else
+ CPPFLAGS="$cf_save"
+ fi
+ fi
+done
+
+if test -z "$cf_x_athena_inc" ; then
+ { echo "$as_me:20892: 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
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
+
+fi
+
+cf_x_athena_root=$cf_x_athena
+cf_x_athena_lib=""
+
+for cf_path in default \
+ /usr/contrib/X11R6 \
+ /usr/contrib/X11R5 \
+ /usr/lib/X11R5 \
+ /usr/local
+do
+ for cf_lib in \
+ ${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_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ echo "$as_me:20941: checking for $cf_libs in $cf_path" >&5
+echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
+ else
+
+cf_add_libs="$cf_libs"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+ echo "$as_me:20961: 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 20965 "configure"
+#include "confdefs.h"
+
+#include <X11/Intrinsic.h>
+#include <X11/$cf_x_athena_root/SimpleMenu.h>
+
+int
+main (void)
+{
+
+$cf_test((XtAppContext) 0)
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13390: \"$ac_link\"") >&5
+if { (eval echo "$as_me:20981: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13393: \$? = $ac_status" >&5
+ echo "$as_me:20984: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13396: \"$ac_try\"") >&5
+ { (eval echo "$as_me:20987: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13399: \$? = $ac_status" >&5
+ echo "$as_me:20990: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -13405,91 +20996,826 @@ cat conftest.$ac_ext >&5
cf_result=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:13408: result: $cf_result" >&5
+ echo "$as_me:20999: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
- test $cf_result = no && { { echo "$as_me:13410: error: Cannot link curses library" >&5
-echo "$as_me: error: Cannot link curses library" >&2;}
+ if test "$cf_result" = yes ; then
+ cf_x_athena_lib="$cf_libs"
+ break
+ fi
+ LIBS="$cf_save"
+ fi
+ 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:21013: 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; }; }
- elif test "$cf_curs_lib" = "$cf_term_lib" ; then
- :
- elif test "$cf_term_lib" != predefined ; then
- echo "$as_me:13416: 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 13419 "configure"
+fi
+
+cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
+
+cat >>confdefs.h <<EOF
+#define $cf_x_athena_LIBS 1
+EOF
+
+fi
+
+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:21031: 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:21046: 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:21054: result: $XCURSES_CONFIG" >&5
+echo "${ECHO_T}$XCURSES_CONFIG" >&6
+else
+ echo "$as_me:21057: 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:21070: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ 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=.
+ $as_executable_p "$ac_dir/$ac_word" || continue
+ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
+echo "$as_me:21085: found $ac_dir/$ac_word" >&5
+break
+done
+
+fi
+fi
+ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
+if test -n "$ac_ct_XCURSES_CONFIG"; then
+ echo "$as_me:21093: result: $ac_ct_XCURSES_CONFIG" >&5
+echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
+else
+ echo "$as_me:21096: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_XCURSES_CONFIG" && break
+done
+test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
+
+ XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
+fi
+
+if test "$XCURSES_CONFIG" != none ; then
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in `$XCURSES_CONFIG --cflags`
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+fi
+
+if test -n "$cf_new_extra_cppflags" ; then
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+cf_add_libs="`$XCURSES_CONFIG --libs`"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+cf_cv_lib_XCurses=yes
+
+else
+
+LDFLAGS="$LDFLAGS $X_LIBS"
+
+test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
+
+echo "${as_me:-configure}:21231: testing checking additions to CFLAGS ..." 1>&5
+
+cf_check_cflags="$CFLAGS"
+cf_check_cppflags="$CPPFLAGS"
+
+cf_fix_cppflags=no
+cf_new_cflags=
+cf_new_cppflags=
+cf_new_extra_cppflags=
+
+for cf_add_cflags in $X_CFLAGS
+do
+case $cf_fix_cppflags in
+(no)
+ case $cf_add_cflags in
+ (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
+ case $cf_add_cflags in
+ (-D*)
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=yes
+
+ if test $cf_fix_cppflags = yes ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ elif test "${cf_tst_cflags}" = "\"'" ; then
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ continue
+ fi
+ ;;
+ esac
+ case "$CPPFLAGS" in
+ (*$cf_add_cflags)
+ ;;
+ (*)
+ case $cf_add_cflags in
+ (-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
+
+ test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
+ cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+ (*)
+
+ test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
+ cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
+
+ ;;
+ esac
+ ;;
+(yes)
+
+ test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
+ cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
+
+ cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
+
+ test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
+ && test -z "${cf_tst_cflags}" \
+ && cf_fix_cppflags=no
+ ;;
+esac
+done
+
+if test -n "$cf_new_cflags" ; then
+ test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
+
+echo "${as_me:-configure}:21316: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
+
+ test -n "$CFLAGS" && CFLAGS="$CFLAGS "
+ CFLAGS="${CFLAGS}$cf_new_cflags"
+
+fi
+
+if test -n "$cf_new_cppflags" ; then
+ test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
+
+echo "${as_me:-configure}:21326: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
+
+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}:21336: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
+
+ test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
+ EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
+
+fi
+
+if test "x$cf_check_cflags" != "x$CFLAGS" ; then
+cat >conftest.$ac_ext <<_ACEOF
+#line 21345 "configure"
#include "confdefs.h"
-#include <${cf_cv_ncurses_header:-curses.h}>
+#include <stdio.h>
int
-main ()
+main (void)
{
-initscr(); tgoto((char *)0, 0, 0);
+printf("Hello world");
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13431: \"$ac_link\"") >&5
+if { (eval echo "$as_me:21357: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13434: \$? = $ac_status" >&5
+ echo "$as_me:21360: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13437: \"$ac_try\"") >&5
+ { (eval echo "$as_me:21363: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13440: \$? = $ac_status" >&5
+ echo "$as_me:21366: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_result=no
+ :
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
+test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
- LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
- cat >conftest.$ac_ext <<_ACEOF
-#line 13449 "configure"
+echo "${as_me:-configure}:21374: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
+
+ if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
+ test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
+
+echo "${as_me:-configure}:21379: testing but keeping change to \$CPPFLAGS ..." 1>&5
+
+ fi
+ CFLAGS="$cf_check_flags"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+
+echo "$as_me:21387: 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
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 21395 "configure"
#include "confdefs.h"
-#include <${cf_cv_ncurses_header:-curses.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 XOpenDisplay ();
int
-main ()
+main (void)
{
-initscr()
+XOpenDisplay ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:13461: \"$ac_link\"") >&5
+if { (eval echo "$as_me:21414: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13464: \$? = $ac_status" >&5
+ echo "$as_me:21417: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:13467: \"$ac_try\"") >&5
+ { (eval echo "$as_me:21420: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13470: \$? = $ac_status" >&5
+ echo "$as_me:21423: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_result=yes
+ ac_cv_lib_X11_XOpenDisplay=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-cf_result=error
+ac_cv_lib_X11_XOpenDisplay=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:21434: 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
+
+cf_add_libs="-lX11"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
fi
+
+echo "$as_me:21456: 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
+else
+
+cf_add_libs="-lXCurses"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 21479 "configure"
+#include "confdefs.h"
+
+#include <xcurses.h>
+char *XCursesProgramName = "test";
+
+int
+main (void)
+{
+XCursesExit();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:21494: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:21497: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:21500: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:21503: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_lib_XCurses=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_lib_XCurses=no
+fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- echo "$as_me:13482: result: $cf_result" >&5
-echo "${ECHO_T}$cf_result" >&6
- fi
+
fi
+echo "$as_me:21514: 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
+#define UNIX 1
+EOF
+
+cat >>confdefs.h <<\EOF
+#define XCURSES 1
+EOF
+
+ echo "$as_me:21529: 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 21535 "configure"
+#include "confdefs.h"
+#include <xcurses.h>
+_ACEOF
+if { (eval echo "$as_me:21539: \"$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:21545: \$? = $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_xcurses_h=yes
+else
+ echo "$as_me: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ ac_cv_header_xcurses_h=no
+fi
+rm -f conftest.err conftest.$ac_ext
+fi
+echo "$as_me:21564: 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
+#define HAVE_XCURSES 1
+EOF
+
+fi
+
+else
+ { { echo "$as_me:21575: error: Cannot link with XCurses" >&5
+echo "$as_me: error: Cannot link with XCurses" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ ;;
+(*)
+ { { echo "$as_me:21582: error: unexpected screen-value: $cf_cv_screen" >&5
+echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+esac
+
+: ${cf_nculib_root:=$cf_cv_screen}
+as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
+echo "$as_me:21590: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
+echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $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="-l$cf_nculib_root $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line 21598 "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 _nc_init_pthreads ();
+int
+main (void)
+{
+_nc_init_pthreads ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:21620: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:21623: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:21626: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Lib=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_Lib=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:21637: 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
+ cf_cv_ncurses_pthreads=yes
+else
+ cf_cv_ncurses_pthreads=no
+fi
+
+if test "$cf_cv_ncurses_pthreads" = yes
+then
+
+cf_add_libs="-lpthread"
+# Filter out duplicates - this happens with badly-designed ".pc" files...
+for cf_add_1lib in $LIBS
+do
+ for cf_add_2lib in $cf_add_libs
+ do
+ if test "x$cf_add_1lib" = "x$cf_add_2lib"
+ then
+ cf_add_1lib=
+ break
+ fi
+ done
+ test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
+done
+LIBS="$cf_add_libs"
+
+fi
+
+echo "$as_me:21666: checking if curses supports wide characters" >&5
+echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
+if test "${cf_cv_widec_curses+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+#line 21673 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+
+ wchar_t temp[2];
+ wchar_t wch = 'A';
+ temp[0] = wch;
+ waddnwstr(stdscr, temp, 1);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:21692: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:21695: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:21698: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:21701: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_widec_curses=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_widec_curses=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+fi
+echo "$as_me:21712: result: $cf_cv_widec_curses" >&5
+echo "${ECHO_T}$cf_cv_widec_curses" >&6
+
+if test "$cf_cv_widec_curses" = yes ; then
+
+cat >>confdefs.h <<\EOF
+#define WIDEC_CURSES 1
+EOF
+
+ # This is needed on Tru64 5.0 to declare mbstate_t
+ echo "$as_me:21722: 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_widec_mbstate+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 21729 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+mbstate_t state
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:21743: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:21746: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:21749: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:21752: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_widec_mbstate=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+#line 21759 "configure"
+#include "confdefs.h"
+
+#include <stdlib.h>
+#include <wchar.h>
+#include <${cf_cv_ncurses_header:-curses.h}>
+int
+main (void)
+{
+mbstate_t state
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:21774: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:21777: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:21780: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:21783: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_widec_mbstate=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_widec_mbstate=unknown
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:21795: result: $cf_cv_widec_mbstate" >&5
+echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
+
+if test "$cf_cv_widec_mbstate" = yes ; then
+
+cat >>confdefs.h <<\EOF
+#define NEED_WCHAR_H 1
+EOF
+
+fi
+
+if test "$cf_cv_widec_mbstate" != unknown ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
fi
fi
cf_all_widgets=yes
-echo "$as_me:13492: checking if you want extra dialogs" >&5
+echo "$as_me:21818: checking if you want extra dialogs" >&5
echo $ECHO_N "checking if you want extra dialogs... $ECHO_C" >&6
# Check whether --enable-extras or --disable-extras was given.
@@ -13499,7 +21825,7 @@ if test "${enable_extras+set}" = set; then
else
enableval=yes
fi;
-echo "$as_me:13502: result: $enableval" >&5
+echo "$as_me:21828: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
cf_all_widgets=yes
@@ -13507,7 +21833,7 @@ else
cf_all_widgets=no
fi
-echo "$as_me:13510: checking if you want config-file support" >&5
+echo "$as_me:21836: checking if you want config-file support" >&5
echo $ECHO_N "checking if you want config-file support... $ECHO_C" >&6
# Check whether --enable-rc-file or --disable-rc-file was given.
@@ -13517,7 +21843,7 @@ if test "${enable_rc_file+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13520: result: $enableval" >&5
+echo "$as_me:21846: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS rc\$o"
@@ -13530,7 +21856,7 @@ else
:
fi
-echo "$as_me:13533: checking if you want Xdialog-style dialogs" >&5
+echo "$as_me:21859: checking if you want Xdialog-style dialogs" >&5
echo $ECHO_N "checking if you want Xdialog-style dialogs... $ECHO_C" >&6
# Check whether --enable-Xdialog or --disable-Xdialog was given.
@@ -13540,7 +21866,7 @@ if test "${enable_Xdialog+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13543: result: $enableval" >&5
+echo "$as_me:21869: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS calendar\$o fselect\$o timebox\$o"
@@ -13553,7 +21879,7 @@ else
:
fi
-echo "$as_me:13556: checking if you want extra Xdialog-style dialogs (1.2)" >&5
+echo "$as_me:21882: checking if you want extra Xdialog-style dialogs (1.2)" >&5
echo $ECHO_N "checking if you want extra Xdialog-style dialogs (1.2)... $ECHO_C" >&6
# Check whether --enable-Xdialog2 or --disable-Xdialog2 was given.
@@ -13563,7 +21889,7 @@ if test "${enable_Xdialog2+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13566: result: $enableval" >&5
+echo "$as_me:21892: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS buildlist\$o rangebox\$o treeview\$o"
@@ -13576,7 +21902,7 @@ else
:
fi
-echo "$as_me:13579: checking if you want compatibility with whiptail options" >&5
+echo "$as_me:21905: checking if you want compatibility with whiptail options" >&5
echo $ECHO_N "checking if you want compatibility with whiptail options... $ECHO_C" >&6
# Check whether --enable-whiptail or --disable-whiptail was given.
@@ -13586,7 +21912,7 @@ if test "${enable_whiptail+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13589: result: $enableval" >&5
+echo "$as_me:21915: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
@@ -13598,7 +21924,7 @@ else
:
fi
-echo "$as_me:13601: checking if you want the form dialog" >&5
+echo "$as_me:21927: checking if you want the form dialog" >&5
echo $ECHO_N "checking if you want the form dialog... $ECHO_C" >&6
# Check whether --enable-form or --disable-form was given.
@@ -13608,7 +21934,7 @@ if test "${enable_form+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13611: result: $enableval" >&5
+echo "$as_me:21937: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS formbox\$o"
@@ -13621,7 +21947,7 @@ else
:
fi
-echo "$as_me:13624: checking if you want the gauge dialog" >&5
+echo "$as_me:21950: checking if you want the gauge dialog" >&5
echo $ECHO_N "checking if you want the gauge dialog... $ECHO_C" >&6
# Check whether --enable-gauge or --disable-gauge was given.
@@ -13631,7 +21957,7 @@ if test "${enable_gauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13634: result: $enableval" >&5
+echo "$as_me:21960: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS guage\$o pause\$o prgbox\$o progressbox\$o"
@@ -13644,7 +21970,7 @@ else
:
fi
-echo "$as_me:13647: checking if you want the tailbox dialog" >&5
+echo "$as_me:21973: checking if you want the tailbox dialog" >&5
echo $ECHO_N "checking if you want the tailbox dialog... $ECHO_C" >&6
# Check whether --enable-tailbox or --disable-tailbox was given.
@@ -13654,7 +21980,7 @@ if test "${enable_tailbox+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13657: result: $enableval" >&5
+echo "$as_me:21983: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS tailbox\$o"
@@ -13667,7 +21993,7 @@ else
:
fi
-echo "$as_me:13670: checking if you want the mixedform dialog" >&5
+echo "$as_me:21996: checking if you want the mixedform dialog" >&5
echo $ECHO_N "checking if you want the mixedform dialog... $ECHO_C" >&6
# Check whether --enable-mixedform or --disable-mixedform was given.
@@ -13675,9 +22001,9 @@ if test "${enable_mixedform+set}" = set; then
enableval="$enable_mixedform"
else
- enableval=$cf_all_widgets
+ enableval=${enable_form:=$cf_all_widgets}
fi;
-echo "$as_me:13680: result: $enableval" >&5
+echo "$as_me:22006: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedform\$o"
@@ -13690,7 +22016,7 @@ else
:
fi
-echo "$as_me:13693: checking if you want the mixedgauge dialog" >&5
+echo "$as_me:22019: checking if you want the mixedgauge dialog" >&5
echo $ECHO_N "checking if you want the mixedgauge dialog... $ECHO_C" >&6
# Check whether --enable-mixedgauge or --disable-mixedgauge was given.
@@ -13700,7 +22026,7 @@ if test "${enable_mixedgauge+set}" = set; then
else
enableval=$cf_all_widgets
fi;
-echo "$as_me:13703: result: $enableval" >&5
+echo "$as_me:22029: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
EXTRAOBJS="$EXTRAOBJS mixedgauge\$o"
@@ -13713,7 +22039,7 @@ else
:
fi
-echo "$as_me:13716: checking if you want the wide-curses features" >&5
+echo "$as_me:22042: checking if you want the wide-curses features" >&5
echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
# Check whether --enable-widec or --disable-widec was given.
@@ -13721,9 +22047,9 @@ if test "${enable_widec+set}" = set; then
enableval="$enable_widec"
else
- enableval=$cf_wide_curses
+ enableval=$cf_cv_widec_curses
fi;
-echo "$as_me:13726: result: $enableval" >&5
+echo "$as_me:22052: result: $enableval" >&5
echo "${ECHO_T}$enableval" >&6
if test "$enableval" != no ; then
@@ -13735,13 +22061,13 @@ else
:
fi
-echo "$as_me:13738: checking for ANSI C header files" >&5
+echo "$as_me:22064: 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 13744 "configure"
+#line 22070 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -13749,13 +22075,13 @@ else
#include <float.h>
_ACEOF
-if { (eval echo "$as_me:13752: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:22078: \"$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:13758: \$? = $ac_status" >&5
+ echo "$as_me:22084: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -13777,7 +22103,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 13780 "configure"
+#line 22106 "configure"
#include "confdefs.h"
#include <string.h>
@@ -13795,7 +22121,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 13798 "configure"
+#line 22124 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -13816,7 +22142,7 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line 13819 "configure"
+#line 22145 "configure"
#include "confdefs.h"
#include <ctype.h>
#if ((' ' & 0x0FF) == 0x020)
@@ -13831,7 +22157,7 @@ else
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
-main ()
+main (void)
{
int i;
for (i = 0; i < 256; i++)
@@ -13842,15 +22168,15 @@ main ()
}
_ACEOF
rm -f conftest$ac_exeext
-if { (eval echo "$as_me:13845: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22171: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:13848: \$? = $ac_status" >&5
+ echo "$as_me:22174: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (eval echo "$as_me:13850: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22176: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13853: \$? = $ac_status" >&5
+ echo "$as_me:22179: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
@@ -13863,7 +22189,7 @@ rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
-echo "$as_me:13866: result: $ac_cv_header_stdc" >&5
+echo "$as_me:22192: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
@@ -13873,20 +22199,20 @@ EOF
fi
-echo "$as_me:13876: checking whether time.h and sys/time.h may both be included" >&5
+echo "$as_me:22202: 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 13882 "configure"
+#line 22208 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
int
-main ()
+main (void)
{
if ((struct tm *) 0)
return 0;
@@ -13895,16 +22221,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22224: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13901: \$? = $ac_status" >&5
+ echo "$as_me:22227: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13904: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22230: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13907: \$? = $ac_status" >&5
+ echo "$as_me:22233: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_time=yes
else
@@ -13914,7 +22240,7 @@ ac_cv_header_time=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13917: result: $ac_cv_header_time" >&5
+echo "$as_me:22243: result: $ac_cv_header_time" >&5
echo "${ECHO_T}$ac_cv_header_time" >&6
if test $ac_cv_header_time = yes; then
@@ -13927,19 +22253,19 @@ fi
ac_header_dirent=no
for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
-echo "$as_me:13930: checking for $ac_hdr that defines DIR" >&5
+echo "$as_me:22256: checking for $ac_hdr that defines DIR" >&5
echo $ECHO_N "checking for $ac_hdr that defines DIR... $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 13936 "configure"
+#line 22262 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
int
-main ()
+main (void)
{
if ((DIR *) 0)
return 0;
@@ -13948,16 +22274,16 @@ return 0;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22277: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:13954: \$? = $ac_status" >&5
+ echo "$as_me:22280: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:13957: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22283: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:13960: \$? = $ac_status" >&5
+ echo "$as_me:22286: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
@@ -13967,7 +22293,7 @@ eval "$as_ac_Header=no"
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:13970: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:22296: 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
@@ -13980,7 +22306,7 @@ fi
done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
- echo "$as_me:13983: checking for opendir in -ldir" >&5
+ echo "$as_me:22309: checking for opendir in -ldir" >&5
echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
if test "${ac_cv_lib_dir_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -13988,7 +22314,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldir $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 13991 "configure"
+#line 22317 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -13999,7 +22325,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char opendir ();
int
-main ()
+main (void)
{
opendir ();
;
@@ -14007,16 +22333,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14010: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22336: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14013: \$? = $ac_status" >&5
+ echo "$as_me:22339: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14016: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22342: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14019: \$? = $ac_status" >&5
+ echo "$as_me:22345: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dir_opendir=yes
else
@@ -14027,14 +22353,14 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:14030: result: $ac_cv_lib_dir_opendir" >&5
+echo "$as_me:22356: result: $ac_cv_lib_dir_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
if test $ac_cv_lib_dir_opendir = yes; then
LIBS="$LIBS -ldir"
fi
else
- echo "$as_me:14037: checking for opendir in -lx" >&5
+ echo "$as_me:22363: checking for opendir in -lx" >&5
echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
if test "${ac_cv_lib_x_opendir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14042,7 +22368,7 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lx $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line 14045 "configure"
+#line 22371 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
@@ -14053,7 +22379,7 @@ extern "C"
builtin and then its argument prototype would still apply. */
char opendir ();
int
-main ()
+main (void)
{
opendir ();
;
@@ -14061,16 +22387,16 @@ opendir ();
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14064: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22390: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14067: \$? = $ac_status" >&5
+ echo "$as_me:22393: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14070: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22396: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14073: \$? = $ac_status" >&5
+ echo "$as_me:22399: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_x_opendir=yes
else
@@ -14081,7 +22407,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
-echo "$as_me:14084: result: $ac_cv_lib_x_opendir" >&5
+echo "$as_me:22410: result: $ac_cv_lib_x_opendir" >&5
echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
if test $ac_cv_lib_x_opendir = yes; then
LIBS="$LIBS -lx"
@@ -14089,26 +22415,26 @@ fi
fi
-for ac_header in search.h unctrl.h unistd.h
+for ac_header in search.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:14095: checking for $ac_header" >&5
+echo "$as_me:22421: 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 14101 "configure"
+#line 22427 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:14105: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:22431: \"$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:14111: \$? = $ac_status" >&5
+ echo "$as_me:22437: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -14127,7 +22453,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:14130: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:22456: 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
@@ -14137,7 +22463,7 @@ EOF
fi
done
-echo "$as_me:14140: checking for term.h" >&5
+echo "$as_me:22466: 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
@@ -14148,8 +22474,8 @@ else
cf_header_list="term.h ncurses/term.h ncursesw/term.h"
-case ${cf_cv_ncurses_header:-curses.h} in #(vi
-*/*)
+case ${cf_cv_ncurses_header:-curses.h} in
+(*/*)
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"
;;
@@ -14158,13 +22484,13 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14161 "configure"
+#line 22487 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
#include <${cf_header}>
int
-main ()
+main (void)
{
WINDOW *x
;
@@ -14172,16 +22498,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14175: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22501: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14178: \$? = $ac_status" >&5
+ echo "$as_me:22504: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14181: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22507: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14184: \$? = $ac_status" >&5
+ echo "$as_me:22510: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -14193,14 +22519,14 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
-case $cf_cv_term_header in #(vi
-no)
+case $cf_cv_term_header in
+(no)
# If curses is ncurses, some packagers still mess it up by trying to make
# us use GNU termcap. This handles the most common case.
for cf_header in ncurses/term.h ncursesw/term.h
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14203 "configure"
+#line 22529 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
@@ -14210,7 +22536,7 @@ no)
make an error
#endif
int
-main ()
+main (void)
{
WINDOW *x
;
@@ -14218,16 +22544,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22547: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14224: \$? = $ac_status" >&5
+ echo "$as_me:22550: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14227: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22553: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14230: \$? = $ac_status" >&5
+ echo "$as_me:22556: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_term_header=$cf_header
break
@@ -14242,25 +22568,25 @@ rm -f conftest.$ac_objext conftest.$ac_ext
esac
fi
-echo "$as_me:14245: result: $cf_cv_term_header" >&5
+echo "$as_me:22571: result: $cf_cv_term_header" >&5
echo "${ECHO_T}$cf_cv_term_header" >&6
-case $cf_cv_term_header in #(vi
-term.h) #(vi
+case $cf_cv_term_header in
+(term.h)
cat >>confdefs.h <<\EOF
#define HAVE_TERM_H 1
EOF
;;
-ncurses/term.h) #(vi
+(ncurses/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_TERM_H 1
EOF
;;
-ncursesw/term.h)
+(ncursesw/term.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_TERM_H 1
@@ -14269,13 +22595,13 @@ EOF
;;
esac
-echo "$as_me:14272: checking return type of signal handlers" >&5
+echo "$as_me:22598: 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 14278 "configure"
+#line 22604 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
@@ -14289,7 +22615,7 @@ void (*signal ()) ();
#endif
int
-main ()
+main (void)
{
int i;
;
@@ -14297,16 +22623,16 @@ int i;
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14300: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22626: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14303: \$? = $ac_status" >&5
+ echo "$as_me:22629: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14306: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22632: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14309: \$? = $ac_status" >&5
+ echo "$as_me:22635: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_signal=void
else
@@ -14316,7 +22642,7 @@ ac_cv_type_signal=int
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14319: result: $ac_cv_type_signal" >&5
+echo "$as_me:22645: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
cat >>confdefs.h <<EOF
@@ -14338,16 +22664,17 @@ wcsrtombs \
wcstombs \
wctob \
wctomb \
+mktime \
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:14344: checking for $ac_func" >&5
+echo "$as_me:22671: 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 14350 "configure"
+#line 22677 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below. */
@@ -14362,7 +22689,7 @@ char $ac_func ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -14378,16 +22705,16 @@ f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14381: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22708: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14384: \$? = $ac_status" >&5
+ echo "$as_me:22711: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14387: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22714: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14390: \$? = $ac_status" >&5
+ echo "$as_me:22717: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_var=yes"
else
@@ -14397,7 +22724,7 @@ eval "$as_ac_var=no"
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:14400: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "$as_me:22727: 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
@@ -14407,20 +22734,21 @@ EOF
fi
done
-echo "$as_me:14410: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
-echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
+echo "$as_me:22737: checking definition to turn on extended curses functions" >&5
+echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
if test "${cf_cv_need_xopen_extension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+cf_cv_need_xopen_extension=unknown
cat >conftest.$ac_ext <<_ACEOF
-#line 14417 "configure"
+#line 22745 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
#if defined(NCURSES_VERSION_PATCH)
@@ -14428,6 +22756,10 @@ main ()
make an error
#endif
#endif
+#ifdef NCURSES_VERSION
+ cchar_t check;
+ int check2 = curs_set((int)sizeof(check));
+#endif
long x = winnstr(stdscr, "", 0);
int x1, y1;
getbegyx(stdscr, y1, x1)
@@ -14436,70 +22768,83 @@ main ()
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14439: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22771: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14442: \$? = $ac_status" >&5
+ echo "$as_me:22774: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14445: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22777: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14448: \$? = $ac_status" >&5
+ echo "$as_me:22780: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_need_xopen_extension=no
+ cf_cv_need_xopen_extension=none
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-cat >conftest.$ac_ext <<_ACEOF
-#line 14455 "configure"
+
+ for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
+ do
+ cat >conftest.$ac_ext <<_ACEOF
+#line 22790 "configure"
#include "confdefs.h"
-#define _XOPEN_SOURCE_EXTENDED
+#define $cf_try_xopen_extension 1
#include <stdlib.h>
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
#ifdef NCURSES_VERSION
- cchar_t check;
- int check2 = curs_set((int)sizeof(check));
+ cchar_t check;
+ int check2 = curs_set((int)sizeof(check));
#endif
- long x = winnstr(stdscr, "", 0);
- int x1, y1;
- getbegyx(stdscr, y1, x1)
+ long x = winnstr(stdscr, "", 0);
+ int x1, y1;
+ getbegyx(stdscr, y1, x1)
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14477: \"$ac_link\"") >&5
+if { (eval echo "$as_me:22812: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14480: \$? = $ac_status" >&5
+ echo "$as_me:22815: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14483: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22818: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14486: \$? = $ac_status" >&5
+ echo "$as_me:22821: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- cf_cv_need_xopen_extension=yes
+ cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
-cf_cv_need_xopen_extension=unknown
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
+
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
fi
-echo "$as_me:14498: result: $cf_cv_need_xopen_extension" >&5
+echo "$as_me:22835: 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:14502: checking for unctrl.h" >&5
+case $cf_cv_need_xopen_extension in
+(*_*)
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
+
+ ;;
+esac
+
+echo "$as_me:22847: 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
@@ -14510,8 +22855,8 @@ else
cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
-case ${cf_cv_ncurses_header:-curses.h} in #(vi
-*/*)
+case ${cf_cv_ncurses_header:-curses.h} in
+(*/*)
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"
;;
@@ -14520,13 +22865,13 @@ esac
for cf_header in $cf_header_list
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14523 "configure"
+#line 22868 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
#include <${cf_header}>
int
-main ()
+main (void)
{
WINDOW *x
;
@@ -14534,16 +22879,16 @@ WINDOW *x
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14537: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:22882: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14540: \$? = $ac_status" >&5
+ echo "$as_me:22885: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14543: \"$ac_try\"") >&5
+ { (eval echo "$as_me:22888: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14546: \$? = $ac_status" >&5
+ echo "$as_me:22891: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_unctrl_header=$cf_header
break
@@ -14555,33 +22900,33 @@ fi
rm -f conftest.$ac_objext conftest.$ac_ext
done
-case $cf_cv_unctrl_header in #(vi
-no)
- { echo "$as_me:14560: WARNING: unctrl.h header not found" >&5
+fi
+echo "$as_me:22904: result: $cf_cv_unctrl_header" >&5
+echo "${ECHO_T}$cf_cv_unctrl_header" >&6
+
+case $cf_cv_unctrl_header in
+(no)
+ { echo "$as_me:22909: WARNING: unctrl.h header not found" >&5
echo "$as_me: WARNING: unctrl.h header not found" >&2;}
;;
esac
-fi
-echo "$as_me:14566: result: $cf_cv_unctrl_header" >&5
-echo "${ECHO_T}$cf_cv_unctrl_header" >&6
-
-case $cf_cv_unctrl_header in #(vi
-unctrl.h) #(vi
+case $cf_cv_unctrl_header in
+(unctrl.h)
cat >>confdefs.h <<\EOF
#define HAVE_UNCTRL_H 1
EOF
;;
-ncurses/unctrl.h) #(vi
+(ncurses/unctrl.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSES_UNCTRL_H 1
EOF
;;
-ncursesw/unctrl.h)
+(ncursesw/unctrl.h)
cat >>confdefs.h <<\EOF
#define HAVE_NCURSESW_UNCTRL_H 1
@@ -14614,10 +22959,10 @@ do
cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo "$as_me:14617: checking for ${cf_func}" >&5
+ echo "$as_me:22962: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-echo "${as_me:-configure}:14620: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:22965: testing ${cf_func} ..." 1>&5
if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14626,7 +22971,7 @@ else
eval cf_result='$ac_cv_func_'$cf_func
if test ".$cf_result" != ".no"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 14629 "configure"
+#line 22974 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -14644,13 +22989,14 @@ char * XCursesProgramName = "test";
#endif
int
-main ()
+main (void)
{
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
-if (foo + 1234 > 5678)
- ${cf_cv_main_return:-return}(foo);
+fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
+if (foo + 1234L > 5678L)
+ ${cf_cv_main_return:-return}(foo != 0);
#endif
;
@@ -14658,16 +23004,16 @@ if (foo + 1234 > 5678)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14661: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23007: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14664: \$? = $ac_status" >&5
+ echo "$as_me:23010: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14667: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23013: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14670: \$? = $ac_status" >&5
+ echo "$as_me:23016: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -14683,7 +23029,7 @@ fi
# use the computed/retrieved cache-value:
eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:14686: result: $cf_result" >&5
+ echo "$as_me:23032: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result != no; then
cat >>confdefs.h <<EOF
@@ -14693,13 +23039,13 @@ EOF
fi
done
-echo "$as_me:14696: checking for start_color" >&5
+echo "$as_me:23042: checking for start_color" >&5
echo $ECHO_N "checking for start_color... $ECHO_C" >&6
if test "${ac_cv_func_start_color+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14702 "configure"
+#line 23048 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char start_color (); below. */
@@ -14714,7 +23060,7 @@ char start_color ();
char (*f) ();
int
-main ()
+main (void)
{
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
@@ -14730,16 +23076,16 @@ f = start_color; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14733: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23079: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14736: \$? = $ac_status" >&5
+ echo "$as_me:23082: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14739: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23085: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14742: \$? = $ac_status" >&5
+ echo "$as_me:23088: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_start_color=yes
else
@@ -14749,7 +23095,7 @@ ac_cv_func_start_color=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:14752: result: $ac_cv_func_start_color" >&5
+echo "$as_me:23098: result: $ac_cv_func_start_color" >&5
echo "${ECHO_T}$ac_cv_func_start_color" >&6
if test $ac_cv_func_start_color = yes; then
@@ -14759,18 +23105,18 @@ EOF
fi
-echo "$as_me:14762: checking for chtype typedef" >&5
+echo "$as_me:23108: checking for chtype typedef" >&5
echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
if test "${cf_cv_chtype_decl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14769 "configure"
+#line 23115 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
chtype foo
;
@@ -14778,16 +23124,16 @@ chtype foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14781: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23127: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14784: \$? = $ac_status" >&5
+ echo "$as_me:23130: \$? = $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:23133: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14790: \$? = $ac_status" >&5
+ echo "$as_me:23136: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_decl=yes
else
@@ -14797,7 +23143,7 @@ cf_cv_chtype_decl=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14800: result: $cf_cv_chtype_decl" >&5
+echo "$as_me:23146: result: $cf_cv_chtype_decl" >&5
echo "${ECHO_T}$cf_cv_chtype_decl" >&6
if test $cf_cv_chtype_decl = yes ; then
@@ -14805,18 +23151,18 @@ cat >>confdefs.h <<\EOF
#define HAVE_TYPE_CHTYPE 1
EOF
- echo "$as_me:14808: checking if chtype is scalar or struct" >&5
+ echo "$as_me:23154: checking if chtype is scalar or struct" >&5
echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
if test "${cf_cv_chtype_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14815 "configure"
+#line 23161 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
chtype foo; long x = foo
;
@@ -14824,16 +23170,16 @@ chtype foo; long x = foo
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:14827: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23173: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:14830: \$? = $ac_status" >&5
+ echo "$as_me:23176: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:14833: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23179: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14836: \$? = $ac_status" >&5
+ echo "$as_me:23182: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_chtype_type=scalar
else
@@ -14843,7 +23189,7 @@ cf_cv_chtype_type=struct
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:14846: result: $cf_cv_chtype_type" >&5
+echo "$as_me:23192: result: $cf_cv_chtype_type" >&5
echo "${ECHO_T}$cf_cv_chtype_type" >&6
if test $cf_cv_chtype_type = scalar ; then
@@ -14854,7 +23200,7 @@ EOF
fi
fi
-echo "$as_me:14857: checking for wide alternate character set array" >&5
+echo "$as_me:23203: 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
@@ -14864,7 +23210,7 @@ else
for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
do
cat >conftest.$ac_ext <<_ACEOF
-#line 14867 "configure"
+#line 23213 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14872,7 +23218,7 @@ else
#endif
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
void *foo = &($name['k'])
;
@@ -14880,16 +23226,16 @@ void *foo = &($name['k'])
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14883: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23229: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14886: \$? = $ac_status" >&5
+ echo "$as_me:23232: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14889: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23235: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14892: \$? = $ac_status" >&5
+ echo "$as_me:23238: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_map=$name
break
@@ -14900,7 +23246,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
done
fi
-echo "$as_me:14903: result: $cf_cv_curses_wacs_map" >&5
+echo "$as_me:23249: result: $cf_cv_curses_wacs_map" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
test "$cf_cv_curses_wacs_map" != unknown &&
@@ -14908,7 +23254,7 @@ cat >>confdefs.h <<EOF
#define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
EOF
-echo "$as_me:14911: checking for wide alternate character constants" >&5
+echo "$as_me:23257: 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
@@ -14918,7 +23264,7 @@ cf_cv_curses_wacs_symbols=no
if test "$cf_cv_curses_wacs_map" != unknown
then
cat >conftest.$ac_ext <<_ACEOF
-#line 14921 "configure"
+#line 23267 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14926,7 +23272,7 @@ then
#endif
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
cchar_t *foo = WACS_PLUS;
$cf_cv_curses_wacs_map['k'] = *WACS_PLUS
@@ -14935,16 +23281,16 @@ cchar_t *foo = WACS_PLUS;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14938: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23284: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14941: \$? = $ac_status" >&5
+ echo "$as_me:23287: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14944: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23290: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14947: \$? = $ac_status" >&5
+ echo "$as_me:23293: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -14954,7 +23300,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
else
cat >conftest.$ac_ext <<_ACEOF
-#line 14957 "configure"
+#line 23303 "configure"
#include "confdefs.h"
#ifndef _XOPEN_SOURCE_EXTENDED
@@ -14962,7 +23308,7 @@ else
#endif
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
cchar_t *foo = WACS_PLUS
;
@@ -14970,16 +23316,16 @@ cchar_t *foo = WACS_PLUS
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:14973: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23319: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:14976: \$? = $ac_status" >&5
+ echo "$as_me:23322: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:14979: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23325: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:14982: \$? = $ac_status" >&5
+ echo "$as_me:23328: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_curses_wacs_symbols=yes
else
@@ -14990,7 +23336,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
fi
-echo "$as_me:14993: result: $cf_cv_curses_wacs_symbols" >&5
+echo "$as_me:23339: result: $cf_cv_curses_wacs_symbols" >&5
echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
test "$cf_cv_curses_wacs_symbols" != no &&
@@ -15003,10 +23349,10 @@ do
cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
- echo "$as_me:15006: checking for ${cf_func}" >&5
+ echo "$as_me:23352: checking for ${cf_func}" >&5
echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
-echo "${as_me:-configure}:15009: testing ${cf_func} ..." 1>&5
+echo "${as_me:-configure}:23355: testing ${cf_func} ..." 1>&5
if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -15015,7 +23361,7 @@ else
eval cf_result='$ac_cv_func_'$cf_func
if test ".$cf_result" != ".no"; then
cat >conftest.$ac_ext <<_ACEOF
-#line 15018 "configure"
+#line 23364 "configure"
#include "confdefs.h"
#ifdef HAVE_XCURSES
@@ -15033,13 +23379,14 @@ char * XCursesProgramName = "test";
#endif
int
-main ()
+main (void)
{
#ifndef ${cf_func}
long foo = (long)(&${cf_func});
-if (foo + 1234 > 5678)
- ${cf_cv_main_return:-return}(foo);
+fprintf(stderr, "testing linkage of $cf_func:%p\n", (void *)foo);
+if (foo + 1234L > 5678L)
+ ${cf_cv_main_return:-return}(foo != 0);
#endif
;
@@ -15047,16 +23394,16 @@ if (foo + 1234 > 5678)
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15050: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23397: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15053: \$? = $ac_status" >&5
+ echo "$as_me:23400: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15056: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23403: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15059: \$? = $ac_status" >&5
+ echo "$as_me:23406: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_result=yes
else
@@ -15072,7 +23419,7 @@ fi
# use the computed/retrieved cache-value:
eval 'cf_result=$cf_cv_func_'$cf_func
- echo "$as_me:15075: result: $cf_result" >&5
+ echo "$as_me:23422: result: $cf_result" >&5
echo "${ECHO_T}$cf_result" >&6
if test $cf_result != no; then
cat >>confdefs.h <<EOF
@@ -15084,14 +23431,14 @@ done
if test "x$cf_cv_func_wgetparent" != xyes
then
- echo "$as_me:15087: checking if WINDOW has _parent member" >&5
+ echo "$as_me:23434: checking if WINDOW has _parent member" >&5
echo $ECHO_N "checking if WINDOW has _parent member... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line 15090 "configure"
+#line 23437 "configure"
#include "confdefs.h"
#include <${cf_cv_ncurses_header:-curses.h}>
int
-main ()
+main (void)
{
WINDOW *p = stdscr->_parent
;
@@ -15099,16 +23446,16 @@ WINDOW *p = stdscr->_parent
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15102: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23449: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15105: \$? = $ac_status" >&5
+ echo "$as_me:23452: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15108: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23455: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15111: \$? = $ac_status" >&5
+ echo "$as_me:23458: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_window__parent=yes
else
@@ -15117,7 +23464,7 @@ cat conftest.$ac_ext >&5
cf_window__parent=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
- echo "$as_me:15120: result: $cf_window__parent" >&5
+ echo "$as_me:23467: result: $cf_window__parent" >&5
echo "${ECHO_T}$cf_window__parent" >&6
if test "$cf_window__parent" = yes
then
@@ -15132,23 +23479,23 @@ fi
for ac_header in sys/wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:15135: checking for $ac_header" >&5
+echo "$as_me:23482: 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 15141 "configure"
+#line 23488 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:15145: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:23492: \"$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:15151: \$? = $ac_status" >&5
+ echo "$as_me:23498: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15167,7 +23514,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:15170: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:23517: 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
@@ -15188,23 +23535,23 @@ else
for ac_header in wait.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:15191: checking for $ac_header" >&5
+echo "$as_me:23538: 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 15197 "configure"
+#line 23544 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:15201: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:23548: \"$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:15207: \$? = $ac_status" >&5
+ echo "$as_me:23554: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15223,7 +23570,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:15226: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:23573: 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
@@ -15236,23 +23583,23 @@ done
for ac_header in waitstatus.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:15239: checking for $ac_header" >&5
+echo "$as_me:23586: 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 15245 "configure"
+#line 23592 "configure"
#include "confdefs.h"
#include <$ac_header>
_ACEOF
-if { (eval echo "$as_me:15249: \"$ac_cpp conftest.$ac_ext\"") >&5
+if { (eval echo "$as_me:23596: \"$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:15255: \$? = $ac_status" >&5
+ echo "$as_me:23602: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
@@ -15271,7 +23618,7 @@ else
fi
rm -f conftest.err conftest.$ac_ext
fi
-echo "$as_me:15274: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "$as_me:23621: 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
@@ -15293,18 +23640,18 @@ cf_wait_headers="$cf_wait_headers
fi
fi
-echo "$as_me:15296: checking for union wait" >&5
+echo "$as_me:23643: checking for union wait" >&5
echo $ECHO_N "checking for union wait... $ECHO_C" >&6
if test "${cf_cv_type_unionwait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15303 "configure"
+#line 23650 "configure"
#include "confdefs.h"
$cf_wait_headers
int
-main ()
+main (void)
{
int x;
int y = WEXITSTATUS(x);
@@ -15316,16 +23663,16 @@ int x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15319: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23666: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15322: \$? = $ac_status" >&5
+ echo "$as_me:23669: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15325: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23672: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15328: \$? = $ac_status" >&5
+ echo "$as_me:23675: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=no
echo compiles ok w/o union wait 1>&5
@@ -15335,11 +23682,11 @@ else
cat conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line 15338 "configure"
+#line 23685 "configure"
#include "confdefs.h"
$cf_wait_headers
int
-main ()
+main (void)
{
union wait x;
#ifdef WEXITSTATUS
@@ -15355,16 +23702,16 @@ union wait x;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15358: \"$ac_link\"") >&5
+if { (eval echo "$as_me:23705: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15361: \$? = $ac_status" >&5
+ echo "$as_me:23708: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15364: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23711: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15367: \$? = $ac_status" >&5
+ echo "$as_me:23714: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_type_unionwait=yes
echo compiles ok with union wait and possibly macros too 1>&5
@@ -15379,7 +23726,7 @@ fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
fi
-echo "$as_me:15382: result: $cf_cv_type_unionwait" >&5
+echo "$as_me:23729: result: $cf_cv_type_unionwait" >&5
echo "${ECHO_T}$cf_cv_type_unionwait" >&6
test $cf_cv_type_unionwait = yes &&
cat >>confdefs.h <<\EOF
@@ -15388,18 +23735,18 @@ EOF
if test $cf_cv_type_unionwait = yes; then
- echo "$as_me:15391: checking if union wait can be used as wait-arg" >&5
+ echo "$as_me:23738: checking if union wait can be used as wait-arg" >&5
echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_wait+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15398 "configure"
+#line 23745 "configure"
#include "confdefs.h"
$cf_wait_headers
int
-main ()
+main (void)
{
union wait x; wait(&x)
;
@@ -15407,16 +23754,16 @@ union wait x; wait(&x)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15410: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23757: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15413: \$? = $ac_status" >&5
+ echo "$as_me:23760: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15416: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23763: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15419: \$? = $ac_status" >&5
+ echo "$as_me:23766: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_wait=yes
else
@@ -15428,25 +23775,25 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:15431: result: $cf_cv_arg_union_wait" >&5
+ echo "$as_me:23778: result: $cf_cv_arg_union_wait" >&5
echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
test $cf_cv_arg_union_wait = yes &&
cat >>confdefs.h <<\EOF
#define WAIT_USES_UNION 1
EOF
- echo "$as_me:15438: checking if union wait can be used as waitpid-arg" >&5
+ echo "$as_me:23785: checking if union wait can be used as waitpid-arg" >&5
echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
if test "${cf_cv_arg_union_waitpid+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line 15445 "configure"
+#line 23792 "configure"
#include "confdefs.h"
$cf_wait_headers
int
-main ()
+main (void)
{
union wait x; waitpid(0, &x, 0)
;
@@ -15454,16 +23801,16 @@ union wait x; waitpid(0, &x, 0)
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15457: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23804: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15460: \$? = $ac_status" >&5
+ echo "$as_me:23807: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15463: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23810: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15466: \$? = $ac_status" >&5
+ echo "$as_me:23813: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_arg_union_waitpid=yes
else
@@ -15475,7 +23822,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
- echo "$as_me:15478: result: $cf_cv_arg_union_waitpid" >&5
+ echo "$as_me:23825: result: $cf_cv_arg_union_waitpid" >&5
echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
test $cf_cv_arg_union_waitpid = yes &&
cat >>confdefs.h <<\EOF
@@ -15484,14 +23831,14 @@ EOF
fi
-echo "$as_me:15487: checking if we must include wchar.h to declare mbstate_t" >&5
+echo "$as_me:23834: 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 15494 "configure"
+#line 23841 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -15500,7 +23847,7 @@ cat >conftest.$ac_ext <<_ACEOF
#include <libutf8.h>
#endif
int
-main ()
+main (void)
{
mbstate_t state
;
@@ -15508,23 +23855,23 @@ mbstate_t state
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15511: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23858: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15514: \$? = $ac_status" >&5
+ echo "$as_me:23861: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15517: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23864: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15520: \$? = $ac_status" >&5
+ echo "$as_me:23867: \$? = $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 15527 "configure"
+#line 23874 "configure"
#include "confdefs.h"
#include <stdlib.h>
@@ -15534,7 +23881,7 @@ cat >conftest.$ac_ext <<_ACEOF
#include <libutf8.h>
#endif
int
-main ()
+main (void)
{
mbstate_t value
;
@@ -15542,16 +23889,16 @@ mbstate_t value
}
_ACEOF
rm -f conftest.$ac_objext
-if { (eval echo "$as_me:15545: \"$ac_compile\"") >&5
+if { (eval echo "$as_me:23892: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
- echo "$as_me:15548: \$? = $ac_status" >&5
+ echo "$as_me:23895: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:15551: \"$ac_try\"") >&5
+ { (eval echo "$as_me:23898: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15554: \$? = $ac_status" >&5
+ echo "$as_me:23901: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cf_cv_mbstate_t=yes
else
@@ -15563,7 +23910,7 @@ rm -f conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:15566: result: $cf_cv_mbstate_t" >&5
+echo "$as_me:23913: result: $cf_cv_mbstate_t" >&5
echo "${ECHO_T}$cf_cv_mbstate_t" >&6
if test "$cf_cv_mbstate_t" = yes ; then
@@ -15582,17 +23929,267 @@ EOF
fi
+for ac_header in \
+termio.h \
+termios.h \
+unistd.h \
+sys/ioctl.h \
+sys/termio.h \
+
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:23941: 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 23947 "configure"
+#include "confdefs.h"
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:23951: \"$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:23957: \$? = $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:23976: 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
+
+if test "$ac_cv_header_termios_h" = yes ; then
+ case "$CFLAGS $CPPFLAGS" in
+ (*-D_POSIX_SOURCE*)
+ termios_bad=dunno ;;
+ (*) termios_bad=maybe ;;
+ esac
+ if test "$termios_bad" = maybe ; then
+ echo "$as_me:23993: checking whether termios.h needs _POSIX_SOURCE" >&5
+echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line 23996 "configure"
+#include "confdefs.h"
+#include <termios.h>
+int
+main (void)
+{
+struct termios foo; int x = foo.c_iflag
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:24008: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:24011: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:24014: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:24017: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ termios_bad=no
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 24025 "configure"
+#include "confdefs.h"
+
+#define _POSIX_SOURCE
+#include <termios.h>
+int
+main (void)
+{
+struct termios foo; int x = foo.c_iflag
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:24039: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:24042: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:24045: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:24048: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ termios_bad=unknown
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+termios_bad=yes
+cat >>confdefs.h <<\EOF
+#define _POSIX_SOURCE 1
+EOF
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ echo "$as_me:24064: result: $termios_bad" >&5
+echo "${ECHO_T}$termios_bad" >&6
+ fi
+fi
+
+echo "$as_me:24069: checking declaration of size-change" >&5
+echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
+if test "${cf_cv_sizechange+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cf_cv_sizechange=unknown
+ cf_save_CPPFLAGS="$CPPFLAGS"
+
+for cf_opts in "" "NEED_PTEM_H"
+do
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test -n "$cf_opts"
+ then
+
+ test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
+ CPPFLAGS="${CPPFLAGS}-D$cf_opts"
+
+ fi
+ cat >conftest.$ac_ext <<_ACEOF
+#line 24090 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#else
+#ifdef HAVE_TERMIO_H
+#include <termio.h>
+#endif
+#endif
+
+#ifdef NEED_PTEM_H
+/* This is a workaround for SCO: they neglected to define struct winsize in
+ * termios.h -- it's only in termio.h and ptem.h
+ */
+#include <sys/stream.h>
+#include <sys/ptem.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+int
+main (void)
+{
+
+#ifdef TIOCGSIZE
+ struct ttysize win; /* SunOS 3.0... */
+ int y = win.ts_lines;
+ int x = win.ts_cols;
+#else
+#ifdef TIOCGWINSZ
+ struct winsize win; /* everything else */
+ int y = win.ws_row;
+ int x = win.ws_col;
+#else
+ no TIOCGSIZE or TIOCGWINSZ
+#endif /* TIOCGWINSZ */
+#endif /* TIOCGSIZE */
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:24136: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:24139: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:24142: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:24145: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_cv_sizechange=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_cv_sizechange=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+ CPPFLAGS="$cf_save_CPPFLAGS"
+ if test "$cf_cv_sizechange" = yes ; then
+ echo "size-change succeeded ($cf_opts)" >&5
+ test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
+ break
+ fi
+done
+
+fi
+echo "$as_me:24164: result: $cf_cv_sizechange" >&5
+echo "${ECHO_T}$cf_cv_sizechange" >&6
+if test "$cf_cv_sizechange" != no ; then
+
+cat >>confdefs.h <<\EOF
+#define HAVE_SIZECHANGE 1
+EOF
+
+ case $cf_cv_sizechange in
+ (NEED*)
+ cat >>confdefs.h <<EOF
+#define $cf_cv_sizechange 1
+EOF
+
+ ;;
+ esac
+fi
+
PACKAGE_PREFIX=DLG
PACKAGE_CONFIG=dlg_config.h
EXTRA_OUTPUT="$EXTRA_OUTPUT headers-sh:$srcdir/headers-sh.in"
cat >conftest.$ac_ext <<_ACEOF
-#line 15591 "configure"
+#line 24188 "configure"
#include "confdefs.h"
#include <locale.h>
int
-main ()
+main (void)
{
setlocale(LC_ALL, "")
;
@@ -15600,16 +24197,16 @@ setlocale(LC_ALL, "")
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15603: \"$ac_link\"") >&5
+if { (eval echo "$as_me:24200: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15606: \$? = $ac_status" >&5
+ echo "$as_me:24203: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15609: \"$ac_try\"") >&5
+ { (eval echo "$as_me:24206: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15612: \$? = $ac_status" >&5
+ echo "$as_me:24209: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cat >>confdefs.h <<\EOF
@@ -15622,38 +24219,91 @@ cat conftest.$ac_ext >&5
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-echo "$as_me:15625: checking if rpath-hack should be disabled" >&5
+echo "$as_me:24222: checking if runtime has nl_langinfo support for first weekday" >&5
+echo $ECHO_N "checking if runtime has nl_langinfo support for first weekday... $ECHO_C" >&6
+if test "${cf_nl_langinfo_1stday+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line 24229 "configure"
+#include "confdefs.h"
+
+#include <langinfo.h>
+#include <locale.h>
+
+int
+main (void)
+{
+
+ int first_weekday = nl_langinfo (_NL_TIME_FIRST_WEEKDAY)[0];
+ long week_1stday_l = (long) nl_langinfo (_NL_TIME_WEEK_1STDAY);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:24247: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:24250: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:24253: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:24256: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cf_nl_langinfo_1stday=yes
+
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+cf_nl_langinfo_1stday=no
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:24269: result: $cf_nl_langinfo_1stday" >&5
+echo "${ECHO_T}$cf_nl_langinfo_1stday" >&6
+test "x$cf_nl_langinfo_1stday" = xyes && cat >>confdefs.h <<\EOF
+#define HAVE_NL_LANGINFO_1STDAY 1
+EOF
+
+echo "$as_me:24275: 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
+ if test "$enableval" != "yes" ; then
cf_disable_rpath_hack=yes
- else
- cf_disable_rpath_hack=no
- fi
+ else
+ cf_disable_rpath_hack=no
+ fi
else
enableval=yes
- cf_disable_rpath_hack=no
+ cf_disable_rpath_hack=no
fi;
-echo "$as_me:15642: result: $cf_disable_rpath_hack" >&5
+echo "$as_me:24292: 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:15646: checking for updated LDFLAGS" >&5
+echo "$as_me:24296: 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:15649: result: maybe" >&5
+ echo "$as_me:24299: 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:15656: checking for $ac_word" >&5
+echo "$as_me:24306: 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
@@ -15668,7 +24318,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_cf_ldd_prog="$ac_prog"
-echo "$as_me:15671: found $ac_dir/$ac_word" >&5
+echo "$as_me:24321: found $ac_dir/$ac_word" >&5
break
done
@@ -15676,10 +24326,10 @@ fi
fi
cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
if test -n "$cf_ldd_prog"; then
- echo "$as_me:15679: result: $cf_ldd_prog" >&5
+ echo "$as_me:24329: result: $cf_ldd_prog" >&5
echo "${ECHO_T}$cf_ldd_prog" >&6
else
- echo "$as_me:15682: result: no" >&5
+ echo "$as_me:24332: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -15693,11 +24343,11 @@ test -n "$cf_ldd_prog" || cf_ldd_prog="no"
cf_rpath_oops=
cat >conftest.$ac_ext <<_ACEOF
-#line 15696 "configure"
+#line 24346 "configure"
#include "confdefs.h"
#include <stdio.h>
int
-main ()
+main (void)
{
printf("Hello");
;
@@ -15705,16 +24355,16 @@ printf("Hello");
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:15708: \"$ac_link\"") >&5
+if { (eval echo "$as_me:24358: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
- echo "$as_me:15711: \$? = $ac_status" >&5
+ echo "$as_me:24361: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:15714: \"$ac_try\"") >&5
+ { (eval echo "$as_me:24364: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
- echo "$as_me:15717: \$? = $ac_status" >&5
+ echo "$as_me:24367: \$? = $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`
@@ -15742,7 +24392,7 @@ rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
then
test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
-echo "${as_me:-configure}:15745: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
+echo "${as_me:-configure}:24395: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
break
@@ -15754,17 +24404,17 @@ echo "${as_me:-configure}:15745: testing ...adding -L$cf_rpath_dir/lib to LDFLAG
test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:15757: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:24407: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:15761: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:24411: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LDFLAGS
do
- case $cf_rpath_src in #(vi
- -L*) #(vi
+ case $cf_rpath_src in
+ (-L*)
# check if this refers to a directory which we will ignore
cf_rpath_skip=no
@@ -15795,7 +24445,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:15798: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:24448: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -15808,17 +24458,17 @@ LDFLAGS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
-echo "${as_me:-configure}:15811: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:24461: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:15815: testing ...checking LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:24465: testing ...checking LIBS $LIBS ..." 1>&5
cf_rpath_dst=
for cf_rpath_src in $LIBS
do
- case $cf_rpath_src in #(vi
- -L*) #(vi
+ case $cf_rpath_src in
+ (-L*)
# check if this refers to a directory which we will ignore
cf_rpath_skip=no
@@ -15849,7 +24499,7 @@ do
then
test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
-echo "${as_me:-configure}:15852: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
+echo "${as_me:-configure}:24502: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
fi
@@ -15862,14 +24512,14 @@ LIBS=$cf_rpath_dst
test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
-echo "${as_me:-configure}:15865: testing ...checked LIBS $LIBS ..." 1>&5
+echo "${as_me:-configure}:24515: testing ...checked LIBS $LIBS ..." 1>&5
test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
-echo "${as_me:-configure}:15869: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
+echo "${as_me:-configure}:24519: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
else
- echo "$as_me:15872: result: no" >&5
+ echo "$as_me:24522: result: no" >&5
echo "${ECHO_T}no" >&6
fi
@@ -15881,12 +24531,12 @@ cf_libroot=$cf_libname
if test "x$cf_cv_do_symlinks" = xyes
then
- case "x$cf_cv_shlib_version" in #(vi
- xrel) #(vi
+ case "x$cf_cv_shlib_version" in
+ (xrel)
cf_liblink="\${LIB_ABI_NAME}"
cf_libname="\${LIB_REL_NAME}"
;;
- xabi)
+ (xabi)
cf_liblink="\${LIB_REL_NAME}"
cf_libname="\${LIB_ABI_NAME}"
;;
@@ -15895,7 +24545,7 @@ fi
LIB_TARGET=$cf_libname
SET_SHLIB_VARS="# begin CF__DEFINE_SHLIB_VARS\\
-LIB_BASENAME = ${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
+LIB_BASENAME = \${LIB_PREFIX}\${LIB_ROOTNAME}\${LIB_SUFFIX}\\
LIB_REL_NAME = \${LIB_BASENAME}.\${REL_VERSION}\\
LIB_ABI_NAME = \${LIB_BASENAME}.\${ABI_VERSION}\\
LIB_TARGET = $LIB_TARGET\\
@@ -15983,7 +24633,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:15986: creating $CONFIG_STATUS" >&5
+{ echo "$as_me:24636: creating $CONFIG_STATUS" >&5
echo "$as_me: creating $CONFIG_STATUS" >&6;}
cat >$CONFIG_STATUS <<_ACEOF
#! $SHELL
@@ -16115,7 +24765,7 @@ EOF
cat >>$CONFIG_STATUS <<EOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.52.20121002,
+configured by $0, generated by GNU Autoconf 2.52.20170501,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
@@ -16159,7 +24809,7 @@ cat >>$CONFIG_STATUS <<\EOF
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
- { { echo "$as_me:16162: error: ambiguous option: $1
+ { { echo "$as_me:24812: 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;}
@@ -16178,7 +24828,7 @@ Try \`$0 --help' for more information." >&2;}
ac_need_defaults=false;;
# This is an error.
- -*) { { echo "$as_me:16181: error: unrecognized option: $1
+ -*) { { echo "$as_me:24831: 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;}
@@ -16197,7 +24847,7 @@ cat >&5 << _ACEOF
## Running config.status. ##
## ----------------------- ##
-This file was extended by $as_me 2.52.20121002, executed with
+This file was extended by $as_me 2.52.20170501, executed with
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
@@ -16237,7 +24887,7 @@ do
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
"dlg_config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS dlg_config.h:config.hin" ;;
- *) { { echo "$as_me:16240: error: invalid argument: $ac_config_target" >&5
+ *) { { echo "$as_me:24890: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
@@ -16339,8 +24989,14 @@ s,@INSTALL_DATA@,$INSTALL_DATA,;t t
s,@LN_S@,$LN_S,;t t
s,@LINT@,$LINT,;t t
s,@LINT_OPTS@,$LINT_OPTS,;t t
+s,@GROFF_PATH@,$GROFF_PATH,;t t
+s,@NROFF_PATH@,$NROFF_PATH,;t t
+s,@TBL_PATH@,$TBL_PATH,;t t
+s,@GROFF_NOTE@,$GROFF_NOTE,;t t
+s,@NROFF_NOTE@,$NROFF_NOTE,;t t
s,@AR@,$AR,;t t
s,@ac_ct_AR@,$ac_ct_AR,;t t
+s,@ARFLAGS@,$ARFLAGS,;t t
s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
s,@CTAGS@,$CTAGS,;t t
s,@ETAGS@,$ETAGS,;t t
@@ -16373,6 +25029,10 @@ s,@CFG_ROOTNAME@,$CFG_ROOTNAME,;t t
s,@HDR_ROOTNAME@,$HDR_ROOTNAME,;t t
s,@LIB_ROOTNAME@,$LIB_ROOTNAME,;t t
s,@SUB_INC@,$SUB_INC,;t t
+s,@cf_man2html@,$cf_man2html,;t t
+s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
+s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
+s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
s,@CONFIG_H@,$CONFIG_H,;t t
s,@ALLOCA@,$ALLOCA,;t t
s,@GLIBC21@,$GLIBC21,;t t
@@ -16404,6 +25064,7 @@ s,@GT_NO@,$GT_NO,;t t
s,@LINK_PREFIX@,$LINK_PREFIX,;t t
s,@ABI_VERSION@,$ABI_VERSION,;t t
s,@REL_VERSION@,$REL_VERSION,;t t
+s,@shlibdir@,$shlibdir,;t t
s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
@@ -16419,6 +25080,8 @@ s,@LIB_COMPILE@,$LIB_COMPILE,;t t
s,@LIB_LINK@,$LIB_LINK,;t t
s,@LIB_INSTALL@,$LIB_INSTALL,;t t
s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
+s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
+s,@MAKE_DLLS@,$MAKE_DLLS,;t t
s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
@@ -16431,6 +25094,9 @@ s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
s,@INSTALL_LIB@,$INSTALL_LIB,;t t
s,@RPATH_LIST@,$RPATH_LIST,;t t
+s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
+s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
+s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
s,@DFT_LIB_SUFFIX@,$DFT_LIB_SUFFIX,;t t
s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
@@ -16441,6 +25107,12 @@ s,@MAKE_SHARED@,$MAKE_SHARED,;t t
s,@MAKE_STATIC@,$MAKE_STATIC,;t t
s,@NCURSES_CONFIG@,$NCURSES_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,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
s,@EXTRAOBJS@,$EXTRAOBJS,;t t
s,@PACKAGE_PREFIX@,$PACKAGE_PREFIX,;t t
s,@PACKAGE_CONFIG@,$PACKAGE_CONFIG,;t t
@@ -16475,10 +25147,28 @@ EOF
# These are the two extra sed commands mentioned above.
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ # It is possible to make a multiline substitution using escaped newlines.
+ # Ensure that we do not split the substitution between script fragments.
+ ac_BEG=$ac_end
+ ac_END=`expr $ac_end + $ac_max_sed_lines`
+ sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
+ if test -s $tmp/subs.next; then
+ grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
+ if test ! -s $tmp/subs.edit; then
+ grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
+ if test ! -s $tmp/subs.edit; then
+ if test $ac_beg -gt 1; then
+ ac_end=`expr $ac_end - 1`
+ continue
+ fi
+ fi
+ fi
+ fi
+
if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
@@ -16561,7 +25251,7 @@ done; }
esac
if test x"$ac_file" != x-; then
- { echo "$as_me:16564: creating $ac_file" >&5
+ { echo "$as_me:25254: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
@@ -16579,7 +25269,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:16582: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:25272: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -16592,7 +25282,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16595: error: cannot find input file: $f" >&5
+ { { echo "$as_me:25285: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -16608,7 +25298,7 @@ cat >>$CONFIG_STATUS <<\EOF
if test -n "$ac_seen"; then
ac_used=`grep '@datarootdir@' $ac_item`
if test -z "$ac_used"; then
- { echo "$as_me:16611: WARNING: datarootdir was used implicitly but not set:
+ { echo "$as_me:25301: 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;}
@@ -16617,7 +25307,7 @@ $ac_seen" >&2;}
fi
ac_seen=`grep '${datarootdir}' $ac_item`
if test -n "$ac_seen"; then
- { echo "$as_me:16620: WARNING: datarootdir was used explicitly but not set:
+ { echo "$as_me:25310: 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;}
@@ -16654,7 +25344,7 @@ s,@INSTALL@,$ac_INSTALL,;t t
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:16657: WARNING: Variable $ac_name is used but was not set:
+ { echo "$as_me:25347: 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;}
@@ -16665,7 +25355,7 @@ $ac_seen" >&2;}
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:16668: WARNING: Some variables may not be substituted:
+ { echo "$as_me:25358: WARNING: Some variables may not be substituted:
$ac_seen" >&5
echo "$as_me: WARNING: Some variables may not be substituted:
$ac_seen" >&2;}
@@ -16714,7 +25404,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:16717: creating $ac_file" >&5
+ test x"$ac_file" != x- && { echo "$as_me:25407: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
@@ -16725,7 +25415,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:16728: error: cannot find input file: $f" >&5
+ test -f "$f" || { { echo "$as_me:25418: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
@@ -16738,7 +25428,7 @@ echo "$as_me: error: cannot find input file: $f" >&2;}
echo $srcdir/$f
else
# /dev/null tree
- { { echo "$as_me:16741: error: cannot find input file: $f" >&5
+ { { echo "$as_me:25431: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
@@ -16796,7 +25486,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:16799: $ac_file is unchanged" >&5
+ { echo "$as_me:25489: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
@@ -16848,38 +25538,39 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
case $ac_dest in
default-1 ) for ac_file in $CONFIG_FILES; do
- # Support "outfile[:infile[:infile...]]"
- case "$ac_file" in
- *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- esac
-
- # PO directories have a Makefile.in generated from Makefile.inn.
- case "$ac_file" in */[Mm]akefile.in)
- # Adjust a relative srcdir.
- ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
- ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
- ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
- ac_base=`basename $ac_file .in`
- # In autoconf-2.13 it is called $ac_given_srcdir.
- # In autoconf-2.50 it is called $srcdir.
- test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
-
- case "$ac_given_srcdir" in
- .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
- /*) top_srcdir="$ac_given_srcdir" ;;
- *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
esac
- if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
- rm -f "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
- sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
- test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
- sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
- fi
- ;;
- esac
- done ;;
+ # PO directories have a Makefile.in generated from Makefile.inn.
+ case "$ac_file" in
+ (*/[Mm]akefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ ac_base=`basename $ac_file .in`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+
+ case "$ac_given_srcdir" in
+ (.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ (/*) top_srcdir="$ac_given_srcdir" ;;
+ (*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
+ sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
+ fi
+ ;;
+ esac
+ done ;;
default )
cf_libname=\${LIB_BASENAME}
@@ -16888,12 +25579,12 @@ cf_libroot=$cf_libname
if test "x$cf_cv_do_symlinks" = xyes
then
- case "x$cf_cv_shlib_version" in #(vi
- xrel) #(vi
+ case "x$cf_cv_shlib_version" in
+ (xrel)
cf_liblink="\${LIB_ABI_NAME}"
cf_libname="\${LIB_REL_NAME}"
;;
- xabi)
+ (xabi)
cf_liblink="\${LIB_REL_NAME}"
cf_libname="\${LIB_ABI_NAME}"
;;
@@ -16902,10 +25593,10 @@ fi
LIB_TARGET=$cf_libname
case x$LIB_MODEL in
-xlibtool|xshared) #(vi
+(xlibtool|xshared)
cf_libdeps="\${LIBS} \${LDFLAGS}"
;;
-x*)
+(x*)
cf_libdeps=
;;
esac
@@ -16959,7 +25650,7 @@ fi
if test x$LIB_MODEL = xshared
then
cat >>makefile <<CF_EOF
- - test -z "\$(DESTDIR)" && /sbin/ldconfig
+ - \$(SHELL) -c "if test -z "\$(DESTDIR)" ; then /sbin/ldconfig; fi"
CF_EOF
fi
diff --git a/contrib/dialog/configure.in b/contrib/dialog/configure.in
index 75ce24438012..fb6633c1a11f 100644
--- a/contrib/dialog/configure.in
+++ b/contrib/dialog/configure.in
@@ -1,7 +1,7 @@
-dnl $Id: configure.in,v 1.79 2013/09/02 14:02:57 tom Exp $
+dnl $Id: configure.in,v 1.92 2018/06/18 08:59:49 tom Exp $
dnl Process this file with autoconf to produce a configure script.
dnl ---------------------------------------------------------------------------
-dnl Copyright 1999-2011,2012 -- Thomas E. Dickey
+dnl Copyright 1999-2016,2018 -- Thomas E. Dickey
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the
@@ -27,7 +27,7 @@ dnl holders shall not be used in advertising or otherwise to promote the
dnl sale, use or other dealings in this Software without prior written
dnl authorization.
dnl ---------------------------------------------------------------------------
-AC_PREREQ(2.52.20011201)
+AC_PREREQ(2.52.20170501)
AC_INIT(dialog.h)
AC_CONFIG_HEADER(dlg_config.h:config.hin)
@@ -47,8 +47,11 @@ AC_PROG_INSTALL
CF_PROG_LN_S
CF_PROG_LINT
+CF_PROG_GROFF
+test -z "$GROFF_NOTE" && NROFF_NOTE=
+
dnl needed for CF_WITH_LIBTOOL
-AC_CHECK_TOOL(AR, ar, ar)
+CF_AR_FLAGS
CF_MAKEFLAGS
CF_MAKE_TAGS
@@ -59,6 +62,7 @@ CF_LIB_PREFIX
CF_XOPEN_SOURCE
CF_LARGEFILE
+CF_WITH_INSTALL_PREFIX
CF_WITH_WARNINGS
CF_PKG_CONFIG
@@ -92,6 +96,8 @@ AC_ARG_ENABLE(header-subdir,
AC_MSG_RESULT($SUB_INC)
AC_SUBST(SUB_INC)
+CF_WITH_MAN2HTML
+
dnl
dnl Checks for libraries.
dnl
@@ -114,23 +120,8 @@ CF_WITH_CURSES_DIR
CF_ENABLE_RPATH
-use_ncurses=no
-AC_ARG_WITH(ncurses,
- [ --with-ncurses compile/link with ncurses library],
- [use_ncurses=ncurses])
-AC_ARG_WITH(ncursesw,
- [ --with-ncursesw compile/link with wide-char ncurses library],
- [use_ncurses=ncursesw])
-if test $use_ncurses != no ; then
- cf_wide_curses=yes
- if test $use_ncurses = ncursesw ; then
- CF_UTF8_LIB
- fi
- CF_NCURSES_CONFIG($use_ncurses)
-else
- cf_wide_curses=no
- CF_CURSES_CONFIG
-fi
+CF_WITH_NCURSES_ETC
+CF_WIDEC_CURSES
cf_all_widgets=yes
CF_ARG_MSG_ENABLE([if you want extra dialogs],
@@ -183,7 +174,7 @@ CF_ARG_MSG_ENABLE([if you want the mixedform dialog],
mixedform,
[ --disable-mixedform do not include the mixedform dialog],
[EXTRAOBJS="$EXTRAOBJS mixedform\$o"
- AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,$cf_all_widgets)
+ AC_DEFINE(HAVE_DLG_MIXEDFORM,1,[Define to 1 to include the mixedform dialog])],,${enable_form:=$cf_all_widgets})
CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
mixedgauge,
@@ -194,7 +185,7 @@ CF_ARG_MSG_ENABLE([if you want the mixedgauge dialog],
CF_ARG_MSG_ENABLE([if you want the wide-curses features],
widec,
[ --enable-widec enable wide-curses features],
- [AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_wide_curses)
+ [AC_DEFINE(USE_WIDE_CURSES,1,[Define to 1 to enable wide-curses features])],,$cf_cv_widec_curses)
AC_SUBST(EXTRAOBJS)
@@ -204,7 +195,7 @@ dnl
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_DIRENT
-AC_CHECK_HEADERS(search.h unctrl.h unistd.h)
+AC_CHECK_HEADERS(search.h stdint.h unistd.h)
CF_CURSES_TERM_H
dnl
@@ -226,6 +217,7 @@ wcsrtombs \
wcstombs \
wctob \
wctomb \
+mktime \
)
CF_CURSES_FUNCS(\
@@ -255,10 +247,12 @@ CF_CURSES_WACS_SYMBOLS
CF_CURSES_WGETPARENT
CF_FUNC_WAIT
CF_MBSTATE_T
+CF_SIZECHANGE
CF_HEADERS_SH(DLG,dlg_config.h)
AC_TRY_LINK([#include <locale.h>],[setlocale(LC_ALL, "")],[AC_DEFINE(HAVE_SETLOCALE,1,[Define to 1 if locale feature can be enabled])])
+CF_NL_LANGINFO_1STDAY
CF_DISABLE_RPATH_HACK
diff --git a/contrib/dialog/demo.pl b/contrib/dialog/demo.pl
new file mode 100755
index 000000000000..8f1a37e7b379
--- /dev/null
+++ b/contrib/dialog/demo.pl
@@ -0,0 +1,337 @@
+#!/usr/bin/env perl
+# $Id: demo.pl,v 1.23 2018/06/12 21:39:44 tom Exp $
+################################################################################
+# Copyright 2018 Thomas E. Dickey
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License, version 2.1
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to
+# Free Software Foundation, Inc.
+# 51 Franklin St., Fifth Floor
+# Boston, MA 02110, USA.
+################################################################################
+# This demonstration is provided solely to exercise the sample Perl wrapper for
+# dialog which is included in its source-code. See libui-dialog-perl for a
+# more comprehensive binding.
+#
+# TODO: modify dialog.pl to use $DIALOG environment variable, drive from GetOpts here
+# TODO: eliminate constant $scr_lines in dialog.pl
+
+use warnings;
+use strict;
+use diagnostics;
+
+use FindBin qw($Bin $Script);
+use lib "$Bin";
+
+require "dialog.pl";
+dialog->import('@dialog_result');
+our @dialog_result;
+
+sub tput($$) {
+ my $name = shift;
+ my $default = shift;
+ my $value = `tput "$name"`;
+ chomp $value;
+ $value = $default unless ( $value =~ /^[0-9]+$/ );
+ return $value;
+}
+
+sub napms($) {
+ my $msecs = shift;
+ select( undef, undef, undef, $msecs * 0.001 );
+}
+
+sub show_results($$) {
+ my $title = shift;
+ my $width = shift;
+ &rhs_msgbox(
+ $title,
+ sprintf(
+ "Resulting text:\\n %s", join( '\\n ', @dialog_result )
+ ),
+ $width
+ );
+}
+
+sub doit() {
+ my $status = 1;
+ my $RHS_CLEAR = "clear";
+ my $RHS_TEXTBOX = "textbox";
+ my $RHS_MSGBOX = "msgbox";
+ my $RHS_INFOBOX = "infobox";
+ my $RHS_YESNO = "yesno";
+ my $RHS_GAUGE = "gauge";
+ my $RHS_INPUTBOX = "inputbox";
+ my $RHS_MENU = "menu";
+ my $RHS_MENUL = "menul";
+ my $RHS_MENUA = "menua";
+ my $RHS_CHECKLIST = "checklist";
+ my $RHS_CHECKLISTL = "checklistl";
+ my $RHS_CHECKLISTA = "checklista";
+ my $RHS_RADIOLIST = "radiolist";
+
+ my @demo_2col = qw(
+ This that
+ is has
+ a this
+ 2-column quoted
+ menu "tag".
+ );
+ my @demo_3col;
+ my @demo_tags;
+ my %demo_hash;
+
+ for ( my $s = 0, my $t = 0 ; $s <= $#demo_2col ; $s += 2, $t += 3 ) {
+ my $d = $s / 2;
+ my $c1 = $demo_2col[$s];
+ my $c2 = $demo_2col[ $s + 1 ];
+ $demo_3col[$t] = $c1;
+ $demo_3col[ $t + 1 ] = $c2;
+ $demo_3col[ $t + 2 ] = ( $c1 =~ /2/ ) ? 1 : 0;
+ $demo_tags[$d] = $c1;
+ $demo_tags[$d] =~ s/2/1/;
+ $demo_tags[ $d + ( $#demo_2col + 1 ) / 2 ] = $c2;
+ $demo_hash{ sprintf( "%d %s", $d, $c1 ) } = $c2;
+ }
+
+ while ( $status > 0 ) {
+ my $lines = &tput( "lines", 24 );
+ my $cols = &tput( "cols", 80 );
+ my $maxcols = $cols - 4;
+ my $mincols = ( $cols > 8 ) ? 8 : $cols;
+ my $midcols = int( ( $cols * 3 ) / 4 );
+
+ @dialog_result = ();
+ $status = &rhs_menu(
+ "My title", "My message",
+ 0, 14,
+ $RHS_CLEAR, "clear and exit",
+ $RHS_TEXTBOX, "text-box of this script",
+ $RHS_MSGBOX, "informational-message, OK button",
+ $RHS_INFOBOX, "informational-message, no button",
+ $RHS_YESNO, "message with Yes/No buttons",
+ $RHS_GAUGE, "message with progress-gauge",
+ $RHS_INPUTBOX, "input-box",
+ $RHS_MENU, "menu, with tags and description",
+ $RHS_MENUL, "menu, using only tags",
+ $RHS_MENUA, "alphabetically sorted menu",
+ $RHS_CHECKLIST, "check-list with tags and description",
+ $RHS_CHECKLISTL, "check-list using only tags",
+ $RHS_CHECKLISTA, "alphabetically sorted check-list",
+ $RHS_RADIOLIST, "list of radio-buttons"
+ );
+ if ( $status > 0 and $#dialog_result == 0 ) {
+
+ my $testcase = $dialog_result[0];
+ if ( $testcase eq $RHS_CLEAR ) {
+ &rhs_clear;
+ last;
+ }
+ elsif ( $testcase eq $RHS_TEXTBOX ) {
+ &rhs_textbox( "This script", "$Script", 0, 0 );
+ }
+ elsif ( $testcase eq $RHS_MSGBOX ) {
+ my $msg =
+ "This is a demonstration script.\\n"
+ . "This should be the second line,\\n"
+ . "and this should be the third line,";
+ &rhs_msgbox( "A message", $msg,
+ int( ( length($msg) + 3 ) / 3 ) + 3 );
+ }
+ elsif ( $testcase eq $RHS_INFOBOX ) {
+ my $msg =
+ "This is a fairly long line of text, used to"
+ . " show how dialog can be used to wrap lines to fit in"
+ . " screens with different width. The text will start wide,"
+ . " then get narrower, showing a new infobox for each width"
+ . " before going back up to the full width of the terminal.";
+ my $wide = $maxcols;
+ while ( $wide > $mincols ) {
+ &rhs_infobox( "Info-box", $msg, $wide-- );
+ &napms(50);
+ }
+ while ( $wide < $maxcols ) {
+ &rhs_infobox( "Info-box", $msg, ++$wide );
+ &napms(50);
+ }
+ &rhs_msgbox( "Info-end", $msg, $wide );
+ }
+ elsif ( $testcase eq $RHS_YESNO ) {
+ if (
+ &rhs_yesno(
+ "Yes/no",
+ "Should \"dialog --yesno\" return \"1\" on \"yes\""
+ . " to simplify (some) shell scripts?",
+ $cols / 2
+ )
+ )
+ {
+ &rhs_msgbox(
+ "Explanation",
+ "No, a successful program exits with "
+ . "\"0\" (EXIT_SUCCESS)",
+ $cols / 2
+ );
+ }
+ else {
+ &rhs_msgbox(
+ "Explanation",
+ "Shell scripts assume that \"exit\ 0\" is successful;"
+ . " Perl is different.",
+ $cols / 2
+ );
+ }
+ }
+ elsif ( $testcase eq $RHS_GAUGE ) {
+ my $pct = 0;
+ my $sec = 10;
+ &rhs_gauge(
+ "My gauge",
+ "Show progress (or lack of it)",
+ $midcols * 3, $pct
+ );
+ while ( $pct < 100 ) {
+ $pct++;
+ &napms($sec);
+ $sec *= 1.04;
+ &rhs_update_gauge($pct);
+ }
+ $pct = 99;
+ &rhs_update_gauge_and_message( "This will go faster", $pct );
+ while ( $pct > 0 ) {
+ $pct--;
+ &napms($sec);
+ $sec /= 1.05;
+ &rhs_update_gauge($pct);
+ }
+ &napms(1000);
+ &rhs_stop_gauge;
+ }
+ elsif ( $testcase eq $RHS_INPUTBOX ) {
+ if (
+ &rhs_inputbox(
+ "My inputbox", "This demonstrates the inputbox",
+ $maxcols, ""
+ )
+ )
+ {
+ &show_results( "My inputbox", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_MENU ) {
+ if (
+ &rhs_menu(
+ (
+ "A menu",
+ "This menu uses \"tag\" values and descriptions:",
+ $midcols, ( $#demo_2col + 1 ) / 2
+ ),
+ @demo_2col
+ )
+ )
+ {
+ &show_results( "My menu", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_MENUL ) {
+ if (
+ &rhs_menul(
+ (
+ "A menu", "This menu uses only the \"tag\" values:",
+ $midcols, $#demo_tags + 1
+ ),
+ @demo_tags
+ )
+ )
+ {
+ &show_results( "My long-menu", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_MENUA ) {
+ if (
+ &rhs_menua(
+ "A menu", "This menu uses the sorted keys from a hash:",
+ $midcols, %demo_hash
+ )
+ )
+ {
+ &show_results( "My alpha-menu", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_CHECKLIST ) {
+ if (
+ &rhs_checklist(
+ (
+ "A checklist",
+ "This checklist uses \"tag\" values"
+ . " and descriptions:",
+ $midcols,
+ ( $#demo_3col + 1 ) / 3
+ ),
+ @demo_3col
+ )
+ )
+ {
+ &show_results( "My checklist", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_CHECKLISTL ) {
+ if (
+ &rhs_checklistl(
+ (
+ "A checklist",
+ "This checklist uses only the \"tag\" values:",
+ $midcols, $#demo_tags + 1
+ ),
+ @demo_tags
+ )
+ )
+ {
+ &show_results( "My long-checklist", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_CHECKLISTA ) {
+ if (
+ &rhs_checklista(
+ "A checklist",
+ "This checklist uses the sorted keys from a hash:",
+ $midcols, %demo_hash
+ )
+ )
+ {
+ &show_results( "My alpha-checklist", $midcols );
+ }
+ }
+ elsif ( $testcase eq $RHS_RADIOLIST ) {
+ if (
+ &rhs_radiolist(
+ (
+ "A radiolist",
+ "This radiolist uses \"tag\" values"
+ . " and descriptions:",
+ $midcols,
+ ( $#demo_3col + 1 ) / 3
+ ),
+ @demo_3col
+ )
+ )
+ {
+ &show_results( "My radiolist", $midcols );
+ }
+ }
+ }
+ }
+}
+
+&doit;
+
+1;
diff --git a/contrib/dialog/dialog.1 b/contrib/dialog/dialog.1
index 50bb02bb4fb2..49f304ba2131 100644
--- a/contrib/dialog/dialog.1
+++ b/contrib/dialog/dialog.1
@@ -1,6 +1,6 @@
'\" t
-.\" $Id: dialog.1,v 1.167 2013/09/02 17:38:36 tom Exp $
-.\" Copyright 2005-2012,2013 Thomas E. Dickey
+.\" $Id: dialog.1,v 1.205 2018/06/19 00:26:13 tom Exp $
+.\" Copyright 2005-2017,2018 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -31,17 +31,24 @@
.RS +7
.PP
.nf
+.ft CW
..
.de Ee
.fi
+.ft R
.RE
..
.\" Bulleted paragraph
.de bP
-.IP \(bu 4
+.ie n .IP \(bu 4
+.el .IP \(bu 2
..
+.ie \n(.g .ds `` \(lq
+.el .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el .ds '' ''
.
-.TH \*D 1 "" "$Date: 2013/09/02 17:38:36 $"
+.TH \*D 1 "" "$Date: 2018/06/19 00:26:13 $"
.SH NAME
dialog \- display dialog boxes from shell scripts
.SH SYNOPSIS
@@ -56,7 +63,7 @@ dialog \- display dialog boxes from shell scripts
\fIbox-options\fP
.SH DESCRIPTION
\fB\*L\fP
-is a program that will let you to present a variety of questions or
+is a program that will let you present a variety of questions or
display messages using dialog boxes from a shell script.
These types of dialog boxes are implemented
(though not all are necessarily compiled into \fB\*p\fR):
@@ -135,6 +142,7 @@ the file named as its value.
.RS
.B \*p --file \fIparameterfile
.RE
+.PP
Blanks not within double-quotes are discarded
(use backslashes to quote single characters).
The result is inserted into the command-line,
@@ -143,8 +151,22 @@ Interpretation of the command-line resumes from that point.
If \fIparameterfile\fP begins with "&", \fB\*p\fP
interprets the following text as a file descriptor number
rather than a filename.
+.PP
+Most widgets accept \fIheight\fP and \fIwidth\fP parameters,
+which can be used to automatically size the widget to accommodate
+multi-line message \fIprompt\fP values:
+.bP
+If the parameter is negative,
+\fB\*l\fP uses the screen's size.
+.bP
+If the parameter is zero,
+\fB\*l\fP uses minimum size for the widget to display the \fIprompt\fP
+and data.
+.bP
+Otherwise, \fB\*l\fP uses the given size for the widget.
.
.SS \fBCommon Options\fP
+Most of the common options are reset before processing each widget.
.
.IP "\fB--ascii-lines
Rather than draw graphics lines around boxes,
@@ -166,7 +188,7 @@ string to be displayed on the backdrop, at the top of the screen.
Specify the position of the upper left corner of a dialog box on the screen.
.
.IP "\fB--cancel-label \fIstring"
-Override the label used for "Cancel" buttons.
+Override the label used for \*(``Cancel\*('' buttons.
.
.IP "\fB--clear"
Clears the widget screen, keeping only the screen_color background.
@@ -179,36 +201,36 @@ To compare the effects, use these:
.ES
All three widgets visible, staircase effect, ordered 1,2,3:
.Ex
-\*p \\
- --begin 2 2 --yesno "" 0 0 \\
- --and-widget --begin 4 4 --yesno "" 0 0 \\
+\*p \e
+ --begin 2 2 --yesno "" 0 0 \e
+ --and-widget --begin 4 4 --yesno "" 0 0 \e
--and-widget --begin 6 6 --yesno "" 0 0
.Ee
.
.ES
Only the last widget is left visible:
.Ex
-\*p \\
- --clear --begin 2 2 --yesno "" 0 0 \\
- --and-widget --clear --begin 4 4 --yesno "" 0 0 \\
+\*p \e
+ --clear --begin 2 2 --yesno "" 0 0 \e
+ --and-widget --clear --begin 4 4 --yesno "" 0 0 \e
--and-widget --begin 6 6 --yesno "" 0 0
.Ee
.
.ES
All three widgets visible, staircase effect, ordered 3,2,1:
.Ex
-\*p \\
- --keep-window --begin 2 2 --yesno "" 0 0 \\
- --and-widget --keep-window --begin 4 4 --yesno "" 0 0 \\
+\*p \e
+ --keep-window --begin 2 2 --yesno "" 0 0 \e
+ --and-widget --keep-window --begin 4 4 --yesno "" 0 0 \e
--and-widget --begin 6 6 --yesno "" 0 0
.Ee
.
.ES
First and third widget visible, staircase effect, ordered 3,1:
.Ex
-\*p \\
- --keep-window --begin 2 2 --yesno "" 0 0 \\
- --and-widget --clear --begin 4 4 --yesno "" 0 0 \\
+\*p \e
+ --keep-window --begin 2 2 --yesno "" 0 0 \e
+ --and-widget --clear --begin 4 4 --yesno "" 0 0 \e
--and-widget --begin 6 6 --yesno "" 0 0
.Ee
.IP
@@ -217,10 +239,12 @@ cursor home after the dialog program has exited, use the \fBclear\fR\ (1)
command.
.
.IP "\fB--colors"
-Interpret embedded "\\Z" sequences in the dialog text
+Interpret embedded "\eZ" sequences in the dialog text
by the following character,
which tells \fB\*p\fP to set colors or video attributes:
-0 through 7 are the ANSI used in curses:
+.RS
+.bP
+0 through 7 are the ANSI color numbers used in curses:
black,
red,
green,
@@ -229,12 +253,18 @@ blue,
magenta,
cyan and
white respectively.
+.bP
Bold is set by 'b', reset by 'B'.
+.bP
Reverse is set by 'r', reset by 'R'.
+.bP
Underline is set by 'u', reset by 'U'.
-The settings are cumulative, e.g., "\\Zb\\Z1" makes the following text
+.bP
+The settings are cumulative, e.g., "\eZb\eZ1" makes the following text
bold (perhaps bright) red.
-Restore normal settings with "\\Zn".
+.bP
+Restore normal settings with "\eZn".
+.RE
.
.IP "\fB--column-separator \fIstring"
Tell \fB\*p\fP to split data for radio/checkboxes and menus on the
@@ -242,7 +272,8 @@ occurrences of the given string, and to align the split data into columns.
.
.IP "\fB--cr-wrap"
Interpret embedded newlines in the dialog text as a newline on the screen.
-Otherwise, \fB\*p\fR will only wrap lines where needed to fit inside the text box.
+Otherwise, \fB\*p\fR will only wrap lines
+where needed to fit inside the text box.
.IP
Even though you can control line breaks with this,
\fB\*L\fR will still wrap any lines that are too long for the width of the box.
@@ -250,7 +281,16 @@ Without cr-wrap, the layout of your text may be formatted to look nice
in the source code of your script without affecting the way it will
look in the dialog.
.IP
-See also the "\fB--no-collapse\fP" and "\fB--trim\fP" options.
+The \fIcr-wrap\fP feature is implemented subject to these conditions:
+.RS
+.bP
+the string contains \*(``\en\*('' and the \fB--no-nl-expand\fP option is
+not used, or
+.bP
+the \fB--trim\fP option is used.
+.RE
+.IP
+For more information, see \fBWhitespace Options\fP.
.
.IP "\fB--create-rc \fIfile"
When
@@ -271,11 +311,13 @@ Make the default value of the
\fByes/no\fP
box a
.BR No .
-Likewise, make the default button of widgets that provide "OK" and "Cancel"
-a \fBCancel\fP.
+Likewise, treat the default button of widgets that provide
+\*(``OK\*('' and \*(``Cancel\*(''
+as a \fICancel\fP.
If "\fB--nocancel\fP" or "\fB--visit-items\fP" are given
those options overrides this,
-making the default button always "Yes" (internally the same as "OK").
+making the default button always \*(``Yes\*(''
+(internally the same as \*(``OK\*('').
.
.IP "\fB--default-button \fIstring"
Set the default (preselected) button in a widget.
@@ -301,14 +343,14 @@ Set the default item in a checklist, form or menu box.
Normally the first item in the box is the default.
.
.IP "\fB--exit-label \fIstring"
-Override the label used for "EXIT" buttons.
+Override the label used for \*(``EXIT\*('' buttons.
.
.IP "\fB--extra-button"
-Show an extra button, between "OK" and "Cancel" buttons.
+Show an extra button, between \*(``OK\*('' and \*(``Cancel\*('' buttons.
.
.IP "\fB--extra-label \fIstring"
-Override the label used for "Extra" buttons.
-Note: for inputmenu widgets, this defaults to "Rename".
+Override the label used for \*(``Extra\*('' buttons.
+Note: for inputmenu widgets, this defaults to \*(``Rename\*(''.
.
.IP "\fB--help"
Prints the help message to the standard output and exits.
@@ -316,11 +358,14 @@ The help message is also printed if no options are given,
or if an unrecognized option is given.
.
.IP "\fB--help-button"
-Show a help-button after "OK" and "Cancel" buttons,
-i.e., in checklist, radiolist and menu boxes.
+Show a help-button after \*(``OK\*('' and \*(``Cancel\*('' buttons,
+e.g., in checklist, radiolist and menu boxes,
+and other widgets which have an \*(``OK\*('' button,
+whether or not the \*(``Cancel\*('' button is used.
.IP
On exit, the return status will indicate that the Help button was pressed.
-\fB\*L\fP will also write a message to its output after the token "HELP":
+\fB\*L\fP will also write a message to its output
+after the token \*(``HELP\*('':
.RS
.bP
If "\fB--item-help\fR" is also given, the item-help text will be written.
@@ -333,12 +378,12 @@ You can use the \fB--help-tags\fP option and/or set the DIALOG_ITEM_HELP
environment variable to modify these messages and exit-status.
.
.IP "\fB--help-label \fIstring"
-Override the label used for "Help" buttons.
+Override the label used for \*(``Help\*('' buttons.
.
.IP "\fB--help-status"
If the help-button is selected,
writes the checklist, radiolist or form information
-after the item-help "HELP" information.
+after the item-help \*(``HELP\*('' information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.
@@ -371,6 +416,12 @@ if your script must work in that type of environment.
Makes the password widget friendlier but less secure,
by echoing asterisks for each character.
.
+.IP "\fB--iso-week"
+Set the starting point for the week-number
+shown in the "\fB--calendar\fP" option
+according to ISO-8601, which starts numbering
+with the first week which includes a Thursday in January.
+.
.IP "\fB--item-help"
Interpret the tags data for checklist, radiolist and menu boxes
adding a column which is displayed in the bottom line of the
@@ -409,7 +460,7 @@ If not specified, the limit is 2048.
.
.IP "\fB--no-cancel"
.IP "\fB--nocancel"
-Suppress the "Cancel" button in checklist, inputbox and menu box modes.
+Suppress the \*(``Cancel\*('' button in checklist, inputbox and menu box modes.
A script can still test if the user pressed the ESC key to cancel to quit.
.
.IP "\fB--no-collapse"
@@ -418,12 +469,24 @@ spaces to a single space for text which is displayed in a message boxes, etc.
Use this option to disable that feature.
Note that \fB\*p\fR will still wrap text,
subject to the "\fB--cr-wrap\fR" and "\fB--trim\fR" options.
+.IP
+The \fIno-collapse\fP feature is implemented subject to these conditions:
+.RS
+.bP
+the string contains \*(``\en\*('' and the \fB--no-nl-expand\fP option is
+not used, or
+.bP
+the \fB--trim\fP option is not used.
+.RE
+.IP
+For more information, see \fBWhitespace Options\fP.
.
.IP "\fB--no-items"
Some widgets (checklist, inputmenu, radiolist, menu) display a list
-with two columns (a "tag" and "item", i.e., "description").
+with two columns (a \*(``tag\*('' and \*(``item\*('',
+i.e., \*(``description\*('').
This option tells \fB\*p\fP to read shorter rows,
-omitting the "item" part of the list.
+omitting the \*(``item\*('' part of the list.
This is occasionally useful, e.g., if the tags provide enough information.
.IP
See also \fB--no-tags\fP.
@@ -439,7 +502,7 @@ printing its process id to \fB\*p\fP's output.
SIGHUP is disabled for the background process.
.
.IP "\fB--no-label \fIstring"
-Override the label used for "No" buttons.
+Override the label used for \*(``No\*('' buttons.
.
.IP "\fB--no-lines
Rather than draw lines around boxes, draw spaces in the same place.
@@ -449,20 +512,26 @@ See also "\fB--ascii-lines\fR".
Do not enable the mouse.
.
.IP "\fB--no-nl-expand
-Do not convert "\\n" substrings of the message/prompt text into
+Do not convert "\en" substrings of the message/prompt text into
literal newlines.
+.IP
+The \fIno-nl-expand\fP feature is used only if
+the string contains \*(``\en\*('' so that there is something to convert.
+.IP
+For more information, see \fBWhitespace Options\fP.
.
.IP "\fB--no-ok"
.IP "\fB--nook"
-Suppress the "OK" button in checklist, inputbox and menu box modes.
-A script can still test if the user pressed the "Enter" key to accept the data.
+Suppress the \*(``OK\*('' button in checklist, inputbox and menu box modes.
+A script can still test if the user pressed
+the \*(``Enter\*('' key to accept the data.
.
.IP "\fB--no-shadow"
Suppress shadows that would be drawn to the right and bottom of each dialog box.
.
.IP "\fB--no-tags"
Some widgets (checklist, inputmenu, radiolist, menu) display a list
-with two columns (a "tag" and "description").
+with two columns (a \*(``tag\*('' and \*(``description\*('').
The tag is useful for scripting, but may not help the user.
The \fB--no-tags\fP option (from Xdialog) may be used to suppress the
column of tags from the display.
@@ -479,7 +548,7 @@ the first character of the description.
In either case, the matchable character is highlighted.
.
.IP "\fB--ok-label \fIstring"
-Override the label used for "OK" buttons.
+Override the label used for \*(``OK\*('' buttons.
.
.IP "\fB--output-fd \fIfd"
Direct output to the given file descriptor.
@@ -487,9 +556,9 @@ Most \fB\*p\fR scripts write to the standard error,
but error messages may also be written there, depending on your script.
.
.IP "\fB--separator \fIstring"
-.IP "\fB--output-separator\fIstring"
+.IP "\fB--output-separator \fIstring"
Specify a string that will separate the output on \fB\*p\fP's output from
-checklists, rather than a newline (for --separate-output) or a space.
+checklists, rather than a newline (for \fB--separate-output\fP) or a space.
This applies to other widgets such as forms and editboxes which normally
use a newline.
.
@@ -499,7 +568,26 @@ to \fB\*p\fP's output.
This may be used alone, without other options.
.
.IP "\fB--print-size"
-Prints the size of each dialog box to \fB\*p\fP's output.
+Prints the size of each dialog box to \fB\*p\fP's output
+when the box is initialized.
+.
+.IP "\fB--print-text-only \fIstring [ height [ width ] ]"
+Prints the string as it would be wrapped in a message box
+to \fB\*p\fP's output.
+.IP
+Because the optional \fIheight\fP and \fIwidth\fP default to zero,
+if they are omitted, \fB\*p\fP autosizes according to the screen dimensions.
+.
+.IP "\fB--print-text-size \fIstring [ height [ width ] ]"
+Prints the size of the string as it would be wrapped in a message box,
+to \fB\*p\fP's output,
+as
+.Ex
+height width
+.Ee
+.IP
+Because the optional \fIheight\fP and \fIwidth\fP parameters default to zero,
+if they are omitted, \fB\*p\fP autosizes according to the screen dimensions.
.
.IP "\fB--print-version"
Prints \fB\*p\fR's version to \fB\*p\fP's output.
@@ -510,6 +598,11 @@ It does not cause \fBdialog\fP to exit by itself.
Normally \fB\*p\fP quotes the strings returned by checklist's
as well as the item-help text.
Use this option to quote all string results.
+.IP "\fB--reorder"
+By default, the buildlist widget uses the same order for the output (right)
+list as for the input (left).
+Use this option to tell \fB\*p\fP to use the order
+in which a user adds selections to the output list.
.
.IP "\fB--scrollbar"
For widgets holding a scrollable set of data,
@@ -517,7 +610,8 @@ draw a scrollbar on its right-margin.
This does not respond to the mouse.
.
.IP "\fB--separate-output"
-For checklist widgets, output result one line at a time, with no quoting.
+For certain widgets (buildlist, checklist, treeview),
+output result one line at a time, with no quoting.
This facilitates parsing by another program.
.
.IP "\fB--separate-widget \fIstring"
@@ -563,6 +657,7 @@ Depending on the platform and your environment, that may fail.
Convert each tab character to one or more spaces
(for the \fBtextbox\fP widget; otherwise to a single space).
Otherwise, tabs are rendered according to the curses library's interpretation.
+The \fB--no-collapse\fP option disables tab expansion.
.
.IP "\fB--tab-len \fIn"
Specify the number of spaces that a tab character occupies if the
@@ -583,7 +678,7 @@ A timeout of zero seconds is ignored.
.IP
This option is ignored by the "\fB--pause\fP" widget.
It is also overridden if the background "\fB--tailboxbg\fP" option is used
-to setup multiple concurrent widgets.
+to set up multiple concurrent widgets.
.
.IP "\fB--title \fItitle"
Specifies a
@@ -596,15 +691,40 @@ keystrokes and other information to the given file.
If \fBdialog\fP reads a configure file, it is logged as well.
Piped input to the \fIgauge\fP widget is logged.
Use control/T to log a picture of the current dialog window.
-.PP
+.IP
The \fB\*p\fR program handles some command-line parameters specially,
and removes them from the parameter list as they are processed.
For example, if the first option is \fB--trace\fP,
then that is processed (and removed) before \fB\*p\fR initializes the display.
.
+.IP "\fB--week-start \fIday"
+sets the starting day for the week, used in the "\fB--calendar\fP" option.
+The \fIday\fP parameter can be
+.RS
+.bP
+a number (0 to 6, Sunday through Saturday using POSIX) or
+.bP
+the special value \*(``locale\*('' (this works with systems using glibc,
+providing an extension to the \fBlocale\fP command,
+the \fBfirst_weekday\fP value).
+.bP
+a string matching one of the abbreviations for the day of the week
+shown in the \fBcalendar\fP widget, e.g., \*(``Mo\*('' for \*(``Monday\*(''.
+.RE
+.
.IP "\fB--trim"
eliminate leading blanks,
trim literal newlines and repeated blanks from message text.
+.IP
+The \fItrim\fP feature is implemented subject to these conditions:
+.RS
+.bP
+the string does not contain \*(``\en\*('' or
+.bP
+the \fB--no-nl-expand\fP option is used.
+.RE
+.IP
+For more information, see \fBWhitespace Options\fP.
.
.IP
See also the "\fB--cr-wrap\fR" and "\fB--no-collapse\fR" options.
@@ -624,31 +744,31 @@ Abbreviations (the first letter of the tag) apply to the list items.
If you tab to the button row, abbreviations apply to the buttons.
.
.IP "\fB--yes-label \fIstring"
-Override the label used for "Yes" buttons.
+Override the label used for \*(``Yes\*('' buttons.
.
.\" ************************************************************************
.SS Box Options
All dialog boxes have at least three parameters:
-.TP 5
+.TP 7
\fItext\fP
the caption or contents of the box.
-.TP 5
+.TP 7
\fIheight\fP
the height of the dialog box.
-.TP 5
+.TP 7
\fIwidth\fP
the width of the dialog box.
.PP
Other parameters depend on the box type.
.
.
-.IP "\fB--buildlist \fItext height width \fR[ \fItag item status \fR] \fI..."
+.IP "\fB--buildlist \fItext height width list-height \fR[ \fItag item status \fR] \fI..."
A \fBbuildlist\fP dialog displays two lists, side-by-side.
The list on the left shows unselected items.
The list on the right shows selected items.
As items are selected or unselected, they move between the lists.
.IP
-Use a carriage return or the "OK" button to accept the current value
+Use a carriage return or the \*(``OK\*('' button to accept the current value
in the selected-window and exit.
The results are written using the order displayed in the selected-window.
.IP
@@ -666,7 +786,7 @@ If \fB--visit-items\fP is given,
tab-traversal uses four states (Left/Right/OK/Cancel).
.RE
.IP
-Whether or not \fB--visit--items\fP is given,
+Whether or not \fB--visit-items\fP is given,
it is possible to move the highlight between the two lists using
the default "^" (left-column) and "$" (right-column) keys.
.IP
@@ -675,7 +795,8 @@ strings of those entries that are turned on
will be printed on \fB\*p\fP's output.
.IP
If the "\fB--separate-output\fP" option is not given,
-the strings will be quoted as needed to make it simple for scripts to separate them.
+the strings will be quoted as needed
+to make it simple for scripts to separate them.
By default, this uses double-quotes.
See the "\fB--single-quoted\fP" option, which modifies the quoting behavior.
.
@@ -686,7 +807,7 @@ month, day and year in separately adjustable windows.
If the values for day, month or year are missing or negative,
the current date's corresponding values are used.
You can increment or decrement any of those using the
-left-, up-, right- and down-arrows.
+left-, up-, right-, and down-arrows.
Use vi-style h, j, k and l for moving around the array of days in a month.
Use tab or backtab to move between windows.
If the year is given as zero, the current date is used as an initial value.
@@ -696,12 +817,8 @@ The format can be overridden using the \fB--date-format\fP option.
.
.
.IP "\fB--checklist \fItext height width list-height \fR[ \fItag item status \fR] \fI..."
-A
-\fBchecklist\fP
-box is similar to a
-\fBmenu\fP
-box; there are
-multiple entries presented in the form of a menu.
+A \fBchecklist\fP box is similar to a \fBmenu\fP box;
+there are multiple entries presented in the form of a menu.
Another difference is
that you can indicate which entry is currently selected, by setting its
.IR status " to " on "."
@@ -715,14 +832,16 @@ strings of those entries that are turned on
will be printed on \fB\*p\fP's output.
.IP
If the "\fB--separate-output\fP" option is not given,
-the strings will be quoted as needed to make it simple for scripts to separate them.
+the strings will be quoted as needed
+to make it simple for scripts to separate them.
By default, this uses double-quotes.
See the "\fB--single-quoted\fP" option, which modifies the quoting behavior.
.
.
.IP "\fB--dselect \fIfilepath height width\fR"
-The directory-selection dialog displays a text-entry window in which you can type
-a directory, and above that a windows with directory names.
+The directory-selection dialog displays a text-entry window
+in which you can type a directory,
+and above that a windows with directory names.
.IP
Here
\fBfilepath\fP
@@ -740,10 +859,11 @@ Typing any printable characters switches focus to the text-entry window,
entering that character as well as scrolling the directory
window to the closest match.
.IP
-Use a carriage return or the "OK" button to accept the current value
+Use a carriage return or the \*(``OK\*('' button to accept the current value
in the text-entry window and exit.
.IP
-On exit, the contents of the text-entry window are written to \fB\*p\fP's output.
+On exit, the contents of the text-entry window are written
+to \fB\*p\fP's output.
.
.IP "\fB--editbox \fIfilepath height width\fR"
The edit-box dialog displays a copy of the file.
@@ -752,8 +872,10 @@ the \fIbackspace\fP, \fIdelete\fP and cursor keys
to correct typing errors.
It also recognizes pageup/pagedown.
Unlike the \fB--inputbox\fP,
-you must tab to the "OK" or "Cancel" buttons to close the dialog.
-Pressing the "Enter" key within the box will split the corresponding line.
+you must tab to the \*(``OK\*('' or \*(``Cancel\*('' buttons
+to close the dialog.
+Pressing the \*(``Enter\*('' key within the box will split
+the corresponding line.
.IP
On exit, the contents of the edit window are written to \fB\*p\fP's output.
.
@@ -789,9 +911,9 @@ is not written out.
.
.
.IP "\fB--fselect \fIfilepath height width\fR"
-The \fBfselect\fP (file-selection) dialog displays a text-entry window in which you can type
-a filename (or directory), and above that two windows with directory
-names and filenames.
+The \fBfselect\fP (file-selection) dialog displays a text-entry window
+in which you can type a filename (or directory),
+and above that two windows with directory names and filenames.
.IP
Here
\fBfilepath\fP
@@ -813,10 +935,11 @@ Typing the space character forces \fB\*p\fP to complete the current
name (up to the point where there may be a match against more than one
entry).
.IP
-Use a carriage return or the "OK" button to accept the current value
+Use a carriage return or the \*(``OK\*('' button to accept the current value
in the text-entry window and exit.
.IP
-On exit, the contents of the text-entry window are written to \fB\*p\fP's output.
+On exit, the contents of the text-entry window are written
+to \fB\*p\fP's output.
.
.
.IP "\fB--gauge \fItext height width [percent]\fR"
@@ -828,9 +951,9 @@ New percentages are read from
standard input, one integer per line.
The meter is updated
to reflect each new percentage.
-If the standard input reads the string "XXX",
+If the standard input reads the string \*(``XXX\*('',
then the first line following is taken as an integer percentage,
-then subsequent lines up to another "XXX" are used for a new prompt.
+then subsequent lines up to another \*(``XXX\*('' are used for a new prompt.
The gauge exits when EOF is reached on the standard input.
.IP
The \fIpercent\fR value denotes the initial percentage shown in the meter.
@@ -852,8 +975,7 @@ the user that some operations are carrying on that may require some
time to finish.
.IP
On exit, no text is written to \fB\*p\fP's output.
-Only an "OK" button is provided for input,
-but an ESC exit status may be returned.
+An OK exit status is returned.
.
.
.IP "\fB--inputbox \fItext height width [init]"
@@ -881,7 +1003,7 @@ There are only a few differences between them:
The entries are not automatically centered but left adjusted.
.TP
2.
-An extra button (called \fIRename\fP) is implied to rename
+An extra button (called \fIRename\/\fP) is implied to rename
the current item when it is pressed.
.TP
3.
@@ -907,9 +1029,8 @@ menu.
The \fIitem\fP is a short description of the option that the entry represents.
The user can move between the menu entries by pressing the
cursor keys, the first letter of the \fItag\fP
-as a hot-key, or the number keys
-.IR 1-9 ". There are"
-\fImenu-height\fP
+as a hot-key, or the number keys \fI1\fP through \fI9\fP.
+There are \fImenu-height\fP
entries displayed in the menu at one time, but the menu will be
scrolled if there are more entries than that.
.IP
@@ -935,12 +1056,10 @@ readonly, e.g., a label.
.RE
.
.IP "\fB--mixedgauge \fItext height width percent \fR[ \fItag1 item1 \fR] \fI..."
-A
-\fBmixedgauge\fP
-box displays a meter along the bottom of the box.
+A \fBmixedgauge\fP box displays a meter along the bottom of the box.
The meter indicates the percentage.
.IP
-It also displays a list of the \fItag\fP- and \fIitem\fP-values at the
+It also displays a list of the \fItag\/\fP- and \fIitem\/\fP-values at the
top of the box.
See \*l(3) for the tag values.
.IP
@@ -967,7 +1086,7 @@ provided that the underlying curses implementation is capable enough.
In this case, a percentage is shown in the base of the widget.
.IP
On exit, no text is written to \fB\*p\fP's output.
-Only an "OK" button is provided for input,
+Only an \*(``OK\*('' button is provided for input,
but an ESC exit status may be returned.
.
.IP "\fB--pause \fItext height width seconds\fR"
@@ -985,12 +1104,12 @@ A \fBpassword\fP box is similar to an input box,
except that the text the user enters is not displayed.
This is useful when prompting for passwords or other
sensitive information.
-Be aware that if anything is passed in "init", it
+Be aware that if anything is passed in \*(``init\*('', it
will be visible in the system's process table to casual snoopers.
Also, it
is very confusing to the user to provide them with a default password they
cannot see.
-For these reasons, using "init" is highly discouraged.
+For these reasons, using \*(``init\*('' is highly discouraged.
See "\fB--insecure\fP" if you do not care about your password.
.IP
On exit, the input string will be printed on \fB\*p\fP's output.
@@ -1044,7 +1163,7 @@ a) rather than displaying the contents of a file,
it displays the piped output of a command and
.TP 3
b) it will exit when it reaches the end of the file
-(there is no "OK" button).
+(there is no \*(``OK\*('' button).
.RE
.IP
If three parameters are given, it displays the text under the title,
@@ -1053,11 +1172,7 @@ If only two parameters are given, this text is omitted.
.
.
.IP "\fB--radiolist \fItext height width list-height \fR [ \fItag item status \fR] \fI..."
-A
-\fBradiolist\fP
-box is similar to a
-\fBmenu\fP
-box.
+A \fBradiolist\fP box is similar to a \fBmenu\fP box.
The only difference is
that you can indicate which entry is currently selected, by setting its
.IR status " to " on "."
@@ -1071,12 +1186,12 @@ Scroll left/right using vi-style 'h' and 'l', or arrow-keys.
A '0' resets the scrolling.
.IP
On exit, no text is written to \fB\*p\fP's output.
-Only an "OK" button is provided for input,
+Only an \*(``OK\*('' button is provided for input,
but an ESC exit status may be returned.
.
.
.nf
-.IP "\fB--rangebox \fItext height width list-height min-value max-value default-value"
+.IP "\fB--rangebox \fItext height width min-value max-value default-value"
.fi
Allow the user to select from a range of values, e.g., using a slider.
The dialog shows the current value as a bar (like the gauge dialog).
@@ -1113,7 +1228,7 @@ A '0' resets the scrolling.
.IP
\*L treats the background task specially if there are other
widgets (\fB--and-widget\fP) on the screen concurrently.
-Until those widgets are closed (e.g., an "OK"),
+Until those widgets are closed (e.g., an \*(``OK\*(''),
\fB\*p\fP will perform all of the tailboxbg widgets in the same process,
polling for updates.
You may use a tab to traverse between the widgets on the screen,
@@ -1123,7 +1238,7 @@ into the background, and prints its process id if the "\fB--no-kill\fP" option
is given.
.IP
On exit, no text is written to \fB\*p\fP's output.
-Only an "EXIT" button is provided for input,
+Only an \*(``EXIT\*('' button is provided for input,
but an ESC exit status may be returned.
.IP
NOTE:
@@ -1145,7 +1260,7 @@ and \fIHOME/END\fR keys available on most keyboards.
If the lines are too long to be displayed in the box,
the \fILEFT/RIGHT\fP
keys can be used to scroll the text region horizontally.
-You may also use vi-style keys h, j, k, l in place of the cursor keys,
+You may also use vi-style keys h, j, k, and l in place of the cursor keys,
and B or N in place of the page-up and page-down keys.
Scroll up/down using vi-style 'k' and 'j', or arrow-keys.
Scroll left/right using vi-style 'h' and 'l', or arrow-keys.
@@ -1154,7 +1269,7 @@ For more convenience,
vi-style forward and backward searching functions are also provided.
.IP
On exit, no text is written to \fB\*p\fP's output.
-Only an "EXIT" button is provided for input,
+Only an \*(``EXIT\*('' button is provided for input,
but an ESC exit status may be returned.
.
.
@@ -1174,7 +1289,7 @@ The format can be overridden using the \fB--time-format\fP option.
Display data organized as a tree.
Each group of data contains a tag,
the text to display for the item,
-its status ("on" or "off")
+its status (\*(``on\*('' or \*(``off\*('')
and the depth of the item in the tree.
.IP
Only one item can be selected (like the \fBradiolist\fP).
@@ -1195,10 +1310,9 @@ appropriate places.
The
\fItext\fP
string can also contain the sub-string
-.I
-"\en"
+.RI """" \en """"
or newline characters
-\fI`\en'\fP
+.RI ` \en '
to control line breaking explicitly.
This dialog box is useful for
asking questions that require the user to answer either yes or no.
@@ -1210,10 +1324,11 @@ button, in which the user can switch between by pressing the
.IR TAB " key."
.IP
On exit, no text is written to \fB\*p\fP's output.
-In addition to the "Yes" and "No" exit codes (see DIAGNOSTICS)
+In addition to the \*(``Yes\*('' and \*(``No\*('' exit codes (see DIAGNOSTICS)
an ESC exit status may be returned.
.IP
-The codes used for "Yes" and "No" match those used for "OK" and "Cancel",
+The codes used for \*(``Yes\*('' and \*(``No\*(''
+match those used for \*(``OK\*('' and \*(``Cancel\*('',
internally no distinction is made.
.
.\" ************************************************************************
@@ -1228,13 +1343,143 @@ when the separate processes of the tailboxbg widget would repaint the screen.
Beep after a user has completed a widget by pressing one of the buttons.
.
.\" ************************************************************************
+.SS "Whitespace Options"
+.PP
+These options can be used to transform whitespace (space, tab, newline)
+as dialog reads the script:
+.RS
+.BR --cr-wrap ,
+.BR --no-collapse ,
+.BR --no-nl-expand ", and"
+.B --trim
+.RE
+.PP
+The options are not independent:
+.bP
+\fB\*L\fP checks if the script contains at least one \*(``\en\*(''
+and (unless \fB--no-nl-expand\fP is set) will ignore the
+\fB--no-collapse\fP and \fB--trim\fP options.
+.bP
+After checking for \*(``\en\*('' and the \fB--no-nl-expand\fP option,
+\fB\*l\fP handles the \fB--trim\fP option.
+.IP
+If the \fB--trim\fP option takes effect,
+then \fB\*l\fP ignores \fB--no-collapse\fP.
+It changes sequences of tabs, spaces
+(and newlines unless \fB-cr-wrap\fP is set) to a single space.
+.bP
+If neither the \*(``\en\*('' or \fB--trim\fP cases apply,
+\fB\*l\fP checks \fB--no-collapse\fP to decide whether to reduce
+sequences of tabs and spaces to a single space.
+.IP
+In this case, \fB\*l\fP ignores \fB-cr-wrap\fP and does not modify newlines.
+.PP
+Taking those dependencies into account,
+here is a table summarizing the behavior
+for the various combinations of options.
+The table assumes that the script contains at least one \*(``\en\*(''
+when the \fB--no-nl-expand\fP option is not set.
+.na
+.TS
+center tab(/) ;
+lB lB lB lB lB
+lB lB lB lB lB
+_ _ _ _ _
+lw5 lw5 lw5 lw5 lw30.
+cr-/no-/no-/trim/Result
+wrap/collapse/nl-expand
+no/no/no/no/T{
+Convert tab to space.
+Convert newline to space.
+Convert \*(``\en\*('' to newline.
+T}
+no/no/no/yes/T{
+Convert tab to space.
+Convert newline to space.
+Convert \*(``\en\*('' to newline.
+T}
+no/no/yes/no/T{
+Convert tab to space.
+Do not convert newline to space.
+Convert multiple-space to single.
+Show \*(``\en\*('' literally.
+T}
+no/no/yes/yes/T{
+Convert tab to space.
+Convert multiple-space to single.
+Convert newline to space.
+Show \*(``\en\*('' literally.
+T}
+no/yes/no/no/T{
+Convert newline to space.
+Convert \*(``\en\*('' to newline.
+T}
+no/yes/no/yes/T{
+Convert newline to space.
+Convert \*(``\en\*('' to newline.
+T}
+no/yes/yes/no/T{
+Do not convert newline to space.
+Do not reduce multiple blanks.
+Show \*(``\en\*('' literally.
+T}
+no/yes/yes/yes/T{
+Convert multiple-space to single.
+Convert newline to space.
+Show \*(``\en\*('' literally.
+T}
+yes/no/no/no/T{
+Convert tab to space.
+Wrap on newline.
+Convert \*(``\en\*('' to newline.
+T}
+yes/no/no/yes/T{
+Convert tab to space.
+Wrap on newline.
+Convert \*(``\en\*('' to newline.
+T}
+yes/no/yes/no/T{
+Convert tab to space.
+Do not convert newline to space.
+Convert multiple-space to single.
+Show \*(``\en\*('' literally.
+T}
+yes/no/yes/yes/T{
+Convert tab to space.
+Convert multiple-space to single.
+Wrap on newline.
+Show \*(``\en\*('' literally.
+T}
+yes/yes/no/no/T{
+Wrap on newline.
+Convert \*(``\en\*('' to newline.
+T}
+yes/yes/no/yes/T{
+Wrap on newline.
+Convert \*(``\en\*('' to newline.
+T}
+yes/yes/yes/no/T{
+Do not convert newline to space.
+Do not reduce multiple blanks.
+Show \*(``\en\*('' literally.
+T}
+yes/yes/yes/yes/T{
+Convert multiple-space to single.
+Wrap on newline.
+Show \*(``\en\*('' literally.
+T}
+.TE
+.ad
+.
+.\" ************************************************************************
.SH "RUN-TIME CONFIGURATION"
.TP 4
1.
Create a sample configuration file by typing:
.LP
-.in +1i
-"\*p --create-rc <file>"
+.Ex
+\*p --create-rc \fIfile\fP
+.Ee
.TP 4
2.
At start,
@@ -1280,14 +1525,14 @@ Specific widget bindings override the "*" bindings.
User-defined bindings override the built-in bindings.
.PP
The \fIcurses_key\fP can be any of the names derived from
-\fBcurses.h\fP, e.g., "HELP" from "KEY_HELP".
+\fBcurses.h\fP, e.g., \*(``HELP\*('' from \*(``KEY_HELP\*(''.
\fB\*L\fP also recognizes ANSI control characters such as "^A", "^?",
as well as C1-controls such as "~A" and "~?".
Finally, it allows any single character to be escaped with a backslash.
.PP
\fB\*L\fP's internal keycode names correspond to the
\fBDLG_KEYS_ENUM\fP type in
-\fBdlg_keys.h\fP, e.g., "HELP" from "DLGK_HELP".
+\fBdlg_keys.h\fP, e.g., \*(``HELP\*('' from \*(``DLGK_HELP\*(''.
.SS Widget Names
.PP
Some widgets (such as the formbox) have an area where fields can be edited.
@@ -1296,9 +1541,10 @@ may have separate keybindings from the main widget
because the subwindows are registered using a different name.
.TS
center tab(/) ;
-l l l
+lI lI lI
+_ _ _
l l l .
-\fIWidget\fR/\fIWindow name\fR/\fISubwindow Name\fR
+Widget/Window name/Subwindow Name
calendar/calendar
checklist/checklist
editbox/editbox/editbox2
@@ -1314,6 +1560,7 @@ tailbox/tailbox
textbox/textbox/searchbox
timebox/timebox
yesno/yesno
+_
.TE
.PP
Some widgets are actually other widgets,
@@ -1321,9 +1568,10 @@ using internal settings to modify the behavior.
Those use the same widget name as the actual widget:
.TS
center tab(/) ;
-l l
+lI lI
+_ _
l l .
-\fIWidget\fR/\fIActual Widget\fR
+Widget/Actual Widget
dselect/fselect
infobox/msgbox
inputmenu/menu
@@ -1333,6 +1581,7 @@ passwordform/form
prgbox/progressbox
programbox/progressbox
tailboxbg/tailbox
+_
.TE
.SS Built-in Bindings
This manual page does not list the key bindings for each widget,
@@ -1352,8 +1601,8 @@ widgets, e.g., when using multiple tailboxbg widgets.
Some users may wish to use the same key for traversing within the
editing part as for traversing between buttons.
The form widget is written to support this sort of redefinition of
-the keys, by adding a special group in <code>dlgk_keys.h</code>
-for "form" (left/right/next/prev).
+the keys, by adding a special group in \fBdlgk_keys.h\fP
+for \*(``form\*('' (left/right/next/prev).
Here is an example binding demonstrating how to do this:
.Ex
bindkey formfield TAB form_NEXT
@@ -1398,16 +1647,16 @@ to use.
\fBDIALOG_OK\fP
Define any of these variables to change the exit code on
Cancel (1),
-error (-1),
+error (\-1),
ESC (255),
Extra (3),
Help (2),
Help with \fB--item-help\fP (2),
or OK (0).
-Normally shell scripts cannot distinguish between -1 and 255.
+Normally shell scripts cannot distinguish between \-1 and 255.
.TP 15
\fBDIALOG_TTY\fP
-Set this variable to "1" to provide compatibility with older versions
+Set this variable to \*(``1\*('' to provide compatibility with older versions
of \fB\*p\fP which assumed that if the script redirects the standard output,
that the "\fB--stdout\fP" option was given.
.SH FILES
@@ -1433,19 +1682,19 @@ button is pressed (DIALOG_CANCEL).
.TP 5
2
if the
-.BR Help
+.B Help
button is pressed (DIALOG_HELP),
.br
except as noted below about DIALOG_ITEM_HELP.
.TP 5
3
if the
-.BR Extra
+.B Extra
button is pressed (DIALOG_EXTRA).
.TP 5
4
if the
-.BR Help
+.B Help
button is pressed,
.br
and the \fB--item-help\fP option is set
@@ -1458,7 +1707,7 @@ this special case was introduced in 2004 to simplify compatibility.
but unless the environment variable is also set,
it changes that to DIALOG_HELP(2) on exit.
.TP 5
--1
+\-1
if errors occur inside \fB\*p\fP (DIALOG_ERROR)
or \fB\*p\fP exits because the \fIESC\fP key (DIALOG_ESC) was pressed.
.
@@ -1478,26 +1727,28 @@ NetBSD 5.1 curses has incomplete support for wide-characters.
.RE
.\" ************************************************************************
.SH COMPATIBILITY
-You may want to write scripts which run with other \fBdialog\fP "clones".
-.SS ORIGINAL DIALOG
-First, there is the "original" \fBdialog\fP program to consider (versions
-0.3 to 0.9).
+You may want to write scripts which run with
+other \fBdialog\fP \*(``clones\*(''.
+.SS Original Dialog
+First, there is the \*(``original\*('' \fBdialog\fP program to consider
+(versions 0.3 to 0.9).
It had some misspelled (or inconsistent) options.
The \fB\*p\fP program maps those deprecated options to the preferred ones.
They include:
.RS
.TS
-l l
+tab(/) ;
+lI lI
_ _
l l.
-\fIOption\fR \fITreatment\fR
-\fB--beep-after\fP ignored
-\fB--guage\fP mapped to \fB--gauge\fP
+Option/Treatment
+\fB--beep-after\fP/ignored
+\fB--guage\fP/mapped to \fB--gauge\fP
+_
.TE
.RE
-.SS XDIALOG
-Technically, "\fBXdialog\fP",
-this is an X application.
+.SS Xdialog
+This is an X application, rather than a terminal program.
With some care, it is possible to write useful scripts that work
with both \fBXdialog\fP and \fBdialog\fP.
.PP
@@ -1505,64 +1756,66 @@ The \fB\*p\fP program ignores these options which are recognized
by \fBXdialog\fP:
.RS
.TS
-l l
+tab(/) ;
+lI lI
_ _
l l.
-\fIOption\fR \fITreatment\fR
-\fB--allow-close\fP ignored
-\fB--auto-placement\fP ignored
-\fB--fixed-font\fP ignored
-\fB--icon\fP ignored
-\fB--keep-colors\fP ignored
-\fB--no-close\fP ignored
-\fB--no-cr-wrap\fP ignored
-\fB--screen-center\fP ignored
-\fB--separator\fP mapped to \fB--separate-output\fP
-\fB--smooth\fP ignored
-\fB--under-mouse\fP ignored
-\fB--wmclass\fP ignored
+Option/Treatment
+\fB--allow-close\fP/ignored
+\fB--auto-placement\fP/ignored
+\fB--fixed-font\fP/ignored
+\fB--icon\fP/ignored
+\fB--keep-colors\fP/ignored
+\fB--no-close\fP/ignored
+\fB--no-cr-wrap\fP/ignored
+\fB--screen-center\fP/ignored
+\fB--separator\fP/mapped to \fB--separate-output\fP
+\fB--smooth\fP/ignored
+\fB--under-mouse\fP/ignored
+\fB--wmclass\fP/ignored
+_
.TE
.RE
.PP
-\fBXdialog\fP's manpage has a section discussing its compatibility with \fB\*p\fP.
+\fBXdialog\fP's manpage has a section discussing its compatibility
+with \fB\*p\fP.
There are some differences not shown in the manpage.
For example, the html documentation states
.RS
.PP
-Note: former Xdialog releases used the "\n" (line feed) as a
-results separator for the checklist widget; this has been
-changed to "/" in Xdialog v1.5.0 so to make it compatible with
-(c)dialog. In your old scripts using the Xdialog checklist, you
-will then have to add the --separate-output option before the
---checklist one.
+Note: former Xdialog releases used the "\en" (line feed) as a
+results separator for the checklist widget;
+this has been changed to "/" in Xdialog v1.5.0
+to make it compatible with (c)dialog.
+In your old scripts using the Xdialog checklist, you
+will then have to add the \fB--separate-output\fP option before the
+\fB--checklist\fP one.
.RE
.PP
\fB\*L\fP has not used a different separator;
the difference was likely due to confusion regarding some script.
-.SS WHIPTAIL
+.SS Whiptail
Then there is \fBwhiptail\fP.
For practical purposes, it is maintained by Debian
(very little work is done by its upstream developers).
Its documentation (README.whiptail) claims
-.RS
-.sp
-.nf
+.Ex
whiptail(1) is a lightweight replacement for \*p(1),
to provide dialog boxes for shell scripts.
It is built on the
newt windowing library rather than the ncurses library, allowing
-it to be smaller in embedded enviroments such as installers,
+it to be smaller in embedded environments such as installers,
rescue disks, etc.
-.sp
+
whiptail is designed to be drop-in compatible with \*p, but
has less features: some dialog boxes are not implemented, such
as tailbox, timebox, calendarbox, etc.
-.fi
-.RE
+.Ee
.PP
Comparing actual sizes (Debian testing, 2007/1/10):
-The total of sizes for \fBwhiptail\fP, the newt, popt and slang libraries is 757kb.
-The comparable number for \fB\*p\fP (counting ncurses) is 520kb.
+The total of sizes for \fBwhiptail\fP,
+the newt, popt and slang libraries is 757\ KB.
+The comparable number for \fB\*p\fP (counting ncurses) is 520\ KB.
Disregard the first paragraph.
.PP
The second paragraph is misleading, since \fBwhiptail\fP
@@ -1597,21 +1850,23 @@ The \fB\*p\fP program ignores or maps these options which are recognized
by \fBwhiptail\fP:
.RS
.TS
-l l
+tab(/) ;
+lI lI
_ _
l l.
-\fIOption\fR \fITreatment\fR
-\fB--cancel-button\fP mapped to \fB--cancel-label\fP
-\fB--fb\fP ignored
-\fB--fullbutton\fP ignored
-\fB--no-button\fP mapped to \fB--no-label\fP
-\fB--nocancel\fP mapped to \fB--no-cancel\fP
-\fB--noitem\fP mapped to \fB--no-items\fP
-\fB--notags\fP mapped to \fB--no-tags\fP
-\fB--ok-button\fP mapped to \fB--ok-label\fP
-\fB--scrolltext\fP mapped to \fB--scrollbar\fP
-\fB--topleft\fP mapped to \fB--begin 0 0\fP
-\fB--yes-button\fP mapped to \fB--yes-label\fP
+Option/Treatment
+\fB--cancel-button\fP/mapped to \fB--cancel-label\fP
+\fB--fb\fP/ignored
+\fB--fullbutton\fP/ignored
+\fB--no-button\fP/mapped to \fB--no-label\fP
+\fB--nocancel\fP/mapped to \fB--no-cancel\fP
+\fB--noitem\fP/mapped to \fB--no-items\fP
+\fB--notags\fP/mapped to \fB--no-tags\fP
+\fB--ok-button\fP/mapped to \fB--ok-label\fP
+\fB--scrolltext\fP/mapped to \fB--scrollbar\fP
+\fB--topleft\fP/mapped to \fB--begin 0 0\fP
+\fB--yes-button\fP/mapped to \fB--yes-label\fP
+_
.TE
.RE
.LP
@@ -1638,24 +1893,24 @@ thereby getting better resolution.
Perhaps.
.SH AUTHOR
.LP
-Thomas E. Dickey (updates for 0.9b and beyond)
+Thomas E.\& Dickey (updates for 0.9b and beyond)
.SH CONTRIBUTORS
-Kiran Cherupally - the mixed form and mixed gauge widgets.
+Kiran Cherupally \(en the mixed form and mixed gauge widgets.
.LP
-Tobias C. Rittweiler
+Tobias C.\& Rittweiler
.LP
-Valery Reznic - the form and progressbox widgets.
+Valery Reznic \(en the form and progressbox widgets.
.LP
-Yura Kalinichenko adapted the gauge widget as "pause".
+Yura Kalinichenko adapted the gauge widget as \*(``pause\*(''.
.PP
This is a rewrite (except as needed to provide compatibility)
of the earlier version of \fB\*p 0.9a\fP,
which lists as authors:
.bP
-Savio Lam - version 0.3, "dialog"
+Savio Lam \(en version 0.3, \*(``dialog\*(''
.bP
-Stuart Herbert - patch for version 0.4
+Stuart Herbert \(en patch for version 0.4
.bP
-Marc Ewing - the gauge widget.
+Marc Ewing \(en the gauge widget.
.bP
-Pasquale De Marco "Pako" - version 0.9a, "cdialog"
+Pasquale De Marco \*(``Pako\*('' \(en version 0.9a, \*(``cdialog\*(''
diff --git a/contrib/dialog/dialog.3 b/contrib/dialog/dialog.3
index de91fbd30788..80c0dd0c8f3b 100644
--- a/contrib/dialog/dialog.3
+++ b/contrib/dialog/dialog.3
@@ -1,6 +1,6 @@
'\" t
-.\" $Id: dialog.3,v 1.93 2013/09/22 23:58:11 tom Exp $
-.\" Copyright 2005-2012,2013 Thomas E. Dickey
+.\" $Id: dialog.3,v 1.121 2018/06/20 01:21:53 tom Exp $
+.\" Copyright 2005-2017,2018 Thomas E. Dickey
.\"
.\" This program is free software; you can redistribute it and/or modify
.\" it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,19 +27,27 @@
.ne 8
.IP
..
-.de EX
-.RS +10
+.de Ex
+.RS +7
+.PP
.nf
+.ft CW
..
-.de EE
+.de Ee
.fi
+.ft R
.RE
..
.\" Bulleted paragraph
.de bP
-.IP \(bu 4
+.ie n .IP \(bu 4
+.el .IP \(bu 2
..
-.TH \*D 3 "" "$Date: 2013/09/22 23:58:11 $"
+.ie \n(.g .ds `` \(lq
+.el .ds `` ``
+.ie \n(.g .ds '' \(rq
+.el .ds '' ''
+.TH \*D 3 "" "$Date: 2018/06/20 01:21:53 $"
.SH NAME
dialog \- widgets and utilities for the \*p program
.SH SYNOPSIS
@@ -47,12 +55,12 @@ dialog \- widgets and utilities for the \*p program
.br
\ \ \ or
.br
-.B cc `\*p-config --cflags` file ... `\*p-config --libs` ]
+.B cc $(\*p-config --cflags) file ... $(\*p-config --libs) ]
.sp
.B #include <\*l.h>
.PP
\fB\*L\fP
-is a program that will let you to present a variety of questions or
+is a program that will let you present a variety of questions or
display messages using dialog boxes from a shell script.
It is built from the \fB\*l\fP library,
which consists of several widgets
@@ -63,12 +71,29 @@ or the main program.
This manpage documents the features from \fI<\*l.h>\fP which
are likely to be important to developers using the widgets directly.
Some hints are also given for developing new widgets.
+.PP
+Here is a \fB\*l\fP version of \fIHello World\/\fP:
+.RS
+.nf
+int main(void)
+{
+ int status;
+ init_dialog(stdin, stdout);
+ status = dialog_yesno(
+ "Hello, in dialog-format",
+ "Hello World!",
+ 0, 0);
+ end_dialog();
+ return status;
+}
+.fi
+.RE
.
.\" ************************************************************************
.SH DEFINITIONS
Exit codes (passed back to the main program for its use)
are defined with a "\fIDLG_EXIT_\fP prefix.
-The defined constants can be mapped using environment variables
+The efined constants can be mapped using environment variables
as described in \fB\*p\fP(1),
e.g., \fIDLG_EXIT_OK\fP corresponds to \fI$DIALOG_OK\fP.
.PP
@@ -78,12 +103,13 @@ are named with the "\fICHR_\fP" prefix, e.g.,
.PP
Colors and video attributes are categorized and associated with
settings in the configuration file
-(see the discussion of \fI$DIALOGRC\fP in \fB\*p\fP(1)).
+(see the discussion of \fI$DIALOGRC\fP in \fB\*p\/\fP(1)).
The \fIDIALOG_ATR(n)\fP macro is used for defining the references
to the combined color and attribute table \fBdlg_color_table[]\fP.
.PP
The \fB\*p\fP application passes its command-line parameters
-to the widget functions. Some of those parameters are single values,
+to the widget functions.
+Some of those parameters are single values,
but some of the widgets accept data as an array of values.
Those include checklist/radiobox, menubox and formbox.
When the \fB--item-help\fP option is given, an extra column
@@ -94,12 +120,14 @@ macros are used to hide this difference from the calling application.
Most of the other definitions found in \fI<\*l.h>\fP
are used for convenience in building the library or main program.
These include definitions based on the generated \fI<dlg_config.h>\fP header.
-
+.
.\" ************************************************************************
.SH DATA STRUCTURES
All of the global data for the \fB\*l\fP library is stored in
-a few structures: \fIDIALOG_STATE\fP, \fIDIALOG_VARS\fP and \fIDIALOG_COLORS\fP.
-The corresponding \fBdialog_state\fP, \fBdialog_vars\fP and \fBdlg_color_table\fP
+a few structures:
+\fIDIALOG_STATE\fP, \fIDIALOG_VARS\fP and \fIDIALOG_COLORS\fP.
+The corresponding
+\fBdialog_state\fP, \fBdialog_vars\fP and \fBdlg_color_table\fP
global variables should be initialized to zeros,
and then populated with the data to use.
A few of these must be nonzero for the corresponding widgets to function.
@@ -109,17 +137,21 @@ are designed for use by the calling application
while variables beginning with "\fIdlg_\fP"
are intended for lower levels, e.g., by the \fB\*l\fP library.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.all_subwindows
+.SH DIALOG_STATE
+The \fIstate\fP variables are \fB\*l\fP's working variables.
+It initializes those, uses them to manage the widgets.
+.\" ---------------------------------------------------------------------------
+.SS .all_subwindows
This is a linked list of all subwindows created by the library.
The \fBdlg_del_window\fP function uses this
to free storage for subwindows when deleting a window.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.all_windows
+.SS .all_windows
This is a linked list of all windows created by the library.
The \fBdlg_del_window\fP function uses this to locate windows which
may be redrawn after deleting a window.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.aspect_ratio
+.SS .aspect_ratio
This corresponds to the command-line option "\fB--aspect-ratio\fP".
The value gives the application
some control over the box dimensions when using auto
@@ -127,27 +159,28 @@ sizing (specifying 0 for height and width).
It represents width / height.
The default is 9, which means 9 characters wide to every 1 line high.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.finish_string
+.SS .finish_string
When set to true, this allows calls to \fBdlg_finish_string\fP to discard the
corresponding data which is created to speed up layout computations for the
-given string parameter. The \fBgauge\fP widget uses this feature.
+given string parameter.
+The \fBgauge\fP widget uses this feature.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.getc_callbacks
-This is setup in \fIui_getc.c\fP to record windows which must be polled
-for input, e.g,. to handle the background tailbox widget.
+.SS .getc_callbacks
+This is set up in \fIui_getc.c\fP to record windows which must be polled
+for input, e.g., to handle the background tailbox widget.
One window is designated as the foreground or control window.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.getc_redirect
+.SS .getc_redirect
If the control window for \fIDIALOG_STATE.getc_callbacks\fP is
closed, the list is transferred to this variable.
Closing all windows causes the application to exit.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.no_mouse
+.SS .no_mouse
This corresponds to the command-line option "\fB--no-mouse\fP".
If true, \fB\*p\fP will not initialize (and enable) the mouse in
\fIinit_dialog\fP.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.output
+.SS .output
This is set in the \fB\*p\fP application to the stream on
which the application and library functions may write text results.
Normally that is the standard error,
@@ -156,7 +189,7 @@ Some scripts, trading portability for convenience,
prefer to write results to the standard output,
e.g., by using the "\fB--stdout\fP" option.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.output_count
+.SS .output_count
This is incremented by \fBdlg_does_output\fP,
which is called by each widget that writes text to the output.
The \fB\*p\fP application uses that to decide if it should
@@ -164,7 +197,7 @@ also write a separator, i.e.,
\fIDIALOG_STATE.separate_str\fP,
between calls to each widget.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.pipe_input
+.SS .pipe_input
This is set in \fIinit_dialog\fP to a stream which can be used by the
\fBgauge\fP widget, which must be the application's standard input.
The \fB\*p\fP application calls \fIinit_dialog\fP normally with
@@ -178,20 +211,20 @@ a specific file descriptor,
or directly from the terminal.
The adjusted pipe stream value is stored in this variable.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.screen_initialized
+.SS .screen_initialized
This is set in \fIinit_dialog\fP and
reset in \fIend_dialog\fP.
It is used to check if curses has been initialized,
and if the \fIendwin\fP function must be called on exit.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.screen_output
+.SS .screen_output
This is set in \fIinit_dialog\fP to the output stream used
by the curses library.
Normally that is the standard output,
unless that happens to not be a terminal (and if \fIinit_dialog\fP can
successfully open the terminal directly).
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.separate_str
+.SS .separate_str
This corresponds to the command-line option "\fB--separate-widget\fP".
The given string
specifies a string that will separate the output on \fB\*p\fP's output from
@@ -200,33 +233,68 @@ This is used to simplify parsing the result of a dialog with several widgets.
If this option is not given,
the default separator string is a tab character.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.tab_len
-This corresponds to the command-line option "\fB--tab-len\fP \fInumber\fP".
+.SS .tab_len
+This corresponds to the command-line option "\fB--tab-len\fP \fInumber\/\fP".
Specify the number of spaces that a tab character occupies if the
"\fB--tab-correct\fP"
option is given.
The default is 8.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.trace_output
+.SS .text_height
+This text-formatting functions set this to the number of lines used for
+formatting a string.
+.LP
+It is used by \fB\*l\fP for the command-line options
+"\fB--print-text-size\fP" and
+"\fB--print-text-only\fP".
+.\" ---------------------------------------------------------------------------
+.SS .text_only
+\fB\*L\fP uses this in the command-line option "\fB--print-text-only\fP".
+.LP
+The text-formatting functions
+(\fBdlg_print_text\fP,
+\fBdlg_print_line\fP, and
+\fBdlg_print_autowrap\fP)
+check this to decide whether to print the formatted text to
+\fB\*p\fP's output or to the curses-display.
+.LP
+Also,
+\fBdlg_auto_size\fP checks the flag, allowing it to be used before
+\fBinit_dialog\fP is called.
+.\" ---------------------------------------------------------------------------
+.SS .text_width
+This text-formatting functions set this to the number of columns used for
+formatting a string.
+.LP
+It is used by \fB\*l\fP for the command-line options
+"\fB--print-text-size\fP" and
+"\fB--print-text-only\fP".
+.\" ---------------------------------------------------------------------------
+.SS .trace_output
This corresponds to the command-line option "\fB--trace\fP \fIfile\fP".
It is the file pointer to which trace messages are written.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.use_colors
+.SS .use_colors
This is set in \fIinit_dialog\fP if the curses implementation supports color.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.use_scrollbar
+.SS .use_scrollbar
This corresponds to the command-line option "\fB--scrollbar\fP".
If true,
draw a scrollbar to make windows holding scrolled data more readable.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.use_shadow
+.SS .use_shadow
This corresponds to the command-line option "\fB--no-shadow\fP".
This is set in \fIinit_dialog\fP if the curses implementation supports color.
If true,
suppress shadows that would be drawn to the right and bottom of each dialog box.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_STATE.visit_items
+.SS .visit_items
This corresponds to the command-line option "\fB--visit-items\fP".
+Modify the tab-traversal of the list-oriented widgets
+(buildlist, checklist, radiobox, menubox, inputmenu, and treeview)
+to include the list of items as one of the states.
+This is useful as a visual aid,
+i.e., the cursor position helps some users.
.\" ---------------------------------------------------------------------------
.PP
The \fB\*p\fP application resets the \fBdialog_vars\fP data before
@@ -234,42 +302,52 @@ accepting options to invoke each widget.
Most of the \fIDIALOG_VARS\fP members are set directly from \fB\*p\fP's
command-line options:
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.ascii_lines
+.SH
+DIALOG_VARS
+.PP
+In contrast to \fBDIALOG_STATE\fP, the members of \fBDIALOG_VARS\fP
+are set by command-line options in \fB\*p\fP.
+.\" ---------------------------------------------------------------------------
+.SS .ascii_lines
This corresponds to the command-line option "\fB--ascii-lines\fP.
It causes line-drawing to be done with ASCII characters, e.g., "+" and "-".
See \fIDIALOG_VARS.no_lines\fP.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.backtitle
-This corresponds to the command-line option "\fB--backtitle\fP \fIbacktitle\fP".
+.SS .backtitle
+This corresponds to the command-line option
+"\fB--backtitle\fP \fIbacktitle\/\fP".
It specifies a
\fIbacktitle\fP
string to be displayed on the backdrop, at the top of the screen.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.beep_after_signal
+.SS .beep_after_signal
This corresponds to the command-line option "\fB--beep-after\fP".
-If true, beep after a user has completed a widget by pressing one of the buttons.
+If true, beep after a user has completed a widget
+by pressing one of the buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.beep_signal
+.SS .beep_signal
This corresponds to the command-line option "\fB--beep\fP".
It is obsolete.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.begin_set
-This is true if the command-line option "\fB--begin y x\fP" was used.
-It specifies the position of the upper left corner of a dialog box on the screen.
+.SS .begin_set
+This is true if the command-line option "\fB--begin\fP \fIy x\/\fP" was used.
+It specifies the position of the upper left corner
+of a dialog box on the screen.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.begin_x
+.SS .begin_x
This corresponds to the \fIx\fP value from
-the command-line option "\fB--begin\fP \fIy x\fP" (second value).
+the command-line option "\fB--begin\fP \fIy x\/\fP" (second value).
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.begin_y
+.SS .begin_y
This corresponds to the \fIy\fP value from
-the command-line option "\fB--begin\fP \fIy x\fP" (first value).
+the command-line option "\fB--begin\fP \fIy x\/\fP" (first value).
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.cancel_label
-This corresponds to the command-line option "\fB--cancel-label\fP \fIstring\fP".
-The given \fIstring\fP overrides the label used for "Cancel" buttons.
+.SS .cancel_label
+This corresponds to the command-line option
+"\fB--cancel-label\fP \fIstring\/\fP".
+The given \fIstring\fP overrides the label used for \*(``Cancel\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.cant_kill
+.SS .cant_kill
This corresponds to the command-line option "\fB--no-kill\fP".
If true, this tells
\fB\*p\fP
@@ -279,9 +357,9 @@ box in the background,
printing its process id to \fB\*p\fP's output.
SIGHUP is disabled for the background process.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.colors
+.SS .colors
This corresponds to the command-line option "\fB--colors\fP".
-If true, interpret embedded "\\Z" sequences in the dialog text
+If true, interpret embedded "\eZ" sequences in the dialog text
by the following character,
which tells \fB\*p\fP to set colors or video attributes:
0 through 7 are the ANSI codes used in curses:
@@ -296,112 +374,120 @@ white respectively.
Bold is set by 'b', reset by 'B'.
Reverse is set by 'r', reset by 'R'.
Underline is set by 'u', reset by 'U'.
-The settings are cumulative, e.g., "\\Zb\\Z1" makes the following text
+The settings are cumulative, e.g., "\eZb\eZ1" makes the following text
bright red.
-Restore normal settings with "\\Zn".
+Restore normal settings with "\eZn".
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.column_separator
+.SS .column_separator
This corresponds to the command-line option "\fB--column-separator\fP".
\fB\*L\fP splits data for radio/checkboxes and menus on the
occurrences of the given string, and aligns the split data into columns.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.cr_wrap
+.SS .cr_wrap
This corresponds to the command-line option "\fB--cr-wrap\fP".
If true,
interpret embedded newlines in the dialog text as a newline on the screen.
-Otherwise, \fB\*p\fR will only wrap lines where needed to fit inside the text box.
+Otherwise, \fB\*p\fR will only wrap lines where needed
+to fit inside the text box.
Even though you can control line breaks with this,
\fB\*p\fR will still wrap any lines that are too long for the width of the box.
Without cr-wrap, the layout of your text may be formatted to look nice
in the source code of your script without affecting the way it will
look in the dialog.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.date_format
-This corresponds to the command-line option "\fB--date-format\fP \fIstring\fP".
+.SS .date_format
+This corresponds to the command-line option
+"\fB--date-format\fP \fIstring\/\fP".
If the host provides \fBstrftime\fP, and the value is nonnull,
the calendar widget uses this to format its output.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.default_button
+.SS .default_button
This is set by the command-line option "\fB--default-button\fP.
It is used by \fBdlg_default_button\fP.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.default_item
-This corresponds to the command-line option "\fB--default-item\fP \fIstring\fP".
+.SS .default_item
+This corresponds to the command-line option
+"\fB--default-item\fP \fIstring\/\fP".
The given string is used as
the default item in a checklist, form or menu box.
Normally the first item in the box is the default.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.defaultno
+.SS .defaultno
This corresponds to the command-line option "\fB--defaultno\fP".
If true,
make the default value of the
\fByes/no\fP
box a
.BR No .
-Likewise, make the default button of widgets that provide "OK" and "Cancel"
-a \fBCancel\fP.
+Likewise, treat the default button of widgets that provide
+\*(``OK\*('' and \*(``Cancel\*(''
+as a \fICancel\fP.
If \fB--nocancel\fP was given that option overrides this,
-making the default button always "Yes" (internally the same as "OK").
+making the default button always \*(``Yes\*(''
+(internally the same as \*(``OK\*('').
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.dlg_clear_screen
+.SS .dlg_clear_screen
This corresponds to the command-line option "\fB--clear\fP".
This option is implemented in the main program, not the library.
If true,
the screen will be cleared on exit.
This may be used alone, without other options.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.exit_label
+.SS .exit_label
This corresponds to the command-line option "\fB--exit-label string\fP".
-The given string overrides the label used for "EXIT" buttons.
+The given string overrides the label used for \*(``EXIT\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.extra_button
+.SS .extra_button
This corresponds to the command-line option "\fB--extra-button\fP".
If true, some widgets show an extra button,
-between "OK" and "Cancel" buttons.
+between \*(``OK\*('' and \*(``Cancel\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.extra_label
-This corresponds to the command-line option "\fB--extra-label\fP \fIstring\fP".
-The given string overrides the label used for "Extra" buttons.
-Note: for inputmenu widgets, this defaults to "Rename".
+.SS .extra_label
+This corresponds to the command-line option
+"\fB--extra-label\fP \fIstring\/\fP".
+The given string overrides the label used for \*(``Extra\*('' buttons.
+Note: for inputmenu widgets, this defaults to \*(``Rename\*(''.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.formitem_type
+.SS .formitem_type
This is set by the command-line option "\fB--passwordform\fP"
to tell the form widget that its text fields should be treated like
password widgets.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_button
+.SS .help_button
This corresponds to the command-line option "\fB--help-button\fP".
-If true, some widgets show a help-button after "OK" and "Cancel" buttons,
+If true, some widgets show a help-button after
+\*(``OK\*('' and \*(``Cancel\*('' buttons,
i.e., in checklist, radiolist and menu boxes.
If \fB--item-help\fR is also given, on exit
-the return status will be the same as for the "OK" button,
-and the item-help text will be written to \fB\*p\fP's output after the token "HELP".
+the return status will be the same as for the \*(``OK\*('' button,
+and the item-help text will be written to \fB\*p\fP's output
+after the token \*(``HELP\*(''.
Otherwise, the return status will indicate that the Help button was pressed,
and no message printed.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_file
-This corresponds to the command-line option "\fB--hfile\fP \fIstring\fP".
+.SS .help_file
+This corresponds to the command-line option "\fB--hfile\fP \fIstring\/\fP".
The given filename is passed to \fBdialog_helpfile\fP when the user
presses F1.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_label
-This corresponds to the command-line option "\fB--help-label\fP \fIstring\fP".
-The given string overrides the label used for "Help" buttons.
+.SS .help_label
+This corresponds to the command-line option "\fB--help-label\fP \fIstring\/\fP".
+The given string overrides the label used for \*(``Help\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_line
-This corresponds to the command-line option "\fB--hline\fP \fIstring\fP".
+.SS .help_line
+This corresponds to the command-line option "\fB--hline\fP \fIstring\/\fP".
The given string is displayed in the bottom of dialog windows,
like a subtitle.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_status
+.SS .help_status
This corresponds to the command-line option "\fB--help-status\fP".
If true, and the the help-button is selected,
writes the checklist or radiolist information
-after the item-help "HELP" information.
+after the item-help \*(``HELP\*('' information.
This can be used to reconstruct the state of a checklist after processing
the help request.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.help_tags
+.SS .help_tags
This corresponds to the command-line option "\fB--help-tags\fP".
If true,
\fBdlg_add_help_formitem\fP and
@@ -409,19 +495,18 @@ If true,
rather than using the tag's help-text value
when \fIDIALOG_VARS.item_help\fP is set.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.input_length
+.SS .input_length
This is nonzero if \fIDIALOG_VARS.input_result\fP is allocated,
versus being a pointer to the user's local variables.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.input_menu
+.SS .input_menu
This flag is set to denote whether the menubox widget
implements a menu versus a inputmenu widget.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.input_result
+.SS .input_result
This may be either a user-supplied buffer,
or a buffer dynamically allocated by the library,
depending on \fIDIALOG_VARS.input_length\fP:
-.RS
.bP
If \fIDIALOG_VARS.input_length\fP is zero,
this is a pointer to user buffer (on the stack, or static).
@@ -431,95 +516,108 @@ which is defined in \fI<\*l.h>\fP.
When \fIDIALOG_VARS.input_length\fP is nonzero,
this is a dynamically-allocated buffer used by the widgets to return
printable results to the calling application.
-.RE
-.IP
+.LP
Certain widgets copy a result to this buffer.
If the pointer is NULL, or if the length is insufficient for
the result, then the \fB\*l\fP library allocates a buffer which is large enough,
and sets \fIDIALOG_VARS.input_length\fP.
Callers should check for this case if they have supplied their own buffer.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.insecure
+.SS .insecure
This corresponds to the command-line option "\fB--insecure\fP".
If true, make the password widget friendlier but less secure,
by echoing asterisks for each character.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.in_helpfile
+.SS .in_helpfile
This variable is used to prevent \fBdialog_helpfile\fP from showing
anything, e.g., if F1 were pressed within a help-file display.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.item_help
+.SS .iso_week
+This corresponds to the command-line option "\fB--iso-week\fP".
+It is used in the calendar widget to tell how
+to compute the starting week for the year:
+.bP
+by default, the calendar treats January 1 as the first week of the year.
+.bP
+If this variable is true, the calendar uses ISO 8601's convention.
+ISO 8601 numbers weeks starting with the first week in January with
+a Thursday in the current year.
+January 1 may be in the \fIprevious\fP year.
+.\" ---------------------------------------------------------------------------
+.SS .item_help
This corresponds to the command-line option "\fB--item-help\fP".
If true,
interpret the tags data for checklist, radiolist and menu boxes
adding a column whose text is displayed in the bottom line of the
screen, for the currently selected item.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.keep_tite
+.SS .keep_tite
This is set by the command-line option "\fB--keep-tite\fP"
to tell \fB\*p\fP to not attempt to cancel the terminal initialization
-(termcap \fIti\fP/\fIte\fP) sequences which correspond to xterm's alternate-screen
-switching.
+(termcap \fIti\/\fP/\,\fIte\/\fP) sequences
+which correspond to xterm's alternate-screen switching.
Normally \fB\*p\fP does this to avoid flickering when run several times
in a script.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.keep_window
+.SS .keep_window
This corresponds to the command-line option "\fB--keep-window\fP".
If true, do not remove/repaint the window on exit.
This is useful for keeping the window contents visible when several
widgets are run in the same process.
Note that curses will clear the screen when starting a new process.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.last_key
+.SS .last_key
This corresponds to the command-line option "\fB--last-key\fP".
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.max_input
-This corresponds to the command-line option "\fB--max-input\fP \fIsize\fP".
+.SS .max_input
+This corresponds to the command-line option "\fB--max-input\fP \fIsize\/\fP".
Limit input strings to the given size.
If not specified, the limit is 2048.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.no_items
+.SS .no_items
This corresponds to the command-line option "\fB--no-items\fP".
Some widgets (checklist, inputmenu, radiolist, menu) display a list
-with two columns (a "tag" and "item", i.e., "description").
+with two columns (a \*(``tag\*('' and \*(``item\*('',
+i.e., \*(``description\*('').
This tells \fB\*p\fP to read shorter rows from data,
-omitting the "list".
+omitting the \*(``list\*(''.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.no_label
-This corresponds to the command-line option "\fB--no-label\fP \fIstring\fP".
-The given string overrides the label used for "No" buttons.
+.SS .no_label
+This corresponds to the command-line option "\fB--no-label\fP \fIstring\/\fP".
+The given string overrides the label used for \*(``No\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.no_lines
+.SS .no_lines
This corresponds to the command-line option "\fB--no-lines\fP.
It suppresses line-drawing.
See \fIDIALOG_VARS.ascii_lines\fP.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.no_nl_expand
+.SS .no_nl_expand
This corresponds to the command-line option "\fB--no-nl-expand\fP".
-If false, \fBdlg_trim_string\fP converts literal "\\n" substrings
+If false, \fBdlg_trim_string\fP converts literal "\en" substrings
in a message into newlines.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.no_tags
+.SS .no_tags
This corresponds to the command-line option "\fB--no-tags\fP".
Some widgets (checklist, inputmenu, radiolist, menu) display a list
-with two columns (a "tag" and "item", also known as "description").
+with two columns (a \*(``tag\*('' and \*(``item\*('',
+also known as \*(``description\*('').
The tag is useful for scripting, but may not help the user.
The \fB--no-tags\fP option (from Xdialog) may be used to suppress the
column of tags from the display.
-.IP
+.LP
Normally \fB\*p\fP allows you to quickly move to entries on the displayed list,
by matching a single character to the first character of the tag.
When the \fB--no-tags\fP option is given, \fB\*p\fP matches against
the first character of the description.
In either case, the matchable character is highlighted.
-.IP
+.LP
Here is a table showing how the no_tags and no_items values interact:
.TS
tab(/);
l l l l l
-_ _ _ _ _
-l l l c c.
+l l l n n.
Widget/Fields Shown/Fields Read/.no_items/.no_tags
+_
buildlist/item/tag,item/0/0*
buildlist/item/tag,item/0/1
buildlist/tag/tag/1/0*
@@ -546,7 +644,6 @@ treeview/tag/tag/1/0*
treeview/tag/tag/1/1
_
.TE
-.RS
.TP 2
*
Xdialog does not display the tag column for the analogous buildlist
@@ -554,15 +651,14 @@ and treeview widgets.
\fB\*L\fP does the same on the command-line.
However the library interface defaults to displaying the tag column.
Your application can enable or disable the tag column as needed for each widget.
-.RE
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.nocancel
+.SS .nocancel
This corresponds to the command-line option "\fB--no-cancel\fP".
If true,
-suppress the "Cancel" button in checklist, inputbox and menu box modes.
+suppress the \*(``Cancel\*('' button in checklist, inputbox and menu box modes.
A script can still test if the user pressed the ESC key to cancel to quit.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.nocollapse
+.SS .nocollapse
This corresponds to the command-line option "\fB--no-collapse\fP".
Normally \fB\*p\fR converts tabs to spaces and reduces multiple
spaces to a single space for text which is displayed in a message boxes, etc.
@@ -570,94 +666,114 @@ It true, that feature is disabled.
Note that \fB\*p\fR will still wrap text, subject to the \fB--cr-wrap\fR
option.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.nook
+.SS .nook
This corresponds to the command-line option "\fB--nook\fP.
-\fB\*L\fP will suppress the "ok" (or "yes") button from the widget.
+\fB\*L\fP will suppress the \*(``ok\*('' (or \*(``yes\*('') button
+from the widget.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.ok_label
-This corresponds to the command-line option "\fB--ok-label\fP \fIstring\fP".
-The given string overrides the label used for "OK" buttons.
+.SS .ok_label
+This corresponds to the command-line option "\fB--ok-label\fP \fIstring\/\fP".
+The given string overrides the label used for \*(``OK\*('' buttons.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.print_siz
+.SS .print_siz
This corresponds to the command-line option "\fB--print-size\fP".
If true,
each widget prints its size to \fB\*p\fP's output when it is invoked.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.quoted
+.SS .quoted
This corresponds to the command-line option "\fB--quoted\fP.
-.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.separate_output
+Normally \fB\*p\fP quotes the strings returned by checklist's
+as well as the item-help text.
+If true, \fB\*p\fP will quote all string results.
+.\" ---------------------------------------------------------------------------
+.SS .reorder
+This corresponds to the command-line option "\fB--reorder\fP.
+By default, the buildlist widget uses the same order for the output (right)
+list as for the input (left).
+If true, \fB\*p\fP will use the order in which a user adds selections
+to the output list.
+.\" ---------------------------------------------------------------------------
+.SS .separate_output
This corresponds to the command-line option "\fB--separate-output\fP".
If true,
checklist widgets output result one line at a time, with no quoting.
This facilitates parsing by another program.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.single_quoted
+.SS .single_quoted
This corresponds to the command-line option "\fB--single-quoted\fP".
If true,
-Use single-quoting as needed (and no quotes if unneeded) for the
+use single-quoting as needed (and no quotes if unneeded) for the
output of checklist's as well as the item-help text.
If this option is not set, \fB\*p\fP uses double quotes around each item.
The latter requires occasional use of backslashes to make the output useful in
shell scripts.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.size_err
+.SS .size_err
This corresponds to the command-line option "\fB--size-err\fP".
If true,
check the resulting size of a dialog box before trying to use it,
printing the resulting size if it is larger than the screen.
(This option is obsolete, since all new-window calls are checked).
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.sleep_secs
-This corresponds to the command-line option "\fB--sleep\fP \fIsecs\fP".
+.SS .sleep_secs
+This corresponds to the command-line option "\fB--sleep\fP \fIsecs\/\fP".
This option is implemented in the main program, not the library.
-If nonzero, this is the number of seconds after to delay after processing a dialog box.
+If nonzero, this is the number of seconds after to delay
+after processing a dialog box.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.tab_correct
+.SS .tab_correct
This corresponds to the command-line option "\fB--tab-correct\fP".
If true, convert each tab character of the text to one or more spaces.
Otherwise, tabs are rendered according to the curses library's interpretation.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.time_format
-This corresponds to the command-line option "\fB--time-format\fP \fIstring\fP".
+.SS .time_format
+This corresponds to the command-line option
+"\fB--time-format\fP \fIstring\/\fP".
If the host provides \fBstrftime\fP, and the value is nonnull,
the timebox widget uses this to format its output.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.timeout_secs
-This corresponds to the command-line option "\fB--timeout\fP \fIsecs\fP".
+.SS .timeout_secs
+This corresponds to the command-line option "\fB--timeout\fP \fIsecs\/\fP".
If nonzero, timeout input requests (exit with error code)
if no user response within the given number of seconds.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.title
-This corresponds to the command-line option "\fB--title\fP \fItitle\fP".
+.SS .title
+This corresponds to the command-line option "\fB--title\fP \fItitle\/\fP".
Specifies a
\fItitle\fP
string to be displayed at the top of the dialog box.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.trim_whitespace
+.SS .trim_whitespace
This corresponds to the command-line option "\fB--trim\fP".
If true, eliminate leading blanks,
trim literal newlines and repeated blanks from message text.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.visit_items
-This corresponds to the command-line option "\fB--visit-items\fP".
-Modify the tab-traversal of the list-oriented widgets
-(buildlist, checklist, radiobox, menubox, inputmenu, and treeview)
-to include the list of items as one of the states.
-This is useful as a visual aid,
-i.e., the cursor position helps some users.
+.SS .week_start
+This corresponds to the command-line option "\fB--week-start\fP".
+It is used in the calendar widget to set the starting day for the week.
+The string value can be
+.bP
+a number (0 to 6, Sunday through Saturday using POSIX) or
+.bP
+the special value \*(``locale\*('' (this works with systems using glibc,
+providing an extension to the \fBlocale\fP command,
+the \fBfirst_weekday\fP value).
+.bP
+a string matching one of the abbreviations for the day of the week
+shown in the \fBcalendar\fP widget, e.g., \*(``Mo\*('' for \*(``Monday\*(''.
.\" ---------------------------------------------------------------------------
-.IP \fIDIALOG_VARS.yes_label
-This corresponds to the command-line option "\fB--yes-label\fP \fIstring\fP".
-The given string overrides the label used for "Yes" buttons.
+.SS .yes_label
+This corresponds to the command-line option "\fB--yes-label\fP \fIstring\/\fP".
+The given string overrides the label used for \*(``Yes\*('' buttons.
.
.\" ************************************************************************
.\" ************************************************************************
.SH WIDGETS
Functions that implement major functionality for the command-line \fB\*p\fP
program, e.g., widgets, have names beginning "\fIdialog_\fP".
-
+.PP
All dialog boxes have at least three parameters:
+.RS 3
.TP 5
\fItitle\fP
the caption for the box, shown on its top border.
@@ -667,13 +783,13 @@ the height of the dialog box.
.TP 5
\fIwidth\fP
the width of the dialog box.
+.RE
.PP
Other parameters depend on the box type.
.
.\" ************************************************************************
-.IP \fBdialog_buildlist
+.SS dialog_buildlist
implements the "\fB--buildlist\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -699,7 +815,7 @@ is the number of rows in \fIitems\fP.
.B char ** \fIitems
is an array of strings which is viewed either as a list of rows
.RS
-\fItag item status \fR
+\fItag item status\fR
.RE
.IP
or
@@ -711,12 +827,10 @@ depending on whether \fBdialog_vars.item_help\fP is set.
.TP 5
.B int \fIorder_mode
is reserved for future enhancements
-.RE
.
.\" ************************************************************************
-.IP \fBdialog_calendar
+.SS dialog_calendar
implements the "\fB--calendar\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -744,12 +858,10 @@ If the value is negative, the current month of the year is used.
.B int \fIyear
is the initial year shown.
If the value is negative, the current year is used.
-.RE
.\" ************************************************************************
-.IP \fBdialog_checklist
+.SS dialog_checklist
implements the "\fB--checklist\fP" and "\fB--radiolist\fP" options
depending on the \fIflag\fP parameter.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -775,7 +887,7 @@ is the number of rows in \fIitems\fP.
.B int \fIitems
is an array of strings which is viewed either as a list of rows
.RS
-\fItag item status \fR
+\fItag item status\fR
.RE
.IP
or
@@ -787,11 +899,9 @@ depending on whether \fBdialog_vars.item_help\fP is set.
.IP flag
is either \fIFLAG_CHECK\fP, for checklists,
or \fIFLAG_RADIO\fP for radiolists.
-.RE
.\" ************************************************************************
-.IP \fBdialog_dselect
+.SS dialog_dselect
implements the "\fB--dselect\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -807,11 +917,9 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_editbox
+.SS dialog_editbox
implements the "\fB--editbox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -826,11 +934,9 @@ If zero, the height is adjusted to use the available screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is adjusted to use the available screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_form
+.SS dialog_form
implements the "\fB--form\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -865,11 +971,9 @@ or
.RE
.IP
depending on whether \fBdialog_vars.item_help\fP is set.
-.RE
.\" ************************************************************************
-.IP \fBdialog_fselect
+.SS dialog_fselect
implements the "\fB--fselect\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -885,17 +989,15 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_gauge
+.SS dialog_gauge
implements the "\fB--gauge\fP" option.
Alternatively, a simpler or customized gauge widget can be
-setup using
+set up using
\fBdlg_allocate_gauge\fP,
\fBdlg_reallocate_gauge\fP,
\fBdlg_update_gauge\fP and
\fBdlg_free_gauge\fP.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -913,12 +1015,10 @@ If zero, the height is based on the screen size.
.TP 5
.B int \fIpercent
is the percentage to show in the progress bar.
-.RE
.\" ************************************************************************
-.IP \fBdialog_inputbox
+.SS dialog_inputbox
implements the "\fB--inputbox\fP" or
"\fB--password\fP" option, depending on the value of \fIpassword\fP.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -940,18 +1040,16 @@ when auto-sizing the width of the dialog box.
.TP 5
.B int \fIpassword
if true, causes typed input to be echoed as asterisks.
-.RE
.\" ************************************************************************
-.IP \fBdialog_helpfile
+.SS dialog_helpfile
implements the "\fB--hfile\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
.TP 5
.B const char * \fIfile
is the name of a file containing the text to display.
-This function is internally bound to F1 (function key "1"),
+This function is internally bound to F1 (function key \*(``1\*(''),
passing \fBdialog_vars.help_file\fP as a parameter.
The \fBdialog\fP program sets that variable when the \fB--hfile\fP option
is given.
@@ -963,12 +1061,10 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_menu
+.SS dialog_menu
implements the "\fB--menu\fP" or "\fB--inputmenu\fP" option
depending on whether \fBdialog_vars.input_menu\fP is set.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1003,11 +1099,9 @@ or
.RE
.IP
depending on whether \fBdialog_vars.item_help\fP is set.
-.RE
.\" ************************************************************************
-.IP \fBdialog_mixedform
+.SS dialog_mixedform
implements the "\fB--mixedform\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1042,11 +1136,9 @@ or
.RE
.IP
depending on whether \fBdialog_vars.item_help\fP is set.
-.RE
.\" ************************************************************************
-.IP \fBdialog_mixedgauge
+.SS dialog_mixedgauge
implements the "\fB--mixedgauge\fP" option
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1069,11 +1161,13 @@ is the percentage to show in the progress bar.
is the number of rows in \fIitems\fP.
.TP 5
.B int \fIitems
-is an array of strings which is viewed as a list of \fItag\fP and \fIitem\fP values.
-The \fItag\fP values are listed, one per row, in the list at the top of
-the widget.
+is an array of strings which is viewed as a list
+of \fItag\fP and \fIitem\fP values.
+The \fItag\fP values are listed,
+one per row, in the list at the top of the widget.
.IP
-The \fIitem\fP values are decoded: digits 0-9 are the following strings
+The \fIitem\fP values are decoded:
+digits 0 through 9 are the following strings
.RS
.IP 0
Succeeded
@@ -1100,12 +1194,10 @@ N/A
A string with a leading "-" character is centered, marked with "%".
For example, "-75" is displayed as "75%".
Other strings are displayed as is.
-.RE
.\" ************************************************************************
-.IP \fBdialog_msgbox
+.SS dialog_msgbox
implements the "\fB--msgbox\fP" or "\fB--infobox\fP" option
depending on whether \fIpauseopt\fP is set.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1122,15 +1214,13 @@ is the desired width of the box.
If zero, the height is based on the screen size.
.TP 5
.B int \fIpauseopt
-if true, an "OK" button will be shown,
+if true, an \*(``OK\*('' button will be shown,
and the dialog will wait for it to complete.
-With an "OK" button, it is denoted a "msgbox",
-without an "OK" button, it is denoted an "infobox".
-.RE
+With an \*(``OK\*('' button, it is denoted a \*(``msgbox\*('',
+without an \*(``OK\*('' button, it is denoted an \*(``infobox\*(''.
.\" ************************************************************************
-.IP \fBdialog_pause
+.SS dialog_pause
implements the "\fB--pause\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1145,11 +1235,9 @@ If zero, the height is based on the screen size.
.TP 5
.B int \fIseconds
is the timeout to use for the progress bar.
-.RE
.\" ************************************************************************
-.IP \fBdialog_prgbox
+.SS dialog_prgbox
implements the "\fB--prgbox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1170,13 +1258,11 @@ is the desired width of the box.
If zero, the height is based on the screen size.
.TP 5
.B int \fIpauseopt
-if true, an "OK" button will be shown,
+if true, an \*(``OK\*('' button will be shown,
and the dialog will wait for it to complete.
-.RE
.\" ************************************************************************
-.IP \fBdialog_progressbox
+.SS dialog_progressbox
implements the "\fB--progressbox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1192,11 +1278,9 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_rangebox
+.SS dialog_rangebox
implements the "\fB--rangebox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1221,12 +1305,10 @@ is the maximum value to allow.
.TP 5
.B int \fIdefault_value
is the default value, if no change is made.
-.RE
.\" ************************************************************************
-.IP \fBdialog_tailbox
+.SS dialog_tailbox
implements the "\fB--tailbox\fP" or "\fB--tailboxbg\fP" option
depending on whether \fIbg_task\fP is set.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1246,13 +1328,11 @@ If zero, the height is based on the screen size.
if true,
the window is added to the callback list in \fBdialog_state\fP,
and the application will poll for the window to be updated.
-Otherwise an "OK" button is added to the window,
+Otherwise an \*(``OK\*('' button is added to the window,
and it will be closed when the button is activated.
-.RE
.\" ************************************************************************
-.IP \fBdialog_textbox
+.SS dialog_textbox
implements the "\fB--textbox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1267,11 +1347,9 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.\" ************************************************************************
-.IP \fBdialog_timebox
+.SS dialog_timebox
implements the "\fB--timebox\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1301,11 +1379,9 @@ Returns DLG_EXIT_ERROR if the value specified is greater than or equal to 60.
is the initial second shown.
If the value is negative, the current second is used.
Returns DLG_EXIT_ERROR if the value specified is greater than or equal to 60.
-.RE
.\" ************************************************************************
-.IP \fBdialog_treeview
+.SS dialog_treeview
implements the "\fB--treeview\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1337,11 +1413,9 @@ The initial selection state for each item is also in this list.
.IP flag
is either \fIFLAG_CHECK\fP, for checklists (multiple selections),
or \fIFLAG_RADIO\fP for radiolists (a single selection).
-.RE
.\" ************************************************************************
-.IP \fBdialog_yesno
+.SS dialog_yesno
implements the "\fB--yesno\fP" option.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -1356,7 +1430,6 @@ If zero, the height is based on the screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is based on the screen size.
-.RE
.
.\" ************************************************************************
.SH UTILITY FUNCTIONS
@@ -1373,22 +1446,17 @@ library as a string.
.PP
Here is a brief summary of the utility functions and their parameters:
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_callback
+.SS dlg_add_callback
Add a callback, used to allow polling input from multiple tailbox
widgets.
-.RS
.TP 5
.B DIALOG_CALLBACK *\fIp\fP
contains the callback information.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_callback_ref
+.SS dlg_add_callback_ref
Like \fBdlg_add_callback\fP, but passes a reference to the \fBDIALOG_CALLBACK\fP
as well as a pointer to a cleanup function which will be called when the
associated input ends.
-.RS
.TP 5
.B DIALOG_CALLBACK **\fIp\fP
points to the callback information.
@@ -1397,13 +1465,10 @@ zeroed when input ends.
.TP 5
.B DIALOG_FREEBACK \fIfunc\fP
function to call when input ends, e.g., to free caller's additional data.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_help_formitem
+.SS dlg_add_help_formitem
This is a utility function used enforce consistent behavior for
the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
-.RS
.TP 5
.B int *\fIresult\fP
this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
@@ -1413,13 +1478,10 @@ the tag- or help-text is stored here.
.TP 5
.B DIALOG_FORMITEM *\fIitem\fP
contains the list item to use for tag- or help-text.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_help_listitem
+.SS dlg_add_help_listitem
This is a utility function used enforce consistent behavior for
the \fIDIALOG_VARS.help_tags\fP and \fIDIALOG_VARS.item_help\fP variables.
-.RS
.TP 5
.B int *\fIresult\fP
this is updated to DLG_EXIT_ITEM_HELP if \fIDIALOG_VARS.item_help\fP is set.
@@ -1429,14 +1491,11 @@ the tag- or help-text is stored here.
.TP 5
.B DIALOG_LISTITEM *\fIitem\fP
contains the list item to use for tag- or help-text.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_last_key
+.SS dlg_add_last_key
Report the last key entered by the user.
-This implements the \fB\-\-last\-key\fP command-line option,
+This implements the \fB--last-key\fP command-line option,
using \fBdialog_vars.last_key\fP.
-.RS
.TP 5
.B int \fImode
controls the way the last key report is separated from other results:
@@ -1454,56 +1513,43 @@ controls the way the last key report is separated from other results:
1
(same as -1)
.RE
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_quoted
+.SS dlg_add_quoted
Add a quoted string to the result buffer (see \fBdlg_add_result\fP).
If no quotes are necessary, none are used.
If \fBdialog_vars.single_quoted\fR is set, single-quotes are used.
Otherwise, double-quotes are used.
-.RS
.TP 5
.B char * \fIstring
is the string to add.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_result
+.SS dlg_add_result
Add a string to the result buffer \fBdialog_vars.input_result\fP.
-.RS
.TP 5
.B char * \fIstring
is the string to add.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_separator
+.SS dlg_add_separator
Add an output-separator to the result buffer \fBdialog_vars.input_result\fP.
If \fBdialog_vars.output_separator\fP is set, use that.
Otherwise, if \fBdialog_vars.separate_output\fP is set, use newline.
If neither is set, use a space.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_add_string
+.SS dlg_add_string
Add a quoted or unquoted string to the result buffer
(see \fBdlg_add_quoted\fP) and \fBdlg_add_result\fP),
according to whether \fBdialog_vars.quoted\fP is true.
-.RS
.TP 5
.B char * \fIstring
is the string to add.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_align_columns
+.SS dlg_align_columns
Copy and reformat an array of pointers to strings, aligning according to
the column separator \fBdialog_vars.column_separator\fP.
If no column separator is set, the array will be unmodified;
otherwise it is copied and reformatted.
.IP
Caveat: This function is only implemented for 8-bit characters.
-.RS
.TP 5
.B char **\fItarget
This is the array to reformat.
@@ -1514,13 +1560,10 @@ This is the size of the struct for each row of the array.
.TP 5
.B int \fInum_rows
This is the number of rows in the array.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_allocate_gauge
+.SS dlg_allocate_gauge
Allocates a gauge widget.
Use \fBdlg_update_gauge\fP to display the result.
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -1538,23 +1581,19 @@ If zero, the height is adjusted to use the available screen size.
.TP 5
.B int \fIpercent
is the percentage to show in the progress bar.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_asciibox
+.SS dlg_asciibox
returns its parameter transformed to the
-corresponding "+" or "-", etc. for the line-drawing characters used in \fB\*p\fP.
-If the parameter is not a line-drawing or other special character such as ACS_DARROW, it returns 0.
-.RS
+corresponding "+" or "-", etc.,
+for the line-drawing characters used in \fB\*p\fP.
+If the parameter is not a line-drawing or other special character
+such as ACS_DARROW, it returns 0.
.TP 5
.B chtype \fIch
is the parameter, usually one of the \fBACS_\fP\fIxxx\fP constants.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_attr_clear
+.SS dlg_attr_clear
Set window to the given attribute.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -1567,14 +1606,21 @@ is the number of columns to update.
.TP 5
.B chtype \fIattr
is the attribute, e.g., \fBA_BOLD\fP.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_auto_size
-Automatically size the window used for a widget.
-If the given height or width are zero,
-justify the \fIprompt\fP text and return the actual limits.
-.RS
+.SS dlg_auto_size
+Compute window size based on the size of the formatted \fIprompt\fP and
+minimum dimensions for a given widget.
+.PP
+\fB\*L\fP sets
+\fBdialog_state.text_height\fP and
+\fBdialog_state.text_width\fP for
+the formatted \fIprompt\fP
+as a side-effect.
+.PP
+Normally \fB\*l\fP writes the formatted \fIprompt\fP to the curses
+window,
+but it will write the formatted \fIprompt\fP to the output stream
+if \fBdialog_state.text_only\fP is set.
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -1582,25 +1628,60 @@ is the title string to display at the top of the widget.
.B const char * \fIprompt
is the message text which will be displayed in the widget,
used here to determine how large the widget should be.
+.IP
+If the value is \fINULL\fP,
+\fB\*l\fP allows the widget to use the whole screen,
+i.e., if the values referenced by \fIheight\fP and/or \fIwidth\fP are zero.
.TP 5
.B int * \fIheight
is the nominal height.
+\fB\*L\fP checks the referenced value and may update it:
+.RS
+.bP
+if the value is negative,
+\fB\*l\fP updates it to the available height of the screen,
+after reserving rows for the window border and shadow,
+as well as taking into account
+\fBdialog_vars.begin_y\fP and
+\fBdialog_vars.begin_set\fP.
+.bP
+if the value is zero,
+\fB\*l\fP updates it to the required height of the window,
+taking into account a (possibly) multi-line \fIprompt\fP.
+.bP
+if the value is greater than zero,
+\fB\*l\fP uses it internally, but restores the value on return.
+.RE
.TP 5
.B int * \fIwidth
is the nominal width.
+\fB\*L\fP checks the referenced value and may update it:
+.RS
+.bP
+if the value is negative,
+\fB\*l\fP updates it to the available width of the screen,
+after reserving rows for the window border and shadow,
+as well as taking into account
+\fBdialog_vars.begin_x\fP and
+\fBdialog_vars.begin_set\fP.
+.bP
+if the value is zero,
+\fB\*l\fP updates it to the required width of the window,
+taking into account a (possibly) multi-line \fIprompt\fP.
+.bP
+if the value is greater than zero,
+\fB\*l\fP uses it internally, but restores the value on return.
+.RE
.TP 5
.B int \fIboxlines
is the number of lines to reserve in the vertical direction.
.TP 5
.B int \fImincols
is the minimum number of columns to use.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_auto_sizefile
+.SS dlg_auto_sizefile
Like \fBdlg_auto_size\fP, but use a file contents to decide how large
the widget should be.
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -1610,71 +1691,74 @@ is the name of the file.
.TP 5
.B int * \fIheight
is the nominal height.
-If it is -1, use the screen's height (after subtracting \fBdialog_vars.begin_y\fP
+.IP
+If it is -1, use the screen's height
+(after subtracting \fBdialog_vars.begin_y\fP
if \fBdialog_vars.begin_set\fP is true).
+.IP
+If it is greater than zero,
+limit the referenced value to the screen-height
+after verifying that the file exists.
.TP 5
.B int * \fIwidth
is the nominal width.
+.IP
If it is -1, use the screen's width (after subtracting \fBdialog_vars.begin_x\fP
if \fBdialog_vars.begin_set\fP is true).
+.IP
+If it is greater than zero,
+limit the referenced value to the screen-width
+after verifying that the file exists.
.TP 5
.B int \fIboxlines
is the number of lines to reserve on the screen for drawing boxes.
.TP 5
.B int \fImincols
is the number of columns to reserve on the screen for drawing boxes.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_beeping
+.SS dlg_beeping
If \fBdialog_vars.beep_signal\fP is nonzero,
this calls \fBbeep\fP once and sets
\fBdialog_vars.beep_signal\fP to zero.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_boxchar
+.SS dlg_boxchar
returns its \fBchtype\fP parameter transformed as follows:
-.RS
.bP
if neither \fBdialog_vars.ascii_lines\fP nor \fBdialog_vars.no_lines\fP is set.
.bP
-if \fBdialog_vars.ascii_lines\fP is set, returns the corresponding "+" or "-", etc. for the line-drawing characters used in \fB\*p\fP.
+if \fBdialog_vars.ascii_lines\fP is set,
+returns the corresponding "+" or "-", etc.,
+for the line-drawing characters used in \fB\*p\fP.
.bP
-otherwise, if \fBdialog_vars.no_lines\fP is set, returns a space for the line-drawing characters.
+otherwise, if \fBdialog_vars.no_lines\fP is set,
+returns a space for the line-drawing characters.
.bP
-if the parameter is not a line-drawing or other special character such as ACS_DARROW, it returns the parameter unchanged.
-.RE
+if the parameter is not a line-drawing or other special character
+such as ACS_DARROW,
+it returns the parameter unchanged.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_box_x_ordinate
+.SS dlg_box_x_ordinate
returns a suitable x-ordinate (column) for a new widget.
If \fBdialog_vars.begin_set\fP is 1,
use \fBdialog_vars.begin_x\fP;
otherwise center the widget on the screen (using the \fIwidth\fP parameter).
-.RS
.TP 5
.B int \fIwidth
is the width of the widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_box_y_ordinate
+.SS dlg_box_y_ordinate
returns a suitable y-ordinate (row) for a new widget.
If \fBdialog_vars.begin_set\fP is 1,
use \fBdialog_vars.begin_y\fP;
otherwise center the widget on the screen (using the \fIheight\fP parameter).
-.RS
.TP 5
.B int \fIheight
is the height of the widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_buildlist
+.SS dlg_buildlist
This is an alternate interface to the \fBbuildlist\fP widget
which allows the application to read the list item states back
directly without putting them in the output buffer.
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -1717,23 +1801,17 @@ is reserved for future enhancements
.B int * \fIcurrent_item
The widget sets the referenced location to the index of the current display
item (cursor) when it returns.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_button_count
+.SS dlg_button_count
Count the buttons in the list.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_button_layout
+.SS dlg_button_layout
Make sure there is enough space for the buttons by
computing the width required for their labels,
adding margins and limiting based on the screen size.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
@@ -1742,12 +1820,9 @@ is a list of (pointers to) button labels terminated by a null pointer.
the function sets the referenced \fIlimit\fP to the width required for
the buttons (limited by the screen size)
if that is wider than the passed-in limit.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_button_sizes
+.SS dlg_button_sizes
Compute the size of the button array in columns.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
@@ -1760,12 +1835,29 @@ Return the total number of columns in the referenced location.
.TP 5
.B int * \fIlength
Return the longest button's columns in the referenced location.
-.RE
.\" ---------------------------------------------------------------------------
+.SS dlg_button_to_char
+Find the first uppercase character in the label, which we may use for an
+abbreviation.
+If the label is empty, return -1.
+If no uppercase character is found, return 0.
+Otherwise return the uppercase character.
+.LP
+Normally
+.B dlg_draw_buttons
+and
+.B dlg_char_to_button
+use the first uppercase character.
+However, they keep track of all of the labels and
+if the first has already been used in another label,
+they will continue looking for another uppercase character.
+This function does not have enough information to make that check.
.TP 5
-.B dlg_button_x_step
+.B const char * \fIlabel
+is the label to test.
+.\" ---------------------------------------------------------------------------
+.SS dlg_button_x_step
Compute the step-size needed between elements of the button array.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
@@ -1783,36 +1875,10 @@ location.
.TP 5
.B int * \fIstep
store the step-size in the referenced location.
-.RE
-.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_button_to_char
-Find the first uppercase character in the label, which we may use for an
-abbreviation.
-If the label is empty, return -1.
-If no uppercase character is found, return 0.
-Otherwise return the uppercase character.
-.IP
-Normally
-.B dlg_draw_buttons
-and
-.B dlg_char_to_button
-use the first uppercase character.
-However, they keep track of all of the labels and
-if the first has already been used in another label,
-they will continue looking for another uppercase character.
-This function does not have enough information to make that check.
-.RS
-.TP 5
-.B const char * \fIlabel
-is the label to test.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_calc_list_width
+.SS dlg_calc_list_width
Calculate the minimum width for the list,
assuming none of the items are truncated.
-.RS
.TP 5
.B int \fIitem_no
is the number of \fIitems\fP.
@@ -1825,12 +1891,9 @@ needed for of each of these fields.
.IP
If \fBdialog_vars.no_items\fP is set,
the \fItext\fP fields in the list are ignored.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_calc_listh
+.SS dlg_calc_listh
Calculate new height and list_height values.
-.RS
.TP 5
.B int * \fIheight
on input, is the height without adding the list-height.
@@ -1845,13 +1908,10 @@ the \fBdialog_vars.begin_set\fP and \fBdialog_vars.begin_y\fP variables.
.TP 5
.B int \fIitem_no
is the number of \fIitems\fP in the list.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_calc_listw
+.SS dlg_calc_listw
This function is obsolete, provided for library-compatibility.
It is replaced by \fBdlg_calc_list_width\fP.
-.RS
.TP 5
.B int \fIitem_no
is the number of \fIitems\fP.
@@ -1861,31 +1921,25 @@ is a list of character pointers.
.TP 5
.B int \fIgroup
is the number of items in each group, e.g., the second array index.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_char_to_button
+.SS dlg_char_to_button
Given a list of button labels,
and a character which may be the abbreviation for one, find it, if it exists.
An abbreviation will be the first character
which happens to be capitalized in the label.
If the character is found, return its index within the list of \fIlabels\fP.
Otherwise, return \fBDLG_EXIT_UNKNOWN\fP.
-.RS
.TP 5
.B int \fIch
is the character to find.
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_checklist
-This entrypoint provides the \fB--checklist\fP or \fP--radiolist\fP
+.SS dlg_checklist
+This entrypoint provides the \fB--checklist\fP or \fB--radiolist\fP
functionality without the limitations of \fB\*p\fP's command-line syntax
(compare to \fBdialog_checklist\fP).
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -1927,34 +1981,31 @@ depending on whether the widget should act as a checklist or radiobox.
.B int * \fIcurrent_item
The widget sets the referenced location to the index of the current display
item (cursor) when it returns.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_check_scrolled
+.SS dlg_check_scrolled
given a function key (or other key that was mapped to a function key),
check if it is one of the up/down scrolling functions:
.sp
.RS
- DLGK_PAGE_FIRST,
+DLGK_PAGE_FIRST,
.br
- DLGK_PAGE_LAST,
+DLGK_PAGE_LAST,
.br
- DLGK_GRID_UP,
+DLGK_GRID_UP,
.br
- DLGK_GRID_DOWN,
+DLGK_GRID_DOWN,
.br
- DLGK_PAGE_PREV or
+DLGK_PAGE_PREV or
.br
- DLGK_PAGE_NEXT.
+DLGK_PAGE_NEXT.
.RE
.fi
-.IP
+.LP
Some widgets use these key bindings for scrolling the prompt-text up and
down, to allow for display in very small windows.
-.IP
+.LP
The function returns 0 (zero) if it finds one of these keys,
and -1 if not.
-.RS
.TP 5
.B int \fIkey
is the function-key to check
@@ -1977,151 +2028,114 @@ the prompt text.
on entry, holds the starting line number (counting from zero)
last used for \fBdlg_print_scrolled\fP.
On return, holds the updated starting line number.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_clear
+.SS dlg_clear
Set window to the default \fB\*p\fP screen attribute.
This is set in the rc-file with \fBscreen_color\fP.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_clr_result
+.SS dlg_clr_result
Free storage used for the result buffer (\fBdialog_vars.input_result\fP).
The corresponding pointer is set to NULL.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_color_count
+.SS dlg_color_count
Return the number of colors that can be configured in \fB\*p\fP.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_color_setup
+.SS dlg_color_setup
Initialize the color pairs used in \fB\*p\fP.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_count_argv
+.SS dlg_count_argv
Count the entries in an argument vector.
-.RS
.TP 5
.B argv
Points to the argument vector.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_count_columns
+.SS dlg_count_columns
Returns the number of columns used for a string.
This is not necessarily the number of bytes in a string.
-.RS
.TP 5
.B const char * \fIstring
is the string to measure.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_count_real_columns
+.SS dlg_count_real_columns
Returns the number of columns used for a string,
-accounting for "\\Z" sequences which can be used for
+accounting for "\eZ" sequences which can be used for
coloring the text if \fBdialog_vars.colors\fP is set.
This is not necessarily the number of bytes in a string.
-.RS
.TP 5
.B const char * \fIstring
is the string to measure.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_count_wchars
+.SS dlg_count_wchars
Returns the number of wide-characters in the string.
-.RS
.TP 5
.B const char * \fIstring
is the string to measure.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_create_rc
+.SS dlg_create_rc
Create a configuration file,
i.e., write internal tables to a file which can be read back by \fB\*p\fP
as an rc-file.
-.RS
.TP 5
.B const char * \fIfilename
is the name of the file to write to.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_ctl_size
+.SS dlg_ctl_size
If \fBdialog_vars.size_err\fP is true,
check if the given window size is too large to fit on the screen.
If so, exit with an error reporting the size of the window.
-.RS
.TP 5
.B int \fIheight
is the window's height
.TP 5
.B int \fIwidth
is the window's width
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_default_button
+.SS dlg_default_button
If \fBdialog_vars.default_button\fP is positive,
return the button-index for that button code,
using \fBdlg_ok_buttoncode\fP to test indices starting with zero.
Otherwise (or if no match was found for the button code), return zero.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_default_formitem
+.SS dlg_default_formitem
If \fBdialog_vars.default_item\fP is not null,
find that name by matching the \fIname\fP field in the list of form \fIitems\fP.
If found, return the index of that item in the list.
Otherwise, return zero.
-.RS
.TP 5
.B DIALOG_FORMITEM * \fIitems
is the list of items to search.
It is terminated by an entry with a null \fIname\fP field.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_default_item
+.SS dlg_default_item
This function is obsolete, provided for library-compatibility.
It is replaced by \fBdlg_default_formitem\fP and \fBdlg_default_listitem\fP.
-.RS
.TP 5
.B char ** \fIitems
is the list of items to search.
.TP 5
.B int \fIllen
is the number of items in each group, e.g., the second array index.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_defaultno_button
+.SS dlg_defaultno_button
If \fBdialog_vars.defaultno\fP is true, and \fBdialog_vars.nocancel\fP is not,
-find the button-index for the "Cancel" button.
-Otherwise, return the index for "OK" (always zero).
+find the button-index for the \*(``Cancel\*('' button.
+Otherwise, return the index for \*(``OK\*('' (always zero).
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_del_window
+.SS dlg_del_window
Remove a window, repainting everything else.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to remove.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_does_output
+.SS dlg_does_output
This is called each time a widget is invoked which may do output.
It increments \fBdialog_state.output_count\fP,
so the output function in \fB\*p\fP can test this and add a separator.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_arrows
+.SS dlg_draw_arrows
Draw up/down arrows on a window, e.g., for scrollable lists.
It calls \fBdlg_draw_arrows2\fP using the
\fImenubox_color\fP and \fImenubox_border_color\fP attributes.
-.RS
.TP 5
.B WINDOW * \fIdialog
is the window on which to draw an arrow.
@@ -2142,12 +2156,9 @@ as well as a horizontal line to show the window's top.
.B int \fIbottom
is the zero-based row within the window on which to draw down-arrows
as well as a horizontal line to show the window's bottom.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_arrows2
+.SS dlg_draw_arrows2
Draw up/down arrows on a window, e.g., for scrollable lists.
-.RS
.TP 5
.B WINDOW * \fIdialog
is the window on which to draw an arrow.
@@ -2174,47 +2185,41 @@ is the window's background attribute.
.TP 5
.B chtype \fIborderattr
is the window's border attribute.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_bottom_box
+.SS dlg_draw_bottom_box
Draw a partial box at the bottom of a window,
e.g., to surround a row of buttons.
It is designed to merge with an existing box around
the whole window (see \fBdlg_draw_box\fP),
so it uses tee-elements rather than corner-elements
on the top corners of this box.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_bottom_box2
+.SS dlg_draw_bottom_box2
Draw a partial box at the bottom of a window,
e.g., to surround a row of buttons.
It is designed to merge with an existing box around
the whole window (see \fBdlg_draw_box2\fP),
so it uses tee-elements rather than corner-elements
on the top corners of this box.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
+.TP 5
.B chtype \fIon_left
is used to color the upper/left edges of the box, i.e., the tee-element and
horizontal line
+.TP 5
.B chtype \fIon_right
is used to color the right edge of the box, i.e., the tee-element
+.TP 5
.B chtype \fIon_inside
is used to fill-color the inside of the box
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_box
+.SS dlg_draw_box
Draw a rectangular box with line drawing characters.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -2237,12 +2242,9 @@ It also is fill-color used for the box contents.
.TP 5
.B chtype \fIborderchar
is used to color the upper/left edges.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_box2
+.SS dlg_draw_box2
Draw a rectangular box with line drawing characters.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -2267,12 +2269,9 @@ is used to color the upper/left edges.
.TP 5
.B chtype \fIborderchar2
is used to color the right/lower edges.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_buttons
+.SS dlg_draw_buttons
Print a list of buttons at the given position.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -2293,23 +2292,18 @@ is the index within the list of the selected button.
is true if the buttons are arranged in a column rather than a row.
.TP 5
.B int \fIlimit
-is the number of columns (or rows if \fIvertical\fP) allowed for the display.
-.RE
+is the number of columns (or rows if \fIvertical\/\fP) allowed for the display.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_helpline
+.SS dlg_draw_helpline
draw the text in \fBdialog_vars.help_line\fP at the bottom of the given window.
-.RS
.TP 5
.B WINDOW * \fIdialog
is the window to modify.
.TP 5
.B bool \fIdecorations
if true, allow room for the scrolling arrows.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_scrollbar
+.SS dlg_draw_scrollbar
If \fBdialog_state.use_scrollbar\fP is set,
draw a scrollbar on the right margin of windows holding scrollable data.
Also (whether or not the scrollbar is drawn),
@@ -2317,7 +2311,6 @@ annotate the bottom margin of the window with the percentage of data
by the bottom of that window,
and call \fBdlg_draw_arrows2\fP to put markers on the window showing
when more data is available.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window in which the data is scrolled.
@@ -2357,14 +2350,11 @@ is the window's background attribute.
.TP 5
.B chtype \fIborderattr
is the window's border attribute.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_shadow
+.SS dlg_draw_shadow
Draw shadows along the right and bottom edge of a window to give it
a 3-dimensional look.
(The height, etc., may not be the same as the window's actual values).
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -2380,30 +2370,24 @@ is the top row of the window.
.TP 5
.B int \fIx
is the left column of the window.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_draw_title
+.SS dlg_draw_title
Draw a title centered at the top of the window.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_dummy_menutext
+.SS dlg_dummy_menutext
This is a utility function which supports the \fB--inputmenu\fP option of
the \fB\*p\fP program.
If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
Otherwise, it passes \fBdlg_dummy_menutext\fP.
-.IP
+.LP
The function should only return \fBDLG_EXIT_ERROR\fP.
-.RS
.TP 5
.B DIALOG_LISTITEM * \fIitems
is the list of menu items
@@ -2413,23 +2397,17 @@ is the index of the currently-selected item
.TP 5
.B char * \fInewtext
is the updated text for the menu item
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_dump_keys
+.SS dlg_dump_keys
Write all user-defined key-bindings to the given stream,
e.g., as part of \fBdlg_create_rc\fP.
-.RS
.TP 5
.B FILE * \fIfp
is the stream on which to write the bindings.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_dump_window_keys
+.SS dlg_dump_window_keys
Write all user-defined key-bindings to the given stream,
e.g., as part of \fBdlg_create_rc\fP.
-.RS
.TP 5
.B FILE * \fIfp
is the stream on which to write the bindings.
@@ -2437,31 +2415,25 @@ is the stream on which to write the bindings.
.B WINDOW * \fIwin
is the window for which bindings should be dumped.
If it is null, then only built-in bindings are dumped.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_eat_argv
+.SS dlg_eat_argv
Remove one or more items from an argument vector.
-.RS
.TP 5
-.B int *argcp
+.B int * \fIargcp
in/out parameter giving the length of the argument vector.
-.B char ***argvp
+.B char *** \fIargvp
in/out parameter pointing to the argument vector.
-.B int start
+.B int \fIstart
starting index.
-.B int count
+.B int \fIcount
number of arguments to remove.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_edit_offset
+.SS dlg_edit_offset
Given the character-offset in the string,
returns the display-offset where
\fB\*p\fP should position the cursor.
-In this context, "characters" may be multicolumn,
+In this context, \*(``characters\*('' may be multicolumn,
since the string can be a multibyte character string.
-.RS
.TP 5
.B char * \fIstring
is the string to analyze
@@ -2472,16 +2444,13 @@ is the character-offset
.B int \fIx_last
is a limit on the column positions that can be used,
e.g., the window's size.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_edit_string
+.SS dlg_edit_string
Updates the string and character-offset, given various editing characters
or literal characters which are inserted at the character-offset.
Returns true if an editing change was made (and the display should
be updated), and false if the key was something like KEY_ENTER,
which is a non-editing action outside this function.
-.RS
.TP 5
.B char * \fIstring
is the (multibyte) string to update
@@ -2498,45 +2467,37 @@ is true if the editing key is a function-key
.B bool \fIforce
is used in a special loop case by calling code to force the return
value of this function when a function-key code 0 is passed in.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_exit
+.SS dlg_exit
Given an internal exit code,
check if the corresponding environment variable is set.
If so, remap the exit code to match the environment variable.
Finally call \fBexit\fP with the resulting exit code.
-.RS
.TP 5
.B int \fIcode
is the internal exit code, e.g., \fBDLG_EXIT_OK\fP,
which may be remapped.
-.RE
-.IP
+.LP
The \fB\*p\fP program uses this function
to allow shell scripts to remap the exit codes so they can distinguish ESC
from ERROR.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_exit_buttoncode
+.SS dlg_exit_buttoncode
Map the given button index for \fBdlg_exit_label\fP into \fB\*p\fP's exit-code.
-.RS
.TP 5
.B int \fIbutton
is the button index
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_exit_label
+.SS dlg_exit_label
Return a list of button labels.
-If dialog_var.extra_button is true, return the result of \fBdlg_ok_labels\fP.
-Otherwise, return a list with the "Exit" label and (if \fBdialog_vars.help_button\fP
-is set) the "Help" button as well.
+If \fBdialog_vars.extra_button\fP is true,
+return the result of \fBdlg_ok_labels\fP.
+Otherwise, return a list with the \*(``Exit\*('' label
+and (if \fBdialog_vars.help_button\fP is set)
+the \*(``Help\*('' button as well.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_exiterr
+.SS dlg_exiterr
Quit program killing all \fBtailboxbg\fP widgets.
-.RS
.TP 5
.B const char * \fIfmt
is the format of the \fBprintf\fP-like message to write.
@@ -2544,13 +2505,10 @@ is the format of the \fBprintf\fP-like message to write.
.B ...
.br
are the variables to apply to the \fIfmt\fP format.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_find_index
+.SS dlg_find_index
Given the character-offset to find in the list, return the corresponding
array index.
-.RS
.TP 5
.B const int *\fIlist
contains a list of character-offsets,
@@ -2561,29 +2519,23 @@ is the last index into \fBlist\fP to search.
.TP 5
.B int \fIto_find
is the character-offset to find.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_finish_string
+.SS dlg_finish_string
If \fIDIALOG_STATE.finish_string\fP is true,
this function discards data used to speed up layout computations.
-.RS
.TP 5
.B const char * \fIstring
is the address of the string whose data should be discarded.
The address rather than contents is used as the unique identifier because
some of the caching is used for editable input-fields.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_flush_getc
+.SS dlg_flush_getc
Cancel the local data saved by \fBdlg_last_getc\fP.
.\" ---------------------------------------------------------------------------
-.IP dlg_editbox
+.SS dlg_editbox
This entrypoint provides the \fB--editbox\fP
functionality without the limitations of \fB\*p\fP's command-line syntax
(compare to \fBdialog_editbox\fP).
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -2606,14 +2558,11 @@ If zero, the height is adjusted to use the available screen size.
.B int \fIwidth
is the desired width of the box.
If zero, the height is adjusted to use the available screen size.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_form
+.SS dlg_form
This entrypoint provides the \fB--form\fP
functionality without the limitations of \fB\*p\fP's command-line syntax
(compare to \fBdialog_form\fP).
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -2642,12 +2591,9 @@ This is a list of the items to display in the form.
.B int * \fIcurrent_item
The widget sets the referenced location to the index of the current display
item (cursor) when it returns.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_free_columns
+.SS dlg_free_columns
Free data allocated by \fBdlg_align_columns\fP.
-.RS
.TP 5
.B char **\fItarget
This is the array which was reformatted.
@@ -2658,28 +2604,20 @@ This is the size of the struct for each row of the array.
.TP 5
.B int \fInum_rows
This is the number of rows in the array.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_free_formitems
+.SS dlg_free_formitems
Free memory owned by a list of DIALOG_FORMITEM's.
-.RS
.TP 5
.B DIALOG_FORMITEM * \fIitems
is the list to free.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_free_gauge
+.SS dlg_free_gauge
Remove the gauge widget from the screen and free its associated memory.
-.RS
.TP 5
.B void *\fIobjptr
points to the gauge widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_getc
+.SS dlg_getc
Read a character from the given window.
Handle repainting here (to simplify
things in the calling application).
@@ -2687,32 +2625,25 @@ Also, if input-callback(s) are set up,
poll the corresponding files and handle the updates,
e.g., for displaying a tailbox.
Returns the key-code.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window within which to read.
.TP 5
.B int * \fIfkey
as a side-effect, set this to true if the key-code is really a function-key.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_get_attrs
+.SS dlg_get_attrs
extract the video attributes from the given window.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window from which to get attributes.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_getc_callbacks
+.SS dlg_getc_callbacks
passes the given key-code \fIch\fP to the current window that
has established a callback.
If the callback returns zero, remove it and try the next window.
If no more callbacks remain, return.
If any callbacks were found, return true, otherwise false.
-.RS
.TP 5
.B int \fIch
is the key-code
@@ -2723,60 +2654,44 @@ is true if the key is a function-key
.B int * \fIresult
is used to pass an exit-code to the caller,
which should pass that via \fBdlg_exit\fP.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_index_columns
+.SS dlg_index_columns
Build a list of the display-columns for the given multibyte string's characters.
-.RS
.TP 5
.B const char * \fIstring
is the string to analyze
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_index_wchars
+.SS dlg_index_wchars
Build an index of the wide-characters in the string,
so the caller can easily tell
which byte-offset begins a given wide-character.
-.RS
.TP 5
.B const char * \fIstring
is the string to analyze
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_item_help
+.SS dlg_item_help
Draw the string for the \fBdialog_vars.item_help\fP feature.
-.RS
.TP 5
.B const char * \fItxt
is the help-message
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_killall_bg
+.SS dlg_killall_bg
If \fB\*p\fP has callbacks active,
purge the list of all that are not marked
to keep in the background.
If any remain, run those in a background process.
-.RS
.TP 5
.B int * \fIretval
stores the exit-code to pass back to the caller.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_last_getc
+.SS dlg_last_getc
returns the most recent character that was read via \fBdlg_getc\fP.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_limit_columns
+.SS dlg_limit_columns
Given a column limit,
count the number of wide characters that can fit into that limit.
The offset is used to skip over a leading character
that was already written.
-.RS
.TP 5
.B const char * \fIstring
is the string to analyze
@@ -2786,15 +2701,12 @@ is the column limit
.TP 5
.B int \fIoffset
is the starting offset from which analysis should continue
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_lookup_key
+.SS dlg_lookup_key
Check for a key-binding.
If there is no binding associated with the widget, it simply returns
the given curses-key.
Otherwise, it returns the result of the binding
-.RS
.TP 5
.B WINDOW * \fIwin
is the window on which the binding is checked
@@ -2805,37 +2717,28 @@ is the curses key-code
.B int * \fIdialog_key
is the corresponding \fB\*p\fP internal code
(see \fBDLG_KEYS_ENUM\fP in dlg_key.h).
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_max_input
+.SS dlg_max_input
Limit the parameter according to \fBdialog_vars.max_input\fP
-.RS
.TP 5
.B int \fImax_len
is the value to limit
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_match_char
+.SS dlg_match_char
Match a given character against the beginning of the string,
ignoring case of the given character.
The matching string must begin with an uppercase character.
-.RS
.TP 5
.B int \fIch
is the character to check
.TP 5
.B const char * \fIstring
is the string to search
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_menu
+.SS dlg_menu
This entrypoint provides the \fB--menu\fP
functionality without the limitations of \fB\*p\fP's command-line syntax
(compare to \fBdialog_menu\fP).
-.RS
.TP 5
.B const char * \fItitle
is the title string to display at the top of the widget.
@@ -2868,14 +2771,11 @@ item (cursor) when it returns.
.B DIALOG_INPUTMENU \fIrename_menutext
If this is not \fBdlg_dummy_menutext\fP,
the widget acts like an \fIinputmenu\fP widget,
-providing an extra "Rename" button,
+providing an extra \*(``Rename\*('' button,
which activates an edit feature on the selected menu item.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_move_window
+.SS dlg_move_window
Moves/resizes the given window to the given position and size.
-.RS
.TP 5
.B WINDOW *\fIwin
is the window to move/resize.
@@ -2891,28 +2791,21 @@ y-ordinate to use for the repositioned window.
.TP 5
.B WINDOW *\fIx
x-ordinate to use for the repositioned window.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_bigregion
+.SS dlg_mouse_bigregion
Retrieve the big-region under the pointer.
-.RS
.TP 5
.B int \fIy
is the row on which the mouse click occurred
.TP 5
.B int \fIx
is the column on which the mouse click occurred
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_free_regions
+.SS dlg_mouse_free_regions
Free the memory associated with mouse regions.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_mkbigregion
-Creates a region on which the mouse-clicks will return a specifed code.
-.RS
+.SS dlg_mouse_mkbigregion
+Creates a region on which the mouse-clicks will return a specified code.
.TP 5
.B int \fIy
is the top-row of the region.
@@ -2939,8 +2832,8 @@ is currently unused
.B int \fImode
is used to determine how the mouse position is translated into
a code (like a function-key):
-.RS
-.TP
+.RS 5
+.TP 3
1
index by lines
.TP
@@ -2950,11 +2843,8 @@ index by columns
3
index by cells
.RE
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_mkregion
-.RS
+.SS dlg_mouse_mkregion
.TP 5
.B int \fIy
is the top-row of the region.
@@ -2970,56 +2860,44 @@ is the width of the region.
.TP 5
.B int \fIcode
is a code used to make the region unique within a widget
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_region
+.SS dlg_mouse_region
Retrieve the frame under the mouse pointer
-.RS
.TP 5
.B int \fIy
is the row of the mouse-click
.TP 5
.B int \fIx
is the column of the mouse-click
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_setbase
+.SS dlg_mouse_setbase
Sets a base for subsequent calls to \fBdlg_mouse_mkregion\fP,
so they can make regions relative to the start of a given window.
-.RS
.TP 5
.B int \fIx
is the left-column for the base
.TP 5
.B int \fIy
is the top-row for the base
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_setcode
+.SS dlg_mouse_setcode
Sets a value used internally by \fBdlg_mouse_mkregion\fP
which is added to the \fIcode\fP parameter.
By providing different values,
e.g., multiples of \fBKEY_MAX\fP,
-it is possible to support multiple "big" regions in a widget.
+it is possible to support multiple \*(``big\*('' regions in a widget.
The \fIbuildlist\fP widget uses this feature to recognize mouse-clicks
in the left/right panes.
-.RS
.TP 5
.B int \fIcode
is the value to add to \fBdlg_mouse_mkregion\fP's \fIcode\fP parameter.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_wgetch
+.SS dlg_mouse_wgetch
is a wrapper for \fBdlg_getc\fP which additionally maps mouse-clicks
(if the curses library supports those) into extended function-keys
which encode the position according to the \fImode\fP in
\fBdlg_mouse_mkbigregion\fP.
Returns the corresponding key-code.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window on which to perform the input
@@ -3027,12 +2905,9 @@ is the window on which to perform the input
.B int * \fIfkey
the referenced location is set to true if the key-code is an actual
or extended (mouse) function-key.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_mouse_wgetch_nowait
+.SS dlg_mouse_wgetch_nowait
This is a non-blocking variant of \fBdlg_mouse_wgetch\fP.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window on which to perform the input
@@ -3040,20 +2915,16 @@ is the window on which to perform the input
.B int * \fIfkey
the referenced location is set to true if the key-code is an actual
or extended (mouse) function-key.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_need_separator
+.SS dlg_need_separator
Check if an output-separator is needed.
If \fBdialog_vars.output_separator\fP is set, return true.
Otherwise, if \fBdialog_vars.input_result\fP is nonempty, return true.
If neither, return false.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_new_modal_window
+.SS dlg_new_modal_window
Create a modal window, optionally with a shadow.
The shadow is created if \fBdialog_state.use_shadow\fP is true.
-.RS
.TP 5
.B WINDOW * \fIparent
is the parent window (usually the top-level window of a widget)
@@ -3069,13 +2940,10 @@ is the window's top-row
.TP 5
.B int \fIx
is the window's left-column
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_new_window
+.SS dlg_new_window
Create a window, optionally with a shadow.
The shadow is created if \fBdialog_state.use_shadow\fP is true.
-.RS
.TP 5
.B int \fIheight
is the window's height
@@ -3088,96 +2956,84 @@ is the window's top-row
.TP 5
.B int \fIx
is the window's left-column
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_next_button
+.SS dlg_next_button
Return the next index in the list of labels.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
.TP 5
.B int \fIbutton
is the current button-index.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_next_ok_buttonindex
+.SS dlg_next_ok_buttonindex
Assuming that the caller is using \fBdlg_ok_labels\fP to list buttons,
find the next index in the list of buttons.
-.RS
.TP 5
.B int \fIcurrent
is the current index in the list of buttons
.TP 5
.B int \fIextra
if negative, provides a way to enumerate extra active areas on the widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_ok_buttoncode
+.SS dlg_ok_buttoncode
Map the given button index for \fBdlg_ok_labels\fP
into \fB\*p\fP's exit-code.
-.RS
.TP 5
.B int \fIbutton
is the button-index (which is not necessarily the same as the index
in the list of labels).
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_ok_label
-Returns a list with the "Ok" label,
-and if \fBdialog_vars.help_button\fP is true, the "Help" label as well.
+.SS dlg_ok_label
+Returns a list with the \*(``Ok\*('' label,
+and if \fBdialog_vars.help_button\fP is true, the \*(``Help\*('' label as well.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_ok_labels
+.SS dlg_ok_labels
Return a list of button labels for the OK/Cancel group of widgets.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_ordinate
+.SS dlg_ordinate
Decode the string as an integer, decrement if greater than zero to make
a curses-ordinate from a dialog-ordinate.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_parse_bindkey
-Parse the parameters of the "bindkeys" configuration-file entry. This
-expects widget name which may be "*", followed by curses key definition and
+.SS dlg_parse_bindkey
+Parse the parameters of the \*(``bindkeys\*('' configuration-file entry.
+This expects widget name which may be "*", followed by curses key definition and
then \fB\*p\fP key definition.
-.RS
.TP 5
.B char * \fIparams
is the parameter string to parse.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_parse_rc
+.SS dlg_parse_rc
Parse the configuration file and set up variables.
.\" ---------------------------------------------------------------------------
+.SS dlg_popen
+Open a pipe which ties the standard error and output together.
+The \fBpopen\fP function captures only the standard output of a command.
.TP 5
-.B dlg_prev_button
+.B const char *\fIcommand
+The shell command to run.
+.TP 5
+.B const char *\fItype
+Like \fBpopen\fP, "r" is used to read, and "w" is used to write.
+.\" ---------------------------------------------------------------------------
+.SS dlg_prev_button
Return the previous index in the list of labels.
-.RS
.TP 5
.B const char ** \fIlabels
is a list of (pointers to) button labels terminated by a null pointer.
.TP 5
.B int \fIbutton
is the current button index
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_listitem
-This is a helper function used for the various "list" widgets,
+.SS dlg_print_listitem
+This is a helper function used for the various \*(``list\*('' widgets,
e.g., checklist, menu, buildlist, treeview.
-Each list-widget has "tag" and "description" values for each item
-which can be displayed.
+Each list-widget has \*(``tag\*('' and \*(``description\*('' values
+for each item which can be displayed.
If \fBdialog_vars.no_tags\fP is true,
-the "tag" value is not shown.
+the \*(``tag\*('' value is not shown.
The first character of the first value shown (tag or description)
is highlighted to indicate that the widget will match it for quick navigation.
-.RS
.TP 5
.B WINDOW *\fIwin
the window in which to display the text
@@ -3189,24 +3045,21 @@ the value to display
the number of columns available for printing the text
.TP 5
.B bool \fIfirst
-true if this is the first call (for "tag" and "description"),
+true if this is the first call (for \*(``tag\*('' and \*(``description\*(''),
and the first character of the value should be highlighted.
.TP 5
.B int \fIselected
-nonzero if the text should be displayed using the "selected" colors
-.RE
+nonzero if the text should be displayed using the \*(``selected\*('' colors
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_scrolled
+.SS dlg_print_scrolled
This is a wrapper for \fBdlg_print_autowrap\fP which allows the user
to scroll too-long prompt text up/down.
-.IP
+.LP
See \fBdlg_check_scrolled\fP for a function which updates the \fIoffset\fP
variable used as a parameter here.
It complements this function; you need both.
If \fIpauseopt\fP is set, this function returns an updated \fIlast\fP
parameter, needed for \fBdlg_check_scrolled\fP calls.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -3226,16 +3079,13 @@ is the width that the wrapping should occur in
.B int \fIpauseopt
is true if the extra functionality for scrolling should be enabled.
If false, this calls \fBdlg_print_autowrap\fP without doing any scrolling.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_line
+.SS dlg_print_line
Print one line of the prompt in the window within the limits of the
specified right margin.
The line will end on a word boundary and a pointer
to the start of the next line is returned, or a NULL pointer if the end of
*prompt is reached.
-.RS
.TP 5
.B WINDOW *\fIwin
is the window to update.
@@ -3255,27 +3105,21 @@ is the right margin
.TP 5
.B int *\fIx
returns the ending x-ordinate.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_prev_ok_buttonindex
+.SS dlg_prev_ok_buttonindex
Find the previous button index in the list from \fBdlg_ok_labels\fP.
-.RS
.TP 5
.B int \fIcurrent
is the current index
.TP 5
.B int \fIextra
if negative provides a way to enumerate extra active areas on the widget.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_autowrap
+.SS dlg_print_autowrap
Print a string of text in a window, automatically wrap around to the next
line if the string is too long to fit on one line.
Note that the string may contain embedded newlines.
The text is written starting at the top of the window.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -3288,28 +3132,22 @@ is the nominal height the wrapped string is limited to
.TP 5
.B int \fIwidth
is the width that the wrapping should occur in
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_size
+.SS dlg_print_size
If \fBdialog_vars.print_siz\fP is true,
print the given height/width (from a widget)
to \fBdialog_state.output\fP, e.g.,
\fBSize: height, width\fP.
-.RS
.TP 5
.B int \fIheight
is the window's height
.TP 5
.B int \fIwidth
is the window's width
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_print_text
+.SS dlg_print_text
Print up to \fIcols\fP columns from \fBtext\fP,
optionally rendering \fB\*p\fP's escape sequences for attributes and color.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window to update.
@@ -3323,11 +3161,9 @@ is the column limit
.B chtype * \fIattr
holds the starting attributes, and is updated to reflect the final attributes
applied to the string.
-.RE
.\" ---------------------------------------------------------------------------
-.B dlg_progressbox
+.SS dlg_progressbox
implements the "\fB--prgbox\fP" and "\fB--progressbox\fP" options.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -3345,25 +3181,21 @@ is the desired width of the box.
If zero, the height is based on the screen size.
.TP 5
.B int \fIpauseopt
-if true, an "OK" button will be shown,
+if true, an \*(``OK\*('' button will be shown,
and the dialog will wait for it to complete.
-With an "OK" button, it is denoted a "programbox",
-without an "OK" button, it is denoted a "progressbox".
+With an \*(``OK\*('' button, it is denoted a \*(``programbox\*('',
+without an \*(``OK\*('' button, it is denoted a \*(``progressbox\*(''.
.TP 5
.B FILE * \fIfp
is the file pointer, which may be a pipe or a regular file.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_put_backtitle
+.SS dlg_put_backtitle
Display the background title if \fBdialog_vars.backtitle\fP is non-null.
The background title is shown at the top of the screen.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_reallocate_gauge
+.SS dlg_reallocate_gauge
Allocates or reallocates a gauge widget (see \fBdlg_allocate_gauge\fP).
Use \fBdlg_update_gauge\fP to display the result.
-.RS
.TP 5
.B void ** \fIobjptr
If the pointer referenced by this parameter is null, the function creates
@@ -3389,14 +3221,11 @@ If zero, the height is adjusted to use the available screen size.
.TP 5
.B int \fIpercent
is the percentage to show in the progress bar.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_register_buttons
+.SS dlg_register_buttons
The widget developer should call this function after \fBdlg_register_window\fP,
for the list of button labels associated with the widget.
-One may bind a key to a button, e.g., "OK" for \fBDLGK_OK\fP,
-.RS
+One may bind a key to a button, e.g., \*(``OK\*('' for \fBDLGK_OK\fP,
.TP 5
.B WINDOW * \fIwin
is the window with which to associate the buttons
@@ -3406,12 +3235,9 @@ is the widget's binding name (usually the name of the widget).
.TP 5
.B const char ** \fIbuttons
is the list of buttons
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_register_window
+.SS dlg_register_window
For a given named widget's window, associate a binding table.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window with which to associate the buttons
@@ -3421,30 +3247,24 @@ is the widget's binding name (usually the name of the widget).
.TP 5
.B DLG_KEYS_BINDING * \fIbinding
is the binding table
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_remove_callback
+.SS dlg_remove_callback
Remove a callback.
-.RS
.TP 5
.B DIALOG_CALLBACK * \fIp
contains the callback information.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_renamed_menutext
+.SS dlg_renamed_menutext
This is a utility function which supports the \fB--inputmenu\fP option of
the \fB\*p\fP program.
If \fBdialog_vars.input_menu\fP is set, \fBdialog_menu\fP passes this
pointer to \fBdlg_menu\fP as the \fIrename_menutext\fP parameter.
Otherwise, it passes \fBdlg_dummy_menutext\fP.
-.IP
-The function should add "RENAMED" to \fBdialog_vars.input_result\fP ,
+.LP
+The function should add \*(``RENAMED\*('' to \fBdialog_vars.input_result\fP ,
followed by the menu item's name and the \fInewtext\fP value
(with a space separating the three items),
and return \fBDLG_EXIT_EXTRA\fP.
-.RS
.TP 5
.B DIALOG_LISTITEM * \fIitems
is the list of menu items
@@ -3454,31 +3274,26 @@ is the index of the currently-selected item
.TP 5
.B char * \fInewtext
is the updated text for the menu item
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_restore_vars
-Restore \fB\*p\fP's variables from the given variable (see \fBdialog_save_vars\fP).
-.RS
+.SS dlg_restore_vars
+Restore \fB\*p\fP's variables from the given variable
+(see \fBdialog_save_vars\fP).
.TP 5
.B DIALOG_VARS * \fIsave
is the variable from which to restore.
-.RE
-.IP
+.LP
The
\fIDIALOG_VARS.input_length\fP and
\fIDIALOG_VARS.input_result\fP members are treated specially,
since these are used by a widget to pass data to the caller.
They are not modified by this function.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_result_key
+.SS dlg_result_key
Test a \fB\*p\fP internal keycode to see if it corresponds to one of the push
-buttons on the widget such as "OK".
+buttons on the widget such as \*(``OK\*(''.
This is only useful if there are user-defined key bindings, since there are
no built-in bindings that map directly to \fBDLGK_OK\fP, etc.
Return true if a mapping was done.
-.RS
.TP 5
.B int \fIdialog_key
is the \fB\*p\fP key to test
@@ -3488,44 +3303,32 @@ is true if this is a function key
.TP 5
.B int * \fIresultp
store the result of the mapping in the referenced location.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_save_vars
+.SS dlg_save_vars
Save \fB\*p\fP's variables into the given variable (see \fBdlg_restore_vars\fP).
-.RS
.TP 5
.B DIALOG_VARS * \fIsave
is the variable into which to save.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_set_focus
+.SS dlg_set_focus
Set focus on the given window,
making it display above other windows on the screen.
-.RS
.TP 5
.B WINDOW * \fIparent
is the parent window (usually the top-level window of a widget)
.TP 5
.B WINDOW * \fIwin
is the window on which to place focus (usually a subwindow of a widget)
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_set_result
+.SS dlg_set_result
Setup a fixed-buffer for the result in \fBdialog_vars.input_result\fP
-.RS
.TP 5
.B const char * \fIstring
is the new contents for the result
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_show_string
+.SS dlg_show_string
Displays the string, shifted as necessary, to fit within the box and show
the current character-offset.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window within which to display
@@ -3553,44 +3356,45 @@ if true, do not echo input
.TP 5
.B bool \fIforce
if true, force repaint
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_strclone
+.SS dlg_strclone
duplicate the string, like \fBstrdup\fP.
-.RS
.TP 5
.B const char * \fIcprompt
is the string to duplicate
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_strcmp
+.SS dlg_strcmp
compare two strings, ignoring case.
-.RS
.TP 5
.B const char * \fIa
is one string
.TP 5
.B const char * \fIb
is the other string
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_string_to_argv
+.SS dlg_string_to_argv
Convert a string to an argument vector
returning an index (which must be freed by the caller).
-The string is modified (replacing gaps between tokens with nulls).
-.RS
+The string is modified:
+.bP
+Blanks between arguments are replaced by nulls.
+.bP
+Normally arguments are separated by blanks;
+however you can double-quote an argument to enclose blanks.
+The surrounding double-quotes are removed from the string.
+.bP
+A backslash preceding a double-quote within double-quotes is removed.
+.bP
+A backslash preceding a newline outside double-quotes is removed.
+.bP
+Except for special cases, backslashes are preserved in the strings,
+since other \fB\*l\fP functions interpret backslashes, e.g., for colors.
.TP 5
.B char *\fIblob
is the string to convert.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_sub_window
+.SS dlg_sub_window
create a subwindow, e.g., for an input area of a widget
-.RS
.TP 5
.B WINDOW * \fIwin
is the parent window
@@ -3606,43 +3410,53 @@ is the subwindow's top-row
.TP 5
.B int \fIx
is the subwindow's left-column
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_tab_correct_str
+.SS dlg_tab_correct_str
If the \fBdialog_vars.tab_correct\fP is true, convert tabs to single spaces.
Return the converted result.
The caller is responsible for freeing the string.
-.RS
.TP 5
.B char * \fIprompt
is the string to convert
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_trace
+.SS dlg_trace
If the parameter is non-null, opens a trace file with that
name and stores the file pointer in \fBdialog_state.trace\fP.
.\" ---------------------------------------------------------------------------
+.SS dlg_trace_2n
+logs a numeric value as a comment.
+.TP 5
+.B char * \fIname
+is the name to log in the comment.
.TP 5
-.B dlg_trace_chr
+.B int \fIvalue
+is the value to log in the comment.
+.\" ---------------------------------------------------------------------------
+.SS dlg_trace_2n
+logs a string value as a comment.
+If the value contains embedded newlines,
+the comment is continued with \*(``#+\*('' markers.
+.TP 5
+.B char * \fIname
+is the name to log in the comment.
+.TP 5
+.B int \fIvalue
+is the value to log in the comment.
+.\" ---------------------------------------------------------------------------
+.SS dlg_trace_chr
If \fBdialog_state.trace\fP is set,
translate the parameters into a printable representation,
-log it on a "chr" line.
-.RS
+log it on a \*(``chr\*('' line.
.TP 5
-.B int ch
+.B int \fIch
is the nominal keycode value.
.TP 5
-.B int fkey
+.B int \fIfkey
is nonzero if the value is really a function key.
Some of these may be values declared in the DLG_KEYS_ENUM.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_trace_msg
+.SS dlg_trace_msg
Write a formatted message to the trace file.
-.RS
.TP 5
.B const char * \fIfmt
is the format of the \fBprintf\fP-like message to write.
@@ -3650,28 +3464,27 @@ is the format of the \fBprintf\fP-like message to write.
.B ...
.br
are the variables to apply to the \fIfmt\fP format.
-.RE
-.IP
+.LP
Use the DLG_TRACE macro for portability, in case the trace
feature is not compiled into the library.
It uses an extra level of parentheses to work with a variable number of
parameters, e.g.,
-.ES
-.EX
-DLG_TRACE(("this is dialog version %s\\n", dialog_version()));
-.EE
+.Ex
+DLG_TRACE(("this is dialog version %s\en", dialog_version()));
+.Ee
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_trace_win
+.SS dlg_ttysize
+Returns the screensize without using curses.
+That allows the function to be used before initializing the screen.
+.\" ---------------------------------------------------------------------------
+.SS dlg_trace_win
If \fBdialog_state.trace\fP is set,
log a printable picture of the given window.
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_treeview
+.SS dlg_treeview
This is an alternate interface to 'treeview' which allows the application
to read the list item states back directly without putting them in the
output buffer.
-.RS
.TP 5
.B const char * \fItitle
is the title on the top of the widget.
@@ -3720,81 +3533,101 @@ or \fIFLAG_RADIO\fP for radiolists (a single selection).
.B int * \fIcurrent_item
The widget sets the referenced location to the index of the current display
item (cursor) when it returns.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_trim_string
+.SS dlg_trim_string
The \fBdialog\fP program uses this in each widget to adjust the
message string,
-which may contain the newline character (referred to as '\\n')
-and/or the special substring "\\n"
+which may contain the newline character (referred to as '\en')
+and/or the special substring "\en"
(which can be translated into a newline character).
-.IP
+.LP
There are several optional features:
-.RS
.bP
-Unless \fBdialog_vars.no_nl_expand\fP is set,
+Unless \fBdialog_vars.nocollapse\fP is set,
+each tab is converted to a space before other processing.
+.bP
+If \fBdialog_vars.no_nl_expand\fP is not set,
+and the string has "\en" substrings:
.RS
.bP
-If it has "\\n" substrings,
-the function preserves extra spaces.
+The function changes embedded "\en" substrings to '\en' characters.
+.IP
+The function preserves extra spaces after these substitutions.
For instance, spaces following a newline (substring or character)
are preserved to use as an indentation.
.bP
-The function changes embedded "\\n" substrings to '\\n' characters.
+If \fBdialog_vars.cr_wrap\fP is set,
+the function preserves '\en' newline characters.
+Otherwise, each '\en' newline character is converted to a space.
.RE
.bP
-If \fBdialog_vars.no_nl_expand\fP is not set,
-or if there are no "\\n" substrings,
-this function strips all extra spaces to simplify justification.
+Otherwise, if \fBdialog_vars.trim_whitespace\fP is set:
+.RS
+.bP
+This function strips all extra spaces to simplify justification.
.bP
If \fBdialog_vars.cr_wrap\fP is set,
-the function preserves '\\n' newline characters.
-Otherwise, each '\\n' newline character is converted to a space.
+the function preserves '\en' newline characters.
+Otherwise, each '\en' newline character is converted to a space.
+.RE
+.bP
+Finally
+(if \fBdialog_vars.no_nl_expand\fP is set,
+or the string does not contain "\en" substrings,
+and \fBdialog_vars.trim_whitespace\fP is not set):
+.RS
.bP
Unless \fBdialog_vars.nocollapse\fP is set,
-each tab character is converted to a space,
-and sequences of blanks (space or tab) are reduced to a single space.
+sequences of spaces are reduced to a single space.
.RE
-.RS
.TP 5
.B char * \fIsrc
is the string to trim
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_unregister_window
+.SS dlg_unregister_window
Remove the bindings for a given window.
-.RS
.TP 5
.B WINDOW * \fIwin
is the window from which to remove bindings
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_update_gauge
+.SS dlg_update_gauge
Update a gauge widget to show a different percentage value.
-.RS
.TP 5
.B void *\fIobjptr
points to the gauge object to update.
.TP 5
.B int \fIpercent
is the new percentage value to display.
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_yes_buttoncode
+.SS dlg_will_resize
+This filters out bursts of \fBKEY_RESIZE\fP values.
+Call this after \fBdlg_getc\fP returns \fBKEY_RESIZE\fP,
+to improve performance.
+.\" ---------------------------------------------------------------------------
+.SS dlg_yes_buttoncode
Map the given button index for \fBdlg_yes_labels\fP into \fB\*p\fP's exit-code.
-.RS
.TP 5
.B int \fIbutton
is the button index
-.RE
.\" ---------------------------------------------------------------------------
-.TP 5
-.B dlg_yes_labels
+.SS dlg_yes_labels
Return a list of buttons for Yes/No labels.
+.\" ---------------------------------------------------------------------------
+.SS end_dialog
+End use of \fB\*p\fP functions.
+.\" ---------------------------------------------------------------------------
+.SS init_dialog
+Do some initialization for \fB\*p\fP.
+.TP 5
+.B FILE *\fIinput
+is the real tty input of \fB\*p\fP.
+Usually it is the standard input, but if
+\fB--input-fd\fP option is used, it may be anything.
+.TP 5
+.B FILE *\fIoutput
+is where \fB\*p\fP will send its result.
+Usually it is the standard error, but
+if \fB--stdout\fP or \fB--output-fd\fP is used, it may be anything.
.
.\" ************************************************************************
.SH SEE ALSO
@@ -3802,4 +3635,4 @@ Return a list of buttons for Yes/No labels.
.
.\" ************************************************************************
.SH AUTHOR
-Thomas E. Dickey
+Thomas E.\& Dickey
diff --git a/contrib/dialog/dialog.c b/contrib/dialog/dialog.c
index 123878534c31..bab78a8a018e 100644
--- a/contrib/dialog/dialog.c
+++ b/contrib/dialog/dialog.c
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.c,v 1.231 2013/09/02 17:20:09 tom Exp $
+ * $Id: dialog.c,v 1.268 2018/06/21 09:16:05 tom Exp $
*
* cdialog - Display simple dialog boxes from shell scripts
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -109,6 +109,8 @@ typedef enum {
,o_prgbox
,o_print_maxsize
,o_print_size
+ ,o_print_text_only
+ ,o_print_text_size
,o_print_version
,o_programbox
,o_progressbox
@@ -151,10 +153,12 @@ typedef enum {
,o_editbox
,o_fselect
,o_timebox
+ ,o_week_start
#endif
#ifdef HAVE_XDIALOG2
,o_buildlist
,o_rangebox
+ ,o_reorder
,o_treeview
#endif
#if defined(HAVE_XDIALOG2) || defined(HAVE_WHIPTAIL)
@@ -164,6 +168,7 @@ typedef enum {
#ifdef HAVE_DLG_TRACE
,o_trace
#endif
+ ,o_iso_week
} eOptions;
/*
@@ -186,13 +191,26 @@ typedef struct {
callerFn *jumper;
} Mode;
-static bool *dialog_opts;
+static int known_opts = 0;
+static const char **dialog_opts;
static char **dialog_argv;
+static char **special_argv = 0;
+static int special_argc = 0;
+
static bool ignore_unknown = FALSE;
static const char *program = "dialog";
+#ifdef NO_LEAKS
+typedef struct _all_blobs {
+ struct _all_blobs *next;
+ void *blob;
+} AllBlobs;
+
+static AllBlobs *all_blobs;
+#endif
+
/*
* The options[] table is organized this way to make it simple to maintain
* a sorted list of options for the help-message.
@@ -272,6 +290,8 @@ static const Options options[] = {
{ "prgbox", o_prgbox, 2, "<text> <command> <height> <width>" },
{ "print-maxsize", o_print_maxsize, 1, "" },
{ "print-size", o_print_size, 1, "" },
+ { "print-text-only",o_print_text_only, 5, "<text> <height> <width>" },
+ { "print-text-size",o_print_text_size, 5, "<text> <height> <width>" },
{ "print-version", o_print_version, 5, "" },
{ "programbox", o_programbox, 2, "<text> <height> <width>" },
{ "progressbox", o_progressbox, 2, "<text> <height> <width>" },
@@ -320,12 +340,15 @@ static const Options options[] = {
{ "editbox", o_editbox, 2, "<file> <height> <width>" },
{ "fselect", o_fselect, 2, "<filepath> <height> <width>" },
{ "timebox", o_timebox, 2, "<text> <height> <width> <hour> <minute> <second>" },
+ { "week-start", o_week_start, 1, "<str>" },
+ { "iso-week", o_iso_week, 1, NULL },
#endif
#ifdef HAVE_XDIALOG2
- { "buildlist", o_buildlist, 2, "<text> <height> <width> <tag1> <item1> <status1>..." },
+ { "buildlist", o_buildlist, 2, "<text> <height> <width> <list-height> <tag1> <item1> <status1>..." },
{ "no-items", o_no_items, 1, "" },
{ "no-tags", o_no_tags, 1, "" },
{ "rangebox", o_rangebox, 2, "<text> <height> <width> <min-value> <max-value> <default-value>" },
+ { "reorder", o_reorder, 1, "" },
{ "treeview", o_treeview, 2, "<text> <height> <width> <list-height> <tag1> <item1> <status1> <depth1>..." },
#endif
#if defined(HAVE_XDIALOG2) || defined(HAVE_WHIPTAIL)
@@ -338,6 +361,76 @@ static const Options options[] = {
};
/* *INDENT-ON* */
+#ifdef NO_LEAKS
+static void
+ignore_leak(void *value)
+{
+ AllBlobs *next = dlg_calloc(AllBlobs, (size_t) 1);
+ if (next != 0) {
+ next->blob = value;
+ next->next = all_blobs;
+ all_blobs = next;
+ }
+}
+
+static void
+handle_leaks(void)
+{
+ while (all_blobs != 0) {
+ char *blob = all_blobs->blob;
+ AllBlobs *next = all_blobs->next;
+ free(blob);
+ free(all_blobs);
+ all_blobs = next;
+ }
+ free(dialog_opts);
+ if (special_argv != 0) {
+ free(special_argv[0]);
+ free(special_argv);
+ special_argv = 0;
+ special_argc = 0;
+ }
+}
+#else
+#define handle_leaks() /* nothing */
+#define ignore_leak(n) /* nothing */
+#endif
+
+#define OptionChars "\
+0123456789\
+-\
+abcdefghijklmnopqrstuvwxyz\
+"
+
+/*
+ * Check if the given string from main's argv is an option.
+ */
+static bool
+isOption(const char *arg)
+{
+ bool result = FALSE;
+
+ if (arg != 0) {
+ if (dialog_opts != 0) {
+ int n;
+ for (n = 0; dialog_opts[n] != 0; ++n) {
+ if (dialog_opts[n] == arg) {
+ result = TRUE;
+ break;
+ }
+ }
+ } else if (!strncmp(arg, "--", (size_t) 2) && isalpha(UCH(arg[2]))) {
+ if (strlen(arg) == (strspn) (arg, OptionChars)) {
+ result = TRUE;
+ } else {
+ handle_leaks();
+ dlg_exiterr("Invalid option \"%s\"", arg);
+ }
+ }
+ }
+ return result;
+}
+
/*
* Make an array showing which argv[] entries are options. Use "--" as a
* special token to escape the next argument, allowing it to begin with "--".
@@ -357,27 +450,51 @@ unescape_argv(int *argcp, char ***argvp)
int j, k;
int limit_includes = 20 + *argcp;
int count_includes = 0;
- bool changed = FALSE;
bool doalloc = FALSE;
char *filename;
+ const char **my_argv = 0;
+ int my_argc;
- dialog_opts = dlg_calloc(bool, (size_t) *argcp + 1);
- assert_ptr(dialog_opts, "unescape_argv");
+ DLG_TRACE(("# unescape_argv\n"));
+ for (k = 0; k < 2; ++k) {
+
+ my_argc = 0;
+ if (special_argv != 0) {
+ for (j = 0; special_argv[j] != 0; ++j) {
+ if (!strcmp(special_argv[j], "--")) {
+ break;
+ } else if (isOption(special_argv[j])) {
+ if (k != 0)
+ my_argv[my_argc] = special_argv[j];
+ my_argc++;
+ }
+ }
+ }
+
+ if (k == 0) {
+ my_argc += (*argcp + 1);
+ my_argv = dlg_calloc(const char *, (size_t) my_argc);
+ assert_ptr(my_argv, "unescape_argv");
+ }
+ }
for (j = 1; j < *argcp; j++) {
bool escaped = FALSE;
if (!strcmp((*argvp)[j], "--")) {
escaped = TRUE;
- changed = dlg_eat_argv(argcp, argvp, j, 1);
+ dlg_eat_argv(argcp, argvp, j, 1);
} else if (!strcmp((*argvp)[j], "--args")) {
fprintf(stderr, "Showing arguments at arg%d\n", j);
for (k = 0; k < *argcp; ++k) {
fprintf(stderr, " arg%d:%s\n", k, (*argvp)[k]);
}
- changed = dlg_eat_argv(argcp, argvp, j, 1);
+ dlg_eat_argv(argcp, argvp, j, 1);
+ --j;
} else if (!strcmp((*argvp)[j], "--file")) {
- if (++count_includes > limit_includes)
+ if (++count_includes > limit_includes) {
+ handle_leaks();
dlg_exiterr("Too many --file options");
+ }
if ((filename = (*argvp)[j + 1]) != 0) {
FILE *fp;
@@ -395,6 +512,7 @@ unescape_argv(int *argcp, char ***argvp)
}
if (fp) {
+ DLG_TRACE(("# opened --file %s ..\n", filename));
blob = NULL;
length = 0;
do {
@@ -405,50 +523,71 @@ unescape_argv(int *argcp, char ***argvp)
(size_t) BUFSIZ,
fp);
length += bytes_read;
- if (ferror(fp))
+ if (ferror(fp)) {
+ handle_leaks();
dlg_exiterr("error on filehandle in unescape_argv");
+ }
} while (bytes_read == BUFSIZ);
fclose(fp);
blob[length] = '\0';
+ ignore_leak(blob);
list = dlg_string_to_argv(blob);
- if ((added = dlg_count_argv(list)) != 0) {
- if (added > 2) {
- size_t need = (size_t) (*argcp + added + 1);
- if (doalloc) {
- *argvp = dlg_realloc(char *, need, *argvp);
- assert_ptr(*argvp, "unescape_argv");
- } else {
- char **newp = dlg_malloc(char *, need);
- assert_ptr(newp, "unescape_argv");
- for (n = 0; n < *argcp; ++n) {
- newp[n] = (*argvp)[n];
- }
- *argvp = newp;
- doalloc = TRUE;
+ added = dlg_count_argv(list);
+ if (added > 2) {
+ /* *argcp arguments before the expansion of --file
+ - 2 for the removal of '--file <filepath>'
+ + added for the arguments contained in <filepath>
+ + 1 for the terminating NULL pointer */
+ size_t need = (size_t) (*argcp + added - 1);
+ if (doalloc) {
+ *argvp = dlg_realloc(char *, need, *argvp);
+ assert_ptr(*argvp, "unescape_argv");
+ } else {
+ char **newp = dlg_malloc(char *, need);
+ ignore_leak(newp);
+ assert_ptr(newp, "unescape_argv");
+ for (n = 0; n < *argcp; ++n) {
+ newp[n] = (*argvp)[n];
}
- dialog_opts = dlg_realloc(bool, need, dialog_opts);
- assert_ptr(dialog_opts, "unescape_argv");
+ /* The new array is not NULL-terminated yet. */
+ *argvp = newp;
+ doalloc = TRUE;
}
- for (n = *argcp; n >= j + 2; --n) {
+ my_argv = dlg_realloc(const char *, need, my_argv);
+ assert_ptr(my_argv, "unescape_argv");
+
+ /* Shift the arguments after '--file <filepath>'
+ right by (added - 2) positions */
+ for (n = *argcp - 1; n >= j + 2; --n) {
(*argvp)[n + added - 2] = (*argvp)[n];
- dialog_opts[n + added - 2] = dialog_opts[n];
}
- for (n = 0; n < added; ++n) {
- (*argvp)[n + j] = list[n];
- dialog_opts[n + j] = FALSE;
+ } else if (added < 2) {
+ /* 0 or 1 argument read from the included file
+ -> shift the arguments after '--file <filepath>'
+ left by (2 - added) positions */
+ for (n = j + added; n + 2 - added < *argcp; ++n) {
+ (*argvp)[n] = (*argvp)[n + 2 - added];
}
- *argcp += added - 2;
- free(list);
}
+ /* Copy the inserted arguments to *argvp */
+ for (n = 0; n < added; ++n) {
+ (*argvp)[n + j] = list[n];
+ }
+ *argcp += added - 2;
+ (*argvp)[*argcp] = 0; /* Write the NULL terminator */
+ free(list); /* No-op if 'list' is NULL */
+ /* Force rescan starting from the first inserted argument */
+ --j;
+ DLG_TRACE(("# finished --file\n"));
+ continue;
} else {
+ handle_leaks();
dlg_exiterr("Cannot open --file %s", filename);
}
- (*argvp)[*argcp] = 0;
- ++j;
- continue;
} else {
+ handle_leaks();
dlg_exiterr("No value given for --file");
}
}
@@ -456,52 +595,18 @@ unescape_argv(int *argcp, char ***argvp)
&& (*argvp)[j] != 0
&& !strncmp((*argvp)[j], "--", (size_t) 2)
&& isalpha(UCH((*argvp)[j][2]))) {
- dialog_opts[j] = TRUE;
+ my_argv[my_argc++] = (*argvp)[j];
+ DLG_TRACE(("#\toption argv[%d]=%s\n", j, (*argvp)[j]));
}
}
- /* if we didn't find any "--" tokens, there's no reason to do the table
- * lookup in isOption()
- */
- if (!changed) {
- free(dialog_opts);
- dialog_opts = 0;
- }
- dialog_argv = (*argvp);
-}
+ my_argv[my_argc] = 0;
-#define OptionChars "\
-0123456789\
--\
-abcdefghijklmnopqrstuvwxyz\
-"
+ known_opts = my_argc;
+ dialog_opts = my_argv;
-/*
- * Check if the given string from main's argv is an option.
- */
-static bool
-isOption(const char *arg)
-{
- bool result = FALSE;
-
- if (arg != 0) {
- if (dialog_opts != 0) {
- int n;
- for (n = 1; dialog_argv[n] != 0; ++n) {
- if (dialog_argv[n] == arg) {
- result = dialog_opts[n];
- break;
- }
- }
- } else if (!strncmp(arg, "--", (size_t) 2) && isalpha(UCH(arg[2]))) {
- if (strlen(arg) == strspn(arg, OptionChars)) {
- result = TRUE;
- } else {
- dlg_exiterr("Invalid option \"%s\"", arg);
- }
- }
- }
- return result;
+ DLG_TRACE(("#\t%d options vs %d arguments\n", known_opts, *argcp));
+ dialog_argv = (*argvp);
}
static eOptions
@@ -526,6 +631,7 @@ lookupOption(const char *name, int pass)
static void
Usage(const char *msg)
{
+ handle_leaks();
dlg_exiterr("Error: %s.\nUse --help to list options.\n\n", msg);
}
@@ -553,19 +659,23 @@ howmany_tags(char *argv[], int group)
{
int result = 0;
int have;
- const char *format = "Expected %d arguments, found only %d";
char temp[80];
while (argv[0] != 0) {
if (isOption(argv[0]))
break;
if ((have = arg_rest(argv)) < group) {
+ const char *format = _("Expected %d arguments, found only %d");
sprintf(temp, format, group, have);
Usage(temp);
+ } else if ((have % group) != 0) {
+ const char *format = _("Expected %d arguments, found extra %d");
+ sprintf(temp, format, group, (have % group));
+ Usage(temp);
}
- argv += group;
- result++;
+ argv += have;
+ result += (have / group);
}
return result;
@@ -634,6 +744,7 @@ show_result(int ret)
if (dialog_vars.input_result != 0
&& dialog_vars.input_result[0] != '\0') {
fputs(dialog_vars.input_result, dialog_state.output);
+ DLG_TRACE(("# input_result:\n%s\n", dialog_vars.input_result));
either = TRUE;
}
if (either) {
@@ -872,7 +983,7 @@ call_buildlist(CALLARGS)
numeric_arg(av, 3),
numeric_arg(av, 4),
tags, av + 5,
- TRUE);
+ dialog_vars.reorder);
RestoreNoTags();
return result;
}
@@ -1099,10 +1210,10 @@ static const Mode modes[] =
{o_msgbox, 4, 4, call_msgbox},
{o_infobox, 4, 4, call_infobox},
{o_textbox, 4, 4, call_textbox},
- {o_menu, 7, 0, call_menu},
- {o_inputmenu, 7, 0, call_inputmenu},
- {o_checklist, 8, 0, call_checklist},
- {o_radiolist, 8, 0, call_radiolist},
+ {o_menu, 6, 0, call_menu},
+ {o_inputmenu, 6, 0, call_inputmenu},
+ {o_checklist, 7, 0, call_checklist},
+ {o_radiolist, 7, 0, call_radiolist},
{o_inputbox, 4, 5, call_inputbox},
{o_passwordbox, 4, 5, call_passwordbox},
#ifdef HAVE_DLG_GAUGE
@@ -1127,13 +1238,15 @@ static const Mode modes[] =
{o_tailboxbg, 4, 4, call_tailboxbg},
#endif
#ifdef HAVE_XDIALOG
- {o_buildlist, 4, 0, call_buildlist},
{o_calendar, 4, 7, call_calendar},
{o_dselect, 4, 5, call_dselect},
{o_editbox, 4, 4, call_editbox},
{o_fselect, 4, 5, call_fselect},
- {o_rangebox, 5, 7, call_rangebox},
{o_timebox, 4, 7, call_timebox},
+#endif
+#ifdef HAVE_XDIALOG2
+ {o_buildlist, 4, 0, call_buildlist},
+ {o_rangebox, 5, 7, call_rangebox},
{o_treeview, 4, 0, call_treeview},
#endif
};
@@ -1214,6 +1327,64 @@ button_code(const char *name)
}
/*
+ * If this is the last option, we do not want any error messages - just our
+ * output. Calling end_dialog() cancels the refresh() at the end of the
+ * program as well.
+ */
+static void
+IgnoreNonScreen(char **argv, int offset)
+{
+ if (argv[offset + 1] == 0) {
+ ignore_unknown = TRUE;
+ end_dialog();
+ }
+}
+
+static void
+PrintTextOnly(char **argv, int *offset, eOptions code)
+{
+ /* TODO - handle two optional numeric params */
+ char *text;
+ int height = 0;
+ int width = 0;
+ int height2 = 0;
+ int width2 = 0;
+ int next = arg_rest(argv + *offset);
+
+ if (LINES <= 0 && COLS <= 0)
+ dlg_ttysize(fileno(dialog_state.input), &LINES, &COLS);
+
+ text = strdup(optionString(argv, offset));
+ IgnoreNonScreen(argv, *offset);
+
+ if (next >= 1) {
+ next = MIN(next, 3);
+ height = numeric_arg(argv, *offset + 1);
+ if (next >= 2)
+ width = numeric_arg(argv, *offset + 2);
+ *offset += next - 1;
+ }
+
+ dlg_trim_string(text);
+ dlg_auto_size(NULL, text, &height2, &width2, height, width);
+
+ switch (code) {
+ case o_print_text_only:
+ dialog_state.text_only = TRUE;
+ dlg_print_autowrap(stdscr, text, height2, width2);
+ dialog_state.text_only = FALSE;
+ break;
+ case o_print_text_size:
+ fprintf(dialog_state.output, "%d %d\n",
+ dialog_state.text_height,
+ dialog_state.text_width);
+ break;
+ default:
+ break;
+ }
+}
+
+/*
* Print parts of a message
*/
static void
@@ -1276,7 +1447,7 @@ Help(void)
static const char *const tbl_1[] =
{
"cdialog (ComeOn Dialog!) version %s",
- "Copyright 2000-2012,2013 Thomas E. Dickey",
+ "Copyright 2000-2017,2018 Thomas E. Dickey",
"This is free software; see the source for copying conditions. There is NO",
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.",
"",
@@ -1330,13 +1501,15 @@ Help(void)
for (j = 0; j < limit; j++) {
if ((opts[j]->pass & 2) != 0
&& opts[j]->help != 0
- && lookupMode(opts[j]->code))
+ && lookupMode(opts[j]->code)) {
fprintf(dialog_state.output, " --%-12s %s\n", opts[j]->name,
opts[j]->help);
+ }
}
PrintList(tbl_3);
free(opts);
+ handle_leaks();
dlg_exit(DLG_EXIT_OK);
}
@@ -1355,13 +1528,13 @@ process_trace_option(char **argv, int *offset)
if (dialog_state.trace_output == 0) {
dlg_trace(optionString(argv, offset));
} else {
- dlg_trace_msg("# ignore extra --trace option\n");
+ DLG_TRACE(("# ignore extra --trace option\n"));
*offset += 1;
}
- dlg_trace_msg("# Parameters:\n");
+ DLG_TRACE(("# Parameters:\n"));
for (j = 0; argv[j] != 0; ++j) {
- dlg_trace_msg("# argv[%d] = %s\n", j, argv[j]);
+ DLG_TRACE(("#\targv[%d] = %s\n", j, argv[j]));
}
}
#endif
@@ -1375,12 +1548,13 @@ static int
process_common_options(int argc, char **argv, int offset, bool output)
{
bool done = FALSE;
+ eOptions code;
- dlg_trace_msg("# process_common_options, offset %d\n", offset);
+ DLG_TRACE(("# process_common_options, offset %d\n", offset));
while (offset < argc && !done) { /* Common options */
- dlg_trace_msg("#\targv[%d] = %s\n", offset, argv[offset]);
- switch (lookupOption(argv[offset], 1)) {
+ DLG_TRACE(("#\targv[%d] = %s\n", offset, argv[offset]));
+ switch (code = lookupOption(argv[offset], 1)) {
case o_title:
dialog_vars.title = optionString(argv, &offset);
break;
@@ -1485,17 +1659,13 @@ process_common_options(int argc, char **argv, int offset, bool output)
case o_print_size:
dialog_vars.print_siz = TRUE;
break;
+ case o_print_text_only:
+ case o_print_text_size:
+ PrintTextOnly(argv, &offset, code);
+ break;
case o_print_maxsize:
if (output) {
- /*
- * If this is the last option, we do not want any error
- * messages - just our output. Calling end_dialog() cancels
- * the refresh() at the end of the program as well.
- */
- if (argv[offset + 1] == 0) {
- ignore_unknown = TRUE;
- end_dialog();
- }
+ IgnoreNonScreen(argv, offset);
fflush(dialog_state.output);
fprintf(dialog_state.output, "MaxSize: %d, %d\n", SLINES, SCOLS);
}
@@ -1632,10 +1802,31 @@ process_common_options(int argc, char **argv, int offset, bool output)
dialog_vars.no_tags = TRUE;
break;
#endif
+#ifdef HAVE_XDIALOG2
+ case o_reorder:
+ dialog_vars.reorder = TRUE;
+ break;
+#endif
+#ifdef HAVE_XDIALOG
+ case o_week_start:
+ dialog_vars.week_start = optionString(argv, &offset);
+ break;
+#endif
+ case o_iso_week:
+ dialog_vars.iso_week = TRUE;
+ if (dialog_vars.week_start == 0) { /* Monday is implied */
+ static char default_1st[] = "1";
+ dialog_vars.week_start = default_1st;
+ }
+ break;
}
if (!done)
offset++;
}
+
+ if (dialog_state.aspect_ratio == 0)
+ dialog_state.aspect_ratio = DEFAULT_ASPECT_RATIO;
+
return offset;
}
@@ -1647,10 +1838,8 @@ static void
init_result(char *buffer)
{
static bool first = TRUE;
- static char **special_argv = 0;
- static int special_argc = 0;
- dlg_trace_msg("# init_result\n");
+ DLG_TRACE(("# init_result\n"));
/* clear everything we do not save for the next widget */
memset(&dialog_vars, 0, sizeof(dialog_vars));
@@ -1675,19 +1864,8 @@ init_result(char *buffer)
first = FALSE;
}
- /*
- * If we are not checking memory leaks, just do the parse of the
- * environment once.
- */
if (special_argv != 0) {
process_common_options(special_argc, special_argv, 0, FALSE);
-#ifdef NO_LEAKS
- free(special_argv[0]);
- free(special_argv);
- special_argv = 0;
- special_argc = 0;
- first = TRUE;
-#endif
}
}
@@ -1697,6 +1875,7 @@ main(int argc, char *argv[])
char temp[256];
bool esc_pressed = FALSE;
bool keep_tite = FALSE;
+ bool first_time = TRUE;
int offset = 1;
int offset_add;
int retval = DLG_EXIT_OK;
@@ -1717,6 +1896,7 @@ main(int argc, char *argv[])
(void) setlocale(LC_ALL, "");
#endif
+ init_result(my_buffer); /* honor $DIALOGOPTS */
unescape_argv(&argc, &argv);
program = argv[0];
dialog_state.output = stderr;
@@ -1742,13 +1922,17 @@ main(int argc, char *argv[])
break;
case o_input_fd:
if ((j = optionValue(argv, &offset)) < 0
- || (dialog_state.input = fdopen(j, "r")) == 0)
+ || (dialog_state.input = fdopen(j, "r")) == 0) {
+ handle_leaks();
dlg_exiterr("Cannot open input-fd\n");
+ }
break;
case o_output_fd:
if ((j = optionValue(argv, &offset)) < 0
- || (dialog_state.output = fdopen(j, "w")) == 0)
+ || (dialog_state.output = fdopen(j, "w")) == 0) {
+ handle_leaks();
dlg_exiterr("Cannot open output-fd\n");
+ }
break;
case o_keep_tite:
keep_tite = TRUE;
@@ -1756,7 +1940,7 @@ main(int argc, char *argv[])
case o_version:
dialog_state.output = stdout;
PrintVersion(dialog_state.output);
- exit(DLG_EXIT_OK);
+ dlg_exit(DLG_EXIT_OK);
break;
case o_help:
Help();
@@ -1780,26 +1964,25 @@ main(int argc, char *argv[])
++offset;
continue;
}
- dlg_trace_msg("# discarding %d parameters starting with argv[%d] (%s)\n",
- 1 + offset - base, base,
- argv[base]);
+ DLG_TRACE(("# discarding %d parameters starting with argv[%d] (%s)\n",
+ 1 + offset - base, base,
+ argv[base]));
for (j = base; j < argc; ++j) {
dialog_argv[j] = dialog_argv[j + 1 + (offset - base)];
- if (dialog_opts != 0)
- dialog_opts[j] = dialog_opts[j + 1 + (offset - base)];
}
argc -= (1 + offset - base);
offset = base;
}
offset = 1;
init_result(my_buffer);
+ dialog_vars.keep_tite = keep_tite; /* init_result() cleared global */
/*
* Dialog's output may be redirected (see above). Handle the special
* case of options that only report information without interaction.
*/
if (argc == 2) {
- switch (lookupOption(argv[1], 7)) {
+ switch (code = lookupOption(argv[1], 7)) {
case o_print_maxsize:
(void) initscr();
endwin();
@@ -1820,33 +2003,44 @@ main(int argc, char *argv[])
Help();
break;
}
- return DLG_EXIT_OK;
- }
-
- if (argc < 2) {
+ dlg_exit(DLG_EXIT_OK);
+ } else if (argc < 2) {
Help();
}
#ifdef HAVE_RC_FILE
- if (lookupOption(argv[1], 7) == o_create_rc) {
+ else if (lookupOption(argv[1], 7) == o_create_rc) {
if (argc != 3) {
sprintf(temp, "Expected a filename for %.50s", argv[1]);
Usage(temp);
}
- if (dlg_parse_rc() == -1) /* Read the configuration file */
+ if (dlg_parse_rc() == -1) { /* Read the configuration file */
+ handle_leaks();
dlg_exiterr("dialog: dlg_parse_rc");
+ }
dlg_create_rc(argv[2]);
- return DLG_EXIT_OK;
+ dlg_exit(DLG_EXIT_OK);
}
#endif
-
- dialog_vars.keep_tite = keep_tite; /* init_result() cleared global */
+ else {
+ /*
+ * Handle combinations of common options including --print-text-only
+ * which can be done before involving curses, in case we can exit
+ * without initializing curses (and writing to the terminal).
+ */
+ offset = process_common_options(argc, argv, offset, TRUE);
+ if (offset >= argc)
+ dlg_exit(DLG_EXIT_OK);
+ }
init_dialog(dialog_state.input, dialog_state.output);
while (offset < argc && !esc_pressed) {
- init_result(my_buffer);
-
- offset = process_common_options(argc, argv, offset, TRUE);
+ if (first_time) {
+ first_time = FALSE;
+ } else {
+ init_result(my_buffer);
+ offset = process_common_options(argc, argv, offset, TRUE);
+ }
if (argv[offset] == NULL) {
if (ignore_unknown)
@@ -1854,15 +2048,22 @@ main(int argc, char *argv[])
Usage("Expected a box option");
}
- if (lookupOption(argv[offset], 2) != o_checklist
- && dialog_vars.separate_output) {
- sprintf(temp, "Expected --checklist, not %.20s", argv[offset]);
- Usage(temp);
+ if (dialog_vars.separate_output) {
+ switch (lookupOption(argv[offset], 2)) {
+#ifdef HAVE_XDIALOG2
+ case o_buildlist:
+ case o_treeview:
+#endif
+ case o_checklist:
+ break;
+ default:
+ sprintf(temp,
+ "Unexpected widget with --separate-output %.20s",
+ argv[offset]);
+ Usage(temp);
+ }
}
- if (dialog_state.aspect_ratio == 0)
- dialog_state.aspect_ratio = DEFAULT_ASPECT_RATIO;
-
dlg_put_backtitle();
/* use a table to look for the requested mode, to avoid code duplication */
@@ -1917,15 +2118,17 @@ main(int argc, char *argv[])
} else {
argv[j] = strdup("?");
}
+ ignore_leak(argv[j]);
}
break;
}
}
+ DLG_TRACE(("# execute %s\n", argv[offset]));
retval = show_result((*(modePtr->jumper)) (dialog_vars.title,
argv + offset,
&offset_add));
- dlg_trace_msg("# widget returns %d\n", retval);
+ DLG_TRACE(("# widget returns %d\n", retval));
offset += offset_add;
if (dialog_vars.input_result != my_buffer) {
@@ -1972,5 +2175,6 @@ main(int argc, char *argv[])
(void) refresh();
end_dialog();
}
+ handle_leaks();
dlg_exit(retval);
}
diff --git a/contrib/dialog/dialog.h b/contrib/dialog/dialog.h
index 1a6b0f72c96e..2746cd03328d 100644
--- a/contrib/dialog/dialog.h
+++ b/contrib/dialog/dialog.h
@@ -1,9 +1,9 @@
/*
- * $Id: dialog.h,v 1.267 2013/09/22 19:06:36 tom Exp $
+ * $Id: dialog.h,v 1.283 2018/06/19 22:52:11 tom Exp $
*
* dialog.h -- common declarations for all dialog modules
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -127,8 +127,8 @@
#define USE_COLORS TRUE
#ifdef HAVE_COLOR
-#define SCOLS (COLS - (dialog_state.use_shadow ? 2 : 0))
-#define SLINES (LINES - (dialog_state.use_shadow ? 1 : 0))
+#define SCOLS (COLS - (dialog_state.use_shadow ? SHADOW_COLS : 0))
+#define SLINES (LINES - (dialog_state.use_shadow ? SHADOW_ROWS : 0))
#else
#define SCOLS COLS
#define SLINES LINES
@@ -154,15 +154,16 @@
#define CHR_NEXT DLG_CTRL('N')
#define CHR_PREVIOUS DLG_CTRL('P')
#define CHR_TRACE DLG_CTRL('T')
+#define CHR_SPACE ' '
#define ESC 27
#define TAB DLG_CTRL('I')
-#define MARGIN 1
-#define GUTTER 2
-#define SHADOW_ROWS 1
-#define SHADOW_COLS 2
-#define ARROWS_COL 5
+#define MARGIN 1 /* width of the line drawn around each box */
+#define GUTTER 2 /* minimum columns between name/description in menu */
+#define SHADOW_ROWS 1 /* rows to reserve for window's shadow */
+#define SHADOW_COLS 2 /* columns to reserve for window's shadow */
+#define ARROWS_COL 5 /* distance from left margin to up/down arrows */
#define MAX_LEN 2048
#define BUF_SIZE (10L*1024)
@@ -389,6 +390,19 @@ extern WINDOW * dlg_wgetparent(WINDOW * /*win*/);
#define DLGK_max (KEY_MAX + 256)
/*
+ * Use attributes.
+ */
+#ifdef PDCURSES
+#define dlg_attrset(w,a) (void) wattrset((w), (a))
+#define dlg_attron(w,a) (void) wattron((w), (a))
+#define dlg_attroff(w,a) (void) wattroff((w), (a))
+#else
+#define dlg_attrset(w,a) (void) wattrset((w), (int)(a))
+#define dlg_attron(w,a) (void) wattron((w), (int)(a))
+#define dlg_attroff(w,a) (void) wattroff((w), (int)(a))
+#endif
+
+/*
* Callbacks are used to implement the "background" tailbox.
*/
struct _dlg_callback;
@@ -447,6 +461,12 @@ typedef struct {
int visit_cols; /* option "--visit-items" */
/* 1.2-20130922 */
bool finish_string; /* caching optimization for gauge */
+ /* 1.2-20150125 */
+ bool plain_buttons; /* true to suppress button-label highlight */
+ /* 1.3-20180610 */
+ bool text_only; /* option "--print-text-only", etc. */
+ int text_height;
+ int text_width;
} DIALOG_STATE;
extern DIALOG_STATE dialog_state;
@@ -526,6 +546,12 @@ typedef struct {
bool last_key; /* option "--last-key" */
/* 1.2-20130902 */
bool help_tags; /* option "--help-tags" */
+ /* 1.3-20160126 */
+ char *week_start; /* option "--week-start" */
+ /* 1.3-20160206 */
+ bool iso_week; /* option "--iso-week" */
+ /* 1.3-20170131 */
+ bool reorder; /* option "--reorder" */
} DIALOG_VARS;
#define USE_ITEM_HELP(s) (dialog_vars.item_help && (s) != 0)
@@ -553,6 +579,10 @@ extern DIALOG_VARS dialog_vars;
#define chtype long
#endif
+#ifndef isblank
+#define isblank(c) ((c) == ' ' || (c) == TAB)
+#endif
+
#define UCH(ch) ((unsigned char)(ch))
#define assert_ptr(ptr,msg) if ((ptr) == 0) dlg_exiterr("cannot allocate memory in " msg)
@@ -711,6 +741,9 @@ extern void dlg_show_string(WINDOW * /*win*/, const char * /*string*/, int /*off
extern int dlg_dummy_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
extern int dlg_renamed_menutext(DIALOG_LISTITEM * /*items*/, int /*current*/, char * /*newtext*/);
+/* prgbox.c */
+extern FILE * dlg_popen(const char * /*command */, const char * /*type */);
+
/* rc.c */
#ifdef HAVE_RC_FILE
extern int dlg_parse_rc(void);
@@ -720,6 +753,9 @@ extern void dlg_create_rc(const char * /*filename*/);
/* treeview.c */
extern int dlg_treeview(const char * /*title*/, const char * /*cprompt*/, int /*height*/, int /*width*/, int /*list_height*/, int /*item_no*/, DIALOG_LISTITEM * /*items*/, const char * /*states*/, int * /*depths*/, int /*flag*/, int * /*current_item*/);
+/* ttysize.c */
+extern int dlg_ttysize(int /* fd */, int * /* height */, int * /* width */);
+
/* ui_getc.c */
extern int dlg_getc(WINDOW * /*win*/, int * /*fkey*/);
extern int dlg_getc_callbacks(int /*ch*/, int /*fkey*/, int * /*result*/);
@@ -809,11 +845,17 @@ extern int dlg_strcmp(const char * /*a*/, const char * /*b*/);
#ifdef HAVE_DLG_TRACE
#define DLG_TRACE(params) dlg_trace_msg params
extern void dlg_trace_msg(const char *fmt, ...) GCC_PRINTFLIKE(1,2);
+#define DLG_TRACE2S(name,value) dlg_trace_2s (name,value)
+#define DLG_TRACE2N(name,value) dlg_trace_2n (name,value)
+extern void dlg_trace_2s(const char * /*name*/, const char * /*value*/);
+extern void dlg_trace_2n(const char * /*name*/, int /*value*/);
extern void dlg_trace_win(WINDOW * /*win*/);
extern void dlg_trace_chr(int /*ch*/, int /*fkey*/);
extern void dlg_trace(const char * /*fname*/);
#else
#define DLG_TRACE(params) /* nothing */
+#define DLG_TRACE2S(name,value) /* nothing */
+#define DLG_TRACE2N(name,value) /* nothing */
#define dlg_trace_win(win) /* nothing */
#define dlg_trace_chr(ch,fkey) /* nothing */
#define dlg_trace(fname) /* nothing */
@@ -821,6 +863,7 @@ extern void dlg_trace(const char * /*fname*/);
#ifdef KEY_RESIZE
extern void dlg_move_window(WINDOW * /*win*/, int /*height*/, int /*width*/, int /*y*/, int /*x*/);
+extern void dlg_will_resize(WINDOW * /*win*/);
#endif
/*
@@ -840,7 +883,7 @@ typedef struct mseRegion {
#if defined(NCURSES_MOUSE_VERSION)
-#define mouse_open() mousemask(BUTTON1_CLICKED, (mmask_t *) 0)
+#define mouse_open() mousemask(BUTTON1_PRESSED, (mmask_t *) 0)
#define mouse_close() mousemask(0, (mmask_t *) 0)
extern mseRegion * dlg_mouse_mkregion (int /*y*/, int /*x*/, int /*height*/, int /*width*/, int /*code*/);
diff --git a/contrib/dialog/dialog.pl b/contrib/dialog/dialog.pl
index 8fbb68fd8eb7..da0e6444ab9b 100644
--- a/contrib/dialog/dialog.pl
+++ b/contrib/dialog/dialog.pl
@@ -1,6 +1,30 @@
# Functions that handle calling dialog(1) -*-perl-*-
-# $Id: dialog.pl,v 1.4 2001/10/13 00:40:22 tom Exp $
-
+# $Id: dialog.pl,v 1.18 2018/06/12 21:01:58 tom Exp $
+################################################################################
+# Copyright 2018 Thomas E. Dickey
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License, version 2.1
+# as published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to
+# Free Software Foundation, Inc.
+# 51 Franklin St., Fifth Floor
+# Boston, MA 02110, USA.
+################################################################################
+# The "rhs_" functions, as well as return_output originally came from Redhat
+# 4.0, e.g.,
+# http://www.ibiblio.org/pub/historic-linux/distributions/redhat-4.0/i386/live/usr/bin/Xconfigurator.pl
+# The other functions were added to make this more useful for demonstrations.
+
+# These comments are from the original file:
+#------------------------------------------------------------------------------
# Return values are 1 for success and 0 for failure (or cancel)
# Resultant text (if any) is in dialog_result
@@ -10,443 +34,565 @@
# Note that dialog generally returns 0 for success, so I invert the
# sense of the return code for more readable boolean expressions.
+#------------------------------------------------------------------------------
+
+use warnings;
+use strict;
+use diagnostics;
-$scr_lines = 24;
+our $DIALOG = "dialog";
+our $GAUGE;
+our $gauge_width;
+our $scr_lines = 24;
+our $scr_cols = 80;
+our @dialog_result;
+our $trace = 0;
require "flush.pl";
+sub trace {
+ if ($trace) {
+ if ( open TRACE, ">>dialog.log" ) {
+ printf TRACE $_[0], @_[ 1 .. $#_ ];
+ close TRACE;
+ }
+ }
+}
+
+sub quoted($) {
+ my $text = shift;
+ $text =~ s/[\r\n]+/\n/g;
+ $text =~ s/[^\n\t -~]/?/g;
+ $text =~ s/([\\"])/\\$1/g;
+ return sprintf "\"%s\"", $text;
+}
+
+sub screensize() {
+ my $params = `$DIALOG --stdout --print-maxsize`;
+ $params =~ s/\s+$//;
+ $params =~ s/^[^:]*:\s+//;
+ my @params = split /,\s+/, $params;
+ if ( $#params == 1 ) {
+ $scr_lines = $params[0];
+ $scr_cols = $params[1];
+ }
+ else {
+ $scr_lines = 24;
+ $scr_cols = 80;
+ }
+}
+
+sub height_of($$) {
+ my $width = shift;
+ my $message = shift;
+ my $command =
+ "$DIALOG --stdout --print-text-size "
+ . &quoted($message)
+ . " $scr_lines $width 2>&1";
+ my $params = `$command`;
+ my @params = split( /\s/, $params );
+ return $params[0];
+}
+
sub rhs_clear {
- return system("dialog --clear");
+ return system("$DIALOG --clear");
}
sub rhs_textbox {
- local ( $title, $file, $width, $height ) = @_;
+ my ( $title, $file, $width, $height ) = @_;
- system("dialog --title \"$title\" --textbox $file $height $width");
+ $width = int($width);
+ $height = int($height);
+ system( "$DIALOG --title "
+ . &quoted($title)
+ . " --textbox $file $height $width" );
return 1;
}
sub rhs_msgbox {
- local ( $title, $message, $width ) = @_;
- local ( $tmp, $height, $message_len );
-
- $message = &rhs_wordwrap($message, $width);
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
- $height = 4 + $message_len;
-
- $tmp = system("dialog --title \"$title\" --msgbox \"$message\" $height $width");
+ my ( $title, $message, $width ) = @_;
+ my ( $tmp, $height );
+
+ $width = int($width);
+ $message = &rhs_wordwrap( $message, $width );
+ $height = 5 + &height_of( $width, $message );
+
+ $tmp =
+ system( "$DIALOG --title "
+ . &quoted($title)
+ . " --msgbox "
+ . &quoted($message)
+ . " $height $width" );
if ($tmp) {
- return 0;
- } else {
- return 1;
+ return 0;
+ }
+ else {
+ return 1;
}
}
sub rhs_infobox {
- local ( $title, $message, $width ) = @_;
- local ( $tmp, $height, $message_len );
-
- $message = &rhs_wordwrap($message, $width);
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
- $height = 2 + $message_len;
-
- return system("dialog --title \"$title\" --infobox \"$message\" $height $width");
+ my ( $title, $message, $width ) = @_;
+ my ( $tmp, $height );
+
+ $width = int($width);
+ $message = &rhs_wordwrap( $message, $width );
+ $height = 2 + &height_of( $width, $message );
+
+ return
+ system( "$DIALOG --title "
+ . &quoted($title)
+ . " --infobox "
+ . &quoted($message)
+ . " $height $width" );
}
sub rhs_yesno {
- local ( $title, $message, $width ) = @_;
- local ( $tmp, $height, $message_len );
+ my ( $title, $message, $width ) = @_;
+ my ( $tmp, $height );
- $message = &rhs_wordwrap($message, $width);
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
- $height = 4 + $message_len;
+ $width = int($width);
+ $message = &rhs_wordwrap( $message, $width );
+ $height = 4 + &height_of( $width, $message );
+
+ $tmp =
+ system( "$DIALOG --title "
+ . &quoted($title)
+ . " --yesno "
+ . &quoted($message)
+ . " $height $width" );
- $tmp = system("dialog --title \"$title\" --yesno \"$message\" $height $width");
# Dumb: dialog returns 0 for "yes" and 1 for "no"
- if (! $tmp) {
- return 1;
- } else {
- return 0;
+ if ( !$tmp ) {
+ return 1;
+ }
+ else {
+ return 0;
}
}
sub rhs_gauge {
- local ( $title, $message, $width, $percent ) = @_;
- local ( $tmp, $height, $message_len );
+ my ( $title, $message, $width, $percent ) = @_;
+ my ( $tmp, $height );
+ $width = int($width);
$gauge_width = $width;
- $message = &rhs_wordwrap($message, $width);
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
- $height = 5 + $message_len;
+ $message = &rhs_wordwrap( $message, $width );
+ $height = 5 + &height_of( $width, $message );
- open(GAUGE, "|dialog --title \"$title\" --gauge \"$message\" $height $width $percent");
+ open( $GAUGE,
+ "|$DIALOG --title "
+ . &quoted($title)
+ . " --gauge "
+ . &quoted($message)
+ . " $height $width $percent" );
}
sub rhs_update_gauge {
- local ( $percent ) = @_;
+ my ($percent) = @_;
- &printflush(GAUGE, "$percent\n");
+ &printflush( $GAUGE, "$percent\n" );
}
sub rhs_update_gauge_and_message {
- local ( $message, $percent ) = @_;
+ my ( $message, $percent ) = @_;
- $message = &rhs_wordwrap($message, $gauge_width);
+ $message = &rhs_wordwrap( $message, $gauge_width );
$message =~ s/\n/\\n/g;
- &printflush(GAUGE, "XXX\n$percent\n$message\nXXX\n");
+ &printflush( $GAUGE, "XXX\n$percent\n$message\nXXX\n" );
}
sub rhs_stop_gauge {
- close GAUGE;
+ close $GAUGE;
}
sub rhs_inputbox {
- local ( $title, $message, $width, $instr ) = @_;
- local ( $tmp, $height, $message_len );
-
- $message = &rhs_wordwrap($message, $width);
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
- $height = 7 + $message_len;
-
- return &return_output(0, "dialog --title \"$title\" --inputbox \"$message\" $height $width \"$instr\"");
+ my ( $title, $message, $width, $instr ) = @_;
+ my ( $tmp, $height );
+
+ $width = int($width);
+ $message = &rhs_wordwrap( $message, $width );
+ $height = 7 + &height_of( $width, $message );
+
+ return &return_output( 0,
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --inputbox "
+ . &quoted($message)
+ . " $height $width "
+ . &quoted($instr) );
}
sub rhs_menu {
- local ( $title, $message, $width, $numitems ) = @_;
- local ( $i, $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, $numitems ) = @_;
+ my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list );
- shift; shift; shift; shift;
+ $width = int($width);
+ $numitems = int($numitems);
+
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- for ($i = 0; $i < $numitems; $i++) {
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $ent = shift;
- $list[@list] = "\"$ent\"";
+ for ( $i = 0 ; $i < $numitems ; $i++ ) {
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $ent = shift;
+ $list[@list] = &quoted($ent);
}
- $message = &rhs_wordwrap($message, $width);
-
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output(0, "dialog --title \"$title\" --menu \"$message\" $height $width $menuheight @list");
+ return &return_output( 0,
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --menu "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_menul {
- local ( $title, $message, $width, $numitems ) = @_;
- local ( $i, $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, $numitems ) = @_;
+ my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list );
- shift; shift; shift; shift;
+ $width = int($width);
+ $numitems = int($numitems);
+
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- for ($i = 0; $i < $numitems; $i++) {
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $list[@list] = "\"\"";
+ for ( $i = 0 ; $i < $numitems ; $i++ ) {
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $list[@list] = &quoted("");
}
- $message = &rhs_wordwrap($message, $width);
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
-
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output(0, "dialog --title \"$title\" --menu \"$message\" $height $width $menuheight @list");
+ return &return_output( 0,
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --menu "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_menua {
- local ( $title, $message, $width, %items ) = @_;
- local ( $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, %items ) = @_;
+ my ( $tmp, $ent, $height, $listheight, $menuheight, @list );
- @list = ();
- foreach $ent (sort keys (%items)) {
- $list[@list] = "\"$ent\"";
- $list[@list] = "\"$items{$ent}\"";
+ $width = int($width);
+ @list = ();
+ foreach $ent ( sort keys(%items) ) {
+ $list[@list] = &quoted($ent);
+ $list[@list] = &quoted( $items{$ent} );
}
- $message = &rhs_wordwrap($message, $width);
-
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
+ my $numitems = keys(%items);
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $numitems = keys(%items);
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output(0, "dialog --title \"$title\" --menu \"$message\" $height $width $menuheight @list");
+ return &return_output( 0,
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --menu "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_checklist {
- local ( $title, $message, $width, $numitems ) = @_;
- local ( $i, $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, $numitems ) = @_;
+ my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list );
+
+ $width = int($width);
+ $numitems = int($numitems);
- shift; shift; shift; shift;
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- for ($i = 0; $i < $numitems; $i++) {
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $ent = shift;
- if ($ent) {
- $list[@list] = "ON";
- } else {
- $list[@list] = "OFF";
- }
+ for ( $i = 0 ; $i < $numitems ; $i++ ) {
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $ent = shift;
+ if ($ent) {
+ $list[@list] = "ON";
+ }
+ else {
+ $list[@list] = "OFF";
+ }
}
- $message = &rhs_wordwrap($message, $width);
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
-
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output("list", "dialog --title \"$title\" --separate-output --checklist \"$message\" $height $width $menuheight @list");
+ return &return_output( "list",
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --separate-output --checklist "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_checklistl {
- local ( $title, $message, $width, $numitems ) = @_;
- local ( $i, $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, $numitems ) = @_;
+ my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list );
+
+ $width = int($width);
+ $numitems = int($numitems);
- shift; shift; shift; shift;
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- for ($i = 0; $i < $numitems; $i++) {
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $list[@list] = "\"\"";
- $list[@list] = "OFF";
+ for ( $i = 0 ; $i < $numitems ; $i++ ) {
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $list[@list] = &quoted("");
+ $list[@list] = "OFF";
}
- $message = &rhs_wordwrap($message, $width);
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
-
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
}
- return &return_output("list", "dialog --title \"$title\" --separate-output --checklist \"$message\" $height $width $menuheight @list");
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
+ }
+ return &return_output( "list",
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --separate-output --checklist "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_checklista {
- local ( $title, $message, $width, %items ) = @_;
- local ( $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, %items ) = @_;
+ my ( $tmp, $ent, $height, $listheight, $menuheight, @list );
- shift; shift; shift; shift;
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- foreach $ent (sort keys (%items)) {
- $list[@list] = "\"$ent\"";
- $list[@list] = "\"$items{$ent}\"";
- $list[@list] = "OFF";
+ foreach $ent ( sort keys(%items) ) {
+ $list[@list] = &quoted($ent);
+ $list[@list] = &quoted( $items{$ent} );
+ $list[@list] = "OFF";
}
- $message = &rhs_wordwrap($message, $width);
+ my $numitems = keys(%items);
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
-
- $numitems = keys(%items);
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output("list", "dialog --title \"$title\" --separate-output --checklist \"$message\" $height $width $menuheight @list");
+ return &return_output( "list",
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --separate-output --checklist "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub rhs_radiolist {
- local ( $title, $message, $width, $numitems ) = @_;
- local ( $i, $tmp, $ent, $height, $menuheight, @list, $message_len );
+ my ( $title, $message, $width, $numitems ) = @_;
+ my ( $i, $tmp, $ent, $height, $listheight, $menuheight, @list );
- shift; shift; shift; shift;
+ $width = int($width);
+ $numitems = int($numitems);
+
+ shift;
+ shift;
+ shift;
+ shift;
@list = ();
- for ($i = 0; $i < $numitems; $i++) {
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $ent = shift;
- $list[@list] = "\"$ent\"";
- $ent = shift;
- if ($ent) {
- $list[@list] = "ON";
- } else {
- $list[@list] = "OFF";
- }
+ for ( $i = 0 ; $i < $numitems ; $i++ ) {
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $ent = shift;
+ $list[@list] = &quoted($ent);
+ $ent = shift;
+ if ($ent) {
+ $list[@list] = "ON";
+ }
+ else {
+ $list[@list] = "OFF";
+ }
}
- $message = &rhs_wordwrap($message, $width);
-
- $message_len = split(/^/, $message);
- $tmp = $message;
- if (chop($tmp) eq "\n") {
- $message_len++;
- }
+ $message = &rhs_wordwrap( $message, $width );
+ $listheight = &height_of( $width, $message );
+ $height = 6 + $listheight + $numitems;
- $height = $message_len + 6 + $numitems;
- if ($height <= $scr_lines) {
+ if ( $height <= $scr_lines ) {
$menuheight = $numitems;
- } else {
- $height = $scr_lines;
- $menuheight = $scr_lines - $message_len - 6;
+ }
+ else {
+ $height = $scr_lines;
+ $menuheight = $scr_lines - $listheight - 6;
}
- return &return_output(0 , "dialog --title \"$title\" --radiolist \"$message\" $height $width $menuheight @list");
+ return &return_output( 0,
+ "$DIALOG --title "
+ . &quoted($title)
+ . " --radiolist "
+ . &quoted($message)
+ . " $height $width $menuheight @list" );
}
sub return_output {
- local ( $listp, $command ) = @_;
- local ( $res ) = 1;
+ my ( $listp, $command ) = @_;
+ my ($res) = 1;
+
+ pipe( PARENT_READER, CHILD_WRITER );
- pipe(PARENT_READER, CHILD_WRITER);
# We have to fork (as opposed to using "system") so that the parent
# process can read from the pipe to avoid deadlock.
my ($pid) = fork;
- if ($pid == 0) { # child
- close(PARENT_READER);
- open(STDERR, ">&CHILD_WRITER");
- exec($command);
- die("no exec");
- }
- if ($pid > 0) { # parent
- close( CHILD_WRITER );
- if ($listp) {
- @dialog_result = ();
- while (<PARENT_READER>) {
- chop;
- $dialog_result[@dialog_result] = $_;
- }
- }
- else { $dialog_result = <PARENT_READER>; }
- close(PARENT_READER);
- waitpid($pid,0);
- $res = $?;
+ if ( $pid == 0 ) { # child
+ close(PARENT_READER);
+ open( STDERR, ">&CHILD_WRITER" );
+ exec($command);
+ die("no exec");
+ }
+ if ( $pid > 0 ) { # parent
+ close(CHILD_WRITER);
+ if ($listp) {
+ @dialog_result = ();
+ while (<PARENT_READER>) {
+ chop;
+ $dialog_result[@dialog_result] = $_;
+ }
+ }
+ else {
+ @dialog_result = <PARENT_READER>;
+ }
+ close(PARENT_READER);
+ waitpid( $pid, 0 );
+ $res = $?;
}
# Again, dialog returns results backwards
- if (! $res) {
- return 1;
- } else {
- return 0;
+ if ( !$res ) {
+ return 1;
+ }
+ else {
+ return 0;
}
}
sub rhs_wordwrap {
- local ( $intext, $width ) = @_;
- local ( $outtext, $i, $j, @lines, $wrap, @words, $pos, $pad );
+ my ( $intext, $width ) = @_;
+ my ( $outtext, $i, $j, @lines, $wrap, @words, $pos, $pad );
+ &trace( "rhs_wordwrap\n\tintext:%s\n\twidth:%d\n", $intext, $width );
+ &screensize;
+ $width = int($width);
$outtext = "";
- $pad = 3; # leave 3 spaces around each line
- $pos = $pad; # current insert position
- $wrap = 0; # 1 if we have been auto wraping
- $insert_nl = 0; # 1 if we just did an absolute
- # and we should preface any new text
- # with a new line
- @lines = split(/\n/, $intext);
- for ($i = 0; $i <= $#lines; $i++) {
- if ($lines[$i] =~ /^>/) {
- $outtext .= "\n" if ($insert_nl);
+ $pad = 3; # leave 3 spaces around each line
+ $pos = $pad; # current insert position
+ $wrap = 0; # 1 if we have been auto wrapping
+ my $insert_nl = 0; # 1 if we just did an absolute
+ # and we should preface any new text
+ # with a new line
+ @lines = split( /\n/, $intext );
+
+ for ( $i = 0 ; $i <= $#lines ; $i++ ) {
+
+ if ( $lines[$i] =~ /^>/ ) {
+ $outtext .= "\n" if ($insert_nl);
$outtext .= "\n" if ($wrap);
- $lines[$i] =~ /^>(.*)$/;
+ $lines[$i] =~ /^>(.*)$/;
$outtext .= $1;
- $insert_nl = 1;
- $wrap = 0;
- $pos = $pad;
- } else {
+ $insert_nl = 1;
+ $wrap = 0;
+ $pos = $pad;
+ }
+ else {
$wrap = 1;
- @words = split(/\s+/,$lines[$i]);
- for ($j = 0; $j <= $#words; $j++) {
- if ($insert_nl) {
- $outtext .= "\n";
- $insert_nl = 0;
- }
- if ((length($words[$j]) + $pos) > $width - $pad) {
+ @words = split( /\s+/, $lines[$i] );
+ for ( $j = 0 ; $j <= $#words ; $j++ ) {
+ if ($insert_nl) {
+ $outtext .= "\n";
+ $insert_nl = 0;
+ }
+ if ( ( length( $words[$j] ) + $pos ) > $width - $pad ) {
$outtext .= "\n";
$pos = $pad;
}
$outtext .= $words[$j] . " ";
- $pos += length($words[$j]) + 1;
+ $pos += length( $words[$j] ) + 1;
}
}
}
+ &trace( "\touttext:%s\n", $outtext );
return $outtext;
}
diff --git a/contrib/dialog/dlg_keys.c b/contrib/dialog/dlg_keys.c
index 4b59f6b3a8ca..cb8af7c62719 100644
--- a/contrib/dialog/dlg_keys.c
+++ b/contrib/dialog/dlg_keys.c
@@ -1,9 +1,9 @@
/*
- * $Id: dlg_keys.c,v 1.34 2011/10/14 00:41:08 tom Exp $
+ * $Id: dlg_keys.c,v 1.45 2018/05/28 17:27:10 tom Exp $
*
* dlg_keys.c -- runtime binding support for dialog
*
- * Copyright 2006-2009,2011 Thomas E. Dickey
+ * Copyright 2006-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -26,6 +26,10 @@
#define LIST_BINDINGS struct _list_bindings
+#define CHR_BACKSLASH '\\'
+#define IsOctal(ch) ((ch) >= '0' && (ch) <= '7')
+#define TableSize(name) (sizeof(name)/sizeof(name[0]))
+
LIST_BINDINGS {
LIST_BINDINGS *link;
WINDOW *win; /* window on which widget gets input */
@@ -57,10 +61,11 @@ dlg_register_window(WINDOW *win, const char *name, DLG_KEYS_BINDING * binding)
p->win = win;
p->name = name;
p->binding = binding;
- if (q != 0)
+ if (q != 0) {
q->link = p;
- else
+ } else {
all_bindings = p;
+ }
}
#if defined(HAVE_DLG_TRACE) && defined(HAVE_RC_FILE)
/*
@@ -70,8 +75,10 @@ dlg_register_window(WINDOW *win, const char *name, DLG_KEYS_BINDING * binding)
* registered, there is no other way to see what bindings are available,
* than by running dialog and tracing it.
*/
- dlg_trace_msg("# dlg_register_window %s\n", name);
+ DLG_TRACE(("# dlg_register_window %s\n", name));
+ dlg_dump_keys(dialog_state.trace_output);
dlg_dump_window_keys(dialog_state.trace_output, win);
+ DLG_TRACE(("# ...done dlg_register_window %s\n", name));
#endif
}
@@ -194,8 +201,8 @@ dlg_unregister_window(WINDOW *win)
* Parameters:
* win is the window on which the wgetch() was done.
* curses_key is the value returned by wgetch().
- * fkey in/out (on input, it is true if curses_key is a function key,
- * and on output, it is true if the result is a function key).
+ * fkey in/out (on input, it is nonzero if curses_key is a function key,
+ * and on output, it is nonzero if the result is a function key).
*/
int
dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
@@ -230,7 +237,9 @@ dlg_lookup_key(WINDOW *win, int curses_key, int *fkey)
}
}
for (p = all_bindings; p != 0; p = p->link) {
- if (p->win == win || (p->win == 0 && !strcmp(p->name, name))) {
+ if (p->win == win ||
+ (p->win == 0 &&
+ (!strcmp(p->name, name) || !strcmp(p->name, WILDNAME)))) {
int function_key = (*fkey != 0);
for (q = p->binding; q->is_function_key >= 0; ++q) {
if (p->buttons
@@ -318,7 +327,7 @@ typedef struct {
#define ASCII_NAME(name,code) { #name, code }
#define CURSES_NAME(upper) { #upper, KEY_ ## upper }
-#define COUNT_CURSES sizeof(curses_names)/sizeof(curses_names[0])
+#define COUNT_CURSES TableSize(curses_names)
static const CODENAME curses_names[] =
{
ASCII_NAME(ESC, '\033'),
@@ -417,7 +426,7 @@ static const CODENAME curses_names[] =
};
#define DIALOG_NAME(upper) { #upper, DLGK_ ## upper }
-#define COUNT_DIALOG sizeof(dialog_names)/sizeof(dialog_names[0])
+#define COUNT_DIALOG TableSize(dialog_names)
static const CODENAME dialog_names[] =
{
DIALOG_NAME(OK),
@@ -453,9 +462,29 @@ static const CODENAME dialog_names[] =
DIALOG_NAME(FINAL),
DIALOG_NAME(SELECT),
DIALOG_NAME(HELPFILE),
- DIALOG_NAME(TRACE)
+ DIALOG_NAME(TRACE),
+ DIALOG_NAME(TOGGLE)
+};
+
+#define MAP2(letter,actual) { letter, actual }
+
+static const struct {
+ int letter;
+ int actual;
+} escaped_letters[] = {
+
+ MAP2('a', DLG_CTRL('G')),
+ MAP2('b', DLG_CTRL('H')),
+ MAP2('f', DLG_CTRL('L')),
+ MAP2('n', DLG_CTRL('J')),
+ MAP2('r', DLG_CTRL('M')),
+ MAP2('s', CHR_SPACE),
+ MAP2('t', DLG_CTRL('I')),
+ MAP2('\\', '\\'),
};
+#undef MAP2
+
static char *
skip_white(char *s)
{
@@ -574,8 +603,52 @@ make_binding(char *widget, int curses_key, int is_function, int dialog_key)
return result;
}
+static int
+decode_escaped(char **string)
+{
+ unsigned n;
+ int result = 0;
+
+ if (IsOctal(**string)) {
+ int limit = 3;
+ while (limit-- > 0 && IsOctal(**string)) {
+ int ch = (**string);
+ *string += 1;
+ result = (result << 3) | (ch - '0');
+ }
+ } else {
+ for (n = 0; n < TableSize(escaped_letters); ++n) {
+ if (**string == escaped_letters[n].letter) {
+ *string += 1;
+ result = escaped_letters[n].actual;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+static char *
+encode_escaped(int value)
+{
+ static char result[80];
+ unsigned n;
+ bool found = FALSE;
+ for (n = 0; n < TableSize(escaped_letters); ++n) {
+ if (value == escaped_letters[n].actual) {
+ found = TRUE;
+ sprintf(result, "%c", escaped_letters[n].letter);
+ break;
+ }
+ }
+ if (!found) {
+ sprintf(result, "%03o", value & 0xff);
+ }
+ return result;
+}
+
/*
- * Parse the parameters of the "bindkeys" configuration-file entry. This
+ * Parse the parameters of the "bindkey" configuration-file entry. This
* expects widget name which may be "*", followed by curses key definition and
* then dialog key definition.
*
@@ -612,8 +685,8 @@ dlg_parse_bindkey(char *params)
while (*p != '\0' && curses_key < 0) {
if (escaped) {
escaped = FALSE;
- curses_key = *p;
- } else if (*p == '\\') {
+ curses_key = decode_escaped(&p);
+ } else if (*p == CHR_BACKSLASH) {
escaped = TRUE;
} else if (modified) {
if (*p == '?') {
@@ -690,6 +763,12 @@ dump_curses_key(FILE *fp, int curses_key)
}
}
if (!found) {
+#ifdef KEY_MOUSE
+ if (is_DLGK_MOUSE(curses_key)) {
+ fprintf(fp, "MOUSE-");
+ dump_curses_key(fp, curses_key - M_EVENT);
+ } else
+#endif
if (curses_key >= KEY_F(0)) {
fprintf(fp, "F%d", curses_key - KEY_F(0));
} else {
@@ -704,8 +783,12 @@ dump_curses_key(FILE *fp, int curses_key)
fprintf(fp, "~%c", curses_key - 64);
} else if (curses_key == 255) {
fprintf(fp, "~?");
+ } else if (curses_key > 32 &&
+ curses_key < 127 &&
+ curses_key != CHR_BACKSLASH) {
+ fprintf(fp, "%c", curses_key);
} else {
- fprintf(fp, "\\%c", curses_key);
+ fprintf(fp, "%c%s", CHR_BACKSLASH, encode_escaped(curses_key));
}
}
@@ -727,12 +810,28 @@ dump_dialog_key(FILE *fp, int dialog_key)
}
static void
-dump_one_binding(FILE *fp, const char *widget, DLG_KEYS_BINDING * binding)
+dump_one_binding(FILE *fp,
+ WINDOW *win,
+ const char *widget,
+ DLG_KEYS_BINDING * binding)
{
+ int actual;
+ int fkey = (binding->curses_key > 255);
+
fprintf(fp, "bindkey %s ", widget);
dump_curses_key(fp, binding->curses_key);
fputc(' ', fp);
dump_dialog_key(fp, binding->dialog_key);
+ actual = dlg_lookup_key(win, binding->curses_key, &fkey);
+#ifdef KEY_MOUSE
+ if (is_DLGK_MOUSE(binding->curses_key) && is_DLGK_MOUSE(actual)) {
+ ; /* EMPTY */
+ } else
+#endif
+ if (actual != binding->dialog_key) {
+ fprintf(fp, "\t# overridden by ");
+ dump_dialog_key(fp, actual);
+ }
fputc('\n', fp);
}
@@ -752,12 +851,13 @@ dlg_dump_window_keys(FILE *fp, WINDOW *win)
for (p = all_bindings; p != 0; p = p->link) {
if (p->win == win) {
if (dlg_strcmp(last, p->name)) {
- fprintf(fp, "\n# key bindings for %s widgets\n",
- !strcmp(p->name, WILDNAME) ? "all" : p->name);
+ fprintf(fp, "# key bindings for %s widgets%s\n",
+ !strcmp(p->name, WILDNAME) ? "all" : p->name,
+ win == 0 ? " (user-defined)" : "");
last = p->name;
}
for (q = p->binding; q->is_function_key >= 0; ++q) {
- dump_one_binding(fp, p->name, q);
+ dump_one_binding(fp, win, p->name, q);
}
}
}
diff --git a/contrib/dialog/dlg_keys.h b/contrib/dialog/dlg_keys.h
index 789f39ad482b..737db28fdab6 100644
--- a/contrib/dialog/dlg_keys.h
+++ b/contrib/dialog/dlg_keys.h
@@ -1,9 +1,9 @@
/*
- * $Id: dlg_keys.h,v 1.32 2012/12/21 21:54:30 tom Exp $
+ * $Id: dlg_keys.h,v 1.36 2016/08/28 21:23:17 tom Exp $
*
* dlg_keys.h -- runtime binding support for dialog
*
- * Copyright 2005-2011,2012 Thomas E. Dickey
+ * Copyright 2005-2012,2016 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -96,7 +96,8 @@ typedef enum {
DLGK_FINAL,
DLGK_SELECT,
DLGK_HELPFILE,
- DLGK_TRACE
+ DLGK_TRACE,
+ DLGK_TOGGLE
} DLG_KEYS_ENUM;
#define is_DLGK_MOUSE(code) ((code) >= M_EVENT)
@@ -146,7 +147,7 @@ typedef enum {
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' )
#define TRAVERSE_BINDINGS \
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ), \
+ DLG_KEYS_DATA( DLGK_ENTER, CHR_SPACE ), \
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_DOWN ), \
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ), \
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ), \
@@ -154,6 +155,9 @@ typedef enum {
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_LEFT )
+#define TOGGLEKEY_BINDINGS \
+ DLG_KEYS_DATA( DLGK_TOGGLE, CHR_SPACE )
+
extern int dlg_lookup_key(WINDOW * /*win*/, int /*curses_key*/, int * /*dialog_key*/);
extern int dlg_result_key(int /*dialog_key*/, int /*fkey*/, int * /*resultp*/);
extern void dlg_register_buttons(WINDOW * /*win*/, const char * /*name*/, const char ** /*buttons*/);
diff --git a/contrib/dialog/editbox.c b/contrib/dialog/editbox.c
index 03ae27e605c7..db0620d8f94b 100644
--- a/contrib/dialog/editbox.c
+++ b/contrib/dialog/editbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: editbox.c,v 1.62 2013/03/17 15:03:41 tom Exp $
+ * $Id: editbox.c,v 1.70 2018/06/19 22:57:01 tom Exp $
*
* editbox.c -- implements the edit box
*
- * Copyright 2007-2012,2013 Thomas E. Dickey
+ * Copyright 2007-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -69,7 +69,7 @@ load_list(const char *file, char ***list, int *rows)
dlg_exiterr("Not a file: %s", file);
size = (size_t) sb.st_size;
- if ((blob = dlg_malloc(char, size + 1)) == 0) {
+ if ((blob = dlg_malloc(char, size + 2)) == 0) {
fail_list();
} else {
blob[size] = '\0';
@@ -79,6 +79,14 @@ load_list(const char *file, char ***list, int *rows)
size = fread(blob, sizeof(char), size, fp);
fclose(fp);
+ /*
+ * If the file is not empty, ensure that it ends with a newline.
+ */
+ if (size != 0 && blob[size - 1] != '\n') {
+ blob[++size - 1] = '\n';
+ blob[size] = '\0';
+ }
+
for (pass = 0; pass < 2; ++pass) {
int first = TRUE;
need = 0;
@@ -318,6 +326,7 @@ dlg_editbox(const char *title,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
static DLG_KEYS_BINDING binding2[] = {
@@ -325,6 +334,7 @@ dlg_editbox(const char *title,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ /* no TOGGLEKEY_BINDINGS, since that includes space... */
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -354,6 +364,12 @@ dlg_editbox(const char *title,
const char **buttons = dlg_ok_labels();
int mincols = (3 * COLS / 4);
+ DLG_TRACE(("# editbox args:\n"));
+ DLG_TRACE2S("title", title);
+ /* FIXME dump the rows & list */
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+
dlg_save_vars(&save_vars);
dialog_vars.separate_output = TRUE;
@@ -389,7 +405,7 @@ dlg_editbox(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
/* Draw the editing field in a box */
box_y = MARGIN + 0;
@@ -517,13 +533,18 @@ dlg_editbox(const char *title,
&& (key >= KEY_MAX)) {
int wide = getmaxx(editing);
int cell = key - KEY_MAX;
- thisrow = (cell / wide) + base_row;
- col_offset = (cell % wide);
- chr_offset = col_to_chr_offset(THIS_ROW, col_offset);
- show_one = TRUE;
- if (state != sTEXT) {
- state = sTEXT;
- show_buttons = TRUE;
+ int check = (cell / wide) + base_row;
+ if (check < listsize) {
+ thisrow = check;
+ col_offset = (cell % wide);
+ chr_offset = col_to_chr_offset(THIS_ROW, col_offset);
+ show_one = TRUE;
+ if (state != sTEXT) {
+ state = sTEXT;
+ show_buttons = TRUE;
+ }
+ } else {
+ beep();
}
continue;
} else if (was_mouse && key >= KEY_MIN) {
@@ -637,10 +658,14 @@ dlg_editbox(const char *title,
/* handle functionkeys */
if (fkey) {
switch (key) {
+ case DLGK_GRID_UP:
+ case DLGK_GRID_LEFT:
case DLGK_FIELD_PREV:
show_buttons = TRUE;
state = dlg_prev_ok_buttonindex(state, sTEXT);
break;
+ case DLGK_GRID_RIGHT:
+ case DLGK_GRID_DOWN:
case DLGK_FIELD_NEXT:
show_buttons = TRUE;
state = dlg_next_ok_buttonindex(state, sTEXT);
@@ -670,27 +695,31 @@ dlg_editbox(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
- /* repaint */
dlg_clear();
+ dlg_unregister_window(editing);
dlg_del_window(editing);
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
goto retry;
#endif
+ case DLGK_TOGGLE:
+ if (state != sTEXT) {
+ result = dlg_ok_buttoncode(state);
+ } else {
+ beep();
+ }
+ break;
default:
beep();
break;
}
} else {
- if ((key == ' ') && (state != sTEXT)) {
- result = dlg_ok_buttoncode(state);
- } else {
- beep();
- }
+ beep();
}
}
diff --git a/contrib/dialog/formbox.c b/contrib/dialog/formbox.c
index b0b207fb901e..a5de87668d22 100644
--- a/contrib/dialog/formbox.c
+++ b/contrib/dialog/formbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: formbox.c,v 1.87 2013/09/02 17:02:05 tom Exp $
+ * $Id: formbox.c,v 1.95 2018/06/21 08:23:31 tom Exp $
*
- * formbox.c -- implements the form (i.e, some pairs label/editbox)
+ * formbox.c -- implements the form (i.e., some pairs label/editbox)
*
- * Copyright 2003-2012,2013 Thomas E. Dickey
+ * Copyright 2003-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -447,9 +447,11 @@ prev_valid_buttonindex(int state, int extra, bool non_editable)
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ), \
DLG_KEYS_DATA( DLGK_ITEM_NEXT, CHR_NEXT ), \
DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_DOWN ), \
+ DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_RIGHT ), \
DLG_KEYS_DATA( DLGK_ITEM_NEXT, KEY_NEXT ), \
DLG_KEYS_DATA( DLGK_ITEM_PREV, CHR_PREVIOUS ), \
DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_PREVIOUS ), \
+ DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_LEFT ), \
DLG_KEYS_DATA( DLGK_ITEM_PREV, KEY_UP ), \
DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ), \
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE )
@@ -471,6 +473,7 @@ dlg_form(const char *title,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
static DLG_KEYS_BINDING binding2[] = {
@@ -478,6 +481,7 @@ dlg_form(const char *title,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ /* no TOGGLEKEY_BINDINGS, since that includes space... */
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -488,10 +492,12 @@ dlg_form(const char *title,
#endif
int form_width;
- int first = TRUE;
- int first_trace = TRUE;
+ bool first = TRUE;
+ bool first_trace = TRUE;
int chr_offset = 0;
- int state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
+ int state = (dialog_vars.default_button >= 0
+ ? dlg_default_button()
+ : sTEXT);
int x, y, cur_x, cur_y, box_x, box_y;
int code;
int key = 0;
@@ -507,19 +513,32 @@ dlg_form(const char *title,
bool field_changed = FALSE;
bool non_editable = FALSE;
WINDOW *dialog, *form;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
const char **buttons = dlg_ok_labels();
DIALOG_FORMITEM *current;
+ DLG_TRACE(("# %sform args:\n", (dialog_vars.formitem_type
+ ? "password"
+ : "")));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("lheight", form_height);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+ DLG_TRACE2N("current", *current_item);
+
make_FORM_ELTs(items, item_no, &min_height, &min_width);
dlg_button_layout(buttons, &min_width);
dlg_does_output();
- dlg_tab_correct_str(prompt);
#ifdef KEY_RESIZE
retry:
#endif
+ prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(prompt);
dlg_auto_size(title, prompt, &height, &width,
1 + 3 * MARGIN,
MAX(26, 2 + min_width));
@@ -554,7 +573,7 @@ dlg_form(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
form_width = width - 6;
@@ -651,10 +670,6 @@ dlg_form(const char *title,
result = dlg_ok_buttoncode(code);
continue;
}
- if (key == ' ') {
- fkey = TRUE;
- key = DLGK_ENTER;
- }
}
}
@@ -677,6 +692,7 @@ dlg_form(const char *title,
move_by = form_height;
break;
+ case DLGK_TOGGLE:
case DLGK_ENTER:
dlg_del_window(dialog);
result = (state >= 0) ? dlg_enter_buttoncode(state) : DLG_EXIT_OK;
@@ -759,14 +775,16 @@ dlg_form(const char *title,
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
- /* repaint */
+ free(prompt);
dlg_clear();
+ dlg_unregister_window(form);
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
goto retry;
#endif
default:
@@ -861,6 +879,7 @@ dlg_form(const char *title,
}
dlg_mouse_free_regions();
+ dlg_unregister_window(form);
dlg_del_window(dialog);
free(prompt);
@@ -910,7 +929,7 @@ dialog_form(const char *title,
char **items)
{
int result;
- int choice;
+ int choice = 0;
int i;
DIALOG_FORMITEM *listitems;
DIALOG_VARS save_vars;
diff --git a/contrib/dialog/fselect.c b/contrib/dialog/fselect.c
index e6d2a9634f78..a8e5d7eb926b 100644
--- a/contrib/dialog/fselect.c
+++ b/contrib/dialog/fselect.c
@@ -1,9 +1,9 @@
/*
- * $Id: fselect.c,v 1.93 2012/12/30 20:52:25 tom Exp $
+ * $Id: fselect.c,v 1.102 2018/06/21 23:28:04 tom Exp $
*
* fselect.c -- implements the file-selector box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -230,11 +230,11 @@ display_list(LIST * list)
break;
(void) wmove(list->win, y, 0);
if (n == list->choice)
- (void) wattrset(list->win, item_selected_attr);
+ dlg_attrset(list->win, item_selected_attr);
(void) waddstr(list->win, list->data[n]);
- (void) wattrset(list->win, item_attr);
+ dlg_attrset(list->win, item_attr);
}
- (void) wattrset(list->win, item_attr);
+ dlg_attrset(list->win, item_attr);
getparyx(list->win, y, x);
@@ -290,10 +290,10 @@ fix_arrows(LIST * list)
}
}
-static int
-show_list(char *target, LIST * list, int keep)
+static bool
+show_list(char *target, LIST * list, bool keep)
{
- int changed = keep || find_choice(target, list);
+ bool changed = keep || find_choice(target, list);
display_list(list);
return changed;
}
@@ -302,12 +302,12 @@ show_list(char *target, LIST * list, int keep)
* Highlight the closest match to 'target' in the given list, setting offset
* to match.
*/
-static int
-show_both_lists(char *input, LIST * d_list, LIST * f_list, int keep)
+static bool
+show_both_lists(char *input, LIST * d_list, LIST * f_list, bool keep)
{
char *leaf = leaf_of(input);
- return show_list(leaf, d_list, keep) | show_list(leaf, f_list, keep);
+ return show_list(leaf, d_list, keep) || show_list(leaf, f_list, keep);
}
/*
@@ -429,7 +429,7 @@ complete(char *name, LIST * d_list, LIST * f_list, char **buff_ptr)
}
static bool
-fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
+fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, bool keep)
{
bool result = TRUE;
bool rescan = FALSE;
@@ -475,10 +475,14 @@ fill_lists(char *current, char *input, LIST * d_list, LIST * f_list, int keep)
strcpy(path, "./");
leaf = path + strlen(path);
}
- dlg_trace_msg("opendir '%s'\n", path);
+ DLG_TRACE(("opendir '%s'\n", path));
if ((dp = opendir(path)) != 0) {
while ((de = readdir(dp)) != 0) {
- strncpy(leaf, de->d_name, NAMLEN(de))[NAMLEN(de)] = 0;
+ size_t len = NAMLEN(de);
+ if (len == 0 || (len + have + 2) >= MAX_LEN)
+ continue;
+ memcpy(leaf, de->d_name, len);
+ leaf[len] = '\0';
if (stat(path, &sb) == 0) {
if ((sb.st_mode & S_IFMT) == S_IFDIR)
add_to_list(d_list, leaf);
@@ -557,6 +561,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
static DLG_KEYS_BINDING binding2[] = {
@@ -564,6 +569,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -584,8 +590,8 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
int result = DLG_EXIT_UNKNOWN;
int state = dialog_vars.default_button >= 0 ? dlg_default_button() : sTEXT;
int button;
- int first = (state == sTEXT);
- int first_trace = TRUE;
+ bool first = (state == sTEXT);
+ bool first_trace = TRUE;
char *input;
char *completed;
char current[MAX_LEN + 1];
@@ -600,6 +606,12 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
int min_items = height ? 0 : 4;
LIST d_list, f_list;
+ DLG_TRACE(("# %s args:\n", dselect ? "dselect" : "fselect"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("path", path);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+
dlg_does_output();
/* Set up the initial value */
@@ -631,7 +643,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
/* Draw the input field box */
tbox_height = 1;
@@ -713,7 +725,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
if (resized) {
resized = FALSE;
dlg_show_string(w_text, input, offset, inputbox_attr,
- 0, 0, tbox_width, (bool) 0, (bool) first);
+ 0, 0, tbox_width, FALSE, first);
}
#endif
@@ -755,7 +767,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
break;
}
- if (!fkey && key == ' ') {
+ if (key == DLGK_TOGGLE) {
key = DLGK_SELECT;
fkey = TRUE;
}
@@ -841,6 +853,7 @@ dlg_fselect(const char *title, const char *path, int height, int width, int dsel
continue;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
diff --git a/contrib/dialog/guage.c b/contrib/dialog/guage.c
index 79821889e77e..95664b06b956 100644
--- a/contrib/dialog/guage.c
+++ b/contrib/dialog/guage.c
@@ -1,9 +1,9 @@
/*
- * $Id: guage.c,v 1.68 2013/09/22 19:10:22 tom Exp $
+ * $Id: guage.c,v 1.76 2018/06/21 08:23:43 tom Exp $
*
* guage.c -- implements the gauge dialog
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2015,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -121,14 +121,14 @@ repaint_text(MY_OBJ * obj)
WINDOW *dialog = obj->obj.win;
int i, x;
- if (dialog != 0 && obj->obj.input != 0) {
+ if (dialog != 0) {
(void) werase(dialog);
dlg_draw_box2(dialog, 0, 0, obj->height, obj->width, dialog_attr,
border_attr, border2_attr);
dlg_draw_title(dialog, obj->title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_draw_helpline(dialog, FALSE);
dlg_print_autowrap(dialog, obj->prompt, obj->height, obj->width);
@@ -145,7 +145,7 @@ repaint_text(MY_OBJ * obj)
* attribute.
*/
(void) wmove(dialog, obj->height - 3, 4);
- (void) wattrset(dialog, gauge_attr);
+ dlg_attrset(dialog, gauge_attr);
for (i = 0; i < (obj->width - 2 * (3 + MARGIN)); i++)
(void) waddch(dialog, ' ');
@@ -160,9 +160,9 @@ repaint_text(MY_OBJ * obj)
*/
x = (obj->percent * (obj->width - 2 * (3 + MARGIN))) / 100;
if ((gauge_attr & A_REVERSE) != 0) {
- wattroff(dialog, A_REVERSE);
+ dlg_attroff(dialog, A_REVERSE);
} else {
- (void) wattrset(dialog, A_REVERSE);
+ dlg_attrset(dialog, A_REVERSE);
}
(void) wmove(dialog, obj->height - 3, 4);
for (i = 0; i < x; i++) {
@@ -182,11 +182,13 @@ handle_input(DIALOG_CALLBACK * cb)
{
MY_OBJ *obj = (MY_OBJ *) cb;
bool result;
+ bool cleanup = FALSE;
int status;
char buf[MY_LEN + 1];
if (dialog_state.pipe_input == 0) {
status = -1;
+ cleanup = TRUE;
} else if ((status = read_data(buf, dialog_state.pipe_input)) > 0) {
if (isMarker(buf)) {
@@ -222,16 +224,19 @@ handle_input(DIALOG_CALLBACK * cb)
} else {
if (feof(dialog_state.pipe_input) ||
(ferror(dialog_state.pipe_input) && errno != EINTR)) {
- delink(obj);
- dlg_remove_callback(cb);
+ cleanup = TRUE;
}
}
+ repaint_text(obj);
if (status > 0) {
result = TRUE;
- repaint_text(obj);
} else {
result = FALSE;
+ if (cleanup) {
+ dlg_remove_callback(cb);
+ delink(obj);
+ }
}
return result;
@@ -240,7 +245,7 @@ handle_input(DIALOG_CALLBACK * cb)
static bool
handle_my_getc(DIALOG_CALLBACK * cb, int ch, int fkey, int *result)
{
- int status = TRUE;
+ bool status = TRUE;
*result = DLG_EXIT_OK;
if (cb != 0) {
@@ -265,6 +270,8 @@ my_cleanup(DIALOG_CALLBACK * cb)
free(obj->prompt);
obj->prompt = obj->prompt_buf;
}
+ free(obj->title);
+ dlg_del_window(obj->obj.win);
delink(obj);
}
}
@@ -369,12 +376,12 @@ dlg_free_gauge(void *objptr)
{
MY_OBJ *obj = (MY_OBJ *) objptr;
- curs_set(1);
if (valid(obj)) {
- delink(obj);
obj->obj.keep_win = FALSE;
dlg_remove_callback(&(obj->obj));
+ delink(obj);
}
+ curs_set(1);
}
/*
@@ -397,6 +404,13 @@ dialog_gauge(const char *title,
void *objptr = dlg_allocate_gauge(title, cprompt, height, width, percent);
MY_OBJ *obj = (MY_OBJ *) objptr;
+ DLG_TRACE(("# gauge args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("percent", percent);
+
dlg_add_callback_ref((DIALOG_CALLBACK **) & obj, my_cleanup);
dlg_update_gauge(obj, percent);
@@ -407,6 +421,7 @@ dialog_gauge(const char *title,
if (fkey && ch == KEY_RESIZE) {
MY_OBJ *oldobj = obj;
+ dlg_will_resize(obj->obj.win);
dlg_mouse_free_regions();
obj = dlg_allocate_gauge(title,
diff --git a/contrib/dialog/headers.sh b/contrib/dialog/headers.sh
new file mode 100755
index 000000000000..ec2839afbb2f
--- /dev/null
+++ b/contrib/dialog/headers.sh
@@ -0,0 +1,103 @@
+#! /bin/sh
+# $Id: headers.sh,v 1.3 2007/02/25 20:37:56 tom Exp $
+##############################################################################
+# Copyright (c) 2004,2007 Thomas E. Dickey #
+# #
+# 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. #
+##############################################################################
+#
+# Adjust includes for header files that reside in a subdirectory of
+# /usr/include, etc.
+#
+# Parameters (the first case creates the sed script):
+# $1 is the target directory
+# $2 is the source directory
+# or (the second case does the install, using the sed script):
+# $1 is the script to use for installing
+# $2 is the target directory
+# $3 is the source directory
+# $4 is the file to install, editing source/target/etc.
+
+PACKAGE=DIALOG
+PKGNAME=DLG
+CONFIGH=dlg_config.h
+
+TMPSED=headers.sed
+
+if test $# = 2 ; then
+ rm -f $TMPSED
+ DST=$1
+ REF=$2
+ LEAF=`basename $DST`
+ case $DST in
+ /*/include/$LEAF)
+ END=`basename $DST`
+ for i in $REF/*.h
+ do
+ NAME=`basename $i`
+ echo "s/<$NAME>/<$END\/$NAME>/g" >> $TMPSED
+ done
+ ;;
+ *)
+ echo "" >> $TMPSED
+ ;;
+ esac
+ for name in `
+ egrep '^#define[ ][ ]*[_ABCDEFGHIJKLMNOPQRSTUVWXYZ]' $REF/$CONFIGH \
+ | sed -e 's/^#define[ ][ ]*//' \
+ -e 's/[ ].*//' \
+ | egrep -v "^${PACKAGE}_" \
+ | sort -u \
+ | egrep -v "^${PKGNAME}_"`
+ do
+ echo "s/\\<$name\\>/${PKGNAME}_$name/g" >>$TMPSED
+ done
+else
+ PRG=""
+ while test $# != 3
+ do
+ PRG="$PRG $1"; shift
+ done
+
+ DST=$1
+ REF=$2
+ SRC=$3
+
+ SHOW=`basename $SRC`
+ TMPSRC=${TMPDIR-/tmp}/${SHOW}$$
+
+ echo " ... $SHOW"
+ test -f $REF/$SRC && SRC="$REF/$SRC"
+
+ rm -f $TMPSRC
+ sed -f $TMPSED $SRC > $TMPSRC
+ NAME=`basename $SRC`
+
+ # Just in case someone gzip'd manpages, remove the conflicting copy.
+ test -f $DST/$NAME.gz && rm -f $DST/$NAME.gz
+
+ eval $PRG $TMPSRC $DST/$NAME
+ rm -f $TMPSRC
+fi
diff --git a/contrib/dialog/inputbox.c b/contrib/dialog/inputbox.c
index 1d7ad7d56cc4..a627e7ad3bde 100644
--- a/contrib/dialog/inputbox.c
+++ b/contrib/dialog/inputbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: inputbox.c,v 1.76 2012/12/03 11:46:50 tom Exp $
+ * $Id: inputbox.c,v 1.84 2018/06/21 23:29:35 tom Exp $
*
* inputbox.c -- implements the input box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -49,6 +49,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
static DLG_KEYS_BINDING binding2[] = {
@@ -56,6 +57,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
NAVIGATE_BINDINGS,
+ /* no TOGGLEKEY_BINDINGS, since that includes space... */
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -72,8 +74,8 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
int key, fkey, code;
int result = DLG_EXIT_UNKNOWN;
int state;
- int first;
- int edited;
+ bool first;
+ bool edited;
char *input;
WINDOW *dialog;
WINDOW *editor;
@@ -82,6 +84,14 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
dlg_does_output();
+ DLG_TRACE(("# inputbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2S("init", init);
+ DLG_TRACE2N("password", password);
+
dlg_tab_correct_str(prompt);
/* Set up the initial value */
@@ -122,7 +132,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_draw_helpline(dialog, FALSE);
dlg_print_autowrap(dialog, prompt, height, width);
@@ -142,7 +152,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
if (*input != '\0') {
dlg_show_string(editor, input, chr_offset, inputbox_attr,
- 0, 0, box_width, password, first);
+ 0, 0, box_width, (bool) (password != 0), first);
wsyncup(editor);
wcursyncup(editor);
}
@@ -162,7 +172,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
if (!first) {
if (*input != '\0' && !edited) {
dlg_show_string(editor, input, chr_offset, inputbox_attr,
- 0, 0, box_width, password, first);
+ 0, 0, box_width, (bool) (password != 0), first);
wmove(editor, 0, chr_offset);
wsyncup(editor);
wcursyncup(editor);
@@ -188,7 +198,7 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
if (edit) {
dlg_show_string(editor, input, chr_offset, inputbox_attr,
- 0, 0, box_width, password, first);
+ 0, 0, box_width, (bool) (password != 0), first);
wsyncup(editor);
wcursyncup(editor);
first = FALSE;
@@ -221,13 +231,14 @@ dialog_inputbox(const char *title, const char *cprompt, int height, int width,
show_buttons = TRUE;
state = dlg_next_ok_buttonindex(state, sTEXT);
break;
- case ' ': /* FIXME: conflict with inputstr.c */
+ case DLGK_TOGGLE:
case DLGK_ENTER:
dlg_del_window(dialog);
result = (state >= 0) ? dlg_enter_buttoncode(state) : DLG_EXIT_OK;
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
diff --git a/contrib/dialog/inputstr.c b/contrib/dialog/inputstr.c
index 5dd043e391e7..78255fd32fa9 100644
--- a/contrib/dialog/inputstr.c
+++ b/contrib/dialog/inputstr.c
@@ -1,9 +1,9 @@
/*
- * $Id: inputstr.c,v 1.83 2013/09/23 23:19:26 tom Exp $
+ * $Id: inputstr.c,v 1.88 2018/06/18 22:10:54 tom Exp $
*
* inputstr.c -- functions for input/display of a string
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -105,14 +105,14 @@ show_tsearch(const void *nodep, const VISIT which, const int depth)
const CACHE *p = *(CACHE * const *) nodep;
(void) depth;
if (which == postorder || which == leaf) {
- dlg_trace_msg("\tcache %p %p:%s\n", p, p->string, p->string);
+ DLG_TRACE(("# cache %p %p:%s\n", p, p->string, p->string));
}
}
static void
trace_cache(const char *fn, int ln)
{
- dlg_trace_msg("trace_cache %s@%d\n", fn, ln);
+ DLG_TRACE(("# trace_cache %s@%d\n", fn, ln));
twalk(sorted_cache, show_tsearch);
}
@@ -120,14 +120,16 @@ trace_cache(const char *fn, int ln)
#define trace_cache(fn, ln) /* nothing */
#endif
+#define CMP(a,b) (((a) > (b)) ? 1 : (((a) < (b)) ? -1 : 0))
+
static int
compare_cache(const void *a, const void *b)
{
const CACHE *p = (const CACHE *) a;
const CACHE *q = (const CACHE *) b;
- int result = (p->cache_num - q->cache_num);
+ int result = CMP(p->cache_num, q->cache_num);
if (result == 0)
- result = (int) (p->string_at - q->string_at);
+ result = CMP(p->string_at, q->string_at);
return result;
}
#endif
@@ -456,7 +458,7 @@ dlg_index_columns(const char *string)
if (ch == TAB)
cache->list[inx + 1] =
((cache->list[inx] | 7) + 1) - cache->list[inx];
- else if (isprint(ch))
+ else if (isprint(UCH(ch)))
cache->list[inx + 1] = 1;
else {
const char *printable;
@@ -714,7 +716,7 @@ dlg_show_string(WINDOW *win,
compute_edit_offset(string, chr_offset, x_last, &input_x, &scrollamt);
- (void) wattrset(win, attr);
+ dlg_attrset(win, attr);
(void) wmove(win, y_base, x_base);
for (i = scrollamt, k = 0; i < limit && k < x_last; ++i) {
int check = cols[i + 1] - cols[scrollamt];
diff --git a/contrib/dialog/makefile.in b/contrib/dialog/makefile.in
index 3357d916f245..34d2619abfdc 100644
--- a/contrib/dialog/makefile.in
+++ b/contrib/dialog/makefile.in
@@ -1,7 +1,7 @@
-# $Id: makefile.in,v 1.87 2013/09/02 19:51:58 tom Exp $
+# $Id: makefile.in,v 1.97 2018/06/09 01:05:18 tom Exp $
# template makefile for DIALOG
##############################################################################
-# Copyright (c) 1999-2012,2013 Thomas E. Dickey #
+# Copyright (c) 1999-2017,2018 Thomas E. Dickey #
# #
# Permission is hereby granted, free of charge, to any person obtaining a #
# copy of this software and associated documentation files (the "Software"), #
@@ -31,6 +31,7 @@
SHELL = /bin/sh
srcdir = @srcdir@
+top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
@@ -42,13 +43,14 @@ top_builddir = .
x = @EXEEXT@
o = .@OBJEXT@
-DESTDIR =
+DESTDIR = @DESTDIR@
THIS = dialog
CFG_ROOTNAME = @CFG_ROOTNAME@
HDR_ROOTNAME = @HDR_ROOTNAME@
LIB_ROOTNAME = @LIB_ROOTNAME@
+LIB_PREFIX = @LIB_PREFIX@
LIB_SUFFIX = @LIB_SUFFIX@
VERSION_MAJOR = @VERSION_MAJOR@
@@ -57,12 +59,18 @@ VERSION = $(VERSION_MAJOR).$(VERSION_MINOR)
REL_VERSION = @REL_VERSION@
ABI_VERSION = @ABI_VERSION@
LIB_ROOTNAME = @LIB_ROOTNAME@
+
+RESULTING_SYMS = @RESULTING_SYMS@
+VERSIONED_SYMS = @VERSIONED_SYMS@
+
@SET_SHLIB_VARS@
bindir = @bindir@
includedir = @includedir@
libdir = @libdir@
mandir = @mandir@
+manext = 1
+libext = 3
BINDIR = $(DESTDIR)$(bindir)
INCLUDEDIR = $(DESTDIR)$(includedir)
@@ -81,6 +89,7 @@ EXTRA_CFLAGS = @EXTRA_CFLAGS@
CC = @CC@
CPP = @CPP@
AR = @AR@
+ARFLAGS = @ARFLAGS@
LDFLAGS = @EXTRA_LDFLAGS@ @LDFLAGS@
LIBS = @LIBS@ @INTLLIBS@
RANLIB = @LIB_PREP@
@@ -123,7 +132,7 @@ PROG = @PACKAGE@$x
#
# Standard .c to .o compile line.
#
-.SUFFIXES: .c .i $o .html .1 .3 .man .ps .pdf .txt
+.SUFFIXES: .c .i $o .1 .man .txt @MAN2HTML_NOTE@ .html @GROFF_NOTE@ .ps .pdf
.c.i :
@RULE_CC@
@ECHO_CC@$(CPP) $(CPPFLAGS) -c $< >$@
@@ -131,17 +140,17 @@ PROG = @PACKAGE@$x
@RULE_CC@
@ECHO_CC@$(LIBTOOL_COMPILE) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) -c $<
-.1.html :
- GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | groff -P -o0 -I$*_ -Thtml -man" >$@
-
-.1.ps :
- $(SHELL) -c "tbl $< | groff -man" >$@
+@NROFF_NOTE@.1.txt :
+@NROFF_NOTE@ GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | nroff -Tascii -man | col -bx" >$@
-.1.txt :
- GROFF_NO_SGR=stupid $(SHELL) -c "tbl $< | nroff -Tascii -man | col -bx" >$@
-
-.ps.pdf :
- ps2pdf $*.ps
+@MAN2HTML_NOTE@.1.html :
+@MAN2HTML_NOTE@ ./@MAN2HTML_TEMP@ $* 1 man >$@
+@MAN2HTML_NOTE@
+@GROFF_NOTE@.1.ps :
+@GROFF_NOTE@ $(SHELL) -c "tbl $< | groff -man" >$@
+@GROFF_NOTE@
+@GROFF_NOTE@.ps.pdf :
+@GROFF_NOTE@ ps2pdf $*.ps
EXTRAOBJS = @EXTRAOBJS@
OBJECTS = $(EXTRAOBJS) \
@@ -160,6 +169,7 @@ OBJECTS = $(EXTRAOBJS) \
mousewget$o \
msgbox$o \
textbox$o \
+ ttysize$o \
ui_getc$o \
util$o \
version$o \
@@ -194,7 +204,7 @@ dialog$o \
$(OBJECTS) : $(srcdir)/dialog.h $(srcdir)/dlg_keys.h dlg_config.h VERSION
$(PROG)$x : $(LIB) dialog$o @INTLDIR_MAKE@ @INTLLIBS@
- $(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(LDFLAGS) $(LIBS)
+ $(LINK) -o $@ dialog$o -L. -l@PACKAGE@ $(CFLAGS) $(LDFLAGS) $(LIBS)
clean \
distclean \
@@ -219,6 +229,7 @@ distclean :: clean
$(RM) makefile dlg_config.h config.cache config.log config.status
$(RM) samples/install/makefile
$(RM) headers-sh
+ $(RM) man2html.*
$(RM) dialog-config
install :: install-bin install-man
@@ -243,16 +254,16 @@ uninstall-bin :
$(RM) $(BINDIR)/$(ACTUAL_PROG)$x
install-man :: $(MAN1DIR)
- @ echo "** installing $(ACTUAL_PROG).1"
+ @ echo "** installing $(ACTUAL_PROG).$(manext)"
@ $(SHELL) $(srcdir)/rename.sh \
$(srcdir)/dialog.1 \
- $(MAN1DIR)/$(ACTUAL_PROG).1 \
+ $(MAN1DIR)/$(ACTUAL_PROG).$(manext) \
$(ACTUAL_PROG) \
@PACKAGE@ \
$(INSTALL_DATA)
uninstall-man ::
- $(RM) $(MAN1DIR)/$(ACTUAL_PROG).1
+ $(RM) $(MAN1DIR)/$(ACTUAL_PROG).$(manext)
# most users do not want/need the library, so the install rules are distinct.
install-lib :: $(BINDIR) dialog-config
@@ -279,26 +290,27 @@ uninstall-lib :: $(LIB_DIRS)
@ $(SHELL) headers-sh $(RM) $(INCLUDEDIR) . dlg_config.h
install-lib :: $(MAN3DIR)
- @ echo "** installing @PACKAGE@.3"
+ @ echo "** installing @PACKAGE@.$(libext)"
@ $(SHELL) $(srcdir)/rename.sh \
$(srcdir)/dialog.3 \
- $(MAN3DIR)/@PACKAGE@.3 \
+ $(MAN3DIR)/@PACKAGE@.$(libext) \
$(ACTUAL_PROG) \
@PACKAGE@ \
$(INSTALL_DATA)
uninstall-lib ::
- $(RM) $(MAN3DIR)/@PACKAGE@.3
+ $(RM) $(MAN3DIR)/@PACKAGE@.$(libext)
headers.sed : headers-sh
$(SHELL) headers-sh $(INCLUDEDIR) $(srcdir)
################################################################################
TOP_DOCS = \
- dialog.html \
- dialog.pdf \
- dialog.ps \
- dialog.txt
+@NROFF_NOTE@ dialog.txt \
+@MAN2HTML_NOTE@ dialog.html \
+@GROFF_NOTE@ dialog.pdf \
+@GROFF_NOTE@ dialog.ps
+
dialog.html : dialog.1
dialog.pdf : dialog.ps
dialog.ps : dialog.1
@@ -311,10 +323,11 @@ dialog_lib.1 : dialog.3
LIB_DOCS = \
dialog_lib.1 \
- dialog_lib.html \
- dialog_lib.pdf \
- dialog_lib.ps \
- dialog_lib.txt
+@NROFF_NOTE@ dialog_lib.txt \
+@MAN2HTML_NOTE@ dialog_lib.html \
+@GROFF_NOTE@ dialog_lib.pdf \
+@GROFF_NOTE@ dialog_lib.ps
+
dialog_lib.html : dialog_lib.1
dialog_lib.pdf : dialog_lib.ps
dialog_lib.ps : dialog_lib.1
diff --git a/contrib/dialog/menubox.c b/contrib/dialog/menubox.c
index 518393e7397a..abbe11c23362 100644
--- a/contrib/dialog/menubox.c
+++ b/contrib/dialog/menubox.c
@@ -1,9 +1,9 @@
/*
- * $Id: menubox.c,v 1.148 2013/09/02 17:15:13 tom Exp $
+ * $Id: menubox.c,v 1.159 2018/06/21 23:28:56 tom Exp $
*
* menubox.c -- implements the menu box
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public Licens, version 2.1e
@@ -95,13 +95,13 @@ print_item(ALL_DATA * data,
/* Clear 'residue' of last item and mark current current item */
if (is_inputmenu) {
- (void) wattrset(win, (selected != Unselected) ? item_selected_attr : item_attr);
+ dlg_attrset(win, (selected != Unselected) ? item_selected_attr : item_attr);
for (n = my_y - 1; n < my_y + INPUT_ROWS - 1; n++) {
wmove(win, n, 0);
wprintw(win, "%*s", my_width, " ");
}
} else {
- (void) wattrset(win, menubox_attr);
+ dlg_attrset(win, menubox_attr);
wmove(win, my_y, 0);
wprintw(win, "%*s", my_width, " ");
}
@@ -131,7 +131,7 @@ print_item(ALL_DATA * data,
if (selected) {
dlg_item_help(item->help);
}
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
/*
@@ -147,7 +147,7 @@ input_menu_edit(ALL_DATA * data,
char *result;
int offset = 0;
int key = 0, fkey = 0;
- int first = TRUE;
+ bool first = TRUE;
/* see above */
bool is_inputmenu = TRUE;
int y = ItemToRow(choice);
@@ -182,7 +182,7 @@ input_menu_edit(ALL_DATA * data,
}
}
print_item(data, data->menu, items, choice, Selected, TRUE);
- (void) wattrset(data->menu, save);
+ dlg_attrset(data->menu, save);
*resultp = result;
return code;
@@ -245,7 +245,7 @@ print_menu(ALL_DATA * data, int choice, int scrollamt, int max_choice, bool is_i
if (is_inputmenu) {
int spare_lines, x_count;
spare_lines = data->menu_height % INPUT_ROWS;
- (void) wattrset(data->menu, menubox_attr);
+ dlg_attrset(data->menu, menubox_attr);
for (; spare_lines; spare_lines--) {
wmove(data->menu, data->menu_height - spare_lines, 0);
for (x_count = 0; x_count < data->menu_width;
@@ -304,7 +304,7 @@ dlg_menu(const char *title,
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- DLG_KEYS_DATA( DLGK_FIELD_NEXT, ' ' ),
+ TOGGLEKEY_BINDINGS,
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
@@ -331,6 +331,8 @@ dlg_menu(const char *title,
/* *INDENT-ON* */
#ifdef KEY_RESIZE
+ int old_LINES = LINES;
+ int old_COLS = COLS;
int old_height = height;
int old_width = width;
#endif
@@ -345,21 +347,36 @@ dlg_menu(const char *title,
int found;
int use_width, name_width, text_width, list_width;
WINDOW *dialog, *menu;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt = 0;
const char **buttons = dlg_ok_labels();
bool is_inputmenu = ((rename_menutext != 0)
&& (rename_menutext != dlg_dummy_menutext));
+ DLG_TRACE(("# menubox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("lheight", menu_height);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+ DLG_TRACE2N("current", *current_item);
+ DLG_TRACE2N("rename", rename_menutext != 0);
+
+ dialog_state.plain_buttons = TRUE;
+
all.items = items;
all.item_no = item_no;
dlg_does_output();
- dlg_tab_correct_str(prompt);
#ifdef KEY_RESIZE
retry:
#endif
+ prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(prompt);
+
all.menu_height = menu_height;
use_width = dlg_calc_list_width(item_no, items) + 10;
use_width = MAX(26, use_width);
@@ -391,7 +408,7 @@ dlg_menu(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
all.menu_width = width - 6;
@@ -642,6 +659,7 @@ dlg_menu(const char *title,
dlg_draw_buttons(dialog, height - 2, 0, buttons, button,
FALSE, width);
break;
+ case DLGK_TOGGLE:
case DLGK_ENTER:
if (is_inputmenu)
result = dlg_ok_buttoncode(button);
@@ -703,14 +721,19 @@ dlg_menu(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
- height = old_height;
- width = old_width;
- /* repaint */
+#define resizeit(name, NAME) \
+ name = ((NAME >= old_##NAME) \
+ ? (NAME - (old_##NAME - old_##name)) \
+ : old_##name)
+ resizeit(height, LINES);
+ resizeit(width, COLS);
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
+ /* repaint */
goto retry;
#endif
default:
diff --git a/contrib/dialog/mixedform.c b/contrib/dialog/mixedform.c
index 3da422f37d61..963d25f71343 100644
--- a/contrib/dialog/mixedform.c
+++ b/contrib/dialog/mixedform.c
@@ -1,9 +1,9 @@
/*
- * $Id: mixedform.c,v 1.12 2013/09/02 17:02:05 tom Exp $
+ * $Id: mixedform.c,v 1.13 2018/06/15 01:23:33 tom Exp $
*
* mixedform.c -- implements the mixed form (i.e, typed pairs label/editbox)
*
- * Copyright 2007-2011,2013 Thomas E. Dickey
+ * Copyright 2007-2013,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -49,7 +49,7 @@ dialog_mixedform(const char *title,
char **items)
{
int result;
- int choice;
+ int choice = 0;
int i;
DIALOG_FORMITEM *listitems;
DIALOG_VARS save_vars;
diff --git a/contrib/dialog/mixedgauge.c b/contrib/dialog/mixedgauge.c
index b300e078a62a..30f0b69a1219 100644
--- a/contrib/dialog/mixedgauge.c
+++ b/contrib/dialog/mixedgauge.c
@@ -1,9 +1,9 @@
/*
- * $Id: mixedgauge.c,v 1.30 2012/11/18 16:30:20 tom Exp $
+ * $Id: mixedgauge.c,v 1.34 2018/06/18 22:09:31 tom Exp $
*
* mixedgauge.c -- implements the mixedgauge dialog
*
- * Copyright 2007-2011,2012 Thomas E. Dickey
+ * Copyright 2007-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -89,7 +89,7 @@ status_string(char *given, char **freeMe)
break;
}
} else if (*given == '-') {
- size_t need = strlen(++given);
+ size_t need = strlen(++given) + 4;
char *temp = dlg_malloc(char, need);
*freeMe = temp;
sprintf(temp, "%3s%%", given);
@@ -135,6 +135,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
continue;
(void) wmove(win, y, 2 * MARGIN);
+ dlg_attrset(win, dialog_attr);
dlg_print_text(win, dlg->list[item].name, lm, &attr);
(void) wmove(win, y, lm);
@@ -142,7 +143,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
(void) wmove(win, y, lm + (cells - (int) strlen(status)) / 2);
if (freeMe) {
(void) wmove(win, y, lm + 1);
- (void) wattrset(win, title_attr);
+ dlg_attrset(win, title_attr);
for (j = 0; j < cells; j++)
(void) waddch(win, ' ');
@@ -150,9 +151,9 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
(void) waddstr(win, status);
if ((title_attr & A_REVERSE) != 0) {
- wattroff(win, A_REVERSE);
+ dlg_attroff(win, A_REVERSE);
} else {
- (void) wattrset(win, A_REVERSE);
+ dlg_attrset(win, A_REVERSE);
}
(void) wmove(win, y, lm + 1);
@@ -173,6 +174,7 @@ myprint_status(DIALOG_MIXEDGAUGE * dlg)
(void) waddstr(win, status);
}
(void) wmove(win, y, limit_x - 3);
+ dlg_attrset(win, dialog_attr);
(void) waddch(win, ']');
(void) wnoutrefresh(win);
}
@@ -189,10 +191,10 @@ mydraw_mixed_box(WINDOW *win, int y, int x, int height, int width,
chtype attr = A_NORMAL;
const char *message = _("Overall Progress");
chtype save2 = dlg_get_attrs(win);
- (void) wattrset(win, title_attr);
+ dlg_attrset(win, title_attr);
(void) wmove(win, y, x + 2);
dlg_print_text(win, message, width, &attr);
- (void) wattrset(win, save2);
+ dlg_attrset(win, save2);
}
}
@@ -220,7 +222,7 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
* attribute.
*/
(void) wmove(dlg->dialog, dlg->height - 3, 4);
- (void) wattrset(dlg->dialog, gauge_attr);
+ dlg_attrset(dlg->dialog, gauge_attr);
for (i = 0; i < (dlg->width - 2 * (3 + MARGIN)); i++)
(void) waddch(dlg->dialog, ' ');
@@ -235,9 +237,9 @@ dlg_update_mixedgauge(DIALOG_MIXEDGAUGE * dlg, int percent)
*/
x = (percent * (dlg->width - 2 * (3 + MARGIN))) / 100;
if ((title_attr & A_REVERSE) != 0) {
- wattroff(dlg->dialog, A_REVERSE);
+ dlg_attroff(dlg->dialog, A_REVERSE);
} else {
- (void) wattrset(dlg->dialog, A_REVERSE);
+ dlg_attrset(dlg->dialog, A_REVERSE);
}
(void) wmove(dlg->dialog, dlg->height - 3, 4);
for (i = 0; i < x; i++) {
@@ -338,7 +340,7 @@ dlg_begin_mixedgauge(DIALOG_MIXEDGAUGE * dlg,
dlg->width,
y + dlg->item_no + (2 * MARGIN),
x);
- (void) wattrset(dlg->caption, dialog_attr);
+ dlg_attrset(dlg->caption, dialog_attr);
dlg_print_autowrap(dlg->caption, dlg->prompt, dlg->height, dlg->width);
}
@@ -383,6 +385,15 @@ dialog_mixedgauge(const char *title,
DIALOG_MIXEDGAUGE dlg;
int began = 0;
+ DLG_TRACE(("# mixedgauge args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("percent", percent);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+
dlg_begin_mixedgauge(&dlg, &began, title, cprompt, height,
width, item_no, items);
diff --git a/contrib/dialog/mouse.c b/contrib/dialog/mouse.c
index 6a431e160df9..eab4bc91a557 100644
--- a/contrib/dialog/mouse.c
+++ b/contrib/dialog/mouse.c
@@ -1,9 +1,9 @@
/*
- * $Id: mouse.c,v 1.20 2012/12/21 10:00:30 tom Exp $
+ * $Id: mouse.c,v 1.24 2017/01/31 00:27:21 tom Exp $
*
* mouse.c -- mouse support for dialog
*
- * Copyright 2002-2007,2012 Thomas E. Dickey
+ * Copyright 2002-2016,2017 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -55,6 +55,7 @@ void
dlg_mouse_setcode(int code)
{
basecode = code;
+ DLG_TRACE(("# mouse_setcode %d\n", code));
}
void
@@ -86,21 +87,34 @@ dlg_mouse_mkregion(int y, int x, int height, int width, int code)
mseRegion *butPtr;
if ((butPtr = find_region_by_code(basecode + code)) == 0) {
- butPtr = dlg_malloc(mseRegion, 1);
+ butPtr = dlg_calloc(mseRegion, 1);
assert_ptr(butPtr, "dlg_mouse_mkregion");
butPtr->next = regionList;
regionList = butPtr;
}
- if (butPtr != 0) {
- butPtr->mode = -1;
- butPtr->step_x = 0;
- butPtr->step_y = 0;
- butPtr->y = basey + y;
- butPtr->Y = basey + y + height;
- butPtr->x = basex + x;
- butPtr->X = basex + x + width;
- butPtr->code = basecode + code;
+
+ if ((butPtr->mode != -1) ||
+ (butPtr->step_x != 0) ||
+ (butPtr->step_y != 0) ||
+ (butPtr->y != (basey + y)) ||
+ (butPtr->Y != (basey + y + height)) ||
+ (butPtr->x != (basex + x)) ||
+ (butPtr->X != (basex + x + width)) ||
+ (butPtr->code != basecode + code)) {
+ DLG_TRACE(("# mouse_mkregion %d,%d %dx%d %d (%d)\n",
+ y, x, height, width,
+ butPtr->code, code));
}
+
+ butPtr->mode = -1;
+ butPtr->step_x = 0;
+ butPtr->step_y = 0;
+ butPtr->y = basey + y;
+ butPtr->Y = basey + y + height;
+ butPtr->x = basex + x;
+ butPtr->X = basex + x + width;
+ butPtr->code = basecode + code;
+
return butPtr;
}
diff --git a/contrib/dialog/mousewget.c b/contrib/dialog/mousewget.c
index 6f5b04356c7d..6702a79e6e56 100644
--- a/contrib/dialog/mousewget.c
+++ b/contrib/dialog/mousewget.c
@@ -1,9 +1,9 @@
/*
- * $Id: mousewget.c,v 1.22 2012/11/30 10:23:49 tom Exp $
+ * $Id: mousewget.c,v 1.24 2017/01/31 00:27:21 tom Exp $
*
* mousewget.c -- mouse/wgetch support for dialog
*
- * Copyright 2000-2008,2012 Thomas E. Dickey
+ * Copyright 2000-2016,2017 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -42,6 +42,10 @@ mouse_wgetch(WINDOW *win, int *fkey, bool ignore_errs)
mseRegion *p;
if (getmouse(&event) != ERR) {
+ DLG_TRACE(("# mouse-click abs %d,%d (rel %d,%d)\n",
+ event.y, event.x,
+ event.y - getbegy(win),
+ event.x - getbegx(win)));
if ((p = dlg_mouse_region(event.y, event.x)) != 0) {
key = DLGK_MOUSE(p->code);
} else if ((p = dlg_mouse_bigregion(event.y, event.x)) != 0) {
diff --git a/contrib/dialog/msgbox.c b/contrib/dialog/msgbox.c
index 16e20d262559..d9a2eb1c9065 100644
--- a/contrib/dialog/msgbox.c
+++ b/contrib/dialog/msgbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: msgbox.c,v 1.75 2012/12/01 01:48:08 tom Exp $
+ * $Id: msgbox.c,v 1.81 2018/06/21 23:29:59 tom Exp $
*
* msgbox.c -- implements the message box and info box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -39,8 +39,8 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
SCROLLKEY_BINDINGS,
+ TRAVERSE_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -50,18 +50,25 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
int key = 0, fkey;
int result = DLG_EXIT_UNKNOWN;
WINDOW *dialog = 0;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
const char **buttons = dlg_ok_label();
int offset = 0;
int check;
bool show = TRUE;
int min_width = (pauseopt == 1 ? 12 : 0);
- int save_nocancel = dialog_vars.nocancel;
+ bool save_nocancel = dialog_vars.nocancel;
#ifdef KEY_RESIZE
int req_high;
int req_wide;
#endif
+ DLG_TRACE(("# msgbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("pauseopt", pauseopt);
+
dialog_vars.nocancel = TRUE;
button = dlg_default_button();
@@ -73,6 +80,7 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
dlg_button_layout(buttons, &min_width);
+ prompt = dlg_strclone(cprompt);
dlg_tab_correct_str(prompt);
dlg_auto_size(title, prompt, &height, &width,
(pauseopt == 1 ? 2 : 0),
@@ -100,7 +108,7 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
if (pauseopt) {
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
@@ -128,7 +136,9 @@ dialog_msgbox(const char *title, const char *cprompt, int height, int width,
switch (key) {
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
dlg_clear();
+ free(prompt);
height = req_high;
width = req_wide;
show = TRUE;
diff --git a/contrib/dialog/package/debian/changelog b/contrib/dialog/package/debian/changelog
index ed1303c0a5a0..29bfa1d9c5d8 100644
--- a/contrib/dialog/package/debian/changelog
+++ b/contrib/dialog/package/debian/changelog
@@ -1,3 +1,141 @@
+cdialog (20180621) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 15 Feb 2018 05:02:43 -0500
+
+cdialog (20171209) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 09 Dec 2017 10:52:09 -0500
+
+cdialog (20170509) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Tue, 09 May 2017 19:08:48 -0400
+
+cdialog (20170131) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 23 Jan 2017 17:41:21 -0500
+
+cdialog (20161120) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Nov 2016 06:47:59 -0500
+
+cdialog (20160828) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 26 Aug 2016 17:41:17 -0400
+
+cdialog (20160424) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Tue, 19 Apr 2016 06:33:50 -0400
+
+cdialog (20160209) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 01 Feb 2016 05:18:04 -0500
+
+cdialog (20160126) unstable; urgency=low
+
+ * maintenance updates, add --week-start option
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 25 Jan 2016 13:13:51 -0500
+
+cdialog (20150920) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 20 Sep 2015 18:08:36 -0400
+
+cdialog (20150528) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 28 May 2015 19:42:32 -0400
+
+cdialog (20150513) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 13 May 2015 10:46:07 -0400
+
+cdialog (20150512) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 10 May 2015 19:31:46 -0400
+
+cdialog (20150225) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 25 Feb 2015 05:10:57 -0500
+
+cdialog (20150224) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Tue, 24 Feb 2015 07:10:45 -0500
+
+cdialog (20150125) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 25 Jan 2015 16:30:54 -0500
+
+cdialog (20140911) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Thu, 11 Sep 2014 03:56:17 -0400
+
+cdialog (20140910) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 10 Sep 2014 04:23:13 -0400
+
+cdialog (20140908) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 08 Sep 2014 05:10:11 -0400
+
+cdialog (20140901) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 01 Sep 2014 12:15:40 -0400
+
+cdialog (20140219) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Wed, 19 Feb 2014 04:13:36 -0500
+
+cdialog (20140112) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sun, 12 Jan 2014 13:22:17 -0500
+
+cdialog (20130928) unstable; urgency=low
+
+ * maintenance updates
+
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 28 Sep 2013 21:27:37 -0400
+
cdialog (20130923) unstable; urgency=low
* improved memory-caching for gauge widget
diff --git a/contrib/dialog/package/debian/control b/contrib/dialog/package/debian/control
index f219de1fef1b..c42f663275e4 100644
--- a/contrib/dialog/package/debian/control
+++ b/contrib/dialog/package/debian/control
@@ -3,22 +3,22 @@ Maintainer: Thomas E. Dickey <dickey@invisible-island.net>
Section: misc
Priority: optional
Standards-Version: 3.8.4
-Build-Depends: debhelper (>= 5), libncursesw5-dev (>= 5.3), groff-base
+Build-Depends: debhelper (>= 5), libc6 (>= 2.11), libncursesw5-dev (>= 5.3), groff-base
Homepage: http://invisible-island.net/dialog/
Package: cdialog
Architecture: any
-Depends: libncursesw5 (>= 5.3)
+Depends: libc6 (>= 2.11), libncursesw5 (>= 5.3)
Description: dialog - display dialog boxes from shell scripts
- Dialog is a program that will let you to present a variety of questions
- or display messages using dialog boxes from a shell script. These
- types of dialog boxes are implemented (though not all are necessarily
+ Dialog is a program that will let you present a variety of questions or
+ display messages using dialog boxes from a shell script. These types
+ of dialog boxes are implemented (though not all are necessarily
compiled into dialog):
.
- calendar, checklist, dselect, editbox, form, fselect, gauge,
- infobox, inputbox, inputmenu, menu, mixedform, mixedgauge,
- msgbox (message), passwordbox, passwordform, pause, progressbox,
- radiolist, tailbox, tailboxbg, textbox, timebox, and yesno
- (yes/no).
+ buildlist, calendar, checklist, dselect, editbox, form, fselect,
+ gauge, infobox, inputbox, inputmenu, menu, mixedform,
+ mixedgauge, msgbox (message), passwordbox, passwordform, pause,
+ prgbox, programbox, progressbox, radiolist, rangebox, tailbox,
+ tailboxbg, textbox, timebox, treeview, and yesno (yes/no).
.
This package installs as "cdialog" to avoid conflict with other packages.
diff --git a/contrib/dialog/package/debian/copyright b/contrib/dialog/package/debian/copyright
index d76cf1a37ede..7921d2524622 100644
--- a/contrib/dialog/package/debian/copyright
+++ b/contrib/dialog/package/debian/copyright
@@ -4,7 +4,7 @@ Current dialog upstream maintainer: Thomas Dickey <dickey@invisible-island.net>
-------------------------------------------------------------------------------
Files: *.c *.h
- Copyright 2000-2012,2013 Thomas E. Dickey
+ Copyright 2000-2017,2018 Thomas E. Dickey
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License, version 2.1
@@ -27,7 +27,7 @@ Files: *.c *.h
Files: aclocal.m4
Licence: other-BSD
-Copyright: 1999-2010,2013 by Thomas E. Dickey
+Copyright: 1999-2017,2018 by Thomas E. Dickey
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
diff --git a/contrib/dialog/package/debian/postinst b/contrib/dialog/package/debian/postinst
new file mode 100755
index 000000000000..9977c68681c4
--- /dev/null
+++ b/contrib/dialog/package/debian/postinst
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" = "configure" ]; then
+ ldconfig
+fi
diff --git a/contrib/dialog/package/debian/rules b/contrib/dialog/package/debian/rules
index fae0138249de..d8ab2cd9cb5d 100755
--- a/contrib/dialog/package/debian/rules
+++ b/contrib/dialog/package/debian/rules
@@ -1,5 +1,5 @@
#!/usr/bin/make -f
-# MAde with the aid of dh_make, by Craig Small
+# Made with the aid of dh_make, by Craig Small
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
# Some lines taken from debmake, by Cristoph Lameter.
@@ -11,7 +11,11 @@
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-CFLAGS =
+CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
+ACTUAL_PROG = cdialog
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
@@ -27,7 +31,12 @@ configure: configure-stamp
configure-stamp:
dh_testdir
- CFLAGS="$(CFLAGS)" ./configure \
+ cp -v package/dialog.map package/${ACTUAL_PROG}.map
+
+ CPPFLAGS="$(CPPFLAGS)" \
+ CFLAGS="$(CFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ ./configure \
--host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
@@ -35,9 +44,10 @@ configure-stamp:
--enable-nls \
--enable-header-subdir \
--enable-widec \
- --with-libtool \
- --with-ncursesw \
- --with-package=cdialog \
+ --with-shared \
+ --with-screen=ncursesw6 \
+ --with-package=${ACTUAL_PROG} \
+ --with-versioned-syms \
--disable-rpath-hack
touch configure-stamp
@@ -67,7 +77,7 @@ install-stamp: build-stamp
dh_clean -k
dh_installdirs
- $(MAKE) install DESTDIR=$(CURDIR)/debian/cdialog
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/${ACTUAL_PROG}
touch install-stamp
@@ -86,6 +96,7 @@ binary-arch: build install
dh_compress
dh_fixperms
dh_installdeb
+ dh_makeshlibs
dh_shlibdeps
dh_gencontrol
dh_md5sums
diff --git a/contrib/dialog/package/debian/watch b/contrib/dialog/package/debian/watch
index 09775875479a..a72bfbb4e50e 100644
--- a/contrib/dialog/package/debian/watch
+++ b/contrib/dialog/package/debian/watch
@@ -1,4 +1,4 @@
version=3
-opts=passive ftp://invisible-island.net/dialog/dialog-([\d.]+)\.tgz \
+opts=passive ftp://ftp.invisible-island.net/dialog/dialog-([\d.]+)\.tgz \
debian uupdate
diff --git a/contrib/dialog/package/dialog.map b/contrib/dialog/package/dialog.map
new file mode 100644
index 000000000000..c8a733230033
--- /dev/null
+++ b/contrib/dialog/package/dialog.map
@@ -0,0 +1,222 @@
+# $Id: dialog.map,v 1.7 2018/06/21 00:32:55 tom Exp $
+# script for shared library symbol-versioning using ld
+#
+# This file was generated by ncu-mapsyms
+# Configure options (1.0.20040721)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.1.20070227)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.2.20121230)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.3.20160126)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.3.20180620)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+
+DIALOG_1.0.20040721 {
+ global:
+ dialog_calendar;
+ dialog_checklist;
+ dialog_form;
+ dialog_fselect;
+ dialog_gauge;
+ dialog_inputbox;
+ dialog_menu;
+ dialog_msgbox;
+ dialog_state;
+ dialog_tailbox;
+ dialog_textbox;
+ dialog_timebox;
+ dialog_vars;
+ dialog_version;
+ dialog_yesno;
+ dlg_add_callback;
+ dlg_add_quoted;
+ dlg_add_result;
+ dlg_attr_clear;
+ dlg_auto_size;
+ dlg_auto_sizefile;
+ dlg_beeping;
+ dlg_box_x_ordinate;
+ dlg_box_y_ordinate;
+ dlg_button_count;
+ dlg_button_layout;
+ dlg_button_sizes;
+ dlg_button_x_step;
+ dlg_calc_listh;
+ dlg_calc_listw;
+ dlg_char_to_button;
+ dlg_clear;
+ dlg_color_count;
+ dlg_color_setup;
+ dlg_color_table;
+ dlg_count_columns;
+ dlg_count_wchars;
+ dlg_create_rc;
+ dlg_ctl_size;
+ dlg_default_item;
+ dlg_defaultno_button;
+ dlg_del_window;
+ dlg_does_output;
+ dlg_draw_arrows;
+ dlg_draw_bottom_box;
+ dlg_draw_box;
+ dlg_draw_buttons;
+ dlg_draw_shadow;
+ dlg_draw_title;
+ dlg_edit_offset;
+ dlg_edit_string;
+ dlg_exit;
+ dlg_exit_label;
+ dlg_exiterr;
+ dlg_flush_getc;
+ dlg_getc;
+ dlg_getc_callbacks;
+ dlg_index_columns;
+ dlg_index_wchars;
+ dlg_item_help;
+ dlg_killall_bg;
+ dlg_last_getc;
+ dlg_limit_columns;
+ dlg_match_char;
+ dlg_mouse_bigregion;
+ dlg_mouse_free_regions;
+ dlg_mouse_mkbigregion;
+ dlg_mouse_mkregion;
+ dlg_mouse_region;
+ dlg_mouse_setbase;
+ dlg_mouse_wgetch;
+ dlg_new_window;
+ dlg_next_button;
+ dlg_next_ok_buttonindex;
+ dlg_ok_buttoncode;
+ dlg_ok_label;
+ dlg_ok_labels;
+ dlg_parse_rc;
+ dlg_prev_button;
+ dlg_prev_ok_buttonindex;
+ dlg_print_autowrap;
+ dlg_print_size;
+ dlg_print_text;
+ dlg_put_backtitle;
+ dlg_remove_callback;
+ dlg_set_focus;
+ dlg_show_string;
+ dlg_strclone;
+ dlg_sub_window;
+ dlg_tab_correct_str;
+ dlg_trim_string;
+ dlg_yes_labels;
+ end_dialog;
+ init_dialog;
+};
+
+DIALOG_1.1.20070227 {
+ global:
+ dialog_dselect;
+ dialog_editbox;
+ dialog_mixedform;
+ dialog_mixedgauge;
+ dialog_pause;
+ dialog_progressbox;
+ dlg_asciibox;
+ dlg_boxchar;
+ dlg_button_to_char;
+ dlg_calc_list_width;
+ dlg_checklist;
+ dlg_clr_result;
+ dlg_color_pair;
+ dlg_default_formitem;
+ dlg_default_listitem;
+ dlg_draw_arrows2;
+ dlg_dump_keys;
+ dlg_editbox;
+ dlg_exit_buttoncode;
+ dlg_find_index;
+ dlg_form;
+ dlg_free_formitems;
+ dlg_lookup_key;
+ dlg_max_input;
+ dlg_menu;
+ dlg_mouse_wgetch_nowait;
+ dlg_move_window;
+ dlg_ordinate;
+ dlg_parse_bindkey;
+ dlg_print_line;
+ dlg_register_buttons;
+ dlg_register_window;
+ dlg_result_key;
+ dlg_set_result;
+ dlg_strempty;
+ dlg_trace;
+ dlg_trace_chr;
+ dlg_trace_win;
+ dlg_unregister_window;
+ dlg_yes_buttoncode;
+} DIALOG_1.0.20040721;
+
+DIALOG_1.2.20121230 {
+ global:
+ dialog_buildlist;
+ dialog_helpfile;
+ dialog_prgbox;
+ dialog_rangebox;
+ dialog_treeview;
+ dlg_add_callback_ref;
+ dlg_add_separator;
+ dlg_add_string;
+ dlg_align_columns;
+ dlg_allocate_gauge;
+ dlg_buildlist;
+ dlg_check_scrolled;
+ dlg_count_argv;
+ dlg_count_real_columns;
+ dlg_default_button;
+ dlg_draw_bottom_box2;
+ dlg_draw_box2;
+ dlg_draw_helpline;
+ dlg_draw_scrollbar;
+ dlg_dummy_menutext;
+ dlg_dump_window_keys;
+ dlg_eat_argv;
+ dlg_free_columns;
+ dlg_free_gauge;
+ dlg_get_attrs;
+ dlg_mouse_setcode;
+ dlg_need_separator;
+ dlg_new_modal_window;
+ dlg_print_listitem;
+ dlg_print_scrolled;
+ dlg_progressbox;
+ dlg_renamed_menutext;
+ dlg_restore_vars;
+ dlg_save_vars;
+ dlg_string_to_argv;
+ dlg_trace_msg;
+ dlg_treeview;
+ dlg_update_gauge;
+ dlg_wgetparent;
+} DIALOG_1.1.20070227;
+
+DIALOG_1.3.20160126 {
+ global:
+ dlg_add_help_formitem;
+ dlg_add_help_listitem;
+ dlg_add_last_key;
+ dlg_finish_string;
+ dlg_popen;
+ dlg_reallocate_gauge;
+} DIALOG_1.2.20121230;
+
+DIALOG_1.3.20180620 {
+ global:
+ dlg_trace_2n;
+ dlg_trace_2s;
+ dlg_ttysize;
+ dlg_will_resize;
+} DIALOG_1.3.20160126;
diff --git a/contrib/dialog/package/dialog.spec b/contrib/dialog/package/dialog.spec
index 8743a6a46519..c5f6b77aeb2d 100644
--- a/contrib/dialog/package/dialog.spec
+++ b/contrib/dialog/package/dialog.spec
@@ -1,29 +1,29 @@
Summary: dialog - display dialog boxes from shell scripts
%define AppProgram dialog
-%define AppVersion 1.2
-%define AppRelease 20130923
+%define AppVersion 1.3
+%define AppRelease 20180621
%define ActualProg c%{AppProgram}
-# $XTermId: dialog.spec,v 1.54 2013/09/23 23:08:24 tom Exp $
+# $XTermId: dialog.spec,v 1.108 2018/06/21 09:19:45 tom Exp $
Name: %{ActualProg}
Version: %{AppVersion}
Release: %{AppRelease}
License: LGPL
-Group: Applications/Development
-URL: ftp://invisible-island.net/%{AppProgram}
+Group: Applications/System
+URL: ftp://ftp.invisible-island.net/%{AppProgram}
Source0: %{AppProgram}-%{AppVersion}-%{AppRelease}.tgz
Packager: Thomas Dickey <dickey@invisible-island.net>
%description
-Dialog is a program that will let you to present a variety of questions
-or display messages using dialog boxes from a shell script. These
-types of dialog boxes are implemented (though not all are necessarily
-compiled into dialog):
+Dialog is a program that will let you present a variety of questions or
+display messages using dialog boxes from a shell script. These types
+of dialog boxes are implemented (though not all are necessarily compiled
+into dialog):
- calendar, checklist, dselect, editbox, form, fselect, gauge,
- infobox, inputbox, inputmenu, menu, mixedform, mixedgauge,
- msgbox (message), passwordbox, passwordform, pause, progressbox,
- radiolist, tailbox, tailboxbg, textbox, timebox, and yesno
- (yes/no).
+ buildlist, calendar, checklist, dselect, editbox, form, fselect,
+ gauge, infobox, inputbox, inputmenu, menu, mixedform,
+ mixedgauge, msgbox (message), passwordbox, passwordform, pause,
+ prgbox, programbox, progressbox, radiolist, rangebox, tailbox,
+ tailboxbg, textbox, timebox, treeview, and yesno (yes/no).
This package installs as "cdialog" to avoid conflict with other packages.
%prep
@@ -34,32 +34,34 @@ This package installs as "cdialog" to avoid conflict with other packages.
%build
+cp -v package/dialog.map package/%{ActualProg}.map
+
INSTALL_PROGRAM='${INSTALL}' \
- ./configure \
- --target %{_target_platform} \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --libdir=%{_libdir} \
- --mandir=%{_mandir} \
- --with-package=%{ActualProg} \
- --enable-header-subdir \
- --enable-nls \
- --enable-widec \
- --with-libtool \
- --with-ncursesw \
- --disable-rpath-hack
+%configure \
+ --target %{_target_platform} \
+ --prefix=%{_prefix} \
+ --bindir=%{_bindir} \
+ --libdir=%{_libdir} \
+ --mandir=%{_mandir} \
+ --with-package=%{ActualProg} \
+ --enable-header-subdir \
+ --enable-nls \
+ --enable-widec \
+ --with-shared \
+ --with-ncursesw \
+ --with-versioned-syms \
+ --disable-rpath-hack
make
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
make install-full DESTDIR=$RPM_BUILD_ROOT
-libtool --finish %{_libdir}
strip $RPM_BUILD_ROOT%{_bindir}/%{ActualProg}
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.so.*.*.*
-rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.la
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.so.*
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
@@ -80,6 +82,12 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/lib%{ActualProg}.la
%changelog
# each patch should add its ChangeLog entries here
+* Sat Dec 09 2017 Thomas Dickey
+- update ftp url
+
+* Thu Apr 21 2016 Thomas Dickey
+- remove stray call to libtool
+
* Tue Oct 18 2011 Thomas Dickey
- add executable permissions for shared libraries, discard ".la" file.
diff --git a/contrib/dialog/package/dialog.sym b/contrib/dialog/package/dialog.sym
new file mode 100644
index 000000000000..d628b35ef5b6
--- /dev/null
+++ b/contrib/dialog/package/dialog.sym
@@ -0,0 +1,202 @@
+# $Id: dialog.sym,v 1.7 2018/06/21 00:32:55 tom Exp $
+# script for shared library symbol-visibility using libtool
+#
+# This file was generated by ncu-mapsyms
+# Configure options (1.0.20040721)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.1.20070227)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.2.20121230)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.3.20160126)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+# Configure options (1.3.20180620)
+# --disable-leaks --enable-trace
+# --disable-leaks --enable-trace --enable-widec
+dialog_buildlist
+dialog_calendar
+dialog_checklist
+dialog_dselect
+dialog_editbox
+dialog_form
+dialog_fselect
+dialog_gauge
+dialog_helpfile
+dialog_inputbox
+dialog_menu
+dialog_mixedform
+dialog_mixedgauge
+dialog_msgbox
+dialog_pause
+dialog_prgbox
+dialog_progressbox
+dialog_rangebox
+dialog_state
+dialog_tailbox
+dialog_textbox
+dialog_timebox
+dialog_treeview
+dialog_vars
+dialog_version
+dialog_yesno
+dlg_add_callback
+dlg_add_callback_ref
+dlg_add_help_formitem
+dlg_add_help_listitem
+dlg_add_last_key
+dlg_add_quoted
+dlg_add_result
+dlg_add_separator
+dlg_add_string
+dlg_align_columns
+dlg_allocate_gauge
+dlg_asciibox
+dlg_attr_clear
+dlg_auto_size
+dlg_auto_sizefile
+dlg_beeping
+dlg_box_x_ordinate
+dlg_box_y_ordinate
+dlg_boxchar
+dlg_buildlist
+dlg_button_count
+dlg_button_layout
+dlg_button_sizes
+dlg_button_to_char
+dlg_button_x_step
+dlg_calc_list_width
+dlg_calc_listh
+dlg_calc_listw
+dlg_char_to_button
+dlg_check_scrolled
+dlg_checklist
+dlg_clear
+dlg_clr_result
+dlg_color_count
+dlg_color_pair
+dlg_color_setup
+dlg_color_table
+dlg_count_argv
+dlg_count_columns
+dlg_count_real_columns
+dlg_count_wchars
+dlg_create_rc
+dlg_ctl_size
+dlg_default_button
+dlg_default_formitem
+dlg_default_item
+dlg_default_listitem
+dlg_defaultno_button
+dlg_del_window
+dlg_does_output
+dlg_draw_arrows
+dlg_draw_arrows2
+dlg_draw_bottom_box
+dlg_draw_bottom_box2
+dlg_draw_box
+dlg_draw_box2
+dlg_draw_buttons
+dlg_draw_helpline
+dlg_draw_scrollbar
+dlg_draw_shadow
+dlg_draw_title
+dlg_dummy_menutext
+dlg_dump_keys
+dlg_dump_window_keys
+dlg_eat_argv
+dlg_edit_offset
+dlg_edit_string
+dlg_editbox
+dlg_exit
+dlg_exit_buttoncode
+dlg_exit_label
+dlg_exiterr
+dlg_find_index
+dlg_finish_string
+dlg_flush_getc
+dlg_form
+dlg_free_columns
+dlg_free_formitems
+dlg_free_gauge
+dlg_get_attrs
+dlg_getc
+dlg_getc_callbacks
+dlg_index_columns
+dlg_index_wchars
+dlg_item_help
+dlg_killall_bg
+dlg_last_getc
+dlg_limit_columns
+dlg_lookup_key
+dlg_match_char
+dlg_max_input
+dlg_menu
+dlg_mouse_bigregion
+dlg_mouse_free_regions
+dlg_mouse_mkbigregion
+dlg_mouse_mkregion
+dlg_mouse_region
+dlg_mouse_setbase
+dlg_mouse_setcode
+dlg_mouse_wgetch
+dlg_mouse_wgetch_nowait
+dlg_move_window
+dlg_need_separator
+dlg_new_modal_window
+dlg_new_window
+dlg_next_button
+dlg_next_ok_buttonindex
+dlg_ok_buttoncode
+dlg_ok_label
+dlg_ok_labels
+dlg_ordinate
+dlg_parse_bindkey
+dlg_parse_rc
+dlg_popen
+dlg_prev_button
+dlg_prev_ok_buttonindex
+dlg_print_autowrap
+dlg_print_line
+dlg_print_listitem
+dlg_print_scrolled
+dlg_print_size
+dlg_print_text
+dlg_progressbox
+dlg_put_backtitle
+dlg_reallocate_gauge
+dlg_register_buttons
+dlg_register_window
+dlg_remove_callback
+dlg_renamed_menutext
+dlg_restore_vars
+dlg_result_key
+dlg_save_vars
+dlg_set_focus
+dlg_set_result
+dlg_show_string
+dlg_strclone
+dlg_strempty
+dlg_string_to_argv
+dlg_sub_window
+dlg_tab_correct_str
+dlg_trace
+dlg_trace_2n
+dlg_trace_2s
+dlg_trace_chr
+dlg_trace_msg
+dlg_trace_win
+dlg_treeview
+dlg_trim_string
+dlg_ttysize
+dlg_unregister_window
+dlg_update_gauge
+dlg_wgetparent
+dlg_will_resize
+dlg_yes_buttoncode
+dlg_yes_labels
+end_dialog
+init_dialog
diff --git a/contrib/dialog/package/freebsd/Makefile b/contrib/dialog/package/freebsd/Makefile
index c9a9dcc0161d..6f6d652eed1d 100644
--- a/contrib/dialog/package/freebsd/Makefile
+++ b/contrib/dialog/package/freebsd/Makefile
@@ -7,10 +7,10 @@
#
PORTNAME= cdialog
-PORTVERSION= 1.2.20130923
+PORTVERSION= 1.3.20180621
PORTEPOCH= 1
CATEGORIES= devel
-MASTER_SITES= ftp://invisible-island.net/${PORTNAME:S|^c||}/
+MASTER_SITES= ftp://ftp.invisible-island.net/${PORTNAME:S|^c||}/
DISTNAME= ${PORTNAME:S|^c||}-${PORTVERSION:R}-${PORTVERSION:E}
EXTRACT_SUFX= .tgz
diff --git a/contrib/dialog/pause.c b/contrib/dialog/pause.c
index acca9b786026..eeff0fe7be72 100644
--- a/contrib/dialog/pause.c
+++ b/contrib/dialog/pause.c
@@ -1,9 +1,9 @@
/*
- * $Id: pause.c,v 1.36 2012/07/03 00:01:59 tom Exp $
+ * $Id: pause.c,v 1.39 2018/06/19 22:57:01 tom Exp $
*
* pause.c -- implements the pause dialog
*
- * Copyright 2004-2011,2012 Thomas E. Dickey
+ * Copyright 2004-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -76,22 +76,28 @@ dialog_pause(const char *title,
int result = DLG_EXIT_UNKNOWN;
int button_high = (have_buttons ? BTN_HIGH : MARGIN);
int gauge_y;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
int save_timeout = dialog_vars.timeout_secs;
- curs_set(0);
+ DLG_TRACE(("# pause args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("seconds", seconds);
- dlg_tab_correct_str(prompt);
+ curs_set(0);
dialog_vars.timeout_secs = 0;
seconds_orig = (seconds > 0) ? seconds : 1;
#ifdef KEY_RESIZE
retry:
- height = old_height;
- width = old_width;
#endif
+ prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(prompt);
+
if (have_buttons) {
dlg_auto_size(title, prompt, &height, &width,
MIN_HIGH,
@@ -125,7 +131,7 @@ dialog_pause(const char *title,
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
dlg_draw_box2(dialog,
@@ -141,7 +147,7 @@ dialog_pause(const char *title,
* attribute.
*/
(void) wmove(dialog, gauge_y + MARGIN, 4);
- (void) wattrset(dialog, title_attr);
+ dlg_attrset(dialog, title_attr);
for (i = 0; i < (width - 2 * (3 + MARGIN)); i++)
(void) waddch(dialog, ' ');
@@ -156,9 +162,9 @@ dialog_pause(const char *title,
*/
x = (seconds * (width - 2 * (3 + MARGIN))) / seconds_orig;
if ((title_attr & A_REVERSE) != 0) {
- wattroff(dialog, A_REVERSE);
+ dlg_attroff(dialog, A_REVERSE);
} else {
- (void) wattrset(dialog, A_REVERSE);
+ dlg_attrset(dialog, A_REVERSE);
}
(void) wmove(dialog, gauge_y + MARGIN, 4);
for (i = 0; i < x; i++) {
@@ -196,8 +202,12 @@ dialog_pause(const char *title,
switch (key) {
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
dlg_clear(); /* fill the background */
dlg_del_window(dialog); /* delete this window */
+ height = old_height;
+ width = old_width;
+ free(prompt);
refresh(); /* get it all onto the terminal */
goto retry;
#endif
diff --git a/contrib/dialog/po/de.po b/contrib/dialog/po/de.po
index 0d176d9eaf16..92605bc167fd 100644
--- a/contrib/dialog/po/de.po
+++ b/contrib/dialog/po/de.po
@@ -3,67 +3,70 @@
# This file is distributed under the same license as the dialog package.
#
# Michael Piefel <piefel@informatik.hu-berlin.de>, 2002.
-# Roland Illig <roland.illig@gmx.de>, 2009.
+# Roland Illig <roland.illig@gmx.de>, 2009-2014.
+#
msgid ""
msgstr ""
"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
-"PO-Revision-Date: 2009-11-08 23:48+0100\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2014-09-01 12:39+0100\n"
"Last-Translator: Roland Illig <roland.illig@gmx.de>\n"
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Poedit 1.6.9\n"
-#: buttons.c:387
+#: buttons.c:385
msgid "Yes"
msgstr "Ja"
-#: buttons.c:395
+#: buttons.c:393
msgid "No"
msgstr "Nein"
-#: buttons.c:403
+#: buttons.c:401
msgid "OK"
msgstr "OK"
-#: buttons.c:411
+#: buttons.c:409
msgid "Cancel"
msgstr "Abbrechen"
-#: buttons.c:419
+#: buttons.c:417
msgid "EXIT"
msgstr "VERLASSEN"
-#: buttons.c:427
+#: buttons.c:425
msgid "Extra"
msgstr "Extra"
-#: buttons.c:435
+#: buttons.c:433
msgid "Help"
msgstr "Hilfe"
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:273
msgid "Month"
msgstr "Monat"
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:293
msgid "Year"
msgstr "Jahr"
-#: dialog.c:756
+#: dialog.c:741
msgid "Rename"
-msgstr "Bearbeiten"
+msgstr "Umbenennen"
-#: fselect.c:571
+#: fselect.c:550
msgid "Directories"
msgstr "Verzeichnisse"
-#: fselect.c:572
+#: fselect.c:551
msgid "Files"
msgstr "Dateien"
@@ -107,6 +110,6 @@ msgstr "N/A"
msgid "Overall Progress"
msgstr "Gesamtfortschritt"
-#: textbox.c:468
+#: textbox.c:489
msgid "Search"
msgstr "Suche"
diff --git a/contrib/dialog/po/dialog.pot b/contrib/dialog/po/dialog.pot
index 8bd8b6d46456..beda1d598bdc 100644
--- a/contrib/dialog/po/dialog.pot
+++ b/contrib/dialog/po/dialog.pot
@@ -1,66 +1,67 @@
# Dialog
-# Copyright 2003-2010,2011 # Thomas Dickey
+# Copyright 2003-2014,2015 # Thomas Dickey
#
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.1.20110116\n"
+"Project-Id-Version: dialog 1.2.20150510\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
+"POT-Creation-Date: 2015-05-10 21:00-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
-#: buttons.c:387
+#: buttons.c:480
msgid "Yes"
msgstr ""
-#: buttons.c:395
+#: buttons.c:488
msgid "No"
msgstr ""
-#: buttons.c:403
+#: buttons.c:496
msgid "OK"
msgstr ""
-#: buttons.c:411
+#: buttons.c:504
msgid "Cancel"
msgstr ""
-#: buttons.c:419
+#: buttons.c:512
msgid "EXIT"
msgstr ""
-#: buttons.c:427
+#: buttons.c:520
msgid "Extra"
msgstr ""
-#: buttons.c:435
+#: buttons.c:528
msgid "Help"
msgstr ""
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:300
msgid "Month"
msgstr ""
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:322
msgid "Year"
msgstr ""
-#: dialog.c:756
+#: dialog.c:728
msgid "Rename"
msgstr ""
-#: fselect.c:571
+#: fselect.c:596
msgid "Directories"
msgstr ""
-#: fselect.c:572
+#: fselect.c:597
msgid "Files"
msgstr ""
@@ -100,10 +101,10 @@ msgstr ""
msgid "N/A"
msgstr ""
-#: mixedgauge.c:193
+#: mixedgauge.c:190
msgid "Overall Progress"
msgstr ""
-#: textbox.c:468
+#: textbox.c:502
msgid "Search"
msgstr ""
diff --git a/contrib/dialog/po/es.po b/contrib/dialog/po/es.po
index 958b98fe4d07..ccb4b019a579 100644
--- a/contrib/dialog/po/es.po
+++ b/contrib/dialog/po/es.po
@@ -7,62 +7,62 @@ msgid ""
msgstr ""
"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
"PO-Revision-Date: 2010-02-14 14:26+0100\n"
"Last-Translator: Santiago Vila Doncel <sanvila@unex.es>\n"
-"Language-Team: Spanish <es@li.org>\n"
+"Language-Team: Spanish <es@tp.org.es>\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
-#: buttons.c:387
+#: buttons.c:385
msgid "Yes"
msgstr "Sí"
-#: buttons.c:395
+#: buttons.c:393
msgid "No"
msgstr "No"
-#: buttons.c:403
+#: buttons.c:401
msgid "OK"
msgstr "Aceptar"
-#: buttons.c:411
+#: buttons.c:409
msgid "Cancel"
msgstr "Cancelar"
-#: buttons.c:419
+#: buttons.c:417
msgid "EXIT"
msgstr "Salir"
-#: buttons.c:427
+#: buttons.c:425
msgid "Extra"
msgstr "Extra"
-#: buttons.c:435
+#: buttons.c:433
msgid "Help"
msgstr "Ayuda"
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:273
msgid "Month"
msgstr "Mes"
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:293
msgid "Year"
msgstr "Año"
-#: dialog.c:756
+#: dialog.c:741
msgid "Rename"
msgstr "Renombrar"
-#: fselect.c:571
+#: fselect.c:550
msgid "Directories"
msgstr "Directorios"
-#: fselect.c:572
+#: fselect.c:551
msgid "Files"
msgstr "Ficheros"
@@ -107,6 +107,6 @@ msgstr "N/A"
msgid "Overall Progress"
msgstr "Progreso total"
-#: textbox.c:468
+#: textbox.c:489
msgid "Search"
msgstr "Buscar"
diff --git a/contrib/dialog/po/fur.po b/contrib/dialog/po/fur.po
new file mode 100644
index 000000000000..c863351ef7eb
--- /dev/null
+++ b/contrib/dialog/po/fur.po
@@ -0,0 +1,113 @@
+# Dialog
+# Copyright 2003-2007,2008 # Thomas Dickey
+# This file is distributed under the same license as the dialog package.
+# Fabio Tomat <f.t.public@gmail.com>, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: dialog 1.1.20080819\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2016-11-20 07:14+0100\n"
+"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
+"Language-Team: Friulian <f.t.public@gmail.com>\n"
+"Language: fur\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.8\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: buttons.c:385
+msgid "Yes"
+msgstr "Sì"
+
+#: buttons.c:393
+msgid "No"
+msgstr "No"
+
+#: buttons.c:401
+msgid "OK"
+msgstr "OK"
+
+#: buttons.c:409
+msgid "Cancel"
+msgstr "Anule"
+
+#: buttons.c:417
+msgid "EXIT"
+msgstr "JES"
+
+#: buttons.c:425
+msgid "Extra"
+msgstr "Adizionâl"
+
+#: buttons.c:433
+msgid "Help"
+msgstr "Jutori"
+
+#. Headline "Month"
+#: calendar.c:273
+msgid "Month"
+msgstr "Mês"
+
+#. Headline "Year"
+#: calendar.c:293
+msgid "Year"
+msgstr "An"
+
+#: dialog.c:741
+msgid "Rename"
+msgstr "Cambie non"
+
+#: fselect.c:550
+msgid "Directories"
+msgstr "Cartelis"
+
+#: fselect.c:551
+msgid "Files"
+msgstr "File"
+
+#: mixedgauge.c:58
+msgid "Succeeded"
+msgstr "Riessût"
+
+#: mixedgauge.c:61
+msgid "Failed"
+msgstr "Falît"
+
+#: mixedgauge.c:64
+msgid "Passed"
+msgstr "Superât"
+
+#: mixedgauge.c:67
+msgid "Completed"
+msgstr "Completât"
+
+#: mixedgauge.c:70
+msgid "Checked"
+msgstr "Controlât"
+
+#: mixedgauge.c:73
+msgid "Done"
+msgstr "Fat"
+
+#: mixedgauge.c:76
+msgid "Skipped"
+msgstr "Saltât"
+
+#: mixedgauge.c:79
+msgid "In Progress"
+msgstr "In cors"
+
+#: mixedgauge.c:85
+msgid "N/A"
+msgstr "N/D"
+
+#: mixedgauge.c:193
+msgid "Overall Progress"
+msgstr "Progrès gjenerâl"
+
+#: textbox.c:489
+msgid "Search"
+msgstr "Cîr"
diff --git a/contrib/dialog/po/gd.po b/contrib/dialog/po/gd.po
new file mode 100644
index 000000000000..9bcaa605066a
--- /dev/null
+++ b/contrib/dialog/po/gd.po
@@ -0,0 +1,111 @@
+# Scottish Gaelic translation of Dialog.
+# Copyright 2003-2007,2008 # Thomas Dickey
+# This file is distributed under the same license as the dialog package.
+# GunChleoc <fios@foramnagaidhlig.net>, 2014.
+msgid ""
+msgstr ""
+"Project-Id-Version: dialog 1.1.20080819\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2014-02-11 11:19-0000\n"
+"Last-Translator: GunChleoc <fios@foramnagaidhlig.net>\n"
+"Language-Team: Scottish Gaelic <fios@foramnagaidhlig.net>\n"
+"Language: gd\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=4; plural=(n==1 || n==11) ? 0 : (n==2 || n==12) ? 1 : (n > 2 && n < 20) ? 2 : 3;\n"
+
+#: buttons.c:385
+msgid "Yes"
+msgstr "Tha"
+
+#: buttons.c:393
+msgid "No"
+msgstr "Chan eil"
+
+#: buttons.c:401
+msgid "OK"
+msgstr "Ceart ma-thà"
+
+#: buttons.c:409
+msgid "Cancel"
+msgstr "Sguir dheth"
+
+#: buttons.c:417
+msgid "EXIT"
+msgstr "FÀG AN-SEO"
+
+#: buttons.c:425
+msgid "Extra"
+msgstr "Barrachd"
+
+#: buttons.c:433
+msgid "Help"
+msgstr "Cobhair"
+
+#. Headline "Month"
+#: calendar.c:273
+msgid "Month"
+msgstr "Mìos"
+
+#. Headline "Year"
+#: calendar.c:293
+msgid "Year"
+msgstr "Bliadhna"
+
+#: dialog.c:741
+msgid "Rename"
+msgstr "Cuir ainm ùr air"
+
+#: fselect.c:550
+msgid "Directories"
+msgstr "Pasganan"
+
+#: fselect.c:551
+msgid "Files"
+msgstr "Faidhlichean"
+
+#: mixedgauge.c:58
+msgid "Succeeded"
+msgstr "Soirbheachail"
+
+#: mixedgauge.c:61
+msgid "Failed"
+msgstr "Dh'fhàillig leis"
+
+#: mixedgauge.c:64
+msgid "Passed"
+msgstr "Soirbheachail"
+
+#: mixedgauge.c:67
+msgid "Completed"
+msgstr "Coileanta"
+
+#: mixedgauge.c:70
+msgid "Checked"
+msgstr "Air a dhearbhadh"
+
+#: mixedgauge.c:73
+msgid "Done"
+msgstr "Dèanta"
+
+#: mixedgauge.c:76
+msgid "Skipped"
+msgstr "Air a leigeil seachad"
+
+#: mixedgauge.c:79
+msgid "In Progress"
+msgstr "A' dol air adhart"
+
+#: mixedgauge.c:85
+msgid "N/A"
+msgstr "Chan eil seo iomchaidh"
+
+#: mixedgauge.c:193
+msgid "Overall Progress"
+msgstr "Adhartas san fharsaingeachd"
+
+#: textbox.c:489
+msgid "Search"
+msgstr "Lorg"
diff --git a/contrib/dialog/po/hr.po b/contrib/dialog/po/hr.po
index c3661db24325..6b36cd623873 100644
--- a/contrib/dialog/po/hr.po
+++ b/contrib/dialog/po/hr.po
@@ -8,14 +8,16 @@ msgstr ""
"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2012-03-31 00:10+0200\n"
-"Last-Translator: Tomislav Krznar <tomislav.krznar@gmail.com>\n"
+"PO-Revision-Date: 2017-03-26 15:31+0200\n"
+"Last-Translator: gogo <trebelnik2@gmail.com>\n"
"Language-Team: Croatian <lokalizacija@linux.hr>\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Poedit 1.8.7.1\n"
#: buttons.c:385
msgid "Yes"
@@ -31,7 +33,7 @@ msgstr "U redu"
#: buttons.c:409
msgid "Cancel"
-msgstr "Otkaži"
+msgstr "Odustani"
#: buttons.c:417
msgid "EXIT"
@@ -81,7 +83,7 @@ msgstr "Prošlo"
#: mixedgauge.c:67
msgid "Completed"
-msgstr "Dovršeno"
+msgstr "Završeno"
#: mixedgauge.c:70
msgid "Checked"
diff --git a/contrib/dialog/po/hu.po b/contrib/dialog/po/hu.po
index 6975b92be3d2..0236dd85eaca 100644
--- a/contrib/dialog/po/hu.po
+++ b/contrib/dialog/po/hu.po
@@ -1,19 +1,23 @@
-# Dialog
-# Copyright 2003, # Thomas Dickey
-# Arpad Biro <biro_arpad@yahoo.com>, 2003
+# Hungarian translation of dialog
+# Copyright (C) 2003, 2014 Free Software Foundation, Inc.
+# This file is distributed under the same license as the dialog package.
#
+# Ãrpad Biró <biro_arpad@yahoo.com>, 2003.
+# Balázs Úr <urbalazs@gmail.com>, 2014.
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.0-rel20041222\n"
+"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2005-02-02 08:21+0100\n"
-"Last-Translator: Németh Csaba <csaba@sopron.hu>\n"
+"PO-Revision-Date: 2014-03-20 23:07+0100\n"
+"Last-Translator: Balázs Úr <urbalazs@gmail.com>\n"
"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
+"Language: hu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.0.1\n"
+"X-Generator: Lokalize 1.2\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: buttons.c:385
msgid "Yes"
@@ -29,7 +33,7 @@ msgstr "OK"
#: buttons.c:409
msgid "Cancel"
-msgstr "Mégsem"
+msgstr "Mégse"
#: buttons.c:417
msgid "EXIT"
@@ -67,44 +71,43 @@ msgstr "Fájlok"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr ""
+msgstr "Sikerült"
#: mixedgauge.c:61
-#, fuzzy
msgid "Failed"
-msgstr "Fájlok"
+msgstr "Meghiúsult"
#: mixedgauge.c:64
msgid "Passed"
-msgstr ""
+msgstr "Teljesült"
#: mixedgauge.c:67
msgid "Completed"
-msgstr ""
+msgstr "Befejezve"
#: mixedgauge.c:70
msgid "Checked"
-msgstr ""
+msgstr "Bejelölve"
#: mixedgauge.c:73
msgid "Done"
-msgstr ""
+msgstr "Kész"
#: mixedgauge.c:76
msgid "Skipped"
-msgstr ""
+msgstr "Kihagyva"
#: mixedgauge.c:79
msgid "In Progress"
-msgstr ""
+msgstr "Folyamatban"
#: mixedgauge.c:85
msgid "N/A"
-msgstr ""
+msgstr "N/A"
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr ""
+msgstr "Teljes folyamat"
#: textbox.c:489
msgid "Search"
diff --git a/contrib/dialog/po/lv.po b/contrib/dialog/po/lv.po
index 289eefe80141..83be9decdc4d 100644
--- a/contrib/dialog/po/lv.po
+++ b/contrib/dialog/po/lv.po
@@ -4,70 +4,71 @@
# This file is distributed under the same license as the dialog package.
#
# Rihards Prieditis <RPrieditis@inbox.lv>, 2009.
+# RÅ«dolfs Mazurs <rudolfs.mazurs@gmail.com>, 2014.
msgid ""
msgstr ""
"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-01-16 17:57-0500\n"
-"PO-Revision-Date: 2009-04-11 20:50+0300\n"
-"Last-Translator: Rihards Prieditis <RPrieditis@inbox.lv>\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2014-04-20 14:12+0300\n"
+"Last-Translator: Rihards Prieditis <rprieditis@gmail.com>\n"
"Language-Team: Latvian <translation-team-lv@lists.sourceforge.net>\n"
"Language: lv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Lokalize 0.3\n"
+"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);\n"
-#: buttons.c:387
+#: buttons.c:385
msgid "Yes"
msgstr "JÄ"
-#: buttons.c:395
+#: buttons.c:393
msgid "No"
msgstr "NÄ“"
-#: buttons.c:403
+#: buttons.c:401
msgid "OK"
msgstr "Labi"
-#: buttons.c:411
+#: buttons.c:409
msgid "Cancel"
msgstr "Atcelt"
-#: buttons.c:419
+#: buttons.c:417
msgid "EXIT"
msgstr "IZIET"
-#: buttons.c:427
+#: buttons.c:425
msgid "Extra"
msgstr "Papildus"
-#: buttons.c:435
+#: buttons.c:433
msgid "Help"
msgstr "Palīdzība"
#. Headline "Month"
-#: calendar.c:298
+#: calendar.c:273
msgid "Month"
msgstr "MÄ“nesis"
#. Headline "Year"
-#: calendar.c:318
+#: calendar.c:293
msgid "Year"
msgstr "Gads"
-#: dialog.c:756
+#: dialog.c:741
msgid "Rename"
msgstr "PÄrdÄ“vÄ“t"
-#: fselect.c:571
+#: fselect.c:550
msgid "Directories"
msgstr "Direktorijas"
-#: fselect.c:572
+#: fselect.c:551
msgid "Files"
-msgstr "Faili"
+msgstr "Datnes"
#: mixedgauge.c:58
msgid "Succeeded"
@@ -109,6 +110,6 @@ msgstr "n/z"
msgid "Overall Progress"
msgstr "VispÄrÄ“jais progress"
-#: textbox.c:468
+#: textbox.c:489
msgid "Search"
msgstr "Meklēt"
diff --git a/contrib/dialog/po/ro.po b/contrib/dialog/po/ro.po
index f680d05a30be..b53898b4fef9 100644
--- a/contrib/dialog/po/ro.po
+++ b/contrib/dialog/po/ro.po
@@ -1,22 +1,25 @@
-# Mesajele în limba română pentru dialog.
-# Copyright (C) 2003 Free Software Foundation, Inc.
-# Acest fişier este distribuit sub aceeaşi licenţă ca şi pachetul dialog.
+# Translation of dialog messages in Romanian.
+# Copyright (C) 2015 Free Software Foundation, Inc.
+# This file is distributed under the same license as the dialog package.
# Laurentiu Buzdugan <lbuz@rolix.org>, 2005.
-#
+# Mihai Cristescu <mihai.cristescu@archlinux.info>, 2015.
#
#
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.0-rel20041222\n"
+"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-07-20 14:31-0400\n"
-"PO-Revision-Date: 2005-01-20 12:00-0500\n"
-"Last-Translator: Laurentiu Buzdugan <lbuz@rolix.org>\n"
+"POT-Creation-Date: 2008-06-18 18:26-0400\n"
+"PO-Revision-Date: 2015-03-13 19:50+0200\n"
+"Last-Translator: Mihai Cristescu <mihai.cristescu@archlinux.info>\n"
"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"Language: ro\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n"
+"X-Generator: Poedit 1.7.4\n"
#: buttons.c:385
msgid "Yes"
@@ -32,7 +35,7 @@ msgstr "OK"
#: buttons.c:409
msgid "Cancel"
-msgstr "Renunţă"
+msgstr "Renunță"
#: buttons.c:417
msgid "EXIT"
@@ -49,16 +52,16 @@ msgstr "Ajutor"
#. Headline "Month"
#: calendar.c:273
msgid "Month"
-msgstr "Luna"
+msgstr "Lună"
#. Headline "Year"
#: calendar.c:293
msgid "Year"
msgstr "An"
-#: dialog.c:744
+#: dialog.c:741
msgid "Rename"
-msgstr "RedenumeÅŸte"
+msgstr "Redenumește"
#: fselect.c:550
msgid "Directories"
@@ -66,48 +69,47 @@ msgstr "Directoare"
#: fselect.c:551
msgid "Files"
-msgstr "FiÅŸiere"
+msgstr "Fișiere"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr ""
+msgstr "A reușit"
#: mixedgauge.c:61
-#, fuzzy
msgid "Failed"
-msgstr "FiÅŸiere"
+msgstr "A eșuat"
#: mixedgauge.c:64
msgid "Passed"
-msgstr ""
+msgstr "A trecut"
#: mixedgauge.c:67
msgid "Completed"
-msgstr ""
+msgstr "Complet"
#: mixedgauge.c:70
msgid "Checked"
-msgstr ""
+msgstr "Verificat"
#: mixedgauge.c:73
msgid "Done"
-msgstr ""
+msgstr "Gata"
#: mixedgauge.c:76
msgid "Skipped"
-msgstr ""
+msgstr "Omis"
#: mixedgauge.c:79
msgid "In Progress"
-msgstr ""
+msgstr "ÃŽn curs"
#: mixedgauge.c:85
msgid "N/A"
-msgstr ""
+msgstr "N/A"
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr ""
+msgstr "Progres pe ansamblu"
#: textbox.c:489
msgid "Search"
diff --git a/contrib/dialog/po/tr.po b/contrib/dialog/po/tr.po
index e6c052f302d5..112b042425c5 100644
--- a/contrib/dialog/po/tr.po
+++ b/contrib/dialog/po/tr.po
@@ -1,20 +1,24 @@
# Turkish translation of dialog.
# Copyright (C) 2005 dialog GNU GPL:
# This file is distributed under the same license as the dialog package.
-# Abdullah Ulas <potkal@bioinformatics.org>, 2005.
#
-#, fuzzy
+# Abdullah Ulas <potkal@bioinformatics.org>, 2005.
+# Volkan Gezer <volkangezer@gmail.com>, 2017.
msgid ""
msgstr ""
-"Project-Id-Version: dialog 1.0-rel20041222\n"
+"Project-Id-Version: dialog 1.1.20080819\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2008-06-18 18:26-0400\n"
-"PO-Revision-Date: 2005-04-08 18:29+0300\n"
-"Last-Translator: Abdullah Ulas <potkal@bioinformatics.org>\n"
+"PO-Revision-Date: 2017-05-05 12:35+0100\n"
+"Last-Translator: Volkan Gezer <volkangezer@gmail.com>\n"
"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
+"X-Bugs: Report translation errors to the Language-Team address.\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"X-Generator: Lokalize 2.0\n"
#: buttons.c:385
msgid "Yes"
@@ -68,44 +72,43 @@ msgstr "Dosyalar"
#: mixedgauge.c:58
msgid "Succeeded"
-msgstr ""
+msgstr "Başarılı"
#: mixedgauge.c:61
-#, fuzzy
msgid "Failed"
-msgstr "Dosyalar"
+msgstr "Başarısız"
#: mixedgauge.c:64
msgid "Passed"
-msgstr ""
+msgstr "Geçti"
#: mixedgauge.c:67
msgid "Completed"
-msgstr ""
+msgstr "Tamamlandı"
#: mixedgauge.c:70
msgid "Checked"
-msgstr ""
+msgstr "Denetlendi"
#: mixedgauge.c:73
msgid "Done"
-msgstr ""
+msgstr "Bitti"
#: mixedgauge.c:76
msgid "Skipped"
-msgstr ""
+msgstr "Atlandı"
#: mixedgauge.c:79
msgid "In Progress"
-msgstr ""
+msgstr "Devam Etmekte"
#: mixedgauge.c:85
msgid "N/A"
-msgstr ""
+msgstr "N/A"
#: mixedgauge.c:193
msgid "Overall Progress"
-msgstr ""
+msgstr "Genel Ä°lerleme"
#: textbox.c:489
msgid "Search"
diff --git a/contrib/dialog/prgbox.c b/contrib/dialog/prgbox.c
index cbb1458278e6..d095935a358d 100644
--- a/contrib/dialog/prgbox.c
+++ b/contrib/dialog/prgbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: prgbox.c,v 1.9 2012/12/02 23:40:30 tom Exp $
+ * $Id: prgbox.c,v 1.13 2016/01/27 01:37:26 tom Exp $
*
* prgbox.c -- implements the prg box
*
- * Copyright 2011,2012 Thomas E. Dickey
+ * Copyright 2011-2014,2016 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -32,7 +32,7 @@ reapchild(int sig)
/*
* Open a pipe which ties stderr and stdout together.
*/
-static FILE *
+FILE *
dlg_popen(const char *command, const char *type)
{
FILE *result = 0;
@@ -67,8 +67,8 @@ dlg_popen(const char *command, const char *type)
* given command. Also, it needs the command to be parsed into
* tokens.
*/
- if ((blob = malloc(4 + strlen(command))) != 0) {
- sprintf(blob, "-c %s", command);
+ if ((blob = malloc(10 + strlen(command))) != 0) {
+ sprintf(blob, "sh -c \"%s\"", command);
argv = dlg_string_to_argv(blob);
execvp("sh", argv);
}
diff --git a/contrib/dialog/progressbox.c b/contrib/dialog/progressbox.c
index d9d062033360..bbac47e52969 100644
--- a/contrib/dialog/progressbox.c
+++ b/contrib/dialog/progressbox.c
@@ -1,10 +1,10 @@
/*
- * $Id: progressbox.c,v 1.23 2012/12/21 10:00:05 tom Exp $
+ * $Id: progressbox.c,v 1.47 2018/06/21 09:14:47 tom Exp $
*
* progressbox.c -- implements the progress box
*
- * Copyright 2005 Valery Reznic
- * Copyright 2006-2012 Thomas E. Dickey
+ * Copyright 2006-2014,2018 Thomas E. Dickey
+ * Copyright 2005 Valery Reznic
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
@@ -26,35 +26,150 @@
#include <dialog.h>
#include <dlg_keys.h>
+#ifdef KEY_RESIZE
+#include <errno.h>
+#endif
+
#define MIN_HIGH (4)
#define MIN_WIDE (10 + 2 * (2 + MARGIN))
+#ifdef KEY_RESIZE
+typedef struct _wrote {
+ struct _wrote *link;
+ char *text;
+} WROTE;
+#endif
+
typedef struct {
DIALOG_CALLBACK obj;
WINDOW *text;
+ char *prompt;
+ int high, wide;
+ int old_high, old_wide;
char line[MAX_LEN + 1];
int is_eof;
+#ifdef KEY_RESIZE
+ WROTE *wrote;
+#endif
} MY_OBJ;
+static void
+free_obj(MY_OBJ * obj)
+{
+ dlg_del_window(obj->obj.win);
+ free(obj->prompt);
+#ifdef KEY_RESIZE
+ while (obj->wrote) {
+ WROTE *wrote = obj->wrote;
+ obj->wrote = wrote->link;
+ free(wrote->text);
+ free(wrote);
+ }
+#endif
+ free(obj);
+}
+
+static void
+restart_obj(MY_OBJ * obj)
+{
+ free(obj->prompt);
+ obj->high = obj->old_high;
+ obj->wide = obj->old_wide;
+ dlg_clear();
+ dlg_del_window(obj->obj.win);
+}
+
+static void
+start_obj(MY_OBJ * obj, const char *title, const char *cprompt)
+{
+ int y, x, thigh;
+ int i;
+
+ obj->prompt = dlg_strclone(cprompt);
+ dlg_tab_correct_str(obj->prompt);
+ dlg_auto_size(title, obj->prompt, &obj->high, &obj->wide, MIN_HIGH, MIN_WIDE);
+
+ dlg_print_size(obj->high, obj->wide);
+ dlg_ctl_size(obj->high, obj->wide);
+
+ x = dlg_box_x_ordinate(obj->wide);
+ y = dlg_box_y_ordinate(obj->high);
+ thigh = obj->high - (2 * MARGIN);
+
+ obj->obj.win = dlg_new_window(obj->high, obj->wide, y, x);
+
+ dlg_draw_box2(obj->obj.win,
+ 0, 0,
+ obj->high, obj->wide,
+ dialog_attr,
+ border_attr,
+ border2_attr);
+ dlg_draw_title(obj->obj.win, title);
+ dlg_draw_helpline(obj->obj.win, FALSE);
+
+ if (obj->prompt[0] != '\0') {
+ int y2, x2;
+
+ dlg_attrset(obj->obj.win, dialog_attr);
+ dlg_print_autowrap(obj->obj.win, obj->prompt, obj->high, obj->wide);
+ getyx(obj->obj.win, y2, x2);
+ (void) x2;
+ ++y2;
+ wmove(obj->obj.win, y2, MARGIN);
+ for (i = 0; i < getmaxx(obj->obj.win) - 2 * MARGIN; i++)
+ (void) waddch(obj->obj.win, dlg_boxchar(ACS_HLINE));
+ y += y2;
+ thigh -= y2;
+ }
+
+ /* Create window for text region, used for scrolling text */
+ obj->text = dlg_sub_window(obj->obj.win,
+ thigh,
+ obj->wide - (2 * MARGIN),
+ y + MARGIN,
+ x + MARGIN);
+
+ (void) wrefresh(obj->obj.win);
+
+ (void) wmove(obj->obj.win, getmaxy(obj->text), (MARGIN + 1));
+ (void) wnoutrefresh(obj->obj.win);
+
+ dlg_attr_clear(obj->text, getmaxy(obj->text), getmaxx(obj->text), dialog_attr);
+}
+
/*
* Return current line of text.
*/
static char *
-get_line(MY_OBJ * obj)
+get_line(MY_OBJ * obj, int *restart)
{
FILE *fp = obj->obj.input;
int col = 0;
int j, tmpint, ch;
+ char *result = obj->line;
+ *restart = 0;
for (;;) {
- if ((ch = getc(fp)) == EOF) {
- obj->is_eof = 1;
- if (col) {
+ ch = getc(fp);
+#ifdef KEY_RESIZE
+ /* SIGWINCH may have interrupted this - try to ignore if resizable */
+ if (ferror(fp)) {
+ switch (errno) {
+ case EINTR:
+ clearerr(fp);
+ continue;
+ default:
break;
- } else {
- return NULL;
}
}
+#endif
+ if (feof(fp) || ferror(fp)) {
+ obj->is_eof = 1;
+ if (!col) {
+ result = NULL;
+ }
+ break;
+ }
if (ch == '\n')
break;
if (ch == '\r')
@@ -80,36 +195,84 @@ get_line(MY_OBJ * obj)
obj->line[col] = '\0';
- return obj->line;
+#ifdef KEY_RESIZE
+ if (result != NULL) {
+ WINDOW *win = obj->text;
+ WROTE *wrote = dlg_calloc(WROTE, 1);
+
+ if (wrote != 0) {
+ wrote->text = dlg_strclone(obj->line);
+ wrote->link = obj->wrote;
+ obj->wrote = wrote;
+ }
+
+ nodelay(win, TRUE);
+ if ((ch = wgetch(win)) == KEY_RESIZE) {
+ *restart = 1;
+ }
+ nodelay(win, FALSE);
+ }
+#endif
+ return result;
}
/*
* Print a new line of text.
*/
static void
-print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
+print_line(MY_OBJ * obj, const char *line, int row)
{
- int i, y, x;
- char *line = obj->line;
-
- (void) wmove(win, row, 0); /* move cursor to correct line */
- (void) waddch(win, ' ');
-#ifdef NCURSES_VERSION
- (void) waddnstr(win, line, MIN((int) strlen(line), width - 2));
-#else
- line[MIN((int) strlen(line), width - 2)] = '\0';
- waddstr(win, line);
-#endif
+ int width = obj->wide - (2 * MARGIN);
+ int limit = MIN((int) strlen(line), width - 2);
- getyx(win, y, x);
- (void) y;
- /* Clear 'residue' of previous line */
- for (i = 0; i < width - x; i++)
- (void) waddch(win, ' ');
+ (void) wmove(obj->text, row, 0); /* move cursor to correct line */
+ wprintw(obj->text, " %.*s", limit, line);
+ wclrtoeol(obj->text);
}
+#ifdef KEY_RESIZE
static int
-pause_for_ok(WINDOW *dialog, int height, int width)
+wrote_size(MY_OBJ * obj, int want)
+{
+ int result = 0;
+ WROTE *wrote = obj->wrote;
+ while (wrote != NULL && want > 0) {
+ wrote = wrote->link;
+ want--;
+ result++;
+ }
+ return result;
+}
+
+static const char *
+wrote_data(MY_OBJ * obj, int want)
+{
+ const char *result = NULL;
+ WROTE *wrote = obj->wrote;
+ while (wrote != NULL && want > 0) {
+ result = wrote->text;
+ wrote = wrote->link;
+ want--;
+ }
+ return result;
+}
+
+static int
+reprint_lines(MY_OBJ * obj, int buttons)
+{
+ int want = getmaxy(obj->text) - (buttons ? 2 : 0);
+ int have = wrote_size(obj, want);
+ int n;
+ for (n = 0; n < have; ++n) {
+ print_line(obj, wrote_data(obj, have - n), n);
+ }
+ (void) wrefresh(obj->text);
+ return have;
+}
+#endif
+
+static int
+pause_for_ok(MY_OBJ * obj, const char *title, const char *cprompt)
{
/* *INDENT-OFF* */
static DLG_KEYS_BINDING binding[] = {
@@ -125,30 +288,33 @@ pause_for_ok(WINDOW *dialog, int height, int width)
int result = DLG_EXIT_UNKNOWN;
const char **buttons = dlg_ok_label();
int check;
- int save_nocancel = dialog_vars.nocancel;
+ bool save_nocancel = dialog_vars.nocancel;
bool redraw = TRUE;
dialog_vars.nocancel = TRUE;
button = dlg_default_button();
- dlg_register_window(dialog, "progressbox", binding);
- dlg_register_buttons(dialog, "progressbox", buttons);
+#ifdef KEY_RESIZE
+ restart:
+#endif
+
+ dlg_register_window(obj->obj.win, "progressbox", binding);
+ dlg_register_buttons(obj->obj.win, "progressbox", buttons);
- dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
- mouse_mkbutton(height - 2, width / 2 - 4, 6, '\n');
+ dlg_draw_bottom_box2(obj->obj.win, border_attr, border2_attr, dialog_attr);
while (result == DLG_EXIT_UNKNOWN) {
if (redraw) {
redraw = FALSE;
if (button < 0)
button = 0;
- dlg_draw_buttons(dialog,
- height - 2, 0,
+ dlg_draw_buttons(obj->obj.win,
+ obj->high - 2, 0,
buttons, button,
- FALSE, width);
+ FALSE, obj->wide);
}
- key = dlg_mouse_wgetch(dialog, &fkey);
+ key = dlg_mouse_wgetch(obj->obj.win, &fkey);
if (dlg_result_key(key, fkey, &result))
break;
@@ -170,6 +336,15 @@ pause_for_ok(WINDOW *dialog, int height, int width)
case DLGK_ENTER:
result = dlg_ok_buttoncode(button);
break;
+#ifdef KEY_RESIZE
+ case KEY_RESIZE:
+ dlg_will_resize(obj->obj.win);
+ restart_obj(obj);
+ start_obj(obj, title, cprompt);
+ reprint_lines(obj, TRUE);
+ redraw = TRUE;
+ goto restart;
+#endif
default:
if (is_DLGK_MOUSE(key)) {
result = dlg_ok_buttoncode(key - M_EVENT);
@@ -185,7 +360,8 @@ pause_for_ok(WINDOW *dialog, int height, int width)
beep();
}
}
- dlg_unregister_window(dialog);
+ dlg_mouse_free_regions();
+ dlg_unregister_window(obj->obj.win);
dialog_vars.nocancel = save_nocancel;
return result;
@@ -200,90 +376,85 @@ dlg_progressbox(const char *title,
FILE *fp)
{
int i;
- int x, y, thigh;
- WINDOW *dialog, *text;
MY_OBJ *obj;
- char *prompt = dlg_strclone(cprompt);
+ int again = 0;
+ int toprow = 0;
int result;
- dlg_tab_correct_str(prompt);
- dlg_auto_size(title, prompt, &height, &width, MIN_HIGH, MIN_WIDE);
- dlg_print_size(height, width);
- dlg_ctl_size(height, width);
+ DLG_TRACE(("# progressbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("pause", pauseopt);
+ DLG_TRACE2N("fp", fp ? fileno(fp) : -1);
- x = dlg_box_x_ordinate(width);
- y = dlg_box_y_ordinate(height);
- thigh = height - (2 * MARGIN);
+ obj = dlg_calloc(MY_OBJ, 1);
+ assert_ptr(obj, "dlg_progressbox");
+ obj->obj.input = fp;
- dialog = dlg_new_window(height, width, y, x);
+ obj->high = height;
+ obj->wide = width;
- dlg_draw_box2(dialog, 0, 0, height, width, dialog_attr, border_attr, border2_attr);
- dlg_draw_title(dialog, title);
- dlg_draw_helpline(dialog, FALSE);
+#ifdef KEY_RESIZE
+ obj->old_high = height;
+ obj->old_wide = width;
- if (*prompt != '\0') {
- int y2, x2;
+ curs_set(0);
+ restart:
+#endif
- (void) wattrset(dialog, dialog_attr);
- dlg_print_autowrap(dialog, prompt, height, width);
- getyx(dialog, y2, x2);
- (void) x2;
- ++y2;
- wmove(dialog, y2, MARGIN);
- for (i = 0; i < getmaxx(dialog) - 2 * MARGIN; i++)
- (void) waddch(dialog, dlg_boxchar(ACS_HLINE));
- y += y2;
- thigh -= y2;
+ start_obj(obj, title, cprompt);
+#ifdef KEY_RESIZE
+ if (again) {
+ toprow = reprint_lines(obj, FALSE);
}
+#endif
- /* Create window for text region, used for scrolling text */
- text = dlg_sub_window(dialog,
- thigh,
- width - (2 * MARGIN),
- y + MARGIN,
- x + MARGIN);
-
- (void) wrefresh(dialog);
-
- (void) wmove(dialog, thigh, (MARGIN + 1));
- (void) wnoutrefresh(dialog);
-
- obj = dlg_calloc(MY_OBJ, 1);
- assert_ptr(obj, "dlg_progressbox");
-
- obj->obj.input = fp;
- obj->obj.win = dialog;
- obj->text = text;
-
- dlg_attr_clear(text, thigh, getmaxx(text), dialog_attr);
- for (i = 0; get_line(obj); i++) {
- if (i < thigh) {
- print_line(obj, text, i, width - (2 * MARGIN));
+ for (i = toprow; get_line(obj, &again); i++) {
+#ifdef KEY_RESIZE
+ if (again) {
+ dlg_will_resize(obj->obj.win);
+ restart_obj(obj);
+ goto restart;
+ }
+#endif
+ if (i < getmaxy(obj->text)) {
+ print_line(obj, obj->line, i);
} else {
- scrollok(text, TRUE);
- scroll(text);
- scrollok(text, FALSE);
- print_line(obj, text, thigh - 1, width - (2 * MARGIN));
+ scrollok(obj->text, TRUE);
+ scroll(obj->text);
+ scrollok(obj->text, FALSE);
+ print_line(obj, obj->line, getmaxy(obj->text) - 1);
}
- (void) wrefresh(text);
- dlg_trace_win(dialog);
+ (void) wrefresh(obj->text);
if (obj->is_eof)
break;
}
+ dlg_trace_win(obj->obj.win);
+ curs_set(1);
+
if (pauseopt) {
- scrollok(text, TRUE);
- wscrl(text, 1 + MARGIN);
- (void) wrefresh(text);
- result = pause_for_ok(dialog, height, width);
+ int need = 1 + MARGIN;
+ int base = getmaxy(obj->text) - need;
+ if (i >= base) {
+ i -= base;
+ if (i > need)
+ i = need;
+ if (i > 0) {
+ scrollok(obj->text, TRUE);
+ }
+ wscrl(obj->text, i);
+ }
+ (void) wrefresh(obj->text);
+ result = pause_for_ok(obj, title, cprompt);
} else {
- wrefresh(dialog);
+ wrefresh(obj->obj.win);
result = DLG_EXIT_OK;
}
- dlg_del_window(dialog);
- free(prompt);
- free(obj);
+ free_obj(obj);
return result;
}
diff --git a/contrib/dialog/rangebox.c b/contrib/dialog/rangebox.c
index c218966736ab..a5fa2520814a 100644
--- a/contrib/dialog/rangebox.c
+++ b/contrib/dialog/rangebox.c
@@ -1,9 +1,9 @@
/*
- * $Id: rangebox.c,v 1.17 2013/03/17 16:02:00 tom Exp $
+ * $Id: rangebox.c,v 1.24 2018/06/19 22:57:01 tom Exp $
*
* rangebox.c -- implements the rangebox dialog
*
- * Copyright 2012,2013 Thomas E. Dickey
+ * Copyright 2012-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -128,7 +128,7 @@ draw_value(VALUE * data, int value)
scaled = offset;
}
- (void) wattrset(win, gauge_attr);
+ dlg_attrset(win, gauge_attr);
wmove(win, data->slide_y, data->slide_x);
for (n = 0; n < data->slide_len; ++n) {
(void) waddch(win, ' ');
@@ -136,9 +136,9 @@ draw_value(VALUE * data, int value)
wmove(win, data->slide_y, data->value_x);
wprintw(win, "%*d", data->value_len, value);
if ((gauge_attr & A_REVERSE) != 0) {
- wattroff(win, A_REVERSE);
+ dlg_attroff(win, A_REVERSE);
} else {
- (void) wattrset(win, A_REVERSE);
+ dlg_attrset(win, A_REVERSE);
}
wmove(win, data->slide_y, data->slide_x);
for (n = 0; n < scaled; ++n) {
@@ -148,17 +148,17 @@ draw_value(VALUE * data, int value)
}
(void) waddch(win, ch2);
}
- (void) wattrset(win, dialog_attr);
+ dlg_attrset(win, dialog_attr);
wmove(win, y, x);
data->current = value;
- dlg_trace_msg("drew %d offset %d scaled %d limit %d inc %d\n",
- value,
- offset,
- scaled,
- data->slide_len,
- data->slide_inc);
+ DLG_TRACE(("# drew %d offset %d scaled %d limit %d inc %d\n",
+ value,
+ offset,
+ scaled,
+ data->slide_len,
+ data->slide_inc));
dlg_trace_win(win);
}
@@ -181,7 +181,7 @@ dialog_rangebox(const char *title,
DLG_KEYS_DATA( DLGK_DELETE_RIGHT,KEY_DC ),
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ TOGGLEKEY_BINDINGS,
DLG_KEYS_DATA( DLGK_FIELD_NEXT, CHR_NEXT ),
DLG_KEYS_DATA( DLGK_FIELD_NEXT, KEY_RIGHT ),
DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
@@ -215,13 +215,22 @@ dialog_rangebox(const char *title,
WINDOW *dialog;
int state = dlg_default_button();
const char **buttons = dlg_ok_labels();
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
char buffer[MAX_LEN];
int cur_value = default_value;
int usable;
int ranges;
int yorg, xorg;
+ DLG_TRACE(("# tailbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("minval", min_value);
+ DLG_TRACE2N("maxval", max_value);
+ DLG_TRACE2N("default", default_value);
+
if (max_value < min_value)
max_value = min_value;
if (cur_value > max_value)
@@ -235,7 +244,9 @@ dialog_rangebox(const char *title,
retry:
#endif
+ prompt = dlg_strclone(cprompt);
dlg_auto_size(title, prompt, &height, &width, 0, 0);
+
height += MIN_HIGH;
if (width < MIN_WIDE)
width = MIN_WIDE;
@@ -298,7 +309,7 @@ dialog_rangebox(const char *title,
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
dlg_trace_win(dialog);
@@ -321,6 +332,7 @@ dialog_rangebox(const char *title,
/* handle function-keys */
if (fkey) {
switch (key) {
+ case DLGK_TOGGLE:
case DLGK_ENTER:
result = dlg_ok_buttoncode(button);
break;
@@ -374,13 +386,14 @@ dialog_rangebox(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
/* repaint */
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
goto retry;
#endif
diff --git a/contrib/dialog/rc.c b/contrib/dialog/rc.c
index 4a1345508961..fa57f5d256fd 100644
--- a/contrib/dialog/rc.c
+++ b/contrib/dialog/rc.c
@@ -1,9 +1,9 @@
/*
- * $Id: rc.c,v 1.51 2012/11/30 21:32:39 tom Exp $
+ * $Id: rc.c,v 1.53 2018/05/31 20:32:15 tom Exp $
*
* rc.c -- routines for processing the configuration file
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -69,11 +69,8 @@ typedef enum {
/* number of configuration variables */
#define VAR_COUNT (sizeof(vars) / sizeof(vars_st))
-/* check if character is white space */
-#define whitespace(c) (c == ' ' || c == TAB)
-
/* check if character is string quoting characters */
-#define isquote(c) (c == '"' || c == '\'')
+#define isquote(c) ((c) == '"' || (c) == '\'')
/* get last character of string */
#define lastch(str) str[strlen(str)-1]
@@ -130,7 +127,7 @@ static const vars_st vars[] =
static int
skip_whitespace(char *str, int n)
{
- while (whitespace(str[n]) && str[n] != '\0')
+ while (isblank(UCH(str[n])) && str[n] != '\0')
n++;
return n;
}
@@ -246,13 +243,13 @@ str_to_attr(char *str, int *fg, int *bg, int *hl)
part = tempstr + i; /* set 'part' to start of fg/bg string */
/* find end of fg/bg string */
- while (!whitespace(tempstr[i]) && tempstr[i] != ','
+ while (!isblank(UCH(tempstr[i])) && tempstr[i] != ','
&& tempstr[i] != '\0')
i++;
if (tempstr[i] == '\0')
return -1; /* invalid representation */
- else if (whitespace(tempstr[i])) { /* not yet ',' */
+ else if (isblank(UCH(tempstr[i]))) { /* not yet ',' */
tempstr[i++] = '\0';
/* skip white space before ',' */
@@ -284,7 +281,7 @@ str_to_attr(char *str, int *fg, int *bg, int *hl)
/* trim trailing white space from highlight string */
i = (int) strlen(part) - 1;
- while (whitespace(part[i]) && i > 0)
+ while (isblank(UCH(part[i])) && i > 0)
i--;
part[i + 1] = '\0';
@@ -353,7 +350,7 @@ parse_line(char *line, char **var, char **value)
*var = line + i++; /* skip to next character */
/* find end of variable name */
- while (!whitespace(line[i]) && line[i] != '=' && line[i] != '\0')
+ while (!isblank(UCH(line[i])) && line[i] != '=' && line[i] != '\0')
i++;
if (line[i] == '\0') /* syntax error */
@@ -382,7 +379,7 @@ parse_line(char *line, char **var, char **value)
/* trim trailing white space from 'value' */
i = (int) strlen(*value) - 1;
- while (whitespace((*value)[i]) && i > 0)
+ while (isblank(UCH((*value)[i])) && i > 0)
i--;
(*value)[i + 1] = '\0';
@@ -524,10 +521,10 @@ dlg_parse_rc(void)
return 0; /* step (c) failed, use default values */
}
- DLG_TRACE(("opened rc file \"%s\"\n", tempptr));
+ DLG_TRACE(("# opened rc file \"%s\"\n", tempptr));
/* Scan each line and set variables */
while ((result == 0) && (fgets(str, MAX_LEN, rc_file) != NULL)) {
- DLG_TRACE(("rc:%s", str));
+ DLG_TRACE(("#\t%s", str));
if (*str == '\0' || lastch(str) != '\n') {
/* ignore rest of file if line too long */
fprintf(stderr, "\nParse error: line %d of configuration"
diff --git a/contrib/dialog/samples/copifuncs/copi.ifman1 b/contrib/dialog/samples/copifuncs/copi.ifman1
new file mode 100755
index 000000000000..3e271a532e29
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifman1
@@ -0,0 +1,29 @@
+#! /usr/bin/perl
+#
+# This is a utility script to manipulate Fidonet-related issues
+# using Eugene Crosser's ifmail package
+#
+# Version 0.1
+#
+# (C) Michael Bravo and The Communication Tube, 1994
+#
+# You can do whatever you want with this script. I take no responsibility
+# whatsoever in anything related to this script. If you make some useful
+# additions to this, please think of sending them to me so I could partake
+# of your wisdom.
+#
+# This script was written to help attaching and requesting files from the
+# commandline, much like you do with Squish under DOS or OS/2. It is certainly
+# not perfect - I used it as an exercise in Perl. It also probably lacks
+# some other useful features, like ability to specify trunc/sent or kill/sent
+# attributes etc etc. If you really want this or some other features
+# implemented, write me at mbravo@tctube.spb.su or mbravo@octopus.spb.su
+# and I will try to do what I can.
+#
+# Note - files don't get copied to any spool dir, so if you move attached
+# files somewhere, they won't get sent.
+#
+# This script is supposed to read ifmail's config to determine where outbound
+# directory and logfile are. The only two parameters to modify in most cases
+# are below.
+
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg2 b/contrib/dialog/samples/copifuncs/copi.ifmcfg2
new file mode 100755
index 000000000000..c8a8c03d664a
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifmcfg2
@@ -0,0 +1,68 @@
+# Transport programs for mail and news, used by iftoss
+sendmail /usr/lib/sendmail -f $F $T
+rnews /usr/lib/news/rnews
+
+# Unpackers, used by ifunpack.
+# $F expands to archieve file name
+unzip /usr/bin/unzip -oq $F
+unarj /usr/bin/unarj e $F
+#unarc /usr/bin/unpack $F
+unzoo /usr/bin/zoo -extract $F
+unlzh /usr/bin/lharc -x $F
+
+# Packer program, used by ifpack
+# $F expands to archieve file name, $P - to list of packet names
+packer /usr/bin/zip $F $P
+
+# Maximum arcmail file size, will start new arcmail file if exceeds
+maxfsize 65000
+
+# Maximum packet size, ifmail/ifnews will start new packet if exeeds.
+# .out files are NOT created if nonzero specified, you must run ifpack
+# to make packets out. (unimplemented)
+maxpsize 65000
+
+# cnews log file and (temporary) database for seen-bys
+newslog /usr/lib/news/log
+msgidbm /tmp/ifmsgids
+
+# From this line on, values may be prefixed by a logical expression in
+# round brackets. Operators are: '!', '&', '|', 'Xor'.
+# Possible elements are:
+# - Nodelist flags (like "CM", "MNP", "V32" etc.)
+# - speed <operator> <numeric>
+# where <operator> is '=', '!=', '<', '>', '<=', '>='
+# - address <wildcard>
+# where <wildcard> is an (possibly incomplete) fidonet address,
+# e.g. "5020/*"
+# - time <interval>[,<interval>,...]
+# where <interval> is a day spec. with optional time spec., e.g.
+# Wk2000-0900,Sat1800-0000,Sun
+# - phone <prefix>
+# e.g. "phone 7-095-"
+
+# Dialing parameters
+# of multiple "ModemPort", "ModemReset", "ModemDial", "ModemHangup" lines,
+# first matching is used.
+# of multiple "PhoneTrans", "ModemConnect", "ModemError" lines, all matching
+# are used.
+# In send and expect strings, following substitutions are made:
+# \\ '\' character
+# \r carriage return (0x0d)
+# \n new line (0x0a)
+# \t tab (0x09)
+# \b backspace (0x08)
+# \s space (0x20)
+# \NNN (where N is an octal digit) - character with octal code NNN
+# \d 1 second delay (send strings only)
+# \p 1/4 second pause (send strings only)
+# \T translated telephone no. (send strings only)
+# \D untranslated telephone no. (send strings only)
+
+# ModemPort present a blank-separated list of ports with possible speed
+# extention (separated by colon); if speed is prefixed with 'L', it is
+# a "locked" port speed, otherwise it is a maximum speed to be set, while
+# actual speed is taken from the nodelist. If speed is omitted (or set
+# to zero), previous port speed is not changed.
+#ModemPort (time Any0000-0900,Sat,Sun) ttyS0
+#ModemPort cua0:L38400
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg4 b/contrib/dialog/samples/copifuncs/copi.ifmcfg4
new file mode 100755
index 000000000000..4cb7a75b1fca
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifmcfg4
@@ -0,0 +1,30 @@
+ModemHangup +++ATH\r
+ModemOK OK
+ModemConnect CONNECT
+ModemError BUSY
+ModemError NO\sCARRIER
+ModemError NO\sDIAL
+ModemError RING\r
+ModemError ERROR
+
+# Call options (time, address and nodelist flag dependant)
+# All matching are applied in the order they are specified.
+# Possible options are "[No]Call", "[No]Hold", "[No]PUA", "[No]EMSI",
+# "[No]WaZOO", "[No]Freqs", "[No]Zmodem", "[No]ZedZap", "[No]Janus",
+# "[No]Hydra". Here, WaZOO stands for YooHoo/2U2 handshake, not for
+# the transfer scheme. FTS-0001 handshake and DietIFNA scheme cannot
+# be disallowed (because they are mandatory by standart). "Hold"
+# means really hold "hold" type packets and files: do not send them
+# if our system initiated the session, "NoHold" means send "hold"
+# packets when our system initiated the session. "NoPUA" stands for
+# "No PickUp All", i.e. PUP ("Pick Up Primary"). NoCall means do not
+# perform outbound call. This flag has no effect on the nodes
+# explicitly specified in the command line.
+# Default options are "everything allowed".
+# options ((!CM) & time Any0700-0200) Nocall
+#options (time Any0900-2100 & ! address 2:5020/*) Nocall
+
+# EMSI data for this node
+# From this line on values CANNOT be prefixed with logical expression
+# For now, escaping of '}' and ']' unimplemented, try to avoid these
+# characters please!
diff --git a/contrib/dialog/samples/copifuncs/copi.ifmcfg5 b/contrib/dialog/samples/copifuncs/copi.ifmcfg5
new file mode 100755
index 000000000000..8221c1cf160d
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifmcfg5
@@ -0,0 +1,14 @@
+
+# PhoneTrans lines provide rules to change phone prefixes to make local
+# or long-distance calls. In the example below, my country code is 7,
+# and local dialing area is 095. From the numbers starting with "7-095-"
+# the prefix is stripped and the 7-digit remainder is dialed. For
+# the numbers starting with "7-" but not with "7-095-", the country prefix
+# "7-" is stripped and the long-distance dialing prefix "8W" substituted.
+# For the numbers not matching any of the above, international
+# call is performed: international dialing prefix "8W10" is prepended
+# to the unmodified 11-digit number. Generally, the syntax is:
+# "PhoneTrans <what-to-strip> / <what-to-substitute-instead>"
+#PhoneTrans 7-095- /
+#PhoneTrans 7- / 8W
+#PhoneTrans / 8W10
diff --git a/contrib/dialog/samples/copifuncs/copi.ifpoll1 b/contrib/dialog/samples/copifuncs/copi.ifpoll1
new file mode 100755
index 000000000000..812c8e9cd0da
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifpoll1
@@ -0,0 +1,9 @@
+#!/bin/sh
+# ver 0.7
+# ifpoll, poll my boss node or the node given as argument 1
+#
+# i start this shell script every day by crond, but you can
+# start it also by hand :) start it as the owner of ifcico.
+# rasca, berlin 1993 (Rasca Gmelch, 2:2410/305.4)
+#
+# where "ifcico" and "ifpack" reside
diff --git a/contrib/dialog/samples/copifuncs/copi.ifreq1 b/contrib/dialog/samples/copifuncs/copi.ifreq1
new file mode 100755
index 000000000000..637293954bd5
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.ifreq1
@@ -0,0 +1,20 @@
+#!/usr/bin/perl
+$ver = "0.4";
+#
+# this perl script is designed for the ifmail package by eugene grosser.
+#
+# request a file (first argument) from a fido-node (second argument),
+# don't forget to quote if you use wildcards, e.g.:
+
+# ifreq 'files*' 2:2410/305
+# or
+# ifreq 'files newfile' 2:2410/305
+#
+# this perl script does only add an entry to the corresponding flo-file,
+# the mailer ifcico is not started!
+#
+# rasca, berlin 1994 (rasca@marie.physik.tu-berlin.de, 2:2410/305.4)
+#
+# multi-zone support added by
+# Roland Rosenfeld 15.05.1994 (roland@p13.flokiste.fido.de, 2:2450/300.13)
+
diff --git a/contrib/dialog/samples/copifuncs/copi.rcnews b/contrib/dialog/samples/copifuncs/copi.rcnews
new file mode 100755
index 000000000000..957a272ee496
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.rcnews
@@ -0,0 +1,79 @@
+#! /bin/sh
+## $Revision: 1.1 $
+## News boot script.
+
+## =()<. @<_PATH_SHELLVARS>@>()=
+. /usr/lib/news/innshellvars
+
+## Pick ${INND} or ${INNDSTART}
+WHAT=${INNDSTART}
+## Set to true or false
+DOINNWATCH=false
+MAIL="${MAILCMD} -s 'Boot-time Usenet warning on `hostname`' ${NEWSMASTER}"
+
+## RFLAG is set below; set FLAGS as appropriate.
+RFLAG=""
+FLAGS="-i0 -c0"
+
+## Clean shutdown?
+if [ -f ${SERVERPID} ] ; then
+ ( echo 'INND: PID file exists -- unclean shutdown!' >/dev/console )
+ RFLAG="-r"
+fi
+
+if [ ! -f ${NEWSLIB}/.news.daily ] ; then
+ echo 'No .news.daily file; need to run news.daily?' | eval ${MAIL}
+else
+ case `find ${NEWSLIB} -name .news.daily -mtime +1 -print 2>/dev/null` in
+ "")
+ ;;
+ *)
+ echo 'Old .news.daily file; need to run news.daily?' | eval ${MAIL}
+ ;;
+ esac
+fi
+
+## Active file recovery.
+if [ ! -s ${ACTIVE} ] ; then
+ if [ -s ${NEWACTIVE} ] ; then
+ mv ${NEWACTIVE} ${ACTIVE}
+ else
+ if [ -s ${OLDACTIVE} ] ; then
+ cp ${OLDACTIVE} ${ACTIVE}
+ else
+ ( echo 'INND: No active file!' >/dev/console )
+ exit 1
+ fi
+ fi
+ RFLAG="-r"
+ # You might want to rebuild the DBZ database, too:
+ #echo "cd ${NEWSLIB} \
+ # && makehistory -r \
+ # && mv history.n.dir history.dir \
+ # && mv history.n.pag history.pag" | su ${NEWSUSER}
+fi
+
+## Remove temporary batchfiles and lock files.
+( cd ${BATCH} && rm -f bch* )
+( cd ${LOCKS} && rm -f LOCK* )
+( cd ${TEMPSOCKDIR} && rm -f ${TEMPSOCK} )
+rm -f ${NEWSCONTROL} ${NNTPCONNECT} ${SERVERPID}
+
+## Start the show.
+( echo 'Starting innd.' >/dev/console )
+eval ${WHAT} ${RFLAG} ${FLAGS}
+
+# Gee, looks like lisp, doesn't it?
+${DOINNWATCH} && {
+ echo "( ( sleep 60 ; ${INNWATCH} ) & )" | su ${NEWSUSER}
+}
+
+RMFILE=${MOST_LOGS}/expire.rm
+if [ -s ${MOST_LOGS}/expire.rm ] ; then
+ ( echo "Removing articles from pre-downtime expire run." >/dev/console )
+ (
+ echo 'System shut down during expire. Unlinking articles listed in'
+ echo ${RMFILE}
+ ) | eval ${MAIL}
+ echo "${NEWSBIN}/expirerm ${RMFILE}" | su ${NEWSUSER} &
+fi
diff --git a/contrib/dialog/samples/copifuncs/copi.sendifm2 b/contrib/dialog/samples/copifuncs/copi.sendifm2
new file mode 100755
index 000000000000..1a34a1fabbc0
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.sendifm2
@@ -0,0 +1,15 @@
+ ${SITE} ${BATCHFILE}
+
+ echo "${PROGNAME}: [$$] end ${SITE}"
+done
+
+case ${HAVE_UUSTAT} in
+DONT)
+ rm -f ${TEMP}
+ ;;
+esac
+
+## Remove the lock file.
+rm -f ${LOCK}
+
+echo "${PROGNAME}: [$$] end `date`"
diff --git a/contrib/dialog/samples/copifuncs/copi.trnrc b/contrib/dialog/samples/copifuncs/copi.trnrc
new file mode 100644
index 000000000000..7be596f74db6
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/copi.trnrc
@@ -0,0 +1,13 @@
+TRNINIT="-x -e -X -F\" :> \""
+HIDELINE="^X-FTN"
+NEWSHEADER="Newsgroups: %(%F=^\$?%C:%F)
+Subject: %(%S=^\$?%\"\n\nSubject: \":%S)
+%(%R=^\$?:References: %R
+)Sender:
+Distribution: %(%i=^\$?%\"\nDistribution: \":%D)
+Organization: %o
+X-Comment-To: %f\n\n"
+ATTRIBUTION="%f writes:\n"
+YOUSAID="In article %i \n of newsgroup %C you write about \"%s\":\n"
+MAILCALL="(New Mail)"
+export NEWSHEADER HIDELINE TRNINIT ATTRIBUTION MAILCALL YOUSAID EDITOR
diff --git a/contrib/dialog/samples/copifuncs/ifpatch b/contrib/dialog/samples/copifuncs/ifpatch
new file mode 100644
index 000000000000..1e7c7ee510e8
--- /dev/null
+++ b/contrib/dialog/samples/copifuncs/ifpatch
@@ -0,0 +1,101 @@
+--- ifgate/message.c.orig Mon Jul 24 15:17:47 1995
++++ ifgate/message.c Mon Jul 24 15:18:00 1995
+@@ -48,12 +48,26 @@
+ if (!strcasecmp(msg->key,"X-UUCP-From")) return 0;
+ if (!strcasecmp(msg->key,"X-Body-Start")) return 0;
+ if (!strncasecmp(msg->key,"X-FTN-",6)) return 0;
+- if (!strcasecmp(msg->key,"Path")) return isftnpath(msg->val)?0:1;
++ if (!strcasecmp(msg->key,"Path"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return isftnpath(msg->val)?0:1;
++#endif
++
+ if (!strcasecmp(msg->key,"Newsgroups")) return newsmode?0:2;
+ if (!strcasecmp(msg->key,"Xref")) return 0;
+ if (!strcasecmp(msg->key,"Return-Receipt-To")) return 1;
+ if (!strcasecmp(msg->key,"Received")) return newsmode?0:2;
+- if (!strcasecmp(msg->key,"From")) return ftnorigin?0:2;
++ if (!strcasecmp(msg->key,"From"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return ftnorigin?0:2;
++#endif
++
+ if (!strcasecmp(msg->key,"To"))
+ {
+ if (newsmode) return 0;
+@@ -66,7 +80,14 @@
+ }
+ if (!strcasecmp(msg->key,"Cc")) return 2;
+ if (!strcasecmp(msg->key,"Bcc")) return 2;
+- if (!strcasecmp(msg->key,"Reply-To")) return 2;
++ if (!strcasecmp(msg->key,"Reply-To"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return 2;
++#endif
++
+ if (!strcasecmp(msg->key,"Lines")) return 0;
+ if (!strcasecmp(msg->key,"Date")) return 0;
+ if (!strcasecmp(msg->key,"Subject"))
+@@ -77,8 +98,22 @@
+ if (!strcasecmp(msg->key,"Organization")) return removeorg?0:1;
+ if (!strcasecmp(msg->key,"Comment-To")) return 0;
+ if (!strcasecmp(msg->key,"X-Comment-To")) return 0;
+- if (!strcasecmp(msg->key,"Keywords")) return 2;
+- if (!strcasecmp(msg->key,"Summary")) return 2;
++ if (!strcasecmp(msg->key,"Keywords"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return 2;
++#endif
++
++ if (!strcasecmp(msg->key,"Summary"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return 2;
++#endif
++
+ if (!strcasecmp(msg->key,"MIME-Version")) return removemime?0:1;
+ if (!strcasecmp(msg->key,"Content-Type")) return removemime?0:1;
+ if (!strcasecmp(msg->key,"Content-Length")) return removemime?0:1;
+@@ -86,8 +121,26 @@
+ if (!strcasecmp(msg->key,"Content-Name")) return 2;
+ if (!strcasecmp(msg->key,"Content-Description")) return 2;
+ if (!strcasecmp(msg->key,"Message-ID")) return ftnorigin?0:1;
+- if (!strcasecmp(msg->key,"References")) return removeref?0:1;
+- if (!strcasecmp(msg->key,"Distribution")) return ftnorigin?0:1;
++ if (!strcasecmp(msg->key,"References"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return removeref?0:1;
++#endif
++
++ if (!strcasecmp(msg->key,"Distribution"))
++
++#ifdef LESS_RFC_KLUDGES
++ return 0;
++#else
++ return ftnorigin?0:1;
++#endif
++
++#ifdef LESS_RFC_KLUDGES
++ if (!strcasecmp(msg->key,"NNTP-Posting-Host")) return 0;
++#endif
++
+ /*if (!strcasecmp(msg->key,"")) return ;*/
+ return 1;
+ }
diff --git a/contrib/dialog/samples/dselect b/contrib/dialog/samples/dselect
new file mode 100755
index 000000000000..9da035dab95d
--- /dev/null
+++ b/contrib/dialog/samples/dselect
@@ -0,0 +1,11 @@
+#!/bin/sh
+# $Id: dselect,v 1.7 2016/01/26 22:52:53 tom Exp $
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --title "Please choose a file" "$@" --dselect $HOME/ 14 48 2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/install/FDISK.TEST b/contrib/dialog/samples/install/FDISK.TEST
new file mode 100644
index 000000000000..2ad568a62d7b
--- /dev/null
+++ b/contrib/dialog/samples/install/FDISK.TEST
@@ -0,0 +1,28 @@
+
+Disk /dev/hda: 14 heads, 62 sectors, 1018 cylinders
+Units = cylinders of 868 * 512 bytes
+
+ Device Boot Begin Start End Blocks Id System
+/dev/hda1 1 1 3 1271 a OS/2 Boot Manager
+/dev/hda2 4 4 287 123256 6 DOS 16-bit >=32M
+/dev/hda3 * 288 288 649 157108 83 Linux native
+/dev/hda4 650 650 1018 160146 83 Linux native
+
+Disk /dev/sda: 64 heads, 32 sectors, 511 cylinders
+Units = cylinders of 2048 * 512 bytes
+
+ Device Boot Begin Start End Blocks Id System
+/dev/sda1 1 1 21 21488 82 Linux swap
+/dev/sda2 22 22 511 501760 83 Linux native
+
+Disk /dev/sdb: 64 heads, 32 sectors, 4106 cylinders
+Units = cylinders of 2048 * 512 bytes
+
+ Device Boot Begin Start End Blocks Id System
+/dev/sdb1 1 1 201 205808 83 Linux native
+/dev/sdb2 202 202 402 205824 83 Linux native
+/dev/sdb3 403 403 603 205824 83 Linux native
+/dev/sdb4 604 604 4106 3587072 5 Extended
+/dev/sdb5 604 604 1803 1228784 83 Linux native
+/dev/sdb6 1024 1804 3003 1228784 83 Linux native
+/dev/sdb7 2048 3004 4106 1129456 83 Linux native
diff --git a/contrib/dialog/samples/install/makefile.in b/contrib/dialog/samples/install/makefile.in
new file mode 100644
index 000000000000..3dcdc09ba2c5
--- /dev/null
+++ b/contrib/dialog/samples/install/makefile.in
@@ -0,0 +1,35 @@
+# $Id: makefile.in,v 1.1 2000/10/08 17:22:53 tom Exp $
+# template makefile for DIALOG sample 'install'
+#
+SHELL = /bin/sh
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+srcdir = @srcdir@
+top_builddir = ../..
+
+DESTDIR =
+bindir = $(DESTDIR)@bindir@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@ @DEFS@ -I$(top_builddir) -I$(srcdir)/../.. -I. -I$(srcdir)
+EXTRA_CFLAGS = @EXTRA_CFLAGS@
+CC = @CC@
+LDFLAGS = @LDFLAGS@
+LIBS = -L../.. -ldialog @LIBS@
+RANLIB = @RANLIB@
+
+RM = rm -f
+
+all: setup
+
+setup: setup.o
+ $(CC) -o $@ setup.o $(LIBS)
+
+clean:
+ rm -f *.o setup
+
+test: setup
+ ./setup
+
diff --git a/contrib/dialog/samples/install/setup.c b/contrib/dialog/samples/install/setup.c
new file mode 100644
index 000000000000..ae569813e865
--- /dev/null
+++ b/contrib/dialog/samples/install/setup.c
@@ -0,0 +1,371 @@
+/* Copyright (C) 1995 Florian La Roche */
+/* Who wants to help coding? I don't like doing this... */
+
+/* You can just start setup as normal user and see how far it is coded
+ right now. This will do a fake installation and won't actually chnage
+ any data on your computer. */
+
+/* TODO: write a good package selection code
+ change functions to return better error code
+ */
+
+/* Show an extra text-box with the contents of all external commands,
+ before they are executed. So you can abort the installation, if any
+ wrong commands are to be executed. (So don't format wrong partition.) */
+#define VERBOSE 1
+
+/* If defined, don't actually execute any comands and don't actually modify
+ any files. So you can test any possible installation without doing any
+ damage to your computer.
+ The file FDISK.TEST is used instead of real "fdisk -l" output, so that
+ it can be started as normal user. */
+#define DEBUG_THIS 1
+
+#include <dialog.h>
+
+/* max length of a partition name like e.g. '/dev/hda1' */
+#define MAX_DEV_NAME 25
+
+/* max number of possible Linux/Swap/MsDos partitions */
+#define MAX_PARTS 20
+
+char *progname = NULL;
+
+static void
+error(const char *s)
+{
+ fprintf(stderr, "%s: %s\n", progname, s);
+ exit(1);
+}
+
+static int
+my_system(const char *s,...)
+{
+ int ret, i;
+ va_list ap;
+ char sh[200];
+
+ va_start(ap, s);
+ vsprintf(sh, s, ap);
+ va_end(ap);
+
+#ifdef VERBOSE
+ i = dialog_msgbox("I will run the following command:", sh, 10, 65, 1);
+ dialog_clear();
+#ifdef DEBUG_THIS
+ return 0;
+#endif
+#endif
+ ret = system(sh);
+ if (!(ret >> 8))
+ return 0;
+ i = dialog_msgbox("Error-Exit on the following command:",
+ sh, 12, 73, 1);
+ dialog_clear();
+ return 1;
+}
+
+/* We support to install from DOS/Linux-partitions. */
+enum partition_type {
+ MsDos,
+ Linux,
+ Swap
+};
+
+struct partition {
+ enum partition_type type;
+ char name[MAX_DEV_NAME];
+ int blocks;
+ int flag;
+} partitions[MAX_PARTS];
+int num_partition = 0;
+int num_linux = 0;
+int num_swap = 0;
+int num_msdos = 0;
+
+static int
+get_line(char *line, int size, FILE * f)
+{
+ char *ptr = line;
+ int c;
+
+ if (feof(f))
+ return -1;
+ while (size-- && ((c = getc(f)) != EOF) && (c != '\n'))
+ *ptr++ = c;
+ *ptr++ = '\0';
+ return (int) (ptr - line);
+}
+
+static void
+read_partitions(void)
+{
+ FILE *f;
+ char line[200];
+ int length;
+#ifndef DEBUG_THIS
+ int ret = system("fdisk -l 2>/dev/null 1>/tmp/fdisk.output");
+ if ((ret >> 8) != 0) {
+ error("fdisk didn't run");
+ }
+ if ((f = fopen("/tmp/fdisk.output", "r")) == NULL)
+#else
+ if ((f = fopen("FDISK.TEST", "r")) == NULL)
+#endif
+ error("cannot read fdisk output");
+
+ while (num_partition <= MAX_PARTS
+ && (length = get_line(line, 200, f)) >= 0) {
+ if (strncmp(line, "/dev/", 5) == 0) {
+ int n = 0;
+ char *s = line + 5;
+ char *t = partitions[num_partition].name;
+ strcpy(t, "/dev/");
+ t += 5;
+ while (n < MAX_DEV_NAME && *s != '\0'
+ && !isspace((unsigned char) *s)) {
+ *t++ = *s++;
+ n++;
+ }
+ *t = '\0';
+ /* Read the size of the partition. */
+ t = line + 37;
+ while (isspace((unsigned char) *t))
+ t++;
+ partitions[num_partition].blocks = atoi(t);
+ if (strstr(line, "Linux native")) {
+ partitions[num_partition].type = Linux;
+ num_partition++;
+ num_linux++;
+ } else if (strstr(line, "Linux swap")) {
+ partitions[num_partition].type = Swap;
+ num_partition++;
+ num_swap++;
+ } else if (strstr(line, "DOS")) {
+ partitions[num_partition].type = MsDos;
+ num_partition++;
+ num_msdos++;
+ }
+ }
+ }
+ fclose(f);
+#ifndef DEBUG_THIS
+ unlink("/tmp/fdisk.output");
+#endif
+}
+
+static int
+select_partition(const char *title, const char *prompt, int y, int x)
+{
+ int i, num, ret;
+ char info[MAX_PARTS][40];
+ char *items[MAX_PARTS * 2];
+ int num_pa[MAX_PARTS];
+
+ num = 0;
+ for (i = 0; i < num_partition; i++) {
+ if (partitions[i].type == Linux) {
+ items[num * 2] = partitions[i].name;
+ sprintf(info[num], "Linux partition with %d blocks",
+ partitions[i].blocks);
+ items[num * 2 + 1] = info[num];
+ num_pa[num] = i;
+ num++;
+ }
+ }
+ ret = dialog_menu(title, prompt, y + num, x, num, num, items);
+ dialog_clear();
+ if (ret >= 0) /* item selected */
+ ret = num_pa[ret];
+ return ret;
+}
+
+static int
+select_install_partition(void)
+{
+ return select_partition("Select Install Partition",
+ "\\nWhere do you want to install Linux?\\n", 9, 60);
+}
+
+static int
+select_source_partition(void)
+{
+ return select_partition("Select Source Partition",
+ "\\nOn which partition is the source?\\n", 9, 60);
+}
+
+const char *null = ">/dev/null 2>/dev/null";
+const char *install_partition = NULL;
+
+static void
+extract_packages(const char *source_path)
+{
+#ifndef DEBUG_THIS
+ FILE *f;
+#endif
+
+ if (my_system("mkdir -p /install/var/installed/packages %s", null))
+ return;
+ if (my_system("cd /install; for i in /source%s/*.tgz; do "
+ "tar xzplvvkf $i >> var/installed/packages/base "
+ "2>>var/installed/packages/ERROR; done", source_path))
+ return;
+#ifndef DEBUG_THIS
+ if ((f = fopen("/install/etc/fstab", "w")) == NULL) {
+ /* i = */ dialog_msgbox("Error", "Cannot write /etc/fstab",
+ 12, 40, 1);
+ return;
+ }
+ fprintf(f, "%s / ext2 defaults 1 1\n", install_partition);
+ fprintf(f, "none /proc proc defaults 0 2\n");
+ /* XXX write swap-partitions */
+ fclose(f);
+#endif
+}
+
+static void
+install_premounted(void)
+{
+ extract_packages("");
+}
+
+static void
+install_harddisk(void)
+{
+ const char *name;
+ int part, ret;
+
+ if ((part = select_source_partition()) <= -1)
+ return;
+ name = partitions[part].name;
+
+ if (my_system("mount -t ext2 %s /source %s", name, null))
+ return;
+ ret = dialog_inputbox("Path in partition",
+ "Please enter the directory in which the "
+ "source files are.", 13, 50, "", FALSE);
+ dialog_clear();
+ if (ret != 0)
+ return;
+ /* XXX strdup */
+ extract_packages(strdup(dialog_input_result));
+ if (my_system("umount /source %s", null))
+ return;
+}
+
+static void
+install_nfs(void)
+{
+ if (my_system("ifconfig eth0 134.96.81.36 netmask 255.255.255.224 "
+ "broadcast 134.96.81.63 %s", null))
+ return;
+ if (my_system("route add -net 134.96.81.32 %s", null))
+ return;
+ if (my_system("mount -t nfs 134.96.81.38:"
+ "/local/ftp/pub/linux/ELF.binary/tar /source %s", null))
+ return;
+ extract_packages("/base");
+ if (my_system("umount /source %s", null))
+ return;
+ if (my_system("ifconfig eth0 down %s", null))
+ return;
+}
+
+static void
+main_install(void)
+{
+ int part, ret;
+ const char *name;
+ char *items1[] =
+ {
+ "1", "Harddisk Install",
+ "2", "Network Install(NFS)",
+ "3", "Premounted on /source"
+ };
+
+ if (num_linux == 0) {
+ /* XXX */
+ return;
+ }
+ if ((part = select_install_partition()) <= -1)
+ return;
+ install_partition = name = partitions[part].name;
+ if (my_system("mke2fs %s %s", name, null))
+ return;
+ if (my_system("mount -t ext2 %s /install %s", name, null))
+ return;
+ ret = dialog_menu("Choose install medium",
+ "\\nPlease say from where you want to install.\\n",
+ 12, 62, 3, 3, items1);
+ dialog_clear();
+ switch (ret) {
+ case 0:
+ install_harddisk();
+ break;
+ case 1:
+ install_nfs();
+ break;
+ case 2:
+ install_premounted();
+ break;
+ case -2: /* cancel */
+ case -1:
+ break; /* esc */
+ }
+ if (my_system("umount /install %s", null))
+ return;
+}
+
+int
+main(int argc, char **argv)
+{
+ int stop = 0;
+ int ret;
+ char *items1[] =
+ {
+ "1", "Display a help text",
+ "2", "Start an installation",
+ "3", "Exit to the shell"
+ };
+
+ progname = argv[0];
+
+ read_partitions();
+ if (num_linux == 0) {
+ printf("\n\nPlease start \"fdisk\" or \"cfdisk\" and create a"
+ "\nnative Linux-partition to install Linux on.\n\n");
+ exit(1);
+ }
+
+ init_dialog();
+
+ while (!stop) {
+ ret = dialog_menu("Linux Install Utility",
+ "\\nCopyright (C) 1995 Florian La Roche\\n"
+ "\\nPre-Alpha version, be careful, read the doc!!!"
+ "\\nemail: florian@jurix.jura.uni-sb.de, "
+ "flla@stud.uni-sb.de\\n",
+ 15, 64, 3, 3, items1);
+ dialog_clear();
+ switch (ret) {
+ case 0:
+ ret = dialog_textbox("Help Text",
+ "setup.help", 20, 70);
+ dialog_clear();
+ break;
+ case 1:
+ main_install();
+ break;
+ case 2:
+ stop = 1;
+ break;
+ case -2: /* cancel */
+ case -1:
+ stop = 1; /* esc */
+ }
+ }
+ end_dialog();
+ printf("\nExecute \"reboot\" to restart your computer...\n");
+
+ exit(0);
+}
diff --git a/contrib/dialog/samples/install/setup.help b/contrib/dialog/samples/install/setup.help
new file mode 100644
index 000000000000..7ac8369d4e6e
--- /dev/null
+++ b/contrib/dialog/samples/install/setup.help
@@ -0,0 +1,49 @@
+At the moment, only installation from a harddisk
+is supported. All commands are shown to you on
+the screen before executing. This is just to make
+sure that nothing bad is done to your harddisk :-)
+
+You can also select to install from a premounted dir.
+Then the "tar/base" directory must be mounted on
+"/install", so that all tar-packages from the basic
+stuff are in "/install/*.tgz". (So you could be able
+to install via NFS...)
+
+Good luck...,
+anyone wants to help programming this tool?,
+
+Florian La Roche
+
+Contents:
+=========
+- overview about what "setup" does.
+- creating a Linux-partition before starting "setup"
+- about lilo
+- how to use "setup", what keys are supported
+
+What does "setup" do on my computer?
+====================================
+Setup will ask you for a partition on your harddisk,
+where you would like to have Linux installed.
+You can then choose to install this distribution from
+your local harddisk or via network (NFS).
+setup will install a very basic system.
+At the end, you can install lilo, the Linux Loader.
+Rebooting your computer with this little linux system
+and then runing the setup-program on it, will give
+the possibility to install more packages.
+
+Creating a Linux-partition:
+===========================
+To install this Linux distribution, you need to
+create an extra partition on your harddisk for
+Linux.
+
+What is lilo and how should I install it?
+=========================================
+Read the lilo-documentation for this...
+
+
+
+Florian La Roche
+
diff --git a/contrib/dialog/samples/menubox11 b/contrib/dialog/samples/menubox11
new file mode 100755
index 000000000000..4f275226b4b4
--- /dev/null
+++ b/contrib/dialog/samples/menubox11
@@ -0,0 +1,31 @@
+#!/bin/sh
+# $Id: menubox11,v 1.2 2018/06/13 21:59:21 tom Exp $
+# zero-width column
+
+. ./setup-vars
+
+exec 3>&1
+RESULT=`$DIALOG --backtitle "Debian Configuration" \
+ --title "Configuring debconf" \
+ --default-item Dialog "$@" \
+ --menu "Packages that use debconf for configuration share a common look and feel. You can
+select the type of user interface they use.
+\n\n\
+The dialog frontend is a full-screen, character based interface, while the readline
+frontend uses a more traditional plain text interface, and both the gnome and kde
+frontends are modern X interfaces, fitting the respective desktops (but may be used
+in any X environment). The editor frontend lets you configure things using your
+favorite text editor. The noninteractive frontend never asks you any questions.
+\n\n\
+Interface to use:" 0 0 6 \
+ Dialog "" \
+ Readline "" \
+ Gnome "" \
+ Kde "" \
+ Editor "" \
+ Noninteractive "" \
+2>&1 1>&3`
+retval=$?
+exec 3>&-
+
+. ./report-string
diff --git a/contrib/dialog/samples/programbox b/contrib/dialog/samples/programbox
index 9fa0abc82000..afa29e1b3f9a 100755
--- a/contrib/dialog/samples/programbox
+++ b/contrib/dialog/samples/programbox
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: programbox,v 1.1 2011/03/02 01:17:28 tom Exp $
+# $Id: programbox,v 1.3 2018/06/17 20:45:25 tom Exp $
. ./setup-vars
@@ -11,9 +11,12 @@ while true
do
read text
test -z "$text" && break
-ls -ld "$text"
+ls -ld "$text" || break
sleep 0.1
done <$tempfile
) |
$DIALOG --title "PROGRAMBOX" "$@" --programbox 20 70
+
+retval=$?
+. ./report-button
diff --git a/contrib/dialog/samples/programbox2 b/contrib/dialog/samples/programbox2
index 63f87df276b2..d55c497b64c1 100755
--- a/contrib/dialog/samples/programbox2
+++ b/contrib/dialog/samples/programbox2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: programbox2,v 1.1 2011/03/02 01:25:31 tom Exp $
+# $Id: programbox2,v 1.3 2018/06/17 20:45:25 tom Exp $
. ./setup-vars
@@ -11,9 +11,12 @@ while true
do
read text
test -z "$text" && break
-ls -ld "$text"
+ls -ld "$text" || break
sleep 0.1
done <$tempfile
) |
$DIALOG --title "PROGRAMBOX" "$@" --programbox "ProgramBox" 20 70
+
+retval=$?
+. ./report-button
diff --git a/contrib/dialog/samples/progress b/contrib/dialog/samples/progress
index 6ad45d8b04c6..a416909cce35 100755
--- a/contrib/dialog/samples/progress
+++ b/contrib/dialog/samples/progress
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: progress,v 1.5 2010/01/13 10:20:03 tom Exp $
+# $Id: progress,v 1.7 2018/06/17 20:45:25 tom Exp $
. ./setup-vars
@@ -11,9 +11,12 @@ while true
do
read text
test -z "$text" && break
-ls -ld "$text"
+ls -ld "$text" || break
sleep 1
done <$tempfile
) |
$DIALOG --title "PROGRESS" "$@" --progressbox 20 70
+
+retval=$?
+. ./report-button
diff --git a/contrib/dialog/samples/progress2 b/contrib/dialog/samples/progress2
index 564433b1c379..f4bdb3cae80b 100755
--- a/contrib/dialog/samples/progress2
+++ b/contrib/dialog/samples/progress2
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: progress2,v 1.5 2010/01/13 10:20:03 tom Exp $
+# $Id: progress2,v 1.7 2018/06/17 20:45:25 tom Exp $
. ./setup-vars
@@ -11,9 +11,12 @@ while true
do
read text
test -z "$text" && break
-ls -ld "$text"
+ls -ld "$text" || break
sleep 1
done <$tempfile
) |
$DIALOG --title "PROGRESS" "$@" --progressbox "This is a detailed description\nof the progress-box." 20 70
+
+retval=$?
+. ./report-button
diff --git a/contrib/dialog/samples/run_test.sh b/contrib/dialog/samples/run_test.sh
new file mode 100755
index 000000000000..ea9da2935293
--- /dev/null
+++ b/contrib/dialog/samples/run_test.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+# $Id: run_test.sh,v 1.4 2017/02/01 01:50:09 tom Exp $
+# vile:ts=4 sw=4
+THIS=`basename $0`
+
+if [ -z "$DIALOG" ]
+then
+ have=
+ want=dialog
+ for p in . .. ../bin
+ do
+ prog=$p/$want
+ [ -f $prog ] || continue
+ if [ -x $prog ]
+ then
+ have=$prog
+ break
+ fi
+ done
+
+ if [ -z "$have" ]
+ then
+ echo "? did not find $want" >&2
+ exit
+ fi
+
+ DIALOG=$have
+ export DIALOG
+fi
+
+want=`basename $DIALOG`
+
+DIALOGOPTS="$DIALOGOPTS --trace $want.log"
+export DIALOGOPTS
+
+mylog=run_test.log
+cat >$mylog <<EOF
+** `date`
+EOF
+
+for name in "$@"
+do
+ [ -f "$name" ] || continue
+ [ -x "$name" ] || continue
+ # skip this script and known utility-scripts
+ case `basename $name` in
+ $THIS|dft-*|killall|listing|rotated-data|shortlist|with-*)
+ echo "** skipping $name" >>$mylog
+ continue
+ ;;
+ esac
+ rm -f trace $want.log $name.log
+ echo "** running $name" >>$mylog
+ $name
+ [ -f $want.log ] && cp $want.log $name.log
+done
diff --git a/contrib/dialog/samples/setup-edit b/contrib/dialog/samples/setup-edit
index 8f9d284220f4..d244397b1bdd 100644
--- a/contrib/dialog/samples/setup-edit
+++ b/contrib/dialog/samples/setup-edit
@@ -1,7 +1,7 @@
#!/bin/sh
-# $Id: setup-edit,v 1.2 2012/06/29 09:31:49 tom Exp $
+# $Id: setup-edit,v 1.3 2016/01/26 22:42:44 tom Exp $
# vile:shmode
input=`tempfile 2>/dev/null` || input=/tmp/input$$
output=`tempfile 2>/dev/null` || output=/tmp/test$$
-trap "rm -f $input $output" $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
+trap "rm -f $input $output" $SIG_NONE $SIG_HUP $SIG_INT $SIG_QUIT $SIG_TERM
diff --git a/contrib/dialog/samples/setup-tempfile b/contrib/dialog/samples/setup-tempfile
index 3a67ea625986..b00106c29c7e 100644
--- a/contrib/dialog/samples/setup-tempfile
+++ b/contrib/dialog/samples/setup-tempfile
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id: setup-tempfile,v 1.3 2012/07/06 17:51:56 tom Exp $
+# $Id: setup-tempfile,v 1.4 2016/01/26 22:42:47 tom Exp $
# vile:shmode
tempfile=`(tempfile) 2>/dev/null` || tempfile=/tmp/test$$
-trap "rm -f $tempfile" 0 $SIG_NONE $SIG_HUP $SIG_INT $SIG_TRAP $SIG_TERM
+trap "rm -f $tempfile" 0 $SIG_NONE $SIG_HUP $SIG_INT $SIG_QUIT $SIG_TERM
diff --git a/contrib/dialog/tailbox.c b/contrib/dialog/tailbox.c
index bbb14c0867ad..137355b252ef 100644
--- a/contrib/dialog/tailbox.c
+++ b/contrib/dialog/tailbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: tailbox.c,v 1.68 2012/11/18 15:48:52 tom Exp $
+ * $Id: tailbox.c,v 1.72 2018/06/19 22:57:01 tom Exp $
*
* tailbox.c -- implements the tail box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -88,12 +88,7 @@ print_line(MY_OBJ * obj, WINDOW *win, int row, int width)
(void) wmove(win, row, 0); /* move cursor to correct line */
(void) waddch(win, ' ');
-#ifdef NCURSES_VERSION
(void) waddnstr(win, line, MIN((int) strlen(line), width - 2));
-#else
- line[MIN((int) strlen(line), width - 2)] = '\0';
- waddstr(win, line);
-#endif
getyx(win, y, x);
(void) y;
@@ -220,11 +215,28 @@ handle_input(DIALOG_CALLBACK * cb)
}
static bool
+valid_callback(DIALOG_CALLBACK * cb)
+{
+ bool valid = FALSE;
+ DIALOG_CALLBACK *p;
+ for (p = dialog_state.getc_callbacks; p != 0; p = p->next) {
+ if (p == cb) {
+ valid = TRUE;
+ break;
+ }
+ }
+ return valid;
+}
+
+static bool
handle_my_getc(DIALOG_CALLBACK * cb, int ch, int fkey, int *result)
{
MY_OBJ *obj = (MY_OBJ *) cb;
bool done = FALSE;
+ if (!valid_callback(cb))
+ return FALSE;
+
if (!fkey && dlg_char_to_button(ch, obj->buttons) == 0) {
ch = DLGK_ENTER;
fkey = TRUE;
@@ -281,7 +293,11 @@ handle_my_getc(DIALOG_CALLBACK * cb, int ch, int fkey, int *result)
* Display text from a file in a dialog box, like in a "tail -f".
*/
int
-dialog_tailbox(const char *title, const char *file, int height, int width, int bg_task)
+dialog_tailbox(const char *title,
+ const char *filename,
+ int height,
+ int width,
+ int bg_task)
{
/* *INDENT-OFF* */
static DLG_KEYS_BINDING binding[] = {
@@ -311,14 +327,21 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
FILE *fd;
int min_width = 12;
+ DLG_TRACE(("# tailbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("filename", filename);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("bg_task", bg_task);
+
/* Open input file for reading */
- if ((fd = fopen(file, "rb")) == NULL)
+ if ((fd = fopen(filename, "rb")) == NULL)
dlg_exiterr("Can't open input file in dialog_tailbox().");
#ifdef KEY_RESIZE
retry:
#endif
- dlg_auto_sizefile(title, file, &height, &width, 2, min_width);
+ dlg_auto_sizefile(title, filename, &height, &width, 2, min_width);
dlg_print_size(height, width);
dlg_ctl_size(height, width);
@@ -381,6 +404,7 @@ dialog_tailbox(const char *title, const char *file, int height, int width, int b
ch = dlg_getc(dialog, &fkey);
#ifdef KEY_RESIZE
if (fkey && ch == KEY_RESIZE) {
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
diff --git a/contrib/dialog/textbox.c b/contrib/dialog/textbox.c
index 6398f03bb82f..eb06eecf3721 100644
--- a/contrib/dialog/textbox.c
+++ b/contrib/dialog/textbox.c
@@ -1,9 +1,9 @@
/*
- * $Id: textbox.c,v 1.110 2012/12/01 01:48:08 tom Exp $
+ * $Id: textbox.c,v 1.117 2018/06/19 22:57:01 tom Exp $
*
* textbox.c -- implements the text box
*
- * Copyright 2000-2011,2012 Thomas E. Dickey
+ * Copyright 2000-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -92,7 +92,7 @@ lseek_end(MY_OBJ * obj, long offset)
{
long actual = lseek_obj(obj, offset, SEEK_END);
- if (actual > offset) {
+ if (offset == 0L && actual > offset) {
obj->file_size = actual;
}
}
@@ -103,7 +103,7 @@ lseek_cur(MY_OBJ * obj, long offset)
long actual = lseek_obj(obj, offset, SEEK_CUR);
if (actual != offset) {
- dlg_trace_msg("Lseek returned %ld, expected %ld\n", actual, offset);
+ DLG_TRACE(("# Lseek returned %ld, expected %ld\n", actual, offset));
}
}
@@ -525,7 +525,7 @@ get_search_term(WINDOW *dialog, char *input, int height, int width)
searchbox_attr,
searchbox_border_attr,
searchbox_border2_attr);
- (void) wattrset(widget, searchbox_title_attr);
+ dlg_attrset(widget, searchbox_title_attr);
(void) wmove(widget, 0, (box_width - len_caption) / 2);
indx = dlg_index_wchars(caption);
@@ -599,7 +599,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
}
#endif
/* ESC pressed, or no search term, reprint page to clear box */
- (void) wattrset(obj->text, dialog_attr);
+ dlg_attrset(obj->text, dialog_attr);
back_lines(obj, obj->page_length);
return TRUE;
}
@@ -644,7 +644,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
back_lines(obj, 1L);
}
/* Reprint page */
- (void) wattrset(obj->text, dialog_attr);
+ dlg_attrset(obj->text, dialog_attr);
moved = TRUE;
} else { /* no need to find */
(void) beep();
@@ -656,7 +656,7 @@ perform_search(MY_OBJ * obj, int height, int width, int key, char *search_term)
* Display text from a file in a dialog box.
*/
int
-dialog_textbox(const char *title, const char *file, int height, int width)
+dialog_textbox(const char *title, const char *filename, int height, int width)
{
/* *INDENT-OFF* */
static DLG_KEYS_BINDING binding[] = {
@@ -679,7 +679,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
DLG_KEYS_DATA( DLGK_PAGE_LAST, 'G' ),
DLG_KEYS_DATA( DLGK_PAGE_LAST, KEY_END ),
DLG_KEYS_DATA( DLGK_PAGE_LAST, KEY_LL ),
- DLG_KEYS_DATA( DLGK_PAGE_NEXT, ' ' ),
+ DLG_KEYS_DATA( DLGK_PAGE_NEXT, CHR_SPACE ),
DLG_KEYS_DATA( DLGK_PAGE_NEXT, KEY_NPAGE ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'B' ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, 'b' ),
@@ -709,6 +709,12 @@ dialog_textbox(const char *title, const char *file, int height, int width)
int button = dlg_default_button();
int min_width = 12;
+ DLG_TRACE(("# textbox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("filename", filename);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+
search_term[0] = '\0'; /* no search term entered yet */
memset(&obj, 0, sizeof(obj));
@@ -719,8 +725,8 @@ dialog_textbox(const char *title, const char *file, int height, int width)
obj.buttons = dlg_exit_label();
/* Open input file for reading */
- if ((obj.fd = open(file, O_RDONLY)) == -1)
- dlg_exiterr("Can't open input file %s", file);
+ if ((obj.fd = open(filename, O_RDONLY)) == -1)
+ dlg_exiterr("Can't open input file %s", filename);
/* Get file size. Actually, 'file_size' is the real file size - 1,
since it's only the last byte offset from the beginning */
@@ -738,7 +744,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
#endif
moved = TRUE;
- dlg_auto_sizefile(title, file, &height, &width, 2, min_width);
+ dlg_auto_sizefile(title, filename, &height, &width, 2, min_width);
dlg_print_size(height, width);
dlg_ctl_size(height, width);
@@ -942,6 +948,7 @@ dialog_textbox(const char *title, const char *file, int height, int width)
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
@@ -949,7 +956,6 @@ dialog_textbox(const char *title, const char *file, int height, int width)
/* repaint */
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
goto retry;
#endif
diff --git a/contrib/dialog/timebox.c b/contrib/dialog/timebox.c
index 38abeecc75dd..288e76735d24 100644
--- a/contrib/dialog/timebox.c
+++ b/contrib/dialog/timebox.c
@@ -1,9 +1,9 @@
/*
- * $Id: timebox.c,v 1.54 2013/03/17 15:03:41 tom Exp $
+ * $Id: timebox.c,v 1.59 2018/06/19 22:57:01 tom Exp $
*
* timebox.c -- implements the timebox dialog
*
- * Copyright 2001-2012,2013 Thomas E. Dickey
+ * Copyright 2001-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -82,7 +82,7 @@ draw_cell(BOX * data)
data->height + (2 * MARGIN), data->width + (2 * MARGIN),
menubox_border_attr, menubox_border2_attr);
- (void) wattrset(data->window, item_attr);
+ dlg_attrset(data->window, item_attr);
wprintw(data->window, "%02d", data->value);
return 0;
}
@@ -148,7 +148,7 @@ dialog_timebox(const char *title,
DLG_KEYS_DATA( DLGK_DELETE_RIGHT,KEY_DC ),
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- DLG_KEYS_DATA( DLGK_ENTER, ' ' ),
+ TOGGLEKEY_BINDINGS,
DLG_KEYS_DATA( DLGK_FIELD_FIRST,KEY_HOME ),
DLG_KEYS_DATA( DLGK_FIELD_LAST, KEY_END ),
DLG_KEYS_DATA( DLGK_FIELD_LAST, KEY_LL ),
@@ -184,10 +184,19 @@ dialog_timebox(const char *title,
struct tm current;
int state = dlg_default_button();
const char **buttons = dlg_ok_labels();
- char *prompt = dlg_strclone(subtitle);
+ char *prompt;
char buffer[MAX_LEN];
DIALOG_VARS save_vars;
+ DLG_TRACE(("# timebox args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", subtitle);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("hour", hour);
+ DLG_TRACE2N("minute", minute);
+ DLG_TRACE2N("second", second);
+
now_time = time((time_t *) 0);
current = *localtime(&now_time);
@@ -200,7 +209,9 @@ dialog_timebox(const char *title,
retry:
#endif
+ prompt = dlg_strclone(subtitle);
dlg_auto_size(title, prompt, &height, &width, 0, 0);
+
height += MIN_HIGH;
if (width < MIN_WIDE)
width = MIN_WIDE;
@@ -224,7 +235,7 @@ dialog_timebox(const char *title,
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
/* compute positions of hour, month and year boxes */
@@ -303,6 +314,7 @@ dialog_timebox(const char *title,
case DLGK_MOUSE('S'):
state = sSC;
break;
+ case DLGK_TOGGLE:
case DLGK_ENTER:
result = dlg_ok_buttoncode(button);
break;
@@ -340,6 +352,7 @@ dialog_timebox(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
@@ -347,9 +360,9 @@ dialog_timebox(const char *title,
minute = mn_box.value;
second = sc_box.value;
/* repaint */
+ free(prompt);
dlg_clear();
dlg_del_window(dialog);
- refresh();
dlg_mouse_free_regions();
goto retry;
#endif
diff --git a/contrib/dialog/trace.c b/contrib/dialog/trace.c
index 50ccfac6dfbf..067288e775b5 100644
--- a/contrib/dialog/trace.c
+++ b/contrib/dialog/trace.c
@@ -1,9 +1,9 @@
/*
- * $Id: trace.c,v 1.20 2011/10/18 10:47:26 tom Exp $
+ * $Id: trace.c,v 1.26 2018/06/13 00:06:48 tom Exp $
*
* trace.c -- implements screen-dump and keystroke-logging
*
- * Copyright 2007-2010,2011 Thomas E. Dickey
+ * Copyright 2007-2017,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -53,6 +53,40 @@ dlg_trace_msg(const char *fmt,...)
}
void
+dlg_trace_2s(const char *name, const char *value)
+{
+ bool first = TRUE;
+ const char *next;
+ int left, right = 0;
+
+ if (value == 0)
+ value = "<NULL>";
+
+ while (value[right] != '\0') {
+ value += right;
+ if ((next = strchr(value, '\n')) != 0) {
+ left = (int) (next - value);
+ right = left + 1;
+ } else {
+ left = (int) strlen(value);
+ right = left;
+ }
+ if (first) {
+ first = FALSE;
+ dlg_trace_msg("#%14s=%.*s\n", name, left, value);
+ } else {
+ dlg_trace_msg("#+\t\t%.*s\n", left, value);
+ }
+ }
+}
+
+void
+dlg_trace_2n(const char *name, int value)
+{
+ dlg_trace_msg("#\t%7s=%d\n", name, value);
+}
+
+void
dlg_trace_win(WINDOW *win)
{
if (myFP != 0) {
@@ -93,7 +127,7 @@ dlg_trace_win(WINDOW *win)
wchar_t *uc;
if (win_wch(win, &cch) == ERR
- || (uc = wunctrl(&cch)) == 0
+ || (uc = wunctrl((&cch))) == 0
|| uc[1] != 0
|| wcwidth(uc[0]) <= 0) {
buffer[0] = '.';
@@ -185,6 +219,7 @@ dlg_trace_chr(int ch, int fkey)
CASE(DLGK_SELECT);
CASE(DLGK_HELPFILE);
CASE(DLGK_TRACE);
+ CASE(DLGK_TOGGLE);
}
}
} else if (ch == ERR) {
@@ -195,9 +230,11 @@ dlg_trace_chr(int ch, int fkey)
if (fkey_name == 0)
fkey_name = "UNKNOWN";
}
- fprintf(myFP, "chr %s (ch=%#x, fkey=%d)\n",
- fkey_name,
- ch, fkey);
+ if (ch >= 0) {
+ fprintf(myFP, "chr %s (ch=%#x, fkey=%d)\n", fkey_name, ch, fkey);
+ } else {
+ fprintf(myFP, "chr %s (ch=%d, fkey=%d)\n", fkey_name, ch, fkey);
+ }
fflush(myFP);
}
}
@@ -209,12 +246,13 @@ dlg_trace(const char *fname)
if (myFP == 0) {
myFP = fopen(fname, "a");
if (myFP != 0) {
- dlg_trace_time("** opened at");
- dlg_trace_msg("** dialog %s\n", dialog_version());
+ dlg_trace_time("## opened at");
+ DLG_TRACE(("## dialog %s\n", dialog_version()));
+ DLG_TRACE(("## vile: confmode\n"));
}
}
} else if (myFP != 0) {
- dlg_trace_time("** closed at");
+ dlg_trace_time("## closed at");
fclose(myFP);
myFP = 0;
}
diff --git a/contrib/dialog/treeview.c b/contrib/dialog/treeview.c
index 3e57d18962bf..934761ee2049 100644
--- a/contrib/dialog/treeview.c
+++ b/contrib/dialog/treeview.c
@@ -1,9 +1,9 @@
/*
- * $Id: treeview.c,v 1.24 2013/09/02 17:13:33 tom Exp $
+ * $Id: treeview.c,v 1.32 2018/06/19 22:57:01 tom Exp $
*
* treeview.c -- implements the treeview dialog
*
- * Copyright 2012,2013 Thomas E. Dickey
+ * Copyright 2012-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -67,19 +67,19 @@ print_item(ALL_DATA * data,
: item->text);
/* Clear 'residue' of last item */
- (void) wattrset(win, menubox_attr);
+ dlg_attrset(win, menubox_attr);
(void) wmove(win, choice, 0);
for (i = 0; i < data->use_width; i++)
(void) waddch(win, ' ');
(void) wmove(win, choice, data->check_x);
- (void) wattrset(win, selected ? check_selected_attr : check_attr);
+ dlg_attrset(win, selected ? check_selected_attr : check_attr);
(void) wprintw(win,
data->is_check ? "[%c]" : "(%c)",
states[item->state]);
- (void) wattrset(win, menubox_attr);
+ dlg_attrset(win, menubox_attr);
- (void) wattrset(win, selected ? item_selected_attr : item_attr);
+ dlg_attrset(win, selected ? item_selected_attr : item_attr);
for (i = 0; i < depths; ++i) {
int j;
(void) wmove(win, choice, data->item_x + INDENT * i);
@@ -94,7 +94,7 @@ print_item(ALL_DATA * data,
if (selected) {
dlg_item_help(item->help);
}
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
static void
@@ -185,6 +185,7 @@ dlg_treeview(const char *title,
DLG_KEYS_DATA( DLGK_PAGE_NEXT, DLGK_MOUSE(KEY_NPAGE) ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, KEY_PPAGE ),
DLG_KEYS_DATA( DLGK_PAGE_PREV, DLGK_MOUSE(KEY_PPAGE) ),
+ TOGGLEKEY_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -215,6 +216,8 @@ dlg_treeview(const char *title,
states = " *";
num_states = (int) strlen(states);
+ dialog_state.plain_buttons = TRUE;
+
memset(&all, 0, sizeof(all));
all.items = items;
all.item_no = item_no;
@@ -276,7 +279,7 @@ dlg_treeview(const char *title,
dlg_draw_bottom_box2(dialog, border_attr, border2_attr, dialog_attr);
dlg_draw_title(dialog, title);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
dlg_print_autowrap(dialog, prompt, height, width);
all.use_width = width - 4;
@@ -372,7 +375,7 @@ dlg_treeview(const char *title,
choice = (key - KEY_MAX);
print_list(&all, choice, scrollamt, max_choice);
- key = ' '; /* force the selected item to toggle */
+ key = DLGK_TOGGLE; /* force the selected item to toggle */
} else {
beep();
continue;
@@ -385,7 +388,7 @@ dlg_treeview(const char *title,
/*
* A space toggles the item status.
*/
- if (key == ' ') {
+ if (key == DLGK_TOGGLE) {
int current = scrollamt + choice;
int next = items[current].state + 1;
@@ -529,6 +532,7 @@ dlg_treeview(const char *title,
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
/* reset data */
height = old_height;
width = old_width;
@@ -581,6 +585,16 @@ dialog_treeview(const char *title,
int current = 0;
char *help_result;
+ DLG_TRACE(("# treeview args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+ DLG_TRACE2N("lheight", list_height);
+ DLG_TRACE2N("llength", item_no);
+ /* FIXME dump the items[][] too */
+ DLG_TRACE2N("flag", flag);
+
listitems = dlg_calloc(DIALOG_LISTITEM, (size_t) item_no + 1);
assert_ptr(listitems, "dialog_treeview");
diff --git a/contrib/dialog/ttysize.c b/contrib/dialog/ttysize.c
new file mode 100644
index 000000000000..f38708908ed8
--- /dev/null
+++ b/contrib/dialog/ttysize.c
@@ -0,0 +1,87 @@
+/*
+ * $Id: ttysize.c,v 1.1 2018/06/09 02:03:03 tom Exp $
+ *
+ * ttysize.c -- obtain terminal-size for dialog
+ *
+ * Copyright 2018 Thomas E. Dickey
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License, version 2.1
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to
+ * Free Software Foundation, Inc.
+ * 51 Franklin St., Fifth Floor
+ * Boston, MA 02110, USA.
+ *
+ * An earlier version of this program lists as authors
+ * Savio Lam (lam836@cs.cuhk.hk)
+ */
+
+#include <dialog.h>
+
+/*
+ * This is based on work I did for ncurses in 1997, and improved/extended for
+ * other terminal-based programs. The comments are from my original version -TD
+ */
+
+#ifdef HAVE_TERMIOS_H
+#include <termios.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+
+#ifdef NEED_PTEM_H
+ /* On SCO, they neglected to define struct winsize in termios.h -- it's only
+ * in termio.h and ptem.h (the former conflicts with other definitions).
+ */
+# include <sys/stream.h>
+# include <sys/ptem.h>
+#endif
+
+/*
+ * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS,
+ * Solaris, IRIX) define TIOCGWINSZ and struct winsize.
+ */
+#if defined(TIOCGSIZE)
+# define IOCTL_WINSIZE TIOCGSIZE
+# define STRUCT_WINSIZE struct ttysize
+# define WINSIZE_ROWS(n) (int)n.ts_lines
+# define WINSIZE_COLS(n) (int)n.ts_cols
+#elif defined(TIOCGWINSZ)
+# define IOCTL_WINSIZE TIOCGWINSZ
+# define STRUCT_WINSIZE struct winsize
+# define WINSIZE_ROWS(n) (int)n.ws_row
+# define WINSIZE_COLS(n) (int)n.ws_col
+#else
+# undef HAVE_SIZECHANGE
+#endif
+
+int
+dlg_ttysize(int fd, int *high, int *wide)
+{
+ int rc = -1;
+#ifdef HAVE_SIZECHANGE
+ if (isatty(fd)) {
+ STRUCT_WINSIZE size;
+
+ if (ioctl(fd, IOCTL_WINSIZE, &size) >= 0) {
+ *high = WINSIZE_ROWS(size);
+ *wide = WINSIZE_COLS(size);
+ rc = 0;
+ }
+ }
+#else
+ high = 24;
+ wide = 80;
+#endif /* HAVE_SIZECHANGE */
+ return rc;
+}
diff --git a/contrib/dialog/ui_getc.c b/contrib/dialog/ui_getc.c
index 33e571fd0e30..9d3c76df530d 100644
--- a/contrib/dialog/ui_getc.c
+++ b/contrib/dialog/ui_getc.c
@@ -1,9 +1,9 @@
/*
- * $Id: ui_getc.c,v 1.67 2013/03/24 23:53:19 tom Exp $
+ * $Id: ui_getc.c,v 1.70 2018/06/14 00:05:05 tom Exp $
*
* ui_getc.c - user interface glue for getc()
*
- * Copyright 2001-2012,2013 Thomas E. Dickey
+ * Copyright 2001-2013,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -89,10 +89,16 @@ dlg_remove_callback(DIALOG_CALLBACK * p)
DIALOG_CALLBACK *q;
if (p->input != 0) {
- fclose(p->input);
+ FILE *input = p->input;
+ fclose(input);
if (p->input == dialog_state.pipe_input)
dialog_state.pipe_input = 0;
- p->input = 0;
+ /* more than one callback can have the same input */
+ for (q = dialog_state.getc_callbacks; q != 0; q = q->next) {
+ if (q->input == input) {
+ q->input = 0;
+ }
+ }
}
if (!(p->keep_win))
@@ -147,8 +153,9 @@ handle_inputs(WINDOW *win)
if (result) {
(void) wmove(win, cur_y, cur_x); /* Restore cursor position */
wrefresh(win);
- curs_set(state);
}
+ if (state != ERR)
+ curs_set(state);
return result;
}
@@ -480,10 +487,12 @@ dlg_getc(WINDOW *win, int *fkey)
case ERR: /* wtimeout() in effect; check for file I/O */
if (interval > 0
&& current >= expired) {
- dlg_exiterr("timeout");
- }
- if (!valid_file(stdin)
- || !valid_file(dialog_state.screen_output)) {
+ DLG_TRACE(("# dlg_getc: timeout expired\n"));
+ ch = ESC;
+ done = TRUE;
+ } else if (!valid_file(stdin)
+ || !valid_file(dialog_state.screen_output)) {
+ DLG_TRACE(("# dlg_getc: input or output is invalid\n"));
ch = ESC;
done = TRUE;
} else if (check_inputs()) {
diff --git a/contrib/dialog/util.c b/contrib/dialog/util.c
index 73a05a959844..5b0efb74fcb1 100644
--- a/contrib/dialog/util.c
+++ b/contrib/dialog/util.c
@@ -1,9 +1,9 @@
/*
- * $Id: util.c,v 1.258 2013/09/22 00:41:40 tom Exp $
+ * $Id: util.c,v 1.272 2018/06/21 23:47:10 tom Exp $
*
* util.c -- miscellaneous utilities for dialog
*
- * Copyright 2000-2012,2013 Thomas E. Dickey
+ * Copyright 2000-2016,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -193,7 +193,7 @@ dlg_put_backtitle(void)
chtype attr = A_NORMAL;
int backwidth = dlg_count_columns(dialog_vars.backtitle);
- (void) wattrset(stdscr, screen_attr);
+ dlg_attrset(stdscr, screen_attr);
(void) wmove(stdscr, 0, 1);
dlg_print_text(stdscr, dialog_vars.backtitle, COLS - 2, &attr);
for (i = 0; i < COLS - backwidth; i++)
@@ -215,7 +215,7 @@ dlg_attr_clear(WINDOW *win, int height, int width, chtype attr)
{
int i, j;
- (void) wattrset(win, attr);
+ dlg_attrset(win, attr);
for (i = 0; i < height; i++) {
(void) wmove(win, i, 0);
for (j = 0; j < width; j++)
@@ -555,15 +555,19 @@ dlg_color_pair(int foreground, int background)
static chtype
define_color(WINDOW *win, int foreground)
{
- chtype attrs = dlg_get_attrs(win);
int pair;
short fg, bg, background;
-
- if ((pair = PAIR_NUMBER(attrs)) != 0
- && pair_content((short) pair, &fg, &bg) != ERR) {
- background = bg;
- } else {
+ if (dialog_state.text_only) {
background = COLOR_BLACK;
+ } else {
+ chtype attrs = dlg_get_attrs(win);
+
+ if ((pair = PAIR_NUMBER(attrs)) != 0
+ && pair_content((short) pair, &fg, &bg) != ERR) {
+ background = bg;
+ } else {
+ background = COLOR_BLACK;
+ }
}
return dlg_color_pair(foreground, background);
}
@@ -674,13 +678,13 @@ dlg_print_listitem(WINDOW *win,
attrs[1] = tag_selected_attr;
attrs[0] = tag_attr;
- (void) wattrset(win, selected ? attrs[3] : attrs[2]);
+ dlg_attrset(win, selected ? attrs[3] : attrs[2]);
(void) waddnstr(win, text, indx[1]);
if ((int) strlen(text) > indx[1]) {
limit = dlg_limit_columns(text, climit, 1);
if (limit > 1) {
- (void) wattrset(win, selected ? attrs[1] : attrs[0]);
+ dlg_attrset(win, selected ? attrs[1] : attrs[0]);
(void) waddnstr(win,
text + indx[1],
indx[limit] - indx[1]);
@@ -694,7 +698,7 @@ dlg_print_listitem(WINDOW *win,
limit = dlg_limit_columns(text, climit, 0);
if (limit > 0) {
- (void) wattrset(win, selected ? attrs[1] : attrs[0]);
+ dlg_attrset(win, selected ? attrs[1] : attrs[0]);
dlg_print_text(win, text, cols[limit], &attr);
}
}
@@ -718,7 +722,12 @@ dlg_print_text(WINDOW *win, const char *txt, int cols, chtype *attr)
int combined = 0;
#endif
- getyx(win, y_origin, x_origin);
+ if (dialog_state.text_only) {
+ y_origin = y_after = 0;
+ x_origin = x_after = 0;
+ } else {
+ getyx(win, y_origin, x_origin);
+ }
while (cols > 0 && (*txt != '\0')) {
if (dialog_vars.colors) {
while (isOurEscape(txt)) {
@@ -792,12 +801,29 @@ dlg_print_text(WINDOW *win, const char *txt, int cols, chtype *attr)
* more blanks.
*/
thisTab = (CharOf(*txt) == TAB);
- if (thisTab) {
- getyx(win, y_before, x_before);
- (void) y_before;
+ if (dialog_state.text_only) {
+ y_before = y_after;
+ x_before = x_after;
+ } else {
+ if (thisTab) {
+ getyx(win, y_before, x_before);
+ (void) y_before;
+ }
+ }
+ if (dialog_state.text_only) {
+ int ch = CharOf(*txt++);
+ if (thisTab) {
+ while ((x_after++) % 8) {
+ fputc(' ', dialog_state.output);
+ }
+ } else {
+ fputc(ch, dialog_state.output);
+ x_after++; /* FIXME: handle meta per locale */
+ }
+ } else {
+ (void) waddch(win, CharOf(*txt++) | useattr);
+ getyx(win, y_after, x_after);
}
- (void) waddch(win, CharOf(*txt++) | useattr);
- getyx(win, y_after, x_after);
if (thisTab && (y_after == y_origin))
tabbed += (x_after - x_before);
if ((y_after != y_origin) ||
@@ -809,6 +835,9 @@ dlg_print_text(WINDOW *win, const char *txt, int cols, chtype *attr)
ended = TRUE;
}
}
+ if (dialog_state.text_only) {
+ fputc('\n', dialog_state.output);
+ }
}
/*
@@ -843,12 +872,14 @@ dlg_print_line(WINDOW *win,
* is less, and set wrap_ptr to the end of the last word in the line.
*/
for (n = 0; n < limit; ++n) {
- test_ptr = prompt + indx[test_inx];
- if (*test_ptr == '\n' || *test_ptr == '\0' || cur_x >= (rm + hidden))
+ int ch = *(test_ptr = prompt + indx[test_inx]);
+ if (ch == '\n' || ch == '\0' || cur_x >= (rm + hidden))
break;
- if (*test_ptr == TAB && n == 0) {
+ if (ch == TAB && n == 0) {
tabbed = 8; /* workaround for leading tabs */
- } else if (*test_ptr == ' ' && n != 0 && prompt[indx[n - 1]] != ' ') {
+ } else if (isblank(UCH(ch))
+ && n != 0
+ && !isblank(UCH(prompt[indx[n - 1]]))) {
wrap_inx = n;
*x = cur_x;
} else if (dialog_vars.colors && isOurEscape(test_ptr)) {
@@ -867,9 +898,9 @@ dlg_print_line(WINDOW *win,
* we don't have to wrap it at the end of the previous word.
*/
test_ptr = prompt + indx[test_inx];
- if (*test_ptr == '\n' || *test_ptr == ' ' || *test_ptr == '\0') {
+ if (*test_ptr == '\n' || isblank(UCH(*test_ptr)) || *test_ptr == '\0') {
wrap_inx = test_inx;
- while (wrap_inx > 0 && prompt[indx[wrap_inx - 1]] == ' ') {
+ while (wrap_inx > 0 && isblank(UCH(prompt[indx[wrap_inx - 1]]))) {
wrap_inx--;
}
*x = lm + indx[wrap_inx];
@@ -911,19 +942,20 @@ dlg_print_line(WINDOW *win,
* Print the line if we have a window pointer. Otherwise this routine
* is just being called for sizing the window.
*/
- if (win) {
+ if (dialog_state.text_only || win) {
dlg_print_text(win, prompt, (cols[wrap_inx] - hidden), attr);
}
/* *x tells the calling function how long the line was */
- if (*x == 1)
+ if (*x == 1) {
*x = rm;
+ }
*x -= hidden;
/* Find the start of the next line and return a pointer to it */
test_ptr = wrap_ptr;
- while (*test_ptr == ' ')
+ while (isblank(UCH(*test_ptr)))
test_ptr++;
if (*test_ptr == '\n')
test_ptr++;
@@ -947,7 +979,9 @@ justify_text(WINDOW *win,
int bm = limit_y; /* bottom margin */
int last_y = 0, last_x = 0;
- if (win) {
+ dialog_state.text_height = 0;
+ dialog_state.text_width = 0;
+ if (dialog_state.text_only || win) {
rm -= (2 * MARGIN);
bm -= (2 * MARGIN);
}
@@ -1050,12 +1084,12 @@ dlg_print_scrolled(WINDOW *win,
#endif
dummy = newwin(high, width, 0, 0);
if (dummy == 0) {
- (void) wattrset(win, dialog_attr);
+ dlg_attrset(win, dialog_attr);
dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width);
last = 0;
} else {
wbkgdset(dummy, dialog_attr | ' ');
- (void) wattrset(dummy, dialog_attr);
+ dlg_attrset(dummy, dialog_attr);
werase(dummy);
dlg_print_autowrap(dummy, prompt, high, width);
getyx(dummy, y, x);
@@ -1081,12 +1115,12 @@ dlg_print_scrolled(WINDOW *win,
if (percent > 100)
percent = 100;
if (offset != 0 || percent != 100) {
- (void) wattrset(win, position_indicator_attr);
+ dlg_attrset(win, position_indicator_attr);
(void) wmove(win, MARGIN + height, wide - 4);
(void) sprintf(buffer, "%d%%", percent);
(void) waddstr(win, buffer);
if ((len = (int) strlen(buffer)) < 4) {
- (void) wattrset(win, border_attr);
+ dlg_attrset(win, border_attr);
whline(win, dlg_boxchar(ACS_HLINE), 4 - len);
}
}
@@ -1097,7 +1131,7 @@ dlg_print_scrolled(WINDOW *win,
#endif
{
(void) offset;
- (void) wattrset(win, dialog_attr);
+ dlg_attrset(win, dialog_attr);
dlg_print_autowrap(win, prompt, height + 1 + (3 * MARGIN), width);
last = 0;
}
@@ -1243,11 +1277,12 @@ real_auto_size(const char *title,
int x = (dialog_vars.begin_set ? dialog_vars.begin_x : 2);
int y = (dialog_vars.begin_set ? dialog_vars.begin_y : 1);
int title_length = title ? dlg_count_columns(title) : 0;
- int nc = 4;
int high;
int wide;
int save_high = *height;
int save_wide = *width;
+ int max_high;
+ int max_wide;
if (prompt == 0) {
if (*height == 0)
@@ -1256,6 +1291,9 @@ real_auto_size(const char *title,
*width = -1;
}
+ max_high = (*height < 0);
+ max_wide = (*width < 0);
+
if (*height > 0) {
high = *height;
} else {
@@ -1287,16 +1325,25 @@ real_auto_size(const char *title,
*width = title_length;
}
+ dialog_state.text_height = *height;
+ dialog_state.text_width = *width;
+
if (*width < mincols && save_wide == 0)
*width = mincols;
if (prompt != 0) {
- *width += nc;
- *height += boxlines + 2;
+ *width += ((2 * MARGIN) + SHADOW_COLS);
+ *height += boxlines + (2 * MARGIN);
}
+
if (save_high > 0)
*height = save_high;
if (save_wide > 0)
*width = save_wide;
+
+ if (max_high)
+ *height = SLINES - (dialog_vars.begin_set ? dialog_vars.begin_y : 0);
+ if (max_wide)
+ *width = SCOLS - (dialog_vars.begin_set ? dialog_vars.begin_x : 0);
}
/* End of real_auto_size() */
@@ -1309,6 +1356,10 @@ dlg_auto_size(const char *title,
int boxlines,
int mincols)
{
+ DLG_TRACE(("# dlg_auto_size(%d,%d) limits %d,%d\n",
+ *height, *width,
+ boxlines, mincols));
+
real_auto_size(title, prompt, height, width, boxlines, mincols);
if (*width > SCOLS) {
@@ -1316,8 +1367,12 @@ dlg_auto_size(const char *title,
*width = SCOLS;
}
- if (*height > SLINES)
+ if (*height > SLINES) {
*height = SLINES;
+ }
+ DLG_TRACE(("# ...dlg_auto_size(%d,%d) also %d,%d\n",
+ *height, *width,
+ dialog_state.text_height, dialog_state.text_width));
}
/*
@@ -1360,12 +1415,16 @@ dlg_auto_sizefile(const char *title,
}
while (!feof(fd)) {
+ if (ferror(fd))
+ break;
offset = 0;
- while (((ch = getc(fd)) != '\n') && !feof(fd))
- if ((ch == TAB) && (dialog_vars.tab_correct))
+ while (((ch = getc(fd)) != '\n') && !feof(fd)) {
+ if ((ch == TAB) && (dialog_vars.tab_correct)) {
offset += dialog_state.tab_len - (offset % dialog_state.tab_len);
- else
+ } else {
offset++;
+ }
+ }
if (offset > len)
len = (int) offset;
@@ -1384,27 +1443,6 @@ dlg_auto_sizefile(const char *title,
(void) fclose(fd);
}
-static chtype
-dlg_get_cell_attrs(WINDOW *win)
-{
- chtype result;
-#ifdef USE_WIDE_CURSES
- cchar_t wch;
- wchar_t cc;
- attr_t attrs;
- short pair;
- if (win_wch(win, &wch) == OK
- && getcchar(&wch, &cc, &attrs, &pair, NULL) == OK) {
- result = attrs;
- } else {
- result = 0;
- }
-#else
- result = winch(win) & (A_ATTRIBUTES & ~A_COLOR);
-#endif
- return result;
-}
-
/*
* Draw a rectangular box with line drawing characters.
*
@@ -1428,7 +1466,7 @@ dlg_draw_box2(WINDOW *win, int y, int x, int height, int width,
int i, j;
chtype save = dlg_get_attrs(win);
- (void) wattrset(win, 0);
+ dlg_attrset(win, 0);
for (i = 0; i < height; i++) {
(void) wmove(win, y + i, x);
for (j = 0; j < width; j++)
@@ -1451,7 +1489,7 @@ dlg_draw_box2(WINDOW *win, int y, int x, int height, int width,
else
(void) waddch(win, boxchar | ' ');
}
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
}
void
@@ -1586,7 +1624,7 @@ repaint_cell(DIALOG_WINDOWS * dw, bool draw, int y, int x)
chtype the_cell = dlg_get_attrs(cellwin);
chtype the_attr = (draw ? shadow_attr : the_cell);
- if (dlg_get_cell_attrs(cellwin) & A_ALTCHARSET) {
+ if (winch(cellwin) & A_ALTCHARSET) {
the_attr |= A_ALTCHARSET;
}
#if USE_WCHGAT
@@ -1614,7 +1652,7 @@ repaint_shadow(DIALOG_WINDOWS * dw, bool draw, int y, int x, int height, int wid
if (UseShadow(dw)) {
#if !USE_WCHGAT
chtype save = dlg_get_attrs(dw->shadow);
- (void) wattrset(dw->shadow, draw ? shadow_attr : screen_attr);
+ dlg_attrset(dw->shadow, draw ? shadow_attr : screen_attr);
#endif
for (i = 0; i < SHADOW_ROWS; ++i) {
for (j = 0; j < width; ++j) {
@@ -1628,7 +1666,7 @@ repaint_shadow(DIALOG_WINDOWS * dw, bool draw, int y, int x, int height, int wid
}
(void) wnoutrefresh(dw->shadow);
#if !USE_WCHGAT
- (void) wattrset(dw->shadow, save);
+ dlg_attrset(dw->shadow, save);
#endif
}
}
@@ -1795,8 +1833,10 @@ dlg_beeping(void)
void
dlg_print_size(int height, int width)
{
- if (dialog_vars.print_siz)
+ if (dialog_vars.print_siz) {
fprintf(dialog_state.output, "Size: %d, %d\n", height, width);
+ DLG_TRACE(("# print size: %dx%d\n", height, width));
+ }
}
void
@@ -1904,9 +1944,12 @@ dlg_strempty(void)
char *
dlg_strclone(const char *cprompt)
{
- char *prompt = dlg_malloc(char, strlen(cprompt) + 1);
- assert_ptr(prompt, "dlg_strclone");
- strcpy(prompt, cprompt);
+ char *prompt = 0;
+ if (cprompt != 0) {
+ prompt = dlg_malloc(char, strlen(cprompt) + 1);
+ assert_ptr(prompt, "dlg_strclone");
+ strcpy(prompt, cprompt);
+ }
return prompt;
}
@@ -1989,10 +2032,10 @@ dlg_draw_title(WINDOW *win, const char *title)
chtype save = dlg_get_attrs(win);
int x = centered(getmaxx(win), title);
- (void) wattrset(win, title_attr);
+ dlg_attrset(win, title_attr);
wmove(win, 0, x);
dlg_print_text(win, title, getmaxx(win) - x, &attr);
- (void) wattrset(win, save);
+ dlg_attrset(win, save);
dlg_finish_string(title);
}
}
@@ -2004,14 +2047,14 @@ dlg_draw_bottom_box2(WINDOW *win, chtype on_left, chtype on_right, chtype on_ins
int height = getmaxy(win);
int i;
- (void) wattrset(win, on_left);
+ dlg_attrset(win, on_left);
(void) wmove(win, height - 3, 0);
(void) waddch(win, dlg_boxchar(ACS_LTEE));
for (i = 0; i < width - 2; i++)
(void) waddch(win, dlg_boxchar(ACS_HLINE));
- (void) wattrset(win, on_right);
+ dlg_attrset(win, on_right);
(void) waddch(win, dlg_boxchar(ACS_RTEE));
- (void) wattrset(win, on_inside);
+ dlg_attrset(win, on_inside);
(void) wmove(win, height - 2, 1);
for (i = 0; i < width - 2; i++)
(void) waddch(win, ' ');
@@ -2147,6 +2190,34 @@ dlg_move_window(WINDOW *win, int height, int width, int y, int x)
}
}
}
+
+/*
+ * Having just received a KEY_RESIZE, wait a short time to ignore followup
+ * KEY_RESIZE events.
+ */
+void
+dlg_will_resize(WINDOW *win)
+{
+ int n, ch, base;
+ int caught = 0;
+
+ dlg_trace_win(win);
+ wtimeout(win, 20);
+ for (n = base = 0; n < base + 10; ++n) {
+ if ((ch = wgetch(win)) != ERR) {
+ if (ch == KEY_RESIZE) {
+ base = n;
+ ++caught;
+ } else {
+ ungetch(ch);
+ break;
+ }
+ }
+ }
+ dlg_trace_msg("# caught %d KEY_RESIZE key%s\n",
+ 1 + caught,
+ caught == 1 ? "" : "s");
+}
#endif /* KEY_RESIZE */
WINDOW *
@@ -2213,7 +2284,7 @@ dlg_item_help(const char *txt)
chtype attr = A_NORMAL;
int y, x;
- (void) wattrset(stdscr, itemhelp_attr);
+ dlg_attrset(stdscr, itemhelp_attr);
(void) wmove(stdscr, LINES - 1, 0);
(void) wclrtoeol(stdscr);
(void) addch(' ');
@@ -2259,18 +2330,18 @@ dlg_strcmp(const char *a, const char *b)
static bool
trim_blank(char *base, char *dst)
{
- int count = 0;
+ int count = isblank(UCH(*dst));
while (dst-- != base) {
if (*dst == '\n') {
- return FALSE;
- } else if (*dst != ' ') {
- return (count > 1);
- } else {
+ break;
+ } else if (isblank(UCH(*dst))) {
count++;
+ } else {
+ break;
}
}
- return FALSE;
+ return (count > 1);
}
/*
@@ -2301,7 +2372,7 @@ dlg_trim_string(char *s)
* then ignore the '\n'. This eliminates the need to escape
* the '\n' character (no need to use "\n\").
*/
- while (*p1 == ' ')
+ while (isblank(UCH(*p1)))
p1++;
if (*p1 == '\n')
p = p1 + 1;
@@ -2310,15 +2381,15 @@ dlg_trim_string(char *s)
*s++ = *p++;
else {
/* Replace the '\n' with a space if cr_wrap is not set */
- if (!trim_blank(base, s))
+ if (!trim_blank(base, p))
*s++ = ' ';
p++;
}
} else /* If *p != '\n' */
*s++ = *p++;
} else if (dialog_vars.trim_whitespace) {
- if (*p == ' ') {
- if (*(s - 1) != ' ') {
+ if (isblank(UCH(*p))) {
+ if (!isblank(UCH(*(s - 1)))) {
*s++ = ' ';
p++;
} else
@@ -2326,7 +2397,7 @@ dlg_trim_string(char *s)
} else if (*p == '\n') {
if (dialog_vars.cr_wrap)
*s++ = *p++;
- else if (*(s - 1) != ' ') {
+ else if (!isblank(UCH(*(s - 1)))) {
/* Strip '\n's if cr_wrap is not set. */
*s++ = ' ';
p++;
@@ -2335,8 +2406,8 @@ dlg_trim_string(char *s)
} else
*s++ = *p++;
} else { /* If there are no "\n" strings */
- if (*p == ' ' && !dialog_vars.nocollapse) {
- if (!trim_blank(base, s))
+ if (isblank(UCH(*p)) && !dialog_vars.nocollapse) {
+ if (!trim_blank(base, p))
*s++ = *p;
p++;
} else
@@ -2510,7 +2581,7 @@ dlg_add_quoted(char *string)
dlg_add_result(my_quote);
while (*string != '\0') {
temp[0] = *string++;
- if (strchr(my_quote, *temp) || strchr(must_fix, *temp))
+ if ((strchr) (my_quote, *temp) || (strchr) (must_fix, *temp))
dlg_add_result("\\");
dlg_add_result(temp);
}
diff --git a/contrib/dialog/yesno.c b/contrib/dialog/yesno.c
index d8a0c0bb02e6..3605f67aee45 100644
--- a/contrib/dialog/yesno.c
+++ b/contrib/dialog/yesno.c
@@ -1,9 +1,9 @@
/*
- * $Id: yesno.c,v 1.57 2012/12/01 01:48:21 tom Exp $
+ * $Id: yesno.c,v 1.62 2018/06/19 22:57:01 tom Exp $
*
* yesno.c -- implements the yes/no box
*
- * Copyright 1999-2011,2012 Thomas E. Dickey
+ * Copyright 1999-2012,2018 Thomas E. Dickey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License, version 2.1
@@ -37,8 +37,8 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
static DLG_KEYS_BINDING binding[] = {
HELPKEY_BINDINGS,
ENTERKEY_BINDINGS,
- TRAVERSE_BINDINGS,
SCROLLKEY_BINDINGS,
+ TRAVERSE_BINDINGS,
END_KEYS_BINDING
};
/* *INDENT-ON* */
@@ -49,7 +49,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
int button = dlg_default_button();
WINDOW *dialog = 0;
int result = DLG_EXIT_UNKNOWN;
- char *prompt = dlg_strclone(cprompt);
+ char *prompt;
const char **buttons = dlg_yes_labels();
int min_width = 25;
bool show = TRUE;
@@ -58,9 +58,18 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
#ifdef KEY_RESIZE
int req_high = height;
int req_wide = width;
- restart:
#endif
+ DLG_TRACE(("# yesno args:\n"));
+ DLG_TRACE2S("title", title);
+ DLG_TRACE2S("message", cprompt);
+ DLG_TRACE2N("height", height);
+ DLG_TRACE2N("width", width);
+
+#ifdef KEY_RESIZE
+ restart:
+#endif
+ prompt = dlg_strclone(cprompt);
dlg_tab_correct_str(prompt);
dlg_button_layout(buttons, &min_width);
dlg_auto_size(title, prompt, &height, &width, 2, min_width);
@@ -86,7 +95,7 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
dlg_draw_title(dialog, title);
dlg_draw_helpline(dialog, FALSE);
- (void) wattrset(dialog, dialog_attr);
+ dlg_attrset(dialog, dialog_attr);
page = height - (1 + 3 * MARGIN);
dlg_draw_buttons(dialog,
@@ -133,9 +142,12 @@ dialog_yesno(const char *title, const char *cprompt, int height, int width)
break;
#ifdef KEY_RESIZE
case KEY_RESIZE:
+ dlg_will_resize(dialog);
dlg_clear();
+ free(prompt);
height = req_high;
width = req_wide;
+ show = TRUE;
goto restart;
#endif
default: