summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2006-03-27 22:47:12 +0000
committerache <ache@FreeBSD.org>2006-03-27 22:47:12 +0000
commit027bd1dc0a82d8aec04b232384f1e2905ebc5f73 (patch)
tree9d498e1f8ccecf6d278ce31776ae6c07e7d8dcac /contrib
parent1f7d4ffc3ee3be256a7722ba250a9076f2ddbd0f (diff)
parent8aeb9782f4a5d98c23b918bdae2477810088d0d1 (diff)
downloadFreeBSD-src-027bd1dc0a82d8aec04b232384f1e2905ebc5f73.zip
FreeBSD-src-027bd1dc0a82d8aec04b232384f1e2905ebc5f73.tar.gz
This commit was generated by cvs2svn to compensate for changes in r157184,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libreadline/CHANGELOG110
-rw-r--r--contrib/libreadline/CHANGES129
-rw-r--r--contrib/libreadline/INSTALL16
-rw-r--r--contrib/libreadline/MANIFEST14
-rw-r--r--contrib/libreadline/Makefile.in4
-rw-r--r--contrib/libreadline/NEWS67
-rw-r--r--contrib/libreadline/README16
-rw-r--r--contrib/libreadline/aclocal.m452
-rw-r--r--contrib/libreadline/bind.c180
-rw-r--r--contrib/libreadline/callback.c122
-rw-r--r--contrib/libreadline/chardefs.h2
-rw-r--r--contrib/libreadline/config.h.in21
-rwxr-xr-xcontrib/libreadline/configure2291
-rw-r--r--contrib/libreadline/configure.in98
-rw-r--r--contrib/libreadline/doc/rltech.texi40
-rw-r--r--contrib/libreadline/doc/rluser.texi30
-rw-r--r--contrib/libreadline/doc/rluserman.texi2
-rw-r--r--contrib/libreadline/doc/version.texi12
-rw-r--r--contrib/libreadline/examples/Makefile.in34
-rw-r--r--contrib/libreadline/examples/histexamp.c2
-rw-r--r--contrib/libreadline/examples/rl.c9
-rw-r--r--contrib/libreadline/examples/rlcat.c6
-rw-r--r--contrib/libreadline/examples/rlfe/ChangeLog37
-rw-r--r--contrib/libreadline/examples/rlfe/Makefile.in176
-rw-r--r--contrib/libreadline/examples/rlfe/README78
-rw-r--r--contrib/libreadline/examples/rlfe/config.h.in375
-rwxr-xr-xcontrib/libreadline/examples/rlfe/configure5400
-rw-r--r--contrib/libreadline/examples/rlfe/configure.in438
-rw-r--r--contrib/libreadline/examples/rlfe/extern.h33
-rw-r--r--contrib/libreadline/examples/rlfe/os.h530
-rw-r--r--contrib/libreadline/examples/rlfe/pty.c387
-rw-r--r--contrib/libreadline/examples/rlfe/rlfe.c780
-rw-r--r--contrib/libreadline/examples/rlfe/screen.h2
-rw-r--r--contrib/libreadline/examples/rlptytest.c337
-rw-r--r--contrib/libreadline/examples/rltest.c6
-rw-r--r--contrib/libreadline/examples/rlversion.c6
-rw-r--r--contrib/libreadline/funmap.c1
-rw-r--r--contrib/libreadline/histexpand.c32
-rw-r--r--contrib/libreadline/history.c22
-rw-r--r--contrib/libreadline/input.c12
-rw-r--r--contrib/libreadline/isearch.c770
-rw-r--r--contrib/libreadline/macro.c9
-rw-r--r--contrib/libreadline/mbutil.c35
-rw-r--r--contrib/libreadline/misc.c263
-rw-r--r--contrib/libreadline/readline.c354
-rw-r--r--contrib/libreadline/rldefs.h8
-rw-r--r--contrib/libreadline/rlmbutil.h25
-rw-r--r--contrib/libreadline/rlprivate.h136
-rw-r--r--contrib/libreadline/rltty.c79
-rw-r--r--contrib/libreadline/search.c295
-rw-r--r--contrib/libreadline/shlib/Makefile.in21
-rw-r--r--contrib/libreadline/signals.c32
-rwxr-xr-xcontrib/libreadline/support/config.guess2
-rwxr-xr-xcontrib/libreadline/support/shlib-install30
-rwxr-xr-xcontrib/libreadline/support/shobj-conf78
-rw-r--r--contrib/libreadline/text.c300
-rw-r--r--contrib/libreadline/tilde.c46
-rw-r--r--contrib/libreadline/tilde.h3
-rw-r--r--contrib/libreadline/undo.c5
-rw-r--r--contrib/libreadline/vi_keymap.c2
60 files changed, 12939 insertions, 1463 deletions
diff --git a/contrib/libreadline/CHANGELOG b/contrib/libreadline/CHANGELOG
index 0fc31fa..b6499c3 100644
--- a/contrib/libreadline/CHANGELOG
+++ b/contrib/libreadline/CHANGELOG
@@ -808,3 +808,113 @@ examples/rl-fgets.c
- new example from Harold Levy that wraps fgets replacement functions
that call readline in a shared library that can be interposed with
LD_PRELOAD
+
+ 7/27
+ ----
+[readline-5.0 released]
+
+ 11/15
+ -----
+examples/rlfe/{ChangeLog,Makefile.in,README,config.h.in,configure,configure.in,extern.h,os.h,pty.c,rlfe.c,screen.h}
+ - new version of rlfe, rlfe-0.4, from Per Bothner; now a standalone
+ application
+
+ 11/16
+ -----
+shlib/Makefile.in
+ - substitute TERMCAP_LIB in from configure
+
+configure.in
+ - if SHLIB_LIBS doesn't include a termcap library (curses, ncurses,
+ termcap, termlib), append the value of $TERMCAP_LIB to it
+
+ 11/30
+ -----
+configure.in
+ - take out change from 11/16; it doesn't work for some systems (e.g.,
+ SunOS 4.x and Solaris 2.6)
+ - add support for --enable-purify configure argument
+ - pass TERMCAP_LIB in environment when calling shobj-conf
+
+examples/Makefile.in
+ - add support for building examples with purify
+
+ 1/23/2005
+ ---------
+configure.in
+ - set BUILD_DIR to contain backslashes to escape any spaces in the
+ directory name -- this is what make will accept in targets and
+ prerequisites, so it's better than trying to use double quotes
+
+ 2/25
+ ----
+configure.in
+ - change check for sys/ptem.h to include sys/stream.h if present, to
+ avoid the `present but cannot be compiled' messages on Solaris and
+ SVR4.2 (does anyone still use SVR4.2?)
+
+ 5/7
+ ---
+configure.in
+ - add cross-compiling support from the bash configure.in, which cygwin
+ and mingw have apparently adopted
+ - add check for pwd.h, fcntl.h
+ - add checks for fcntl, kill system calls
+ - add checks for getpw{ent,nam,uid} C library functions
+ - pass a compile-time option through to Makefiles if cross-compiling
+
+config.h.in
+ - add HAVE_PWD_H for <pwd.h>, HAVE_FCNTL_H for <fcntl.h>
+ - add HAVE_FCNTL, HAVE_KILL for respective system calls
+ - add HAVE_GETPW{ENT,NAM,UID} for passwd functions
+
+Makefile.in,shlib/Makefile.in
+ - @CROSS_COMPILE@ is substituted into DEFS (equal to -DCROSS_COMPILING
+ if bash is being cross-compiled)
+
+ 8/2
+ ---
+examples/Makefile.in
+ - use $(READLINE_LIB) instead of -lreadline to get around MacOS X 10.4's
+ preference for (incompatible) shared libraries over static libraries
+ in the load path
+
+ 8/11
+ ----
+support/shobj-conf
+ - new variable: SHLIB_LIBPREF, prefix for shared library name (defaults
+ to `lib'
+ - new variable: SHLIB_DLLVERSION, used on Cygwin to set the library
+ version number
+ - new variable: SHLIB_DOT, separator character between library name and
+ suffix and version information (defaults to `.')
+ - new stanza for cygwin to generate windows-compatible dll
+
+support/shlib-install
+ - add new option `-b bindir' for systems like cygwin/windows that
+ require it
+ - new stanza for cygwin that installs a dll into $bindir and an implied
+ link library into $libdir
+
+configure.in
+ - substitute new variables from shobj-conf
+
+shlib/Makefile.in
+ - substitute bindir, SHLIB_DOT, SHLIB_LIBPREF, SHLIB_DLLVERSION from
+ configure
+ - pass `-b $(bindir)' to shlib-install for install and uninstall targets
+ - library names now use $SHLIB_LIBPREF and $SHLIB_DOT
+
+INSTALL,README
+ - document new SHLIB_DOT, SHLIB_LIBPREF, and SHLIB_DLLVERSION variables
+
+ 10/4
+ ----
+[readline-5.1-beta1 frozen]
+
+ 12/1
+ ----
+configure.in
+ - changed release status to `release'
+
+[readline-5.1 frozen]
diff --git a/contrib/libreadline/CHANGES b/contrib/libreadline/CHANGES
index 0c8450d..1ba0c12 100644
--- a/contrib/libreadline/CHANGES
+++ b/contrib/libreadline/CHANGES
@@ -1,3 +1,132 @@
+This document details the changes between this version, readline-5.1,
+and the previous version, readline-5.0.
+
+1. Changes to Readline
+
+a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
+ incorrectly.
+
+b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
+ line correctly.
+
+c. Fixed a problem in computing the number of invisible characters on the first
+ line of a prompt whose length exceeds the screen width.
+
+d. Fixed vi-mode searching so that failure preserves the current line rather
+ than the last line in the history list.
+
+e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
+ prompts longer than the screen width containing multibyte characters,
+
+h. Fix the calculation of the number of physical characters in the prompt
+ string when it contains multibyte characters.
+
+i. A non-zero value for the `rl_complete_suppress_append' variable now causes
+ no `/' to be appended to a directory name.
+
+j. Fixed forward-word and backward-word to work when words contained
+ multibyte characters.
+
+k. Fixed a bug in finding the delimiter of a `?' substring when performing
+ history expansion in a locale that supports multibyte characters.
+
+l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
+
+m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
+ of the `convert-meta' variable.
+
+n. Fixed saving and restoring primary prompt when prompting for incremental
+ and non-incremental searches; search prompts now display multibyte
+ characters correctly.
+
+o. Fixed a bug that caused keys originally bound to self-insert but shadowed
+ by a multi-character key sequence to not be inserted.
+
+p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
+ dereferenced if NULL (matching the documentation).
+
+q. Extensive changes to readline to add enough state so that commands
+ requiring additional characters (searches, multi-key sequences, numeric
+ arguments, commands requiring an additional specifier character like
+ vi-mode change-char, etc.) work without synchronously waiting for
+ additional input.
+
+r. Lots of changes so readline builds and runs on MinGW.
+
+s. Readline no longer tries to modify the terminal settings when running in
+ callback mode.
+
+t. The Readline display code no longer sets the location of the last invisible
+ character in the prompt if the \[\] sequence is empty.
+
+u. The `change-case' command now correctly changes the case of multibyte
+ characters.
+
+v. Changes to the shared library construction scripts to deal with Windows
+ DLL naming conventions for Cygwin.
+
+w. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
+ SIGWINCH.
+
+x. Fixed the non-incremental search code in vi mode to dispose of any current
+ undo list when copying a line from the history into the current editing
+ buffer.
+
+y. Fixed a bug that caused reversing the incremental search direction to
+ not work correctly.
+
+z. Fixed the vi-mode `U' command to only undo up to the first time insert mode
+ was entered, as Posix specifies.
+
+aa. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
+ place.
+
+bb. Fixed a redisplay bug caused by moving the cursor vertically to a line
+ with invisible characters in the prompt in a multibyte locale.
+
+cc. Fixed a bug that could cause the terminal special chars to be bound in the
+ wrong keymap in vi mode.
+
+2. New Features in Readline
+
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
+
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
+
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
+
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
+
+e. If the rl_completion_query_items is set to a value < 0, readline never
+ asks the user whether or not to view the possible completions.
+
+f. The `C-w' binding in incremental search now understands multibyte
+ characters.
+
+g. New application-callable auxiliary function, rl_variable_value, returns
+ a string corresponding to a readline variable's value.
+
+h. When parsing inputrc files and variable binding commands, the parser
+ strips trailing whitespace from values assigned to boolean variables
+ before checking them.
+
+i. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns.
+
+-------------------------------------------------------------------------------
This document details the changes between this version, readline-5.0,
and the previous version, readline-4.3.
diff --git a/contrib/libreadline/INSTALL b/contrib/libreadline/INSTALL
index cb4a06f..1a73c77 100644
--- a/contrib/libreadline/INSTALL
+++ b/contrib/libreadline/INSTALL
@@ -1,7 +1,7 @@
Basic Installation
==================
-These are installation instructions for Readline-5.0.
+These are installation instructions for Readline-5.1.
The simplest way to compile readline is:
@@ -238,6 +238,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -254,6 +257,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted. If
diff --git a/contrib/libreadline/MANIFEST b/contrib/libreadline/MANIFEST
index 5b02340..b288fb6 100644
--- a/contrib/libreadline/MANIFEST
+++ b/contrib/libreadline/MANIFEST
@@ -3,6 +3,7 @@
#
doc d
examples d
+examples/rlfe d
support d
shlib d
COPYING f
@@ -106,12 +107,23 @@ examples/manexamp.c f
examples/readlinebuf.h f
examples/rl-fgets.c f
examples/rlcat.c f
-examples/rlfe.c f
examples/rltest.c f
examples/rl.c f
+examples/rlptytest.c f
examples/rlversion.c f
examples/histexamp.c f
examples/Inputrc f
+examples/rlfe/ChangeLog f
+examples/rlfe/Makefile.in f
+examples/rlfe/README f
+examples/rlfe/config.h.in f
+examples/rlfe/configure f
+examples/rlfe/configure.in f
+examples/rlfe/extern.h f
+examples/rlfe/os.h f
+examples/rlfe/pty.c f
+examples/rlfe/rlfe.c f
+examples/rlfe/screen.h f
# formatted documentation, from MANIFEST.doc
doc/readline.ps f
doc/history.ps f
diff --git a/contrib/libreadline/Makefile.in b/contrib/libreadline/Makefile.in
index 1578bcb..87df428 100644
--- a/contrib/libreadline/Makefile.in
+++ b/contrib/libreadline/Makefile.in
@@ -43,6 +43,8 @@ RM = rm -f
CP = cp
MV = mv
+PURIFY = @PURIFY@
+
@SET_MAKE@
SHELL = @MAKE_SHELL@
@@ -71,7 +73,7 @@ CFLAGS = @CFLAGS@
LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
+DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
TERMCAP_LIB = @TERMCAP_LIB@
diff --git a/contrib/libreadline/NEWS b/contrib/libreadline/NEWS
index 754154b..c5e67dc 100644
--- a/contrib/libreadline/NEWS
+++ b/contrib/libreadline/NEWS
@@ -1,55 +1,32 @@
-This is a terse description of the new features added to readline-5.0 since
-the release of readline-4.3.
+This is a terse description of the new features added to readline-5.1 since
+the release of readline-5.0.
1. New Features in Readline
-a. History expansion has a new `a' modifier equivalent to the `g' modifier
- for compatibility with the BSD csh.
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
-b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
- modifier, which performs a substitution once per word.
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
-c. All non-incremental search operations may now undo the operation of
- replacing the current line with the history line.
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
-d. The text inserted by an `a' command in vi mode can be reinserted with
- `.'.
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
-e. New bindable variable, `show-all-if-unmodified'. If set, the readline
- completer will list possible completions immediately if there is more
- than one completion and partial completion cannot be performed.
+e. If the rl_completion_query_items is set to a value < 0, readline never
+ asks the user whether or not to view the possible completions.
-f. There is a new application-callable `free_history_entry()' function.
+f. New application-callable auxiliary function, rl_variable_value, returns
+ a string corresponding to a readline variable's value.
-g. History list entries now contain timestamp information; the history file
- functions know how to read and write timestamp information associated
- with each entry.
+g. When parsing inputrc files and variable binding commands, the parser
+ strips trailing whitespace from values assigned to boolean variables
+ before checking them.
-h. Four new key binding functions have been added:
-
- rl_bind_key_if_unbound()
- rl_bind_key_if_unbound_in_map()
- rl_bind_keyseq_if_unbound()
- rl_bind_keyseq_if_unbound_in_map()
-
-i. New application variable, rl_completion_quote_character, set to any
- quote character readline finds before it calls the application completion
- function.
-
-j. New application variable, rl_completion_suppress_quote, settable by an
- application completion function. If set to non-zero, readline does not
- attempt to append a closing quote to a completed word.
-
-k. New application variable, rl_completion_found_quote, set to a non-zero
- value if readline determines that the word to be completed is quoted.
- Set before readline calls any application completion function.
-
-l. New function hook, rl_completion_word_break_hook, called when readline
- needs to break a line into words when completion is attempted. Allows
- the word break characters to vary based on position in the line.
-
-m. New bindable command: unix-filename-rubout. Does the same thing as
- unix-word-rubout, but adds `/' to the set of word delimiters.
-
-n. When listing completions, directories have a `/' appended if the
- `mark-directories' option has been enabled.
+h. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns.
diff --git a/contrib/libreadline/README b/contrib/libreadline/README
index ac4e3a7..8dd09cc 100644
--- a/contrib/libreadline/README
+++ b/contrib/libreadline/README
@@ -1,7 +1,7 @@
Introduction
============
-This is the Gnu Readline library, version 5.0.
+This is the Gnu Readline library, version 5.1.
The Readline library provides a set of functions for use by applications
that allow users to edit command lines as they are typed in. Both
@@ -102,6 +102,9 @@ SHLIB_XLDFLAGS Additional flags to pass to SHOBJ_LD for shared library
SHLIB_LIBS Any additional libraries that shared libraries should be
linked against when they are created.
+SHLIB_LIBPREF The prefix to use when generating the filename of the shared
+ library. The default is `lib'; Cygwin uses `cyg'.
+
SHLIB_LIBSUFF The suffix to add to `libreadline' and `libhistory' when
generating the filename of the shared library. Many systems
use `so'; HP-UX uses `sl'.
@@ -118,6 +121,17 @@ SHLIB_LIBVERSION The string to append to the filename to indicate the version
numbers; use `$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' on those systems.
Other Unix versions use different schemes.
+SHLIB_DLLVERSION The version number for shared libraries that determines API
+ compatibility between readline versions and the underlying
+ system. Used only on Cygwin. Defaults to $SHLIB_MAJOR, but
+ can be overridden at configuration time by defining DLLVERSION
+ in the environment.
+
+SHLIB_DOT The character used to separate the name of the shared library
+ from the suffix and version information. The default is `.';
+ systems like Cygwin which don't separate version information
+ from the library name should set this to the empty string.
+
SHLIB_STATUS Set this to `supported' when you have defined the other
necessary variables. Make uses this to determine whether
or not shared library creation should be attempted.
diff --git a/contrib/libreadline/aclocal.m4 b/contrib/libreadline/aclocal.m4
index 9d2ed54..8a70084 100644
--- a/contrib/libreadline/aclocal.m4
+++ b/contrib/libreadline/aclocal.m4
@@ -1541,7 +1541,14 @@ AC_DEFUN(BASH_CHECK_DEV_FD,
[AC_MSG_CHECKING(whether /dev/fd is available)
AC_CACHE_VAL(bash_cv_dev_fd,
[if test -d /dev/fd && test -r /dev/fd/0 < /dev/null; then
- bash_cv_dev_fd=standard
+# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
+ exec 3<&0
+ if test -r /dev/fd/3; then
+ bash_cv_dev_fd=standard
+ else
+ bash_cv_dev_fd=absent
+ fi
+ exec 3<&-
elif test -d /proc/self/fd && test -r /proc/self/fd/0 < /dev/null; then
bash_cv_dev_fd=whacky
else
@@ -1733,12 +1740,18 @@ AC_CACHE_VAL(ac_cv_rl_version,
#include <stdio.h>
#include <readline/readline.h>
+extern int rl_gnu_readline_p;
+
main()
{
FILE *fp;
fp = fopen("conftest.rlv", "w");
- if (fp == 0) exit(1);
- fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
+ if (fp == 0)
+ exit(1);
+ if (rl_gnu_readline_p != 1)
+ fprintf(fp, "0.0\n");
+ else
+ fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
fclose(fp);
exit(0);
}
@@ -1852,6 +1865,39 @@ AC_DEFINE(CTYPE_NON_ASCII)
fi
])
+AC_DEFUN(BASH_CHECK_WCONTINUED,
+[
+AC_MSG_CHECKING(whether WCONTINUED flag to waitpid is unavailable or available but broken)
+AC_CACHE_VAL(bash_cv_wcontinued_broken,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+main()
+{
+ int x;
+
+ x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
+ if (x == -1 && errno == EINVAL)
+ exit (1);
+ else
+ exit (0);
+}
+], bash_cv_wcontinued_broken=no,bash_cv_wcontinued_broken=yes,
+ [AC_MSG_WARN(cannot check WCONTINUED if cross compiling -- defaulting to no)
+ bash_cv_wcontinued_broken=no]
+)])
+AC_MSG_RESULT($bash_cv_wcontinued_broken)
+if test $bash_cv_wcontinued_broken = yes; then
+AC_DEFINE(WCONTINUED_BROKEN)
+fi
+])
+
dnl
dnl tests added for bashdb
dnl
diff --git a/contrib/libreadline/bind.c b/contrib/libreadline/bind.c
index 15d0e4e..7559d32 100644
--- a/contrib/libreadline/bind.c
+++ b/contrib/libreadline/bind.c
@@ -1,6 +1,6 @@
/* bind.c -- key binding and startup file support for the readline library. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -77,6 +77,9 @@ static char *_rl_read_file PARAMS((char *, size_t *));
static void _rl_init_file_error PARAMS((const char *));
static int _rl_read_init_file PARAMS((const char *, int));
static int glean_key_from_name PARAMS((char *));
+static int find_boolean_var PARAMS((const char *));
+
+static char *_rl_get_string_variable_value PARAMS((const char *));
static int substring_member_of_array PARAMS((char *, const char **));
static int currently_reading_init_file;
@@ -341,7 +344,7 @@ rl_generic_bind (type, keyseq, data, map)
k.function = 0;
/* If no keys to bind to, exit right away. */
- if (!keyseq || !*keyseq)
+ if (keyseq == 0 || *keyseq == 0)
{
if (type == ISMACR)
free (data);
@@ -369,7 +372,7 @@ rl_generic_bind (type, keyseq, data, map)
if (ic < 0 || ic >= KEYMAP_SIZE)
return -1;
- if (_rl_convert_meta_chars_to_ascii && META_CHAR (ic))
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
{
ic = UNMETA (ic);
if (map[ESC].type == ISKMAP)
@@ -460,7 +463,14 @@ rl_translate_keyseq (seq, array, len)
else if (c == 'M')
{
i++;
- array[l++] = ESC; /* ESC is meta-prefix */
+ /* XXX - should obey convert-meta setting? */
+ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP)
+ array[l++] = ESC; /* ESC is meta-prefix */
+ else
+ {
+ i++;
+ array[l++] = META (seq[i]);
+ }
}
else if (c == 'C')
{
@@ -1185,9 +1195,9 @@ rl_parse_and_bind (string)
/* If this is a command to set a variable, then do that. */
if (_rl_stricmp (string, "set") == 0)
{
- char *var = string + i;
- char *value;
+ char *var, *value, *e;
+ var = string + i;
/* Make VAR point to start of variable name. */
while (*var && whitespace (*var)) var++;
@@ -1198,6 +1208,20 @@ rl_parse_and_bind (string)
*value++ = '\0';
while (*value && whitespace (*value)) value++;
+ /* Strip trailing whitespace from values to boolean variables. Temp
+ fix until I get a real quoted-string parser here. */
+ i = find_boolean_var (var);
+ if (i >= 0)
+ {
+ /* remove trailing whitespace */
+ e = value + strlen (value) - 1;
+ while (e >= value && whitespace (*e))
+ e--;
+ e++; /* skip back to whitespace or EOS */
+ if (*e && e >= value)
+ *e = '\0';
+ }
+
rl_variable_bind (var, value);
return 0;
}
@@ -1218,8 +1242,9 @@ rl_parse_and_bind (string)
the quoted string delimiter, like the shell. */
if (*funname == '\'' || *funname == '"')
{
- int delimiter = string[i++], passc;
+ int delimiter, passc;
+ delimiter = string[i++];
for (passc = 0; c = string[i]; i++)
{
if (passc)
@@ -1355,6 +1380,7 @@ static struct {
int *value;
int flags;
} boolean_varlist [] = {
+ { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 },
{ "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
{ "byte-oriented", &rl_byte_oriented, 0 },
{ "completion-ignore-case", &_rl_completion_case_fold, 0 },
@@ -1468,13 +1494,34 @@ find_string_var (name)
values result in 0 (false). */
static int
bool_to_int (value)
- char *value;
+ const char *value;
{
return (value == 0 || *value == '\0' ||
(_rl_stricmp (value, "on") == 0) ||
(value[0] == '1' && value[1] == '\0'));
}
+char *
+rl_variable_value (name)
+ const char *name;
+{
+ register int i;
+ int v;
+ char *ret;
+
+ /* Check for simple variables first. */
+ i = find_boolean_var (name);
+ if (i >= 0)
+ return (*boolean_varlist[i].value ? "on" : "off");
+
+ i = find_string_var (name);
+ if (i >= 0)
+ return (_rl_get_string_variable_value (string_varlist[i].name));
+
+ /* Unknown variable names return NULL. */
+ return 0;
+}
+
int
rl_variable_bind (name, value)
const char *name, *value;
@@ -2117,12 +2164,68 @@ rl_dump_macros (count, key)
return (0);
}
+static char *
+_rl_get_string_variable_value (name)
+ const char *name;
+{
+ static char numbuf[32];
+ char *ret;
+ int n;
+
+ if (_rl_stricmp (name, "bell-style") == 0)
+ {
+ switch (_rl_bell_preference)
+ {
+ case NO_BELL:
+ return "none";
+ case VISIBLE_BELL:
+ return "visible";
+ case AUDIBLE_BELL:
+ default:
+ return "audible";
+ }
+ }
+ else if (_rl_stricmp (name, "comment-begin") == 0)
+ return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
+ else if (_rl_stricmp (name, "completion-query-items") == 0)
+ {
+ sprintf (numbuf, "%d", rl_completion_query_items);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "editing-mode") == 0)
+ return (rl_get_keymap_name_from_edit_mode ());
+ else if (_rl_stricmp (name, "isearch-terminators") == 0)
+ {
+ if (_rl_isearch_terminators == 0)
+ return 0;
+ ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
+ if (ret)
+ {
+ strncpy (numbuf, ret, sizeof (numbuf) - 1);
+ free (ret);
+ numbuf[sizeof(numbuf) - 1] = '\0';
+ }
+ else
+ numbuf[0] = '\0';
+ return numbuf;
+ }
+ else if (_rl_stricmp (name, "keymap") == 0)
+ {
+ ret = rl_get_keymap_name (_rl_keymap);
+ if (ret == 0)
+ ret = rl_get_keymap_name_from_edit_mode ();
+ return (ret ? ret : "none");
+ }
+ else
+ return (0);
+}
+
void
rl_variable_dumper (print_readably)
int print_readably;
{
int i;
- const char *kname;
+ char *v;
for (i = 0; boolean_varlist[i].name; i++)
{
@@ -2134,63 +2237,16 @@ rl_variable_dumper (print_readably)
*boolean_varlist[i].value ? "on" : "off");
}
- /* bell-style */
- switch (_rl_bell_preference)
- {
- case NO_BELL:
- kname = "none"; break;
- case VISIBLE_BELL:
- kname = "visible"; break;
- case AUDIBLE_BELL:
- default:
- kname = "audible"; break;
- }
- if (print_readably)
- fprintf (rl_outstream, "set bell-style %s\n", kname);
- else
- fprintf (rl_outstream, "bell-style is set to `%s'\n", kname);
-
- /* comment-begin */
- if (print_readably)
- fprintf (rl_outstream, "set comment-begin %s\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
- else
- fprintf (rl_outstream, "comment-begin is set to `%s'\n", _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
-
- /* completion-query-items */
- if (print_readably)
- fprintf (rl_outstream, "set completion-query-items %d\n", rl_completion_query_items);
- else
- fprintf (rl_outstream, "completion-query-items is set to `%d'\n", rl_completion_query_items);
-
- /* editing-mode */
- if (print_readably)
- fprintf (rl_outstream, "set editing-mode %s\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
- else
- fprintf (rl_outstream, "editing-mode is set to `%s'\n", (rl_editing_mode == emacs_mode) ? "emacs" : "vi");
-
- /* isearch-terminators */
- if (_rl_isearch_terminators)
+ for (i = 0; string_varlist[i].name; i++)
{
- char *disp;
-
- disp = _rl_untranslate_macro_value (_rl_isearch_terminators);
-
+ v = _rl_get_string_variable_value (string_varlist[i].name);
+ if (v == 0) /* _rl_isearch_terminators can be NULL */
+ continue;
if (print_readably)
- fprintf (rl_outstream, "set isearch-terminators \"%s\"\n", disp);
+ fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v);
else
- fprintf (rl_outstream, "isearch-terminators is set to \"%s\"\n", disp);
-
- free (disp);
+ fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v);
}
-
- /* keymap */
- kname = rl_get_keymap_name (_rl_keymap);
- if (kname == 0)
- kname = rl_get_keymap_name_from_edit_mode ();
- if (print_readably)
- fprintf (rl_outstream, "set keymap %s\n", kname ? kname : "none");
- else
- fprintf (rl_outstream, "keymap is set to `%s'\n", kname ? kname : "none");
}
/* Print all of the current variables and their values to
diff --git a/contrib/libreadline/callback.c b/contrib/libreadline/callback.c
index 5b05ea5..9120969 100644
--- a/contrib/libreadline/callback.c
+++ b/contrib/libreadline/callback.c
@@ -1,6 +1,6 @@
/* callback.c -- functions to use readline as an X `callback' mechanism. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -44,9 +44,14 @@
#include "readline.h"
#include "rlprivate.h"
+/* Private data for callback registration functions. See comments in
+ rl_callback_read_char for more details. */
+_rl_callback_func_t *_rl_callback_func = 0;
+_rl_callback_generic_arg *_rl_callback_data = 0;
+
/* **************************************************************** */
/* */
-/* Callback Readline Functions */
+/* Callback Readline Functions */
/* */
/* **************************************************************** */
@@ -72,7 +77,8 @@ _rl_callback_newline ()
{
in_handler = 1;
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
@@ -89,6 +95,7 @@ rl_callback_handler_install (prompt, linefunc)
rl_vcpfunc_t *linefunc;
{
rl_set_prompt (prompt);
+ RL_SETSTATE (RL_STATE_CALLBACK);
rl_linefunc = linefunc;
_rl_callback_newline ();
}
@@ -98,7 +105,8 @@ void
rl_callback_read_char ()
{
char *line;
- int eof;
+ int eof, jcode;
+ static procenv_t olevel;
if (rl_linefunc == NULL)
{
@@ -106,7 +114,79 @@ rl_callback_read_char ()
abort ();
}
- eof = readline_internal_char ();
+ memcpy ((void *)olevel, (void *)readline_top_level, sizeof (procenv_t));
+ jcode = setjmp (readline_top_level);
+ if (jcode)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ memcpy ((void *)readline_top_level, (void *)olevel, sizeof (procenv_t));
+ return;
+ }
+
+ if (RL_ISSTATE (RL_STATE_ISEARCH))
+ {
+ eof = _rl_isearch_callback (_rl_iscxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NSEARCH))
+ {
+ eof = _rl_nsearch_callback (_rl_nscxt);
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG))
+ {
+ eof = _rl_arg_callback (_rl_argcxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+ /* XXX - this should handle _rl_last_command_was_kill better */
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
+ _rl_internal_char_cleanup ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_MULTIKEY))
+ {
+ eof = _rl_dispatch_callback (_rl_kscxt); /* For now */
+ while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED))
+ eof = _rl_dispatch_callback (_rl_kscxt);
+ if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0)
+ {
+ _rl_internal_char_cleanup ();
+ _rl_want_redisplay = 1;
+ }
+ }
+ else if (_rl_callback_func)
+ {
+ /* This allows functions that simply need to read an additional character
+ (like quoted-insert) to register a function to be called when input is
+ available. _rl_callback_data is simply a pointer to a struct that has
+ the argument count originally passed to the registering function and
+ space for any additional parameters. */
+ eof = (*_rl_callback_func) (_rl_callback_data);
+ /* If the function `deregisters' itself, make sure the data is cleaned
+ up. */
+ if (_rl_callback_func == 0)
+ {
+ if (_rl_callback_data)
+ {
+ _rl_callback_data_dispose (_rl_callback_data);
+ _rl_callback_data = 0;
+ }
+ _rl_internal_char_cleanup ();
+ }
+ }
+ else
+ eof = readline_internal_char ();
+
+ if (rl_done == 0 && _rl_want_redisplay)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
/* We loop in case some function has pushed input back with rl_execute_next. */
for (;;)
@@ -115,7 +195,8 @@ rl_callback_read_char ()
{
line = readline_internal_teardown (eof);
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
@@ -131,10 +212,10 @@ rl_callback_read_char ()
if (in_handler == 0 && rl_linefunc)
_rl_callback_newline ();
}
- if (rl_pending_input || _rl_pushed_input_available ())
+ if (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT))
eof = readline_internal_char ();
else
- break;
+ break;
}
}
@@ -143,14 +224,37 @@ void
rl_callback_handler_remove ()
{
rl_linefunc = NULL;
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
if (in_handler)
{
in_handler = 0;
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
#endif
}
}
+_rl_callback_generic_arg *
+_rl_callback_data_alloc (count)
+ int count;
+{
+ _rl_callback_generic_arg *arg;
+
+ arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg));
+ arg->count = count;
+
+ arg->i1 = arg->i2 = 0;
+
+ return arg;
+}
+
+void _rl_callback_data_dispose (arg)
+ _rl_callback_generic_arg *arg;
+{
+ if (arg)
+ free (arg);
+}
+
#endif
diff --git a/contrib/libreadline/chardefs.h b/contrib/libreadline/chardefs.h
index cb04c98..def3a11 100644
--- a/contrib/libreadline/chardefs.h
+++ b/contrib/libreadline/chardefs.h
@@ -86,6 +86,8 @@
/* Some systems define these; we want our definitions. */
#undef ISPRINT
+/* Beware: these only work with single-byte ASCII characters. */
+
#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
diff --git a/contrib/libreadline/config.h.in b/contrib/libreadline/config.h.in
index 8b4f0d0..b4aae98 100644
--- a/contrib/libreadline/config.h.in
+++ b/contrib/libreadline/config.h.in
@@ -26,12 +26,27 @@
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
#undef STAT_MACROS_BROKEN
+/* Define if you have the fcntl function. */
+#undef HAVE_FCNTL
+
+/* Define if you have the getpwent function. */
+#undef HAVE_GETPWENT
+
+/* Define if you have the getpwnam function. */
+#undef HAVE_GETPWNAM
+
+/* Define if you have the getpwuid function. */
+#undef HAVE_GETPWUID
+
/* Define if you have the isascii function. */
#undef HAVE_ISASCII
/* Define if you have the isxdigit function. */
#undef HAVE_ISXDIGIT
+/* Define if you have the kill function. */
+#undef HAVE_KILL
+
/* Define if you have the lstat function. */
#undef HAVE_LSTAT
@@ -87,6 +102,9 @@
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
/* Define if you have the <langinfo.h> header file. */
#undef HAVE_LANGINFO_H
@@ -102,6 +120,9 @@
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
+/* Define if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
/* Define if you have the <stdarg.h> header file. */
#undef HAVE_STDARG_H
diff --git a/contrib/libreadline/configure b/contrib/libreadline/configure
index 5eedea3..17a9eeb 100755
--- a/contrib/libreadline/configure
+++ b/contrib/libreadline/configure
@@ -1,12 +1,11 @@
#! /bin/sh
-# From configure.in for Readline 5.0, version 2.52, from autoconf version AC_ACVERSION.
+# From configure.in for Readline 5.1, version 2.58.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for readline 5.0-rc1.
+# Generated by GNU Autoconf 2.59 for readline 5.1-beta1.
#
# Report bugs to <bug-readline@gnu.org>.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -23,9 +22,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -44,7 +44,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -221,16 +221,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -269,8 +270,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='readline'
PACKAGE_TARNAME='readline'
-PACKAGE_VERSION='5.0-rc1'
-PACKAGE_STRING='readline 5.0-rc1'
+PACKAGE_VERSION='5.1-beta1'
+PACKAGE_STRING='readline 5.1-beta1'
PACKAGE_BUGREPORT='bug-readline@gnu.org'
ac_unique_file="readline.h"
@@ -311,7 +312,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_LIBS SHLIB_MAJOR SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET SHARED_INSTALL_TARGET BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os CROSS_COMPILE SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA AR RANLIB ac_ct_RANLIB MAKE_SHELL SHOBJ_CC SHOBJ_CFLAGS SHOBJ_LD SHOBJ_LDFLAGS SHOBJ_XLDFLAGS SHOBJ_LIBS SHOBJ_STATUS SHLIB_STATUS SHLIB_XLDFLAGS SHLIB_DOT SHLIB_LIBPREF SHLIB_LIBSUFF SHLIB_LIBVERSION SHLIB_DLLVERSION SHLIB_LIBS SHLIB_MAJOR SHLIB_MINOR STATIC_TARGET SHARED_TARGET STATIC_INSTALL_TARGET SHARED_INSTALL_TARGET PURIFY BUILD_DIR LOCAL_CFLAGS LOCAL_LDFLAGS LOCAL_DEFS ARFLAGS LIBVERSION TERMCAP_LIB LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -670,7 +671,7 @@ done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -710,10 +711,10 @@ if test -z "$srcdir"; then
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -780,7 +781,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures readline 5.0-rc1 to adapt to many kinds of systems.
+\`configure' configures readline 5.1-beta1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -805,9 +806,9 @@ _ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -841,7 +842,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of readline 5.0-rc1:";;
+ short | recursive ) echo "Configuration of readline 5.1-beta1:";;
esac
cat <<\_ACEOF
@@ -857,6 +858,7 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-curses use the curses library instead of the termcap
library
+ --with-purify configure to postprocess with purify
Some influential environment variables:
CC C compiler command
@@ -904,12 +906,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -920,7 +955,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -933,11 +968,10 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-readline configure 5.0-rc1
-generated by GNU Autoconf 2.57
+readline configure 5.1-beta1
+generated by GNU Autoconf 2.59
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -948,8 +982,8 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by readline $as_me 5.0-rc1, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+It was created by readline $as_me 5.1-beta1, which was
+generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1026,19 +1060,19 @@ do
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
- ac_must_keep_next=false # Got value, back to normal.
+ ac_must_keep_next=false # Got value, back to normal.
else
- case $ac_arg in
- *=* | --config-cache | -C | -disable-* | --disable-* \
- | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
- | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
- | -with-* | --with-* | -without-* | --without-* | --x)
- case "$ac_configure_args0 " in
- "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
- esac
- ;;
- -* ) ac_must_keep_next=true ;;
- esac
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
@@ -1072,12 +1106,12 @@ _ASBOX
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1106,7 +1140,7 @@ _ASBOX
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1125,7 +1159,7 @@ _ASBOX
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core core.* *.core &&
+ rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
@@ -1205,7 +1239,7 @@ fi
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
@@ -1222,13 +1256,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:$LINENO: 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:$LINENO: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1316,7 +1350,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
ac_config_headers="$ac_config_headers config.h"
-LIBVERSION=5.0
+LIBVERSION=5.1
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
@@ -1374,6 +1408,7 @@ host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
opt_curses=no
+opt_purify=no
# Check whether --with-curses or --without-curses was given.
@@ -1382,10 +1417,22 @@ if test "${with_curses+set}" = set; then
opt_curses=$withval
fi;
+# Check whether --with-purify or --without-purify was given.
+if test "${with_purify+set}" = set; then
+ withval="$with_purify"
+ opt_purify=$withval
+fi;
+
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
+if test "$opt_purify" = yes; then
+ PURIFY="purify"
+else
+ PURIFY=
+fi
+
opt_multibyte=yes
opt_static_libs=yes
opt_shared_libs=yes
@@ -1413,6 +1460,31 @@ _ACEOF
fi
+
+
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/mingw.cache
+ ;;
+ i[3456]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ CROSS_COMPILE='-DCROSS_COMPILING'
+
+fi
+
echo ""
echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -1422,7 +1494,7 @@ test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
echo "$as_me:$LINENO: 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_,'`
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -1785,7 +1857,6 @@ ac_compiler=`set X $ac_compile; echo $2`
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1805,8 +1876,8 @@ ac_clean_files="$ac_clean_files a.out a.exe b.out"
# 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:$LINENO: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
@@ -1826,23 +1897,23 @@ do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
- ;;
+ ;;
conftest.$ac_ext )
- # This is the source file.
- ;;
+ # This is the source file.
+ ;;
[ab].out )
- # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
*.* )
- ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool,
- # but it would be cool to find out if it's true. Does anybody
- # maintain Libtool? --akim.
- export ac_cv_exeext
- break;;
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
* )
- break;;
+ break;;
esac
done
else
@@ -1916,8 +1987,8 @@ for ac_file in conftest.exe conftest conftest.*; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
@@ -1942,7 +2013,6 @@ if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -1993,7 +2063,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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2013,11 +2082,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2030,7 +2109,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2046,7 +2125,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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2063,11 +2141,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2080,7 +2168,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
@@ -2107,7 +2195,6 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2135,6 +2222,16 @@ static char *f (char * (*g) (char **, int), char **p, ...)
va_end (v);
return s;
}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2161,11 +2258,21 @@ do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2178,7 +2285,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2206,19 +2313,28 @@ cat >conftest.$ac_ext <<_ACEOF
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- ''\
- '#include <stdlib.h>' \
+ '' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -2226,14 +2342,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdlib.h>
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -2244,11 +2359,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2261,9 +2386,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2280,11 +2404,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2296,7 +2430,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2310,7 +2444,7 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2346,7 +2480,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2357,7 +2490,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2369,6 +2502,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2389,7 +2523,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2407,6 +2540,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2453,7 +2587,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2464,7 +2597,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#else
# include <assert.h>
#endif
- Syntax error
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2476,6 +2609,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2496,7 +2630,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2514,6 +2647,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2574,7 +2708,6 @@ if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2595,11 +2728,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2612,12 +2755,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2639,7 +2781,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2664,7 +2805,6 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2676,9 +2816,9 @@ cat >>conftest.$ac_ext <<_ACEOF
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -2689,7 +2829,7 @@ main ()
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -2714,7 +2854,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -2739,7 +2879,7 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+ inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -2748,7 +2888,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2760,11 +2899,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2777,7 +2926,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -2804,7 +2953,6 @@ else
echo "$as_me:$LINENO: checking minix/config.h usability" >&5
echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2815,11 +2963,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2832,7 +2990,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -2840,7 +2998,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking minix/config.h presence" >&5
echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2858,6 +3015,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2877,33 +3035,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -2957,7 +3114,6 @@ if test "${ac_cv_prog_gcc_traditional+set}" = set; then
else
ac_pattern="Autoconf.*'x'"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -2977,7 +3133,6 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3012,6 +3167,7 @@ fi
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -3028,6 +3184,7 @@ do
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
@@ -3035,20 +3192,20 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- if test $ac_prog = install &&
- grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # AIX install. It has an incompatible calling convention.
- :
- elif test $ac_prog = install &&
- grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
- # program-specific install script used by HP pwplus--don't use.
- :
- else
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
+ if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
done
;;
@@ -3205,7 +3362,6 @@ if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3268,11 +3424,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3285,7 +3451,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
@@ -3324,7 +3490,6 @@ if test "${ac_cv_c_char_unsigned+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3343,11 +3508,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3360,7 +3535,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_char_unsigned=yes
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
@@ -3378,7 +3553,6 @@ if test "${ac_cv_type_signal+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3405,11 +3579,21 @@ int i;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3422,7 +3606,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_signal=int
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
echo "${ECHO_T}$ac_cv_type_signal" >&6
@@ -3439,7 +3623,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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3459,11 +3642,21 @@ if (sizeof (size_t))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3476,7 +3669,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
@@ -3496,7 +3689,6 @@ if test "${ac_cv_type_ssize_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3516,11 +3708,21 @@ if (sizeof (ssize_t))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3533,7 +3735,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_ssize_t=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
@@ -3554,7 +3756,6 @@ if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3575,11 +3776,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3592,12 +3803,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3619,7 +3829,6 @@ 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 $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3644,7 +3853,6 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3656,9 +3864,9 @@ cat >>conftest.$ac_ext <<_ACEOF
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
- (('a' <= (c) && (c) <= 'i') \
- || ('j' <= (c) && (c) <= 'r') \
- || ('s' <= (c) && (c) <= 'z'))
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -3669,7 +3877,7 @@ main ()
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -3694,7 +3902,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -3715,7 +3923,6 @@ if test "${ac_cv_header_stat_broken+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3782,7 +3989,6 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3802,11 +4008,21 @@ return 0;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3819,7 +4035,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3842,7 +4058,6 @@ else
ac_func_search_save_LIBS=$LIBS
ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3866,11 +4081,21 @@ opendir ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3882,12 +4107,12 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_opendir" = no; then
for ac_lib in dir; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3911,11 +4136,21 @@ opendir ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3928,7 +4163,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
done
fi
LIBS=$ac_func_search_save_LIBS
@@ -3949,7 +4185,6 @@ else
ac_func_search_save_LIBS=$LIBS
ac_cv_search_opendir=no
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -3973,11 +4208,21 @@ opendir ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3989,12 +4234,12 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
if test "$ac_cv_search_opendir" = no; then
for ac_lib in x; do
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4018,11 +4263,21 @@ opendir ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4035,7 +4290,8 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
done
fi
LIBS=$ac_func_search_save_LIBS
@@ -4053,17 +4309,221 @@ fi
+for ac_func in fcntl kill lstat
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+for ac_func in memmove putenv select setenv setlocale \
+ strcasecmp strpbrk tcgetattr vsnprintf
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+#undef $ac_func
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-for ac_func in lstat memmove putenv select setenv setlocale \
- strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in isascii isxdigit
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
@@ -4072,21 +4532,28 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -4117,11 +4584,21 @@ return f != $ac_func;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4134,7 +4611,112 @@ sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in getpwent getpwnam getpwuid
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -4156,7 +4738,6 @@ else
ac_cv_func_strcoll_works=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4193,7 +4774,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_func_strcoll_works=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_func_strcoll_works" >&5
@@ -4221,12 +4802,8 @@ fi
-
-
-
-for ac_header in unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
- limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
- termcap.h termios.h termio.h sys/file.h locale.h memory.h
+for ac_header in fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
+ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
@@ -4242,7 +4819,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4253,11 +4829,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4270,7 +4856,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -4278,7 +4864,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4296,6 +4881,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -4315,33 +4901,185 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
- no:yes )
+esac
+echo "$as_me:$LINENO: 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
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: 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
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -4352,7 +5090,7 @@ 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
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -4369,6 +5107,72 @@ done
+for ac_header in sys/ptem.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_Header=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
echo "$as_me:$LINENO: checking for type of signal functions" >&5
echo $ECHO_N "checking for type of signal functions... $ECHO_C" >&6
if test "${bash_cv_signal_vintage+set}" = set; then
@@ -4376,7 +5180,6 @@ if test "${bash_cv_signal_vintage+set}" = set; then
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4399,11 +5202,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4416,7 +5229,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4436,11 +5248,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4453,7 +5275,6 @@ sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4476,11 +5297,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4494,13 +5325,16 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_signal_vintage=v7
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
@@ -4537,7 +5371,6 @@ echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaul
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4608,7 +5441,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
bash_cv_must_reinstall_sighandlers=yes
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
@@ -4635,7 +5468,6 @@ echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4700,7 +5532,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
bash_cv_func_sigsetjmp=missing
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
@@ -4719,7 +5551,6 @@ if test "${bash_cv_func_lstat+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4739,11 +5570,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4756,7 +5597,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_func_lstat=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_func_lstat" >&5
echo "${ECHO_T}$bash_cv_func_lstat" >&6
@@ -4780,7 +5622,6 @@ echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4843,7 +5684,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
bash_cv_func_strcoll_broken=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
@@ -4869,7 +5710,6 @@ echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaultin
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4927,7 +5767,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
bash_cv_func_ctype_nonascii=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
@@ -4947,7 +5787,6 @@ if test "${bash_cv_getpw_declared+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -4987,7 +5826,6 @@ if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5019,7 +5857,6 @@ if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5060,7 +5897,6 @@ if test "${bash_cv_void_sighandler+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5085,11 +5921,21 @@ int i;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5102,7 +5948,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_void_sighandler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_void_sighandler" >&5
echo "${ECHO_T}$bash_cv_void_sighandler" >&6
@@ -5119,7 +5965,6 @@ if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5137,11 +5982,21 @@ int x = TIOCSTAT;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5154,7 +6009,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_tiocstat_in_ioctl=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_tiocstat_in_ioctl" >&5
@@ -5172,7 +6027,6 @@ if test "${bash_cv_fionread_in_ioctl+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5190,11 +6044,21 @@ int x = FIONREAD;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5207,7 +6071,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_fionread_in_ioctl=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_fionread_in_ioctl" >&5
@@ -5225,7 +6089,6 @@ if test "${bash_cv_speed_t_in_sys_types+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5242,11 +6105,21 @@ speed_t x;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5259,7 +6132,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_speed_t_in_sys_types=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_speed_t_in_sys_types" >&5
@@ -5277,7 +6150,6 @@ if test "${bash_cv_struct_winsize_header+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5295,11 +6167,21 @@ struct winsize x;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5311,7 +6193,6 @@ else
sed 's/^/| /' conftest.$ac_ext >&5
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5329,11 +6210,21 @@ struct winsize x;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5346,10 +6237,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_struct_winsize_header=other
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
if test $bash_cv_struct_winsize_header = ioctl_h; then
@@ -5378,7 +6269,6 @@ if test "${bash_cv_dirent_has_dino+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5417,11 +6307,21 @@ struct dirent d; int z; z = d.d_ino;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5434,7 +6334,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_dirent_has_dino=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_dirent_has_dino" >&5
@@ -5453,7 +6353,6 @@ if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5492,11 +6391,21 @@ struct dirent d; int z; z = d.d_fileno;
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5509,7 +6418,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_dirent_has_d_fileno=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_fileno" >&5
@@ -5542,21 +6451,28 @@ if test "${ac_cv_func_tgetent+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define tgetent innocuous_tgetent
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char tgetent (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef tgetent
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -5587,11 +6503,21 @@ return f != tgetent;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5604,7 +6530,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_tgetent=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5
echo "${ECHO_T}$ac_cv_func_tgetent" >&6
@@ -5619,7 +6546,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltermcap $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5643,11 +6569,21 @@ tgetent ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5660,7 +6596,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_termcap_tgetent=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
@@ -5676,7 +6613,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltinfo $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5700,11 +6636,21 @@ tgetent ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5717,7 +6663,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_tinfo_tgetent=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5
@@ -5733,7 +6680,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5757,11 +6703,21 @@ tgetent ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5774,7 +6730,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_curses_tgetent=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
@@ -5790,7 +6747,6 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lncurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5814,11 +6770,21 @@ tgetent ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5831,7 +6797,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ncurses_tgetent=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
@@ -5905,7 +6872,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5916,11 +6882,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -5933,7 +6909,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -5941,7 +6917,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -5959,6 +6934,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -5978,33 +6954,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -6015,7 +6990,7 @@ 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
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -6047,7 +7022,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6058,11 +7032,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6075,7 +7059,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -6083,7 +7067,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6101,6 +7084,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -6120,33 +7104,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -6157,7 +7140,7 @@ 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
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -6189,7 +7172,6 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6200,11 +7182,21 @@ $ac_includes_default
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6217,7 +7209,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -6225,7 +7217,6 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6243,6 +7234,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -6262,33 +7254,32 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
- (
- cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
-_ASBOX
- ) |
- sed "s/^/$as_me: WARNING: /" >&2
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
;;
- no:yes )
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
-## ------------------------------------ ##
-## Report this to bug-autoconf@gnu.org. ##
-## ------------------------------------ ##
+## ----------------------------------- ##
+## Report this to bug-readline@gnu.org ##
+## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
@@ -6299,7 +7290,7 @@ 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
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -6321,21 +7312,28 @@ if test "${ac_cv_func_mbsrtowcs+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define mbsrtowcs to an innocuous variant, in case <limits.h> declares mbsrtowcs.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbsrtowcs innocuous_mbsrtowcs
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mbsrtowcs (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef mbsrtowcs
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6366,11 +7364,21 @@ return f != mbsrtowcs;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6383,7 +7391,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_mbsrtowcs=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5
echo "${ECHO_T}$ac_cv_func_mbsrtowcs" >&6
@@ -6400,21 +7409,28 @@ if test "${ac_cv_func_mbrtowc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define mbrtowc to an innocuous variant, in case <limits.h> declares mbrtowc.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbrtowc innocuous_mbrtowc
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mbrtowc (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef mbrtowc
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6445,11 +7461,21 @@ return f != mbrtowc;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6462,7 +7488,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_mbrtowc=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5
echo "${ECHO_T}$ac_cv_func_mbrtowc" >&6
@@ -6479,21 +7506,28 @@ if test "${ac_cv_func_mbrlen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define mbrlen to an innocuous variant, in case <limits.h> declares mbrlen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbrlen innocuous_mbrlen
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mbrlen (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef mbrlen
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6524,11 +7558,21 @@ return f != mbrlen;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6541,7 +7585,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_mbrlen=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5
echo "${ECHO_T}$ac_cv_func_mbrlen" >&6
@@ -6558,21 +7603,28 @@ if test "${ac_cv_func_wctomb+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define wctomb to an innocuous variant, in case <limits.h> declares wctomb.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wctomb innocuous_wctomb
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wctomb (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef wctomb
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6603,11 +7655,21 @@ return f != wctomb;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6620,7 +7682,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_wctomb=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wctomb" >&5
echo "${ECHO_T}$ac_cv_func_wctomb" >&6
@@ -6637,21 +7700,28 @@ if test "${ac_cv_func_wcwidth+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define wcwidth to an innocuous variant, in case <limits.h> declares wcwidth.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcwidth innocuous_wcwidth
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wcwidth (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef wcwidth
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6682,11 +7752,21 @@ return f != wcwidth;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6699,7 +7779,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_wcwidth=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
echo "${ECHO_T}$ac_cv_func_wcwidth" >&6
@@ -6716,21 +7797,28 @@ if test "${ac_cv_func_wcsdup+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define wcsdup to an innocuous variant, in case <limits.h> declares wcsdup.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcsdup innocuous_wcsdup
+
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char wcsdup (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
+
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
+
+#undef wcsdup
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
@@ -6761,11 +7849,21 @@ return f != wcsdup;
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6778,7 +7876,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_wcsdup=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5
echo "${ECHO_T}$ac_cv_func_wcsdup" >&6
@@ -6796,7 +7895,6 @@ if test "${bash_cv_have_mbstate_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6818,11 +7916,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6835,7 +7943,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_have_mbstate_t=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_have_mbstate_t" >&5
echo "${ECHO_T}$bash_cv_have_mbstate_t" >&6
@@ -6852,7 +7960,6 @@ if test "${bash_cv_langinfo_codeset+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -6869,11 +7976,21 @@ char* cs = nl_langinfo(CODESET);
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -6886,7 +8003,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
bash_cv_langinfo_codeset=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $bash_cv_langinfo_codeset" >&5
echo "${ECHO_T}$bash_cv_langinfo_codeset" >&6
@@ -6916,7 +8034,16 @@ esac
if test -f ${srcdir}/support/shobj-conf; then
echo "$as_me:$LINENO: checking configuration for building shared libraries" >&5
echo $ECHO_N "checking configuration for building shared libraries... $ECHO_C" >&6
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+
+# case "$SHLIB_LIBS" in
+# *curses*|*termcap*|*termlib*) ;;
+# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+# esac
+
+
+
+
@@ -6965,6 +8092,12 @@ msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
esac
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+
@@ -7012,13 +8145,13 @@ _ACEOF
# `set' does not quote correctly, so add quotes (double-quote
# substitution turns \\\\ into \\, and sed turns \\ into \).
sed -n \
- "s/'/'\\\\''/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -7048,13 +8181,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
+s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
-s/^[^=]*=[ ]*$//;
+s/^[^=]*=[ ]*$//;
}'
fi
@@ -7065,7 +8198,7 @@ ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
@@ -7109,9 +8242,10 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
@@ -7130,7 +8264,7 @@ for as_var in \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -7309,16 +8443,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
-as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -7344,8 +8479,8 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
-This file was extended by readline $as_me 5.0-rc1, which was
-generated by GNU Autoconf 2.57. Invocation command line was
+This file was extended by readline $as_me 5.1-beta1, which was
+generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -7389,9 +8524,9 @@ Usage: $0 [OPTIONS] [FILE]...
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -7407,12 +8542,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-readline config.status 5.0-rc1
-configured by $0, generated by GNU Autoconf 2.57,
+readline config.status 5.1-beta1
+configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2003 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
@@ -7610,6 +8744,7 @@ s,@host@,$host,;t t
s,@host_cpu@,$host_cpu,;t t
s,@host_vendor@,$host_vendor,;t t
s,@host_os@,$host_os,;t t
+s,@CROSS_COMPILE@,$CROSS_COMPILE,;t t
s,@SET_MAKE@,$SET_MAKE,;t t
s,@CC@,$CC,;t t
s,@CFLAGS@,$CFLAGS,;t t
@@ -7636,8 +8771,11 @@ s,@SHOBJ_LIBS@,$SHOBJ_LIBS,;t t
s,@SHOBJ_STATUS@,$SHOBJ_STATUS,;t t
s,@SHLIB_STATUS@,$SHLIB_STATUS,;t t
s,@SHLIB_XLDFLAGS@,$SHLIB_XLDFLAGS,;t t
+s,@SHLIB_DOT@,$SHLIB_DOT,;t t
+s,@SHLIB_LIBPREF@,$SHLIB_LIBPREF,;t t
s,@SHLIB_LIBSUFF@,$SHLIB_LIBSUFF,;t t
s,@SHLIB_LIBVERSION@,$SHLIB_LIBVERSION,;t t
+s,@SHLIB_DLLVERSION@,$SHLIB_DLLVERSION,;t t
s,@SHLIB_LIBS@,$SHLIB_LIBS,;t t
s,@SHLIB_MAJOR@,$SHLIB_MAJOR,;t t
s,@SHLIB_MINOR@,$SHLIB_MINOR,;t t
@@ -7645,6 +8783,7 @@ s,@STATIC_TARGET@,$STATIC_TARGET,;t t
s,@SHARED_TARGET@,$SHARED_TARGET,;t t
s,@STATIC_INSTALL_TARGET@,$STATIC_INSTALL_TARGET,;t t
s,@SHARED_INSTALL_TARGET@,$SHARED_INSTALL_TARGET,;t t
+s,@PURIFY@,$PURIFY,;t t
s,@BUILD_DIR@,$BUILD_DIR,;t t
s,@LOCAL_CFLAGS@,$LOCAL_CFLAGS,;t t
s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
@@ -7683,9 +8822,9 @@ _ACEOF
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
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
@@ -7703,21 +8842,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -7733,10 +8872,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -7774,12 +8913,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
case $INSTALL in
@@ -7801,7 +8973,7 @@ echo "$as_me: creating $ac_file" >&6;}
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -7810,24 +8982,24 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
@@ -7869,12 +9041,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
@@ -7883,11 +9055,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
@@ -7901,28 +9073,29 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
@@ -7945,9 +9118,9 @@ s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
@@ -7961,13 +9134,13 @@ rm -f confdef2sed.sed
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -7976,7 +9149,7 @@ do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -8003,7 +9176,7 @@ do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -8037,10 +9210,10 @@ echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8056,10 +9229,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -8091,16 +9264,41 @@ for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_dest" : 'X\(//\)[^/]' \| \
+ X"$ac_dest" : 'X\(//\)$' \| \
+ X"$ac_dest" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
ac_builddir=.
if test "$ac_dir" != .; then
@@ -8126,12 +9324,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
diff --git a/contrib/libreadline/configure.in b/contrib/libreadline/configure.in
index 31e1760..a786398 100644
--- a/contrib/libreadline/configure.in
+++ b/contrib/libreadline/configure.in
@@ -4,9 +4,27 @@ dnl
dnl report bugs to chet@po.cwru.edu
dnl
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([for Readline 5.0, version 2.52, from autoconf version] AC_ACVERSION)
-AC_INIT(readline, 5.0-rc1, bug-readline@gnu.org)
+# Copyright (C) 1987-2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_REVISION([for Readline 5.1, version 2.59])
+
+AC_INIT(readline, 5.1-release, bug-readline@gnu.org)
dnl make sure we are using a recent autoconf version
AC_PREREQ(2.50)
@@ -16,20 +34,28 @@ AC_CONFIG_AUX_DIR(./support)
AC_CONFIG_HEADERS(config.h)
dnl update the value of RL_READLINE_VERSION in readline.h when this changes
-LIBVERSION=5.0
+LIBVERSION=5.1
AC_CANONICAL_HOST
dnl configure defaults
opt_curses=no
+opt_purify=no
dnl arguments to configure
AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
+AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
if test "$opt_curses" = "yes"; then
prefer_curses=yes
fi
+if test "$opt_purify" = yes; then
+ PURIFY="purify"
+else
+ PURIFY=
+fi
+
dnl option parsing for optional features
opt_multibyte=yes
opt_static_libs=yes
@@ -43,6 +69,35 @@ if test $opt_multibyte = no; then
AC_DEFINE(NO_MULTIBYTE_SUPPORT)
fi
+dnl load up the cross-building cache file -- add more cases and cache
+dnl files as necessary
+
+dnl Note that host and target machine are the same, and different than the
+dnl build machine.
+
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/mingw.cache
+ ;;
+ i[[3456]]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ CROSS_COMPILE='-DCROSS_COMPILING'
+ AC_SUBST(CROSS_COMPILE)
+fi
+
echo ""
echo "Beginning configuration for readline-$LIBVERSION for ${host_cpu}-${host_vendor}-${host_os}"
echo ""
@@ -83,14 +138,24 @@ AC_HEADER_STDC
AC_HEADER_STAT
AC_HEADER_DIRENT
-AC_CHECK_FUNCS(lstat memmove putenv select setenv setlocale \
- strcasecmp strpbrk tcgetattr vsnprintf isascii isxdigit)
+AC_CHECK_FUNCS(fcntl kill lstat)
+AC_CHECK_FUNCS(memmove putenv select setenv setlocale \
+ strcasecmp strpbrk tcgetattr vsnprintf)
+AC_CHECK_FUNCS(isascii isxdigit)
+AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
AC_FUNC_STRCOLL
-AC_CHECK_HEADERS(unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
- limits.h sys/ptem.h sys/pte.h sys/stream.h sys/select.h \
- termcap.h termios.h termio.h sys/file.h locale.h memory.h )
+AC_CHECK_HEADERS(fcntl.h unistd.h stdlib.h varargs.h stdarg.h string.h strings.h \
+ limits.h locale.h pwd.h memory.h termcap.h termios.h termio.h)
+AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h)
+
+AC_CHECK_HEADERS(sys/ptem.h,,,
+[[
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+]])
BASH_SYS_SIGNAL_VINTAGE
BASH_SYS_REINSTALL_SIGHANDLERS
@@ -143,7 +208,13 @@ esac
#
if test -f ${srcdir}/support/shobj-conf; then
AC_MSG_CHECKING(configuration for building shared libraries)
- eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+ eval `TERMCAP_LIB=$TERMCAP_LIB ${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c ${host_cpu} -o ${host_os} -v ${host_vendor}`
+
+# case "$SHLIB_LIBS" in
+# *curses*|*termcap*|*termlib*) ;;
+# *) SHLIB_LIBS="$SHLIB_LIBS $TERMCAP_LIB" ;;
+# esac
+
AC_SUBST(SHOBJ_CC)
AC_SUBST(SHOBJ_CFLAGS)
AC_SUBST(SHOBJ_LD)
@@ -153,8 +224,11 @@ if test -f ${srcdir}/support/shobj-conf; then
AC_SUBST(SHOBJ_STATUS)
AC_SUBST(SHLIB_STATUS)
AC_SUBST(SHLIB_XLDFLAGS)
+ AC_SUBST(SHLIB_DOT)
+ AC_SUBST(SHLIB_LIBPREF)
AC_SUBST(SHLIB_LIBSUFF)
AC_SUBST(SHLIB_LIBVERSION)
+ AC_SUBST(SHLIB_DLLVERSION)
AC_SUBST(SHLIB_LIBS)
AC_MSG_RESULT($SHLIB_STATUS)
@@ -191,6 +265,12 @@ msdosdjgpp*) BUILD_DIR=`pwd.exe` ;; # to prevent //d/path/file
*) BUILD_DIR=`pwd` ;;
esac
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+AC_SUBST(PURIFY)
AC_SUBST(BUILD_DIR)
AC_SUBST(CFLAGS)
diff --git a/contrib/libreadline/doc/rltech.texi b/contrib/libreadline/doc/rltech.texi
index af9bc53..6f2e2ee 100644
--- a/contrib/libreadline/doc/rltech.texi
+++ b/contrib/libreadline/doc/rltech.texi
@@ -5,10 +5,10 @@
@ifinfo
This document describes the GNU Readline Library, a utility for aiding
-in the consitency of user interface across discrete programs that need
+in the consistency of user interface across discrete programs that need
to provide a command line interface.
-Copyright (C) 1988-2004 Free Software Foundation, Inc.
+Copyright (C) 1988-2005 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -284,6 +284,8 @@ negative argument.
A command function should return 0 if its action completes successfully,
and a non-zero value if some error occurs.
+This is the convention obeyed by all of the builtin Readline bindable
+command functions.
@node Readline Variables
@section Readline Variables
@@ -398,6 +400,12 @@ The stdio stream to which Readline performs output.
If @code{NULL}, Readline defaults to @var{stdout}.
@end deftypevar
+@deftypevar int rl_prefer_env_winsize
+If non-zero, Readline gives values found in the @env{LINES} and
+@env{COLUMNS} environment variables greater precedence than values fetched
+from the kernel when computing the screen dimensions.
+@end deftypevar
+
@deftypevar {rl_command_func_t *} rl_last_func
The address of the last command function Readline executed. May be used to
test whether or not a function is being executed twice in succession, for
@@ -909,10 +917,14 @@ possibly containing conversion specifications such as @samp{%d}, and
any additional arguments necessary to satisfy the conversion specifications.
The resulting string is displayed in the @dfn{echo area}. The echo area
is also used to display numeric arguments and search strings.
+You should call @code{rl_save_prompt} to save the prompt information
+before calling this function.
@end deftypefun
@deftypefun int rl_clear_message (void)
-Clear the message in the echo area.
+Clear the message in the echo area. If the prompt was saved with a call to
+@code{rl_save_prompt} before the last call to @code{rl_message},
+call @code{rl_restore_prompt} before calling this function.
@end deftypefun
@deftypefun void rl_save_prompt (void)
@@ -923,6 +935,9 @@ displaying a new message in the message area with @code{rl_message()}.
@deftypefun void rl_restore_prompt (void)
Restore the local Readline prompt display state saved by the most
recent call to @code{rl_save_prompt}.
+if @code{rl_save_prompt} was called to save the prompt before a call
+to @code{rl_message}, this function should be called before the
+corresponding call to @code{rl_clear_message}.
@end deftypefun
@deftypefun int rl_expand_prompt (char *prompt)
@@ -1149,6 +1164,11 @@ This behaves as if the readline command
file (@pxref{Readline Init File Syntax}).
@end deftypefun
+@deftypefun {char *} rl_variable_value (const char *variable)
+Return a string representing the value of the Readline variable @var{variable}.
+For boolean variables, this string is either @samp{on} or @samp{off}.
+@end deftypefun
+
@deftypefun void rl_variable_dumper (int readable)
Print the readline variable names and their current values
to @code{rl_outstream}.
@@ -1378,7 +1398,8 @@ Update Readline's internal screen size by reading values from the kernel.
@deftypefun void rl_set_screen_size (int rows, int cols)
Set Readline's idea of the terminal size to @var{rows} rows and
-@var{cols} columns.
+@var{cols} columns. If either @var{rows} or @var{columns} is less than
+or equal to 0, Readline's idea of that terminal dimension is unchanged.
@end deftypefun
If an application does not want to install a @code{SIGWINCH} handler, but
@@ -1390,6 +1411,10 @@ Return Readline's idea of the terminal's size in the
variables pointed to by the arguments.
@end deftypefun
+@deftypefun void rl_reset_screen_size (void)
+Cause Readline to reobtain the screen size and recalculate its dimensions.
+@end deftypefun
+
The following functions install and remove Readline's signal handlers.
@deftypefun int rl_set_signals (void)
@@ -1707,8 +1732,9 @@ shell variables and hostnames.
@deftypevar int rl_completion_query_items
Up to this many items will be displayed in response to a
-possible-completions call. After that, we ask the user if she is sure
-she wants to see them all. The default value is 100.
+possible-completions call. After that, readline asks the user if she is sure
+she wants to see them all. The default value is 100. A negative value
+indicates that Readline should never ask the user.
@end deftypevar
@deftypevar {int} rl_completion_append_character
@@ -2237,7 +2263,7 @@ too_dangerous (caller)
char *caller;
@{
fprintf (stderr,
- "%s: Too dangerous for me to distribute.\n"
+ "%s: Too dangerous for me to distribute.\n",
caller);
fprintf (stderr, "Write it yourself.\n");
@}
diff --git a/contrib/libreadline/doc/rluser.texi b/contrib/libreadline/doc/rluser.texi
index 6fa9350..478b41f 100644
--- a/contrib/libreadline/doc/rluser.texi
+++ b/contrib/libreadline/doc/rluser.texi
@@ -10,7 +10,7 @@ use these features. There is a document entitled "readline.texinfo"
which contains both end-user and programmer documentation for the
GNU Readline Library.
-Copyright (C) 1988-2004 Free Software Foundation, Inc.
+Copyright (C) 1988-2005 Free Software Foundation, Inc.
Authored by Brian Fox and Chet Ramey.
@@ -383,7 +383,11 @@ set editing-mode vi
@end example
Variable names and values, where appropriate, are recognized without regard
-to case.
+to case. Unrecognized variable names are ignored.
+
+Boolean variables (those that can be set to on or off) are set to on if
+the value is null or empty, @var{on} (case-insensitive), or 1. Any other
+value results in the variable being set to off.
@ifset BashFeatures
The @w{@code{bind -V}} command lists the current Readline variable names
@@ -404,6 +408,12 @@ If set to @samp{none}, Readline never rings the bell. If set to
If set to @samp{audible} (the default), Readline attempts to ring
the terminal's bell.
+@item bind-tty-special-chars
+@vindex bind-tty-special-chars
+If set to @samp{on}, Readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their Readline
+equivalents.
+
@item comment-begin
@vindex comment-begin
The string to insert at the beginning of the line when the
@@ -423,6 +433,7 @@ If the number of possible completions is greater than this value,
Readline will ask the user whether or not he wishes to view
them; otherwise, they are simply listed.
This variable must be set to an integer value greater than or equal to 0.
+A negative value means Readline should never ask.
The default limit is @code{100}.
@item convert-meta
@@ -456,10 +467,11 @@ arrow keys. The default is @samp{off}.
If set to @samp{on}, tilde expansion is performed when Readline
attempts word completion. The default is @samp{off}.
+@item history-preserve-point
@vindex history-preserve-point
If set to @samp{on}, the history code attempts to place point at the
same location on each history line retrieved with @code{previous-history}
-or @code{next-history}.
+or @code{next-history}. The default is @samp{off}.
@item horizontal-scroll-mode
@vindex horizontal-scroll-mode
@@ -1012,6 +1024,8 @@ With an argument @var{n},
insert the @var{n}th word from the previous command (the words
in the previous command begin with word 0). A negative argument
inserts the @var{n}th word from the end of the previous command.
+Once the argument @var{n} is computed, the argument is extracted
+as if the @samp{!@var{n}} history expansion had been specified.
@item yank-last-arg (M-. or M-_)
Insert last argument to the previous command (the last word of the
@@ -1019,6 +1033,8 @@ previous history entry). With an
argument, behave exactly like @code{yank-nth-arg}.
Successive calls to @code{yank-last-arg} move back through the history
list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the @samp{!$} history expansion had been specified.
@end ftable
@@ -1530,7 +1546,7 @@ special variable as delimiters.
Shell quoting is honored.
Each word is then expanded using
brace expansion, tilde expansion, parameter and variable expansion,
-command substitution, arithmetic expansion, and pathname expansion,
+command substitution, and arithmetic expansion,
as described above (@pxref{Shell Expansions}).
The results are split using the rules described above
(@pxref{Word Splitting}).
@@ -1693,6 +1709,12 @@ shell functions specified with @option{-F}.
@item nospace
Tell Readline not to append a space (the default) to words completed at
the end of the line.
+
+@item plusdirs
+After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
+
@end table
@item -A @var{action}
diff --git a/contrib/libreadline/doc/rluserman.texi b/contrib/libreadline/doc/rluserman.texi
index 8681a86..db80b31 100644
--- a/contrib/libreadline/doc/rluserman.texi
+++ b/contrib/libreadline/doc/rluserman.texi
@@ -14,7 +14,7 @@ This manual describes the end user interface of the GNU Readline Library
consistency of user interface across discrete programs which provide
a command line interface.
-Copyright @copyright{} 1988-2004 Free Software Foundation, Inc.
+Copyright @copyright{} 1988-2005 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
diff --git a/contrib/libreadline/doc/version.texi b/contrib/libreadline/doc/version.texi
index 0beb276..99816bf 100644
--- a/contrib/libreadline/doc/version.texi
+++ b/contrib/libreadline/doc/version.texi
@@ -1,10 +1,10 @@
@ignore
-Copyright (C) 1988-2004 Free Software Foundation, Inc.
+Copyright (C) 1988-2005 Free Software Foundation, Inc.
@end ignore
-@set EDITION 5.0
-@set VERSION 5.0
-@set UPDATED 28 January 2004
-@set UPDATED-MONTH January 2004
+@set EDITION 5.1-beta1
+@set VERSION 5.1-beta1
+@set UPDATED 11 November 2005
+@set UPDATED-MONTH November 2005
-@set LASTCHANGE Wed Jan 28 15:46:54 EST 2004
+@set LASTCHANGE Fri Nov 11 19:50:51 EST 2005
diff --git a/contrib/libreadline/examples/Makefile.in b/contrib/libreadline/examples/Makefile.in
index f1b2434..e27bbc0 100644
--- a/contrib/libreadline/examples/Makefile.in
+++ b/contrib/libreadline/examples/Makefile.in
@@ -40,6 +40,8 @@ INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(INCLUDES) $(CFLAGS)
LDFLAGS = -g -L.. @LDFLAGS@
+PURIFY = @PURIFY@
+
READLINE_LIB = ../libreadline.a
HISTORY_LIB = ../libhistory.a
@@ -53,30 +55,32 @@ EXECUTABLES = fileman rltest rl rlcat rlversion histexamp
OBJECTS = fileman.o rltest.o rl.o rlcat.o rlversion.o histexamp.o
all: $(EXECUTABLES)
-everything: all rlfe
+everything: all
rl: rl.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rl.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rl.o $(READLINE_LIB) $(TERMCAP_LIB)
rlcat: rlcat.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlcat.o $(READLINE_LIB) $(TERMCAP_LIB)
fileman: fileman.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ fileman.o $(READLINE_LIB) $(TERMCAP_LIB)
rltest: rltest.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rltest.o $(READLINE_LIB) $(TERMCAP_LIB)
+
+rlptytest: rlptytest.o $(READLINE_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ rlptytest.o $(READLINE_LIB) $(TERMCAP_LIB)
rlversion: rlversion.o $(READLINE_LIB)
- $(CC) $(LDFLAGS) -o $@ rlversion.o -lreadline $(TERMCAP_LIB)
+ $(CC) $(LDFLAGS) -o $@ rlversion.o $(READLINE_LIB) $(TERMCAP_LIB)
histexamp: histexamp.o $(HISTORY_LIB)
- $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
+ $(PURIFY) $(CC) $(LDFLAGS) -o $@ histexamp.o -lhistory $(TERMCAP_LIB)
clean mostlyclean:
$(RM) $(OBJECTS)
$(RM) $(EXECUTABLES) *.exe
- $(RM) rlfe.o rlfe
distclean maintainer-clean: clean
$(RM) Makefile
@@ -86,19 +90,13 @@ rltest.o: rltest.c
rl.o: rl.c
rlversion.o: rlversion.c
histexamp.o: histexamp.c
+rlcat.o: rlcat.c
+rlptytest.o: rlptytest.c
fileman.o: $(top_srcdir)/readline.h
rltest.o: $(top_srcdir)/readline.h
rl.o: $(top_srcdir)/readline.h
rlversion.o: $(top_srcdir)/readline.h
histexamp.o: $(top_srcdir)/history.h
-
-# Stuff for Per Bothner's `rlfe' program
-
-rlfe: rlfe.o $(READLINE_LIB) $(HISTORY_LIB)
- $(CC) $(LDFLAGS) -o $@ rlfe.o -lreadline -lhistory ${TERMCAP_LIB}
-
-rlfe.o: rlfe.c
-
-rlfe.o: $(top_srcdir)/readline.h
-rlfe.o: $(top_srcdir)/history.h
+rlcat.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
+rlptytest.o: $(top_srcdir)/readline.h $(top_srcdir)/history.h
diff --git a/contrib/libreadline/examples/histexamp.c b/contrib/libreadline/examples/histexamp.c
index e875e65..4f059c1 100644
--- a/contrib/libreadline/examples/histexamp.c
+++ b/contrib/libreadline/examples/histexamp.c
@@ -26,6 +26,8 @@
# include <readline/history.h>
#endif
+#include <string.h>
+
main (argc, argv)
int argc;
char **argv;
diff --git a/contrib/libreadline/examples/rl.c b/contrib/libreadline/examples/rl.c
index d260489..c608c15 100644
--- a/contrib/libreadline/examples/rl.c
+++ b/contrib/libreadline/examples/rl.c
@@ -31,12 +31,19 @@
#include <stdio.h>
#include <sys/types.h>
-#include "posixstat.h"
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
#if defined (READLINE_LIBRARY)
+# include "posixstat.h"
# include "readline.h"
# include "history.h"
#else
+# include <sys/stat.h>
# include <readline/readline.h>
# include <readline/history.h>
#endif
diff --git a/contrib/libreadline/examples/rlcat.c b/contrib/libreadline/examples/rlcat.c
index 176b9f4..33aea4a 100644
--- a/contrib/libreadline/examples/rlcat.c
+++ b/contrib/libreadline/examples/rlcat.c
@@ -40,6 +40,12 @@
#include <string.h>
#include <errno.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifndef errno
extern int errno;
#endif
diff --git a/contrib/libreadline/examples/rlfe/ChangeLog b/contrib/libreadline/examples/rlfe/ChangeLog
new file mode 100644
index 0000000..ba41b2b
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/ChangeLog
@@ -0,0 +1,37 @@
+2004-11-04 Per Bothner <per@bothner.com>
+
+ * pty.c: Import from screen-4.0.2.
+ * configure.in, Makefile.in, config.h.in: Set up autoconf handling,
+ copying a bunk of stuff over from screen.
+ * rlfe.c: Use OpenPTY from pty.c instead of get_master_pty.
+
+2004-11-03 Per Bothner <per@bothner.com>
+
+ * rlfe.c: Get input emphasis (boldening) more robust.
+
+ * rlfe.c: Various cleanups on comments and names.
+
+2003-11-07 Wolfgang Taeuber <wolfgang_taeuber@agilent.com>
+
+ * Specify a history file and the size of the history file with command
+ * line options; use EDITOR/VISUAL to set vi/emacs preference.
+
+1999-09-03 Chet Ramey <chet@nike.ins.cwru.edu>
+
+ * fep.c: Memmove is not universally available. This patch assumes
+ that an autoconf test has been performed, and that memcpy is
+ available without checking.
+
+ * fep.c: VDISCARD is not universally available, even when termios is.
+
+ * fep.c: If a system doesn't have TIOCSCTTY, the first `open'
+ performed after setsid allocates a controlling terminal. The
+ original code would leave the child process running on the slave pty
+ without a controlling tty if TIOCSCTTY was not available.
+
+ * fep.c: Most versions of SVR4, including solaris, don't allow
+ terminal ioctl calls on the master side of the pty.
+
+1999-08-28 Per Bothner <per@bothner.com>
+
+ * fep.c: Initial release.
diff --git a/contrib/libreadline/examples/rlfe/Makefile.in b/contrib/libreadline/examples/rlfe/Makefile.in
new file mode 100644
index 0000000..4653dec
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/Makefile.in
@@ -0,0 +1,176 @@
+#
+# Makefile template for rlfe
+#
+# See machine dependant config.h for more configuration options.
+#
+
+srcdir = @srcdir@
+VPATH = @srcdir@
+
+DESTDIR =
+
+# Where to install screen.
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+# don't forget to change mandir and infodir in doc/Makefile.
+bindir = $(exec_prefix)/bin
+
+VERSION = @VERSION@
+SCREEN = screen-$(VERSION)
+
+CC = @CC@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+#LDFLAGS = -L$(READLINE_DIR)
+LDFLAGS = @LDFLAGS@
+LIBS = -lreadline -lhistory -lncurses
+
+CPP=@CPP@
+CPP_DEPEND=$(CC) -MM
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+AWK = @AWK@
+
+OPTIONS=
+#OPTIONS= -DDEBUG
+
+SHELL=/bin/sh
+
+CFILES= rlfe.c pty.c
+HFILES= extern.h os.h screen.h
+EXTRA_DIST=configure.in configure Makefile.in config.h.in ChangeLog README
+OFILES= rlfe.o pty.o
+
+all: rlfe
+
+rlfe: $(OFILES)
+ $(CC) $(LDFLAGS) -o $@ $(OFILES) $(LIBS)
+
+rlfe-$(VERSION).tar.gz:
+ tar czf $@ $(CFILES) $(HFILES) $(EXTRA_DIST)
+
+.c.o:
+ $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(DEFS) $(OPTIONS) $(CFLAGS) $<
+
+install_bin: .version screen
+ -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \
+ then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi
+ $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN)
+ -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN)
+# This doesn't work if $(bindir)/screen is a symlink
+ -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi
+ rm -f $(DESTDIR)$(bindir)/screen
+ (cd $(DESTDIR)$(bindir) && ln -sf $(SCREEN) screen)
+ cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS)
+
+
+uninstall: .version
+ rm -f $(DESTDIR)$(bindir)/$(SCREEN)
+ rm -f $(DESTDIR)$(bindir)/screen
+ -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen
+ rm -f $(DESTDIR)$(ETCSCREENRC)
+ cd doc; $(MAKE) uninstall
+
+shadow:
+ mkdir shadow;
+ cd shadow; ln -s ../*.[ch] ../*.in ../*.sh ../configure ../doc ../terminfo ../etc .
+ rm -f shadow/term.h shadow/tty.c shadow/comm.h shadow/osdef.h
+ echo "install all Makefiles and config:" > shadow/Makefile
+ echo " rm -f config.cache" >> shadow/Makefile
+ echo " sh ./configure" >> shadow/Makefile
+
+term.h: term.c term.sh
+ AWK=$(AWK) srcdir=$(srcdir) sh $(srcdir)/term.sh
+
+kmapdef.c: term.h
+
+tty.c: tty.sh
+ sh $(srcdir)/tty.sh tty.c
+
+mostlyclean:
+ rm -f $(OFILES) rlfe *.o
+
+clean celan: mostlyclean
+ rm -f tty.c term.h comm.h osdef.h kmapdef.c core
+
+# Delete all files from the current directory that are created by
+# configuring or building the program.
+# building of term.h/comm.h requires awk. Keep it in the distribution
+# we keep config.h, as this file knows where 'make dist' finds the ETCSCREENRC.
+#distclean: mostlyclean
+# rm -f $(SCREEN).tar $(SCREEN).tar.gz
+# rm -f config.status Makefile
+# rm -f osdef.h doc/Makefile
+
+maintainer-clean:
+ @echo "This command is not even intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# Delete everything from the current directory that can be
+# reconstructed with this Makefile.
+realclean: .version mostlyclean
+ rm -f $(SCREEN).tar $(SCREEN).tar.gz
+ rm -f config.status Makefile doc/Makefile
+ rm -f tty.c term.h comm.h osdef.h kmapdef.c
+ rm -f config.h
+ echo "install all Makefiles and config:" > Makefile
+ echo " sh ./configure" >> Makefile
+
+tags TAGS: $(CFILES)
+ -ctags *.sh $(CFILES) *.h
+ -ctags -e *.sh $(CFILES) *.h
+
+dist: .version $(SCREEN).tar.gz
+
+
+# Perform self-tests (if any).
+check:
+
+config:
+ rm -f config.cache
+ sh ./configure
+
+
+###############################################################################
+
+.version:
+ @rev=`sed < $(srcdir)/patchlevel.h -n -e '/#define REV/s/#define REV *//p'`; \
+ vers=`sed < $(srcdir)/patchlevel.h -n -e '/#define VERS/s/#define VERS *//p'`; \
+ pat=`sed < $(srcdir)/patchlevel.h -n -e '/#define PATCHLEVEL/s/#define PATCHLEVEL *//p'`; \
+ if [ "$${rev}.$${vers}.$${pat}" != "$(VERSION)" ]; then \
+ echo "This distribution is screen-$${rev}.$${vers}.$${pat}, but"; \
+ echo "the Makefile is from $(VERSION). Please update!"; exit 1; fi
+
+###############################################################################
+
+mdepend: $(CFILES) term.h
+ @rm -f DEPEND ; \
+ for i in ${CFILES} ; do \
+ echo "$$i" ; \
+ echo `echo "$$i" | sed -e 's/.c$$/.o/'`": $$i" `\
+ cc -E $$i |\
+ grep '^# .*"\./.*\.h"' |\
+ (sort -t'"' -u -k 2,2 2>/dev/null || sort -t'"' -u +1 -2) |\
+ sed -e 's/.*"\.\/\(.*\)".*/\1/'\
+ ` >> DEPEND ; \
+ done
+
+depend: depend.in
+ ./config.status || ./configure
+
+depend.in: $(CFILES) term.h
+ cp Makefile.in Makefile.in~
+ sed -e '/\#\#\# Dependencies/q' < Makefile.in > tmp_make
+ for i in $(CFILES); do echo $$i; $(CPP_DEPEND) $$i >> tmp_make; done
+ mv tmp_make Makefile.in
+
+###############################################################################
+
+### Dependencies:
+pty.o: pty.c config.h
diff --git a/contrib/libreadline/examples/rlfe/README b/contrib/libreadline/examples/rlfe/README
new file mode 100644
index 0000000..9e1f689
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/README
@@ -0,0 +1,78 @@
+rlfe (ReadLine Front-End) is a "universal wrapper" around readline.
+You specify an interactive program to run (typically a shell), and
+readline is used to edit input lines.
+
+There are other such front-ends; what distinguishes this one is that
+it monitors the state of the inferior pty, and if the inferior program
+switches its terminal to raw mode, then rlfe passes your characters
+through directly. This basically means you can run your entire
+session (including bash and terminal-mode emacs) under rlfe.
+
+FEATURES
+
+* Can use all readline commands (and history) in commands that
+read input lines in "canonical mode" - even 'cat'!
+
+* Automatically switches between "readline-editing mode" and "raw mode"
+depending on the terminal mode. If the inferior program invokes
+readline itself, it will do its own line editing. (The inferior
+readline will not know about rlfe, and it will have its own history.)
+You can even run programs like 'emavs -nw' and 'vi' under rlfe.
+The goal is you could leave rlfe always on without even knowing
+about it. (We're not quite there, but it works tolerably well.)
+
+* The input line (after any prompt) is changed to bold-face.
+
+INSTALL
+
+The usual: ./configure && make && make install
+
+Note so far rlfe has only been tested on GNU Linux (Fedora Core 2)
+and Mac OS X (10.3).
+
+This assumes readline header files and libraries are in the default
+places. If not, you can create a link named readline pointing to the
+readline sources. To link with libreadline.a and libhistory.a
+you can copy or link them, or add LDFLAGS='-/path/to/readline' to
+the make command-line.
+
+USAGE
+
+Just run it. That by default runs bash. You can run some other
+command by giving it as command-line arguments.
+
+There are a few tweaks: -h allows you to name the history file,
+and -s allows you to specify its size. It default to "emacs" mode,
+but if the the environment variable EDITOR is set to "vi" that
+mode is chosen.
+
+ISSUES
+
+* The mode switching depends on the terminal mode set by the inferior
+program. Thus ssh/telnet/screen-type programs will typically be in
+raw mode, so rlfe won't be much use, even if remote programs run in
+canonical mode. The work-around is to run rlfe on the remote end.
+
+* Echo supression and prompt recognition are somewhat fragile.
+(A protocol so that the o/s tty code can reliably communicate its
+state to rlfe could solve this problem, and the previous one.)
+
+* See the intro to rlfe.c for more notes.
+
+* Assumes a VT100-compatible terminal, though that could be generalized
+if anybody cares.
+
+* Requires ncurses.
+
+* It would be useful to integrate rlfe's logic in a terminal emulator.
+That would make it easier to reposition the edit position with a mouse,
+integrate cut-and-paste with the system clipboard, and more robustly
+handle escape sequence and multi-byte characters more robustly.
+
+AUTHOR
+
+Per Bothner <per@bothner.com>
+
+LICENSE
+
+GPL.
diff --git a/contrib/libreadline/examples/rlfe/config.h.in b/contrib/libreadline/examples/rlfe/config.h.in
new file mode 100644
index 0000000..587cee2
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/config.h.in
@@ -0,0 +1,375 @@
+/* Copyright 2004 Per Bothner <per@bothner.com>
+ * Based on config.h from screen-4.0.2.
+ * Copyright (c) 1993-2000
+ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
+ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
+ * Copyright (c) 1987 Oliver Laumann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING); if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ ****************************************************************
+ * $Id: config.h.in,v 1.12 1994/05/31 12:31:36 mlschroe Exp $ FAU
+ */
+
+
+
+
+
+/**********************************************************************
+ *
+ * User Configuration Section
+ */
+
+
+/*
+ * define PTYMODE if you do not like the default of 0622, which allows
+ * public write to your pty.
+ * define PTYGROUP to some numerical group-id if you do not want the
+ * tty to be in "your" group.
+ * Note, screen is unable to change mode or group of the pty if it
+ * is not installed with sufficient privilege. (e.g. set-uid-root)
+ * define PTYROFS if the /dev/pty devices are mounted on a read-only
+ * filesystem so screen should not even attempt to set mode or group
+ * even if running as root (e.g. on TiVo).
+ */
+#undef PTYMODE
+#undef PTYGROUP
+#undef PTYROFS
+
+/*
+ * If screen is NOT installed set-uid root, screen can provide tty
+ * security by exclusively locking the ptys. While this keeps other
+ * users from opening your ptys, it also keeps your own subprocesses
+ * from being able to open /dev/tty. Define LOCKPTY to add this
+ * exclusive locking.
+ */
+#undef LOCKPTY
+
+
+/**********************************************************************
+ *
+ * End of User Configuration Section
+ *
+ * Rest of this file is modified by 'configure'
+ * Change at your own risk!
+ *
+ */
+
+/*
+ * Some defines to identify special unix variants
+ */
+#ifndef SVR4
+#undef SVR4
+#endif
+
+#ifndef _POSIX_SOURCE
+#undef _POSIX_SOURCE
+#endif
+
+/*
+ * Define POSIX if your system supports IEEE Std 1003.1-1988 (POSIX).
+ */
+#undef POSIX
+
+/*
+ * Define TERMIO if you have struct termio instead of struct sgttyb.
+ * This is usually the case for SVID systems, where BSD uses sgttyb.
+ * POSIX systems should define this anyway, even though they use
+ * struct termios.
+ */
+#undef TERMIO
+
+/*
+ * Define CYTERMIO if you have cyrillic termio modes.
+ */
+#undef CYTERMIO
+
+/*
+ * Define TERMINFO if your machine emulates the termcap routines
+ * with the terminfo database.
+ * Thus the .screenrc file is parsed for
+ * the command 'terminfo' and not 'termcap'.
+ */
+#undef TERMINFO
+
+/*
+ * If your library does not define ospeed, define this.
+ */
+#undef NEED_OSPEED
+
+/*
+ * Define SYSV if your machine is SYSV complient (Sys V, HPUX, A/UX)
+ */
+#ifndef SYSV
+#undef SYSV
+#endif
+
+/*
+ * Define SIGVOID if your signal handlers return void. On older
+ * systems, signal returns int, but on newer ones, it returns void.
+ */
+#undef SIGVOID
+
+/*
+ * Define USESIGSET if you have sigset for BSD 4.1 reliable signals.
+ */
+#undef USESIGSET
+
+/*
+ * Define SYSVSIGS if signal handlers must be reinstalled after
+ * they have been called.
+ */
+#undef SYSVSIGS
+
+/*
+ * Define BSDWAIT if your system defines a 'union wait' in <sys/wait.h>
+ *
+ * Only allow BSDWAIT i.e. wait3 on nonposix systems, since
+ * posix implies wait(3) and waitpid(3). vdlinden@fwi.uva.nl
+ *
+ */
+#ifndef POSIX
+#undef BSDWAIT
+#endif
+
+/*
+ * On RISCOS we prefer wait2() over wait3(). rouilj@sni-usa.com
+ */
+#ifdef BSDWAIT
+#undef USE_WAIT2
+#endif
+
+/*
+ * Define if you have the utempter utmp helper program
+ */
+#undef HAVE_UTEMPTER
+
+/*
+ * If ttyslot() breaks getlogin() by returning indexes to utmp entries
+ * of type DEAD_PROCESS, then our getlogin() replacement should be
+ * selected by defining BUGGYGETLOGIN.
+ */
+#undef BUGGYGETLOGIN
+
+/*
+ * If your system has the calls setreuid() and setregid(),
+ * define HAVE_SETREUID. Otherwise screen will use a forked process to
+ * safely create output files without retaining any special privileges.
+ */
+#undef HAVE_SETREUID
+
+/*
+ * If your system supports BSD4.4's seteuid() and setegid(), define
+ * HAVE_SETEUID.
+ */
+#undef HAVE_SETEUID
+
+/*
+ * If you want the "time" command to display the current load average
+ * define LOADAV. Maybe you must install screen with the needed
+ * privileges to read /dev/kmem.
+ * Note that NLIST_ stuff is only checked, when getloadavg() is not available.
+ */
+#undef LOADAV
+
+#undef LOADAV_NUM
+#undef LOADAV_TYPE
+#undef LOADAV_SCALE
+#undef LOADAV_GETLOADAVG
+#undef LOADAV_UNIX
+#undef LOADAV_AVENRUN
+#undef LOADAV_USE_NLIST64
+
+#undef NLIST_DECLARED
+#undef NLIST_STRUCT
+#undef NLIST_NAME_UNION
+
+/*
+ * If your system has the new format /etc/ttys (like 4.3 BSD) and the
+ * getttyent(3) library functions, define GETTTYENT.
+ */
+#undef GETTTYENT
+
+/*
+ * Define USEBCOPY if the bcopy/memcpy from your system's C library
+ * supports the overlapping of source and destination blocks. When
+ * undefined, screen uses its own (probably slower) version of bcopy().
+ *
+ * SYSV machines may have a working memcpy() -- Oh, this is
+ * quite unlikely. Tell me if you see one.
+ * "But then, memmove() should work, if at all available" he thought...
+ * Boing, never say "works everywhere" unless you checked SCO UNIX.
+ * Their memove fails the test in the configure script. Sigh. (Juergen)
+ */
+#undef USEBCOPY
+#undef USEMEMCPY
+#undef USEMEMMOVE
+
+/*
+ * If your system has vsprintf() and requires the use of the macros in
+ * "varargs.h" to use functions with variable arguments,
+ * define USEVARARGS.
+ */
+#undef USEVARARGS
+
+/*
+ * If your system has strerror() define this.
+ */
+#undef HAVE_STRERROR
+
+/*
+ * If the select return value doesn't treat a descriptor that is
+ * usable for reading and writing as two hits, define SELECT_BROKEN.
+ */
+#undef SELECT_BROKEN
+
+/*
+ * Define this if your system supports named pipes.
+ */
+#undef NAMEDPIPE
+
+/*
+ * Define this if your system exits select() immediatly if a pipe is
+ * opened read-only and no writer has opened it.
+ */
+#undef BROKEN_PIPE
+
+/*
+ * Define this if the unix-domain socket implementation doesn't
+ * create a socket in the filesystem.
+ */
+#undef SOCK_NOT_IN_FS
+
+/*
+ * If your system has setenv() and unsetenv() define USESETENV
+ */
+#undef USESETENV
+
+/*
+ * If your system does not come with a setenv()/putenv()/getenv()
+ * functions, you may bring in our own code by defining NEEDPUTENV.
+ */
+#undef NEEDPUTENV
+
+/*
+ * If the passwords are stored in a shadow file and you want the
+ * builtin lock to work properly, define SHADOWPW.
+ */
+#undef SHADOWPW
+
+/*
+ * If you are on a SYS V machine that restricts filename length to 14
+ * characters, you may need to enforce that by setting NAME_MAX to 14
+ */
+#undef NAME_MAX /* KEEP_UNDEF_HERE override system value */
+#undef NAME_MAX
+
+/*
+ * define HAVE_RENAME if your system has a rename() function
+ */
+#undef HAVE_RENAME
+
+/*
+ * define HAVE__EXIT if your system has the _exit() call.
+ */
+#undef HAVE__EXIT
+
+/*
+ * define HAVE_LSTAT if your system has symlinks and the lstat() call.
+ */
+#undef HAVE_LSTAT
+
+/*
+ * define HAVE_UTIMES if your system has the utimes() call.
+ */
+#undef HAVE_UTIMES
+
+/*
+ * define HAVE_FCHOWN if your system has the fchown() call.
+ */
+#undef HAVE_FCHOWN
+
+/*
+ * define HAVE_FCHMOD if your system has the fchmod() call.
+ */
+#undef HAVE_FCHMOD
+
+/*
+ * define HAVE_VSNPRINTF if your system has vsnprintf() (GNU lib).
+ */
+#undef HAVE_VSNPRINTF
+
+/*
+ * define HAVE_GETCWD if your system has the getcwd() call.
+ */
+#undef HAVE_GETCWD
+
+/*
+ * define HAVE_SETLOCALE if your system has the setlocale() call.
+ */
+#undef HAVE_SETLOCALE
+
+/*
+ * define HAVE_STRFTIME if your system has the strftime() call.
+ */
+#undef HAVE_STRFTIME
+
+/*
+ * define HAVE_NL_LANGINFO if your system has the nl_langinfo() call
+ * and <langinfo.h> defines CODESET.
+ */
+#undef HAVE_NL_LANGINFO
+
+/*
+ * Newer versions of Solaris include fdwalk, which can greatly improve
+ * the startup time of screen; otherwise screen spends a lot of time
+ * closing file descriptors.
+ */
+#undef HAVE_FDWALK
+
+/*
+ * define HAVE_DEV_PTC if you have a /dev/ptc character special
+ * device.
+ */
+#undef HAVE_DEV_PTC
+
+/*
+ * define HAVE_SVR4_PTYS if you have a /dev/ptmx character special
+ * device and support the ptsname(), grantpt(), unlockpt() functions.
+ */
+#undef HAVE_SVR4_PTYS
+
+/*
+ * define HAVE_GETPT if you have the getpt() function.
+ */
+#undef HAVE_GETPT
+
+/*
+ * define HAVE_OPENPTY if your system has the openpty() call.
+ */
+#undef HAVE_OPENPTY
+
+/*
+ * define PTYRANGE0 and or PTYRANGE1 if you want to adapt screen
+ * to unusual environments. E.g. For SunOs the defaults are "qpr" and
+ * "0123456789abcdef". For SunOs 4.1.2
+ * #define PTYRANGE0 "pqrstuvwxyzPQRST"
+ * is recommended by Dan Jacobson.
+ */
+#undef PTYRANGE0
+#undef PTYRANGE1
+
+#define USEVARARGS
diff --git a/contrib/libreadline/examples/rlfe/configure b/contrib/libreadline/examples/rlfe/configure
new file mode 100755
index 0000000..ba82026
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/configure
@@ -0,0 +1,5400 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.59.
+#
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="rlfe.c"
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP AWK WRITEPATH XTERMPATH LIBOBJS LTLIBOBJS'
+ac_subst_files=''
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval "$ac_prev=\$ac_option"
+ ac_prev=
+ continue
+ fi
+
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_option in
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+ | --da=*)
+ datadir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
+
+ -enable-* | --enable-*)
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "enable_$ac_feature='$ac_optarg'" ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst \
+ | --locals | --local | --loca | --loc | --lo)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package| sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) ac_optarg=yes ;;
+ esac
+ eval "with_$ac_package='$ac_optarg'" ;;
+
+ -without-* | --without-*)
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then its parent.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r $srcdir/$ac_unique_file; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+ if test "$ac_srcdir_defaulted" = yes; then
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+ fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+ { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pty-mode=mode default mode for ptys
+ --with-pty-group=group default group for ptys
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+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.59. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=$`echo $ac_var`
+ echo "$ac_var='"'"'$ac_val'"'"'"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h | sort
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+ if test "x$prefix" != xNONE; then
+ CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+ else
+ CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+ fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+ if test -r "$ac_site_file"; then
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+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:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
+else
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: 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:$LINENO: 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:$LINENO: 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:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: 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:$LINENO: 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
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_headers="$ac_config_headers config.h"
+
+VERSION=0.4
+
+
+
+old_CFLAGS="$CFLAGS"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+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:$LINENO: 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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+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:$LINENO: 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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:$LINENO: 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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+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:$LINENO: 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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+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:$LINENO: 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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ 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:$LINENO: 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
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+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:$LINENO: 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
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
+
+ CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# 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:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $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
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: 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:$LINENO: 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:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+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:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $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
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: 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:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $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
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: 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:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std1 is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std1. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX -qlanglvl=ansi
+# Ultrix and OSF/1 -std1
+# HP-UX 10.20 and later -Ae
+# HP-UX older versions -Aa -D_HPUX_SOURCE
+# SVR4 -Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+ x|xno)
+ echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+ *)
+ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+ CC="$CC $ac_cv_prog_cc_stdc" ;;
+esac
+
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: 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
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+else
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+echo "$as_me:$LINENO: checking for library containing strerror" >&5
+echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6
+if test "${ac_cv_search_strerror+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_strerror=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="none required"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_strerror" = no; then
+ for ac_lib in cposix; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 strerror ();
+int
+main ()
+{
+strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_strerror="-l$ac_lib"
+break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ done
+fi
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5
+echo "${ECHO_T}$ac_cv_search_strerror" >&6
+if test "$ac_cv_search_strerror" != no; then
+ test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS"
+
+fi
+
+
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+main(){exit(0);}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+if test $CC != cc ; then
+echo "Your $CC failed - restarting with CC=cc" 1>&6
+
+echo "" 1>&6
+
+CC=cc
+export CC
+exec $0 $configure_args
+fi
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+main(){exit(0);}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+exec 5>&2
+eval $ac_link
+echo "CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;" 1>&6
+
+echo "$ac_compile" 1>&6
+
+{ { echo "$as_me:$LINENO: error: Can't run the compiler - sorry" >&5
+echo "$as_me: error: Can't run the compiler - sorry" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+main()
+{
+ int __something_strange_();
+ __something_strange_(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { { echo "$as_me:$LINENO: error: Your compiler does not set the exit status - sorry" >&5
+echo "$as_me: error: Your compiler does not set the exit status - sorry" >&2;}
+ { (exit 1); exit 1; }; }
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AWK="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$AWK" && break
+done
+
+
+if test -f etc/toolcheck; then
+{ echo "$as_me:$LINENO: checking for buggy tools..." >&5
+echo "$as_me: checking for buggy tools..." >&6;}
+sh etc/toolcheck 1>&6
+fi
+
+
+{ echo "$as_me:$LINENO: checking for System V..." >&5
+echo "$as_me: checking for System V..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+#include <fcntl.h>
+int
+main ()
+{
+int x = SIGCHLD | FNDELAY;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >>confdefs.h <<\_ACEOF
+#define SYSV 1
+_ACEOF
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking for Solaris 2.x..." >&5
+echo "$as_me: checking for Solaris 2.x..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined(SVR4) && defined(sun)
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ LIBS="$LIBS -lsocket -lnsl -lkstat"
+fi
+rm -f conftest*
+
+
+
+{ echo "$as_me:$LINENO: checking select..." >&5
+echo "$as_me: checking select..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+select(0, 0, 0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS="$LIBS -lnet -lnsl"
+{ echo "$as_me:$LINENO: checking select with $LIBS..." >&5
+echo "$as_me: checking select with $LIBS..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+select(0, 0, 0, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: !!! no select - no screen" >&5
+echo "$as_me: error: !!! no select - no screen" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking select return value..." >&5
+echo "$as_me: checking select return value..." >&6;}
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+char *nam = "/tmp/conftest$$";
+
+#ifdef NAMEDPIPE
+
+#ifndef O_NONBLOCK
+#define O_NONBLOCK O_NDELAY
+#endif
+#ifndef S_IFIFO
+#define S_IFIFO 0010000
+#endif
+
+
+main()
+{
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
+
+#ifdef __FreeBSD__
+/* From Andrew A. Chernov (ache@astral.msk.su):
+ * opening RDWR fifo fails in BSD 4.4, but select return values are
+ * right.
+ */
+ exit(0);
+#endif
+ (void)alarm(5);
+#ifdef POSIX
+ if (mkfifo(nam, 0777))
+#else
+ if (mknod(nam, S_IFIFO|0777, 0))
+#endif
+ exit(1);
+ close(0);
+ if (open(nam, O_RDWR | O_NONBLOCK))
+ exit(1);
+ if (write(0, "TEST", 4) == -1)
+ exit(1);
+
+#else
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+main()
+{
+ int s1, s2, l;
+ struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
+
+ (void)alarm(5);
+ if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ exit(1);
+ a.sun_family = AF_UNIX;
+ strcpy(a.sun_path, nam);
+ (void) unlink(nam);
+ if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1)
+ exit(1);
+ if (listen(s1, 2))
+ exit(1);
+ if (fork() == 0)
+ {
+ if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ kill(getppid(), 3);
+ (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2);
+ if (write(s2, "HELLO", 5) == -1)
+ kill(getppid(), 3);
+ exit(0);
+ }
+ l = sizeof(a);
+ close(0);
+ if (accept(s1, (struct sockaddr *)&a, &l))
+ exit(1);
+#endif
+
+
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
+ exit(1);
+ if (select(1, &f, &f, 0, 0) != 2)
+ exit(1);
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "- select is ok" 1>&6
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+echo "- select can't count" 1>&6
+ cat >>confdefs.h <<\_ACEOF
+#define SELECT_BROKEN 1
+_ACEOF
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ echo "$as_me:$LINENO: checking for tgetent..." >&5
+echo "$as_me: checking for tgetent..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+tgetent((char *)0, (char *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+olibs="$LIBS"
+LIBS="-lcurses $olibs"
+{ echo "$as_me:$LINENO: checking libcurses..." >&5
+echo "$as_me: checking libcurses..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#ifdef __hpux
+__sorry_hpux_libcurses_is_totally_broken_in_10_10();
+#else
+tgetent((char *)0, (char *)0);
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS="-ltermcap $olibs"
+{ echo "$as_me:$LINENO: checking libtermcap..." >&5
+echo "$as_me: checking libtermcap..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+tgetent((char *)0, (char *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS="-ltermlib $olibs"
+{ echo "$as_me:$LINENO: checking libtermlib..." >&5
+echo "$as_me: checking libtermlib..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+tgetent((char *)0, (char *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+LIBS="-lncurses $olibs"
+{ echo "$as_me:$LINENO: checking libncurses..." >&5
+echo "$as_me: checking libncurses..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+tgetent((char *)0, (char *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: !!! no tgetent - no screen" >&5
+echo "$as_me: error: !!! no tgetent - no screen" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+main()
+{
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "- you use the termcap database" 1>&6
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+echo "- you use the terminfo database" 1>&6
+ cat >>confdefs.h <<\_ACEOF
+#define TERMINFO 1
+_ACEOF
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: checking ospeed..." >&5
+echo "$as_me: checking ospeed..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+extern short ospeed;
+int
+main ()
+{
+ospeed=5;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >>confdefs.h <<\_ACEOF
+#define NEED_OSPEED 1
+_ACEOF
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+{ echo "$as_me:$LINENO: checking for /dev/ptc..." >&5
+echo "$as_me: checking for /dev/ptc..." >&6;}
+if test -r /dev/ptc; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_PTC 1
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for SVR4 ptys..." >&5
+echo "$as_me: checking for SVR4 ptys..." >&6;}
+sysvr4ptys=
+if test -c /dev/ptmx ; then
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+ptsname(0);grantpt(0);unlockpt(0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SVR4_PTYS 1
+_ACEOF
+
+sysvr4ptys=1
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+for ac_func in getpt
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+if test -z "$sysvr4ptys"; then
+
+for ac_func in openpty
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: 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
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != $ac_func;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_var=no"
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: 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 <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
+echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
+if test "${ac_cv_lib_util_openpty+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lutil $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end 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 openpty ();
+int
+main ()
+{
+openpty ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_util_openpty=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_util_openpty=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
+echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
+if test $ac_cv_lib_util_openpty = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_OPENPTY 1
+_ACEOF
+ LIBS="$LIBS -lutil"
+fi
+
+fi
+done
+
+fi
+
+{ echo "$as_me:$LINENO: checking for ptyranges..." >&5
+echo "$as_me: checking for ptyranges..." >&6;}
+if test -d /dev/ptym ; then
+pdir='/dev/ptym'
+else
+pdir='/dev'
+fi
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef M_UNIX
+ yes;
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ ptys=`echo /dev/ptyp??`
+else
+ ptys=`echo $pdir/pty??`
+fi
+rm -f conftest*
+
+if test "$ptys" != "$pdir/pty??" ; then
+p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
+p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
+cat >>confdefs.h <<_ACEOF
+#define PTYRANGE0 "$p0"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PTYRANGE1 "$p1"
+_ACEOF
+
+fi
+
+
+# Check whether --with-pty-mode or --without-pty-mode was given.
+if test "${with_pty_mode+set}" = set; then
+ withval="$with_pty_mode"
+ ptymode="${withval}"
+fi;
+
+# Check whether --with-pty-group or --without-pty-group was given.
+if test "${with_pty_group+set}" = set; then
+ withval="$with_pty_group"
+ ptygrp="${withval}"
+fi;
+test -n "$ptymode" || ptymode=0620
+if test -n "$ptygrp" ; then
+cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PTYGROUP $ptygrp
+_ACEOF
+
+else
+
+{ echo "$as_me:$LINENO: checking default tty permissions/group..." >&5
+echo "$as_me: checking default tty permissions/group..." >&6;}
+rm -f conftest_grp
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+main()
+{
+ struct stat sb;
+ char *x,*ttyname();
+ int om, m;
+ FILE *fp;
+
+ if (!(x = ttyname(0))) exit(1);
+ if (stat(x, &sb)) exit(1);
+ om = sb.st_mode;
+ if (om & 002) exit(0);
+ m = system("mesg y");
+ if (m == -1 || m == 127) exit(1);
+ if (stat(x, &sb)) exit(1);
+ m = sb.st_mode;
+ if (chmod(x, om)) exit(1);
+ if (m & 002) exit(0);
+ if (sb.st_gid == getgid()) exit(1);
+ if (!(fp=fopen("conftest_grp", "w")))
+ exit(1);
+ fprintf(fp, "%d\n", sb.st_gid);
+ fclose(fp);
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ if test -f conftest_grp; then
+ ptygrp=`cat conftest_grp`
+ echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
+
+ cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+#define PTYGROUP $ptygrp
+_ACEOF
+
+ else
+ echo "- ptys are world accessable" 1>&6
+
+ fi
+
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+
+ WRITEPATH=''
+ XTERMPATH=''
+ # Extract the first word of "write", so it can be a program name with args.
+set dummy write; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_WRITEPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $WRITEPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_WRITEPATH="$WRITEPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_WRITEPATH="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+WRITEPATH=$ac_cv_path_WRITEPATH
+
+if test -n "$WRITEPATH"; then
+ echo "$as_me:$LINENO: result: $WRITEPATH" >&5
+echo "${ECHO_T}$WRITEPATH" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ # Extract the first word of "xterm", so it can be a program name with args.
+set dummy xterm; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_XTERMPATH+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ case $XTERMPATH in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XTERMPATH="$XTERMPATH" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_XTERMPATH="$as_dir/$ac_word$ac_exec_ext"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+ ;;
+esac
+fi
+XTERMPATH=$ac_cv_path_XTERMPATH
+
+if test -n "$XTERMPATH"; then
+ echo "$as_me:$LINENO: result: $XTERMPATH" >&5
+echo "${ECHO_T}$XTERMPATH" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ found=
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ findfollow=
+ lsfollow=
+ found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null`
+ if test -n "$found"; then
+ findfollow=-follow
+ lsfollow=L
+ fi
+ if test -n "$XTERMPATH"; then
+ ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'`
+ if test tty != "$ptygrpn"; then
+ XTERMPATH=
+ fi
+ fi
+ fi
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print`
+ if test -n "$found"; then
+ ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'`
+ echo "- pty mode: $ptymode, group: $ptygrp" 1>&6
+
+ cat >>confdefs.h <<_ACEOF
+#define PTYMODE $ptymode
+_ACEOF
+
+ cat >>confdefs.h <<_ACEOF
+#define PTYGROUP $ptygrp
+_ACEOF
+
+ else
+ echo "- ptys are world accessable" 1>&6
+
+ fi
+ else
+ echo "- can't determine - assume ptys are world accessable" 1>&6
+
+ fi
+
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest_grp
+fi
+
+if test -n "$posix" ; then
+
+echo "assuming posix signal definition" 1>&6
+
+cat >>confdefs.h <<\_ACEOF
+#define SIGVOID 1
+_ACEOF
+
+
+else
+
+{ echo "$as_me:$LINENO: checking return type of signal handlers..." >&5
+echo "$as_me: checking return type of signal handlers..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+extern void (*signal ()) ();
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\_ACEOF
+#define SIGVOID 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: checking sigset..." >&5
+echo "$as_me: checking sigset..." >&6;}
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+
+#ifdef SIGVOID
+sigset(0, (void (*)())0);
+#else
+sigset(0, (int (*)())0);
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cat >>confdefs.h <<\_ACEOF
+#define USESIGSET 1
+_ACEOF
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+{ echo "$as_me:$LINENO: checking signal implementation..." >&5
+echo "$as_me: checking signal implementation..." >&6;}
+if test "$cross_compiling" = yes; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef SIGCLD
+#define SIGCLD SIGCHLD
+#endif
+#ifdef USESIGSET
+#define signal sigset
+#endif
+
+int got;
+
+#ifdef SIGVOID
+void
+#endif
+hand()
+{
+ got++;
+}
+
+main()
+{
+ /* on hpux we use sigvec to get bsd signals */
+#ifdef __hpux
+ (void)signal(SIGCLD, hand);
+ kill(getpid(), SIGCLD);
+ kill(getpid(), SIGCLD);
+ if (got < 2)
+ exit(1);
+#endif
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+cat >>confdefs.h <<\_ACEOF
+#define SYSVSIGS 1
+_ACEOF
+
+fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+fi
+
+ ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+ if test -w $cache_file; then
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
+ else
+ echo "not updating unwritable cache $cache_file"
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
+fi
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_i=`echo "$ac_i" |
+ sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ # 2. Add them.
+ ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ $as_unset $as_var
+ fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.59. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.59,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ -*)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_option=$1
+ ac_need_defaults=false;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: 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;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ CONFIG_FILES="$CONFIG_FILES $ac_optarg"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
+ ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: 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;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
+_ACEOF
+
+
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./confstat$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@VERSION@,$VERSION,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@CPP@,$CPP,;t t
+s,@EGREP@,$EGREP,;t t
+s,@AWK@,$AWK,;t t
+s,@WRITEPATH@,$WRITEPATH,;t t
+s,@XTERMPATH@,$XTERMPATH,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+s,@LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # 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
+ if test -z "$ac_sed_cmds"; then
+ 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"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
+
+
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+ # Remove the trailing spaces.
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h. The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status. Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless. Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments. This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo ' :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+ # Write a limited-size here document to $tmp/defines.sed.
+ echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#define' lines.
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/defines.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+ rm -f conftest.defines
+ mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo ' fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+ # Write a limited-size here document to $tmp/undefs.sed.
+ echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+ # Speed up: don't consider the non `#undef'
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ # Work around the forget-to-reset-the-flag bug.
+ echo 't clr' >>$CONFIG_STATUS
+ echo ': clr' >>$CONFIG_STATUS
+ sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+ echo 'CEOF
+ sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+ rm -f $tmp/in
+ mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+ sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+ rm -f conftest.undefs
+ mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ echo "/* Generated by configure. */" >$tmp/config.h
+ else
+ echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
+ fi
+ cat $tmp/in >>$tmp/config.h
+ rm -f $tmp/in
+ if test x"$ac_file" != x-; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
+ { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { if $as_mkdir_p; then
+ mkdir -p "$ac_dir"
+ else
+ as_dir="$ac_dir"
+ as_dirs=
+ while test ! -d "$as_dir"; do
+ as_dirs="$as_dir $as_dirs"
+ as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ done
+ test ! -n "$as_dirs" || mkdir $as_dirs
+ fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }; }
+
+ rm -f $ac_file
+ mv $tmp/config.h $ac_file
+ fi
+ else
+ cat $tmp/config.h
+ rm -f $tmp/config.h
+ fi
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+
diff --git a/contrib/libreadline/examples/rlfe/configure.in b/contrib/libreadline/examples/rlfe/configure.in
new file mode 100644
index 0000000..ad68541
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/configure.in
@@ -0,0 +1,438 @@
+dnl Process this file with autoconf to produce a configure script.
+
+AC_INIT(rlfe.c)
+AC_CONFIG_HEADER(config.h)
+VERSION=0.4
+AC_SUBST(VERSION)
+
+dnl
+dnl Define some useful macros
+dnl
+AC_DEFUN(AC_PROGRAM_SOURCE,
+[AC_REQUIRE([AC_PROG_CPP])AC_PROVIDE([$0])cat > conftest.c <<EOF
+#include "confdefs.h"
+[$1]
+_CUT_HERE_
+[$2]
+EOF
+eval "$ac_cpp conftest.c 2>&5 | sed -e '1,/_CUT_HERE_/d' -e 's/ //g' > conftest.out"
+. ./conftest.out
+rm -f conftest*
+])dnl
+dnl
+define(AC_NOTE,
+[echo "$1" 1>&AC_FD_MSG
+])dnl
+
+old_CFLAGS="$CFLAGS"
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_GCC_TRADITIONAL
+AC_ISC_POSIX
+
+AC_TRY_RUN(main(){exit(0);},,[
+if test $CC != cc ; then
+AC_NOTE(Your $CC failed - restarting with CC=cc)
+AC_NOTE()
+CC=cc
+export CC
+exec $0 $configure_args
+fi
+])
+
+AC_TRY_RUN(main(){exit(0);},,
+exec 5>&2
+eval $ac_link
+AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;)
+AC_NOTE($ac_compile)
+AC_MSG_ERROR(Can't run the compiler - sorry))
+
+AC_TRY_RUN([
+main()
+{
+ int __something_strange_();
+ __something_strange_(0);
+}
+],AC_MSG_ERROR(Your compiler does not set the exit status - sorry))
+
+AC_PROG_AWK
+
+if test -f etc/toolcheck; then
+AC_CHECKING(for buggy tools)
+sh etc/toolcheck 1>&AC_FD_MSG
+fi
+
+dnl
+dnl **** special unix variants ****
+dnl
+
+AC_CHECKING(for System V)
+AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <signal.h>
+#include <fcntl.h>], [int x = SIGCHLD | FNDELAY;], , AC_DEFINE(SYSV))
+
+AC_CHECKING(for Solaris 2.x)
+AC_EGREP_CPP(yes,
+[#if defined(SVR4) && defined(sun)
+ yes
+#endif
+], LIBS="$LIBS -lsocket -lnsl -lkstat")
+
+dnl
+dnl **** select() ****
+dnl
+
+AC_CHECKING(select)
+AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],,
+LIBS="$LIBS -lnet -lnsl"
+AC_CHECKING(select with $LIBS)
+AC_TRY_LINK(,[select(0, 0, 0, 0, 0);],,
+AC_MSG_ERROR(!!! no select - no screen))
+)
+dnl
+dnl **** check the select implementation ****
+dnl
+
+AC_CHECKING(select return value)
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+char *nam = "/tmp/conftest$$";
+
+#ifdef NAMEDPIPE
+
+#ifndef O_NONBLOCK
+#define O_NONBLOCK O_NDELAY
+#endif
+#ifndef S_IFIFO
+#define S_IFIFO 0010000
+#endif
+
+
+main()
+{
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
+
+#ifdef __FreeBSD__
+/* From Andrew A. Chernov (ache@astral.msk.su):
+ * opening RDWR fifo fails in BSD 4.4, but select return values are
+ * right.
+ */
+ exit(0);
+#endif
+ (void)alarm(5);
+#ifdef POSIX
+ if (mkfifo(nam, 0777))
+#else
+ if (mknod(nam, S_IFIFO|0777, 0))
+#endif
+ exit(1);
+ close(0);
+ if (open(nam, O_RDWR | O_NONBLOCK))
+ exit(1);
+ if (write(0, "TEST", 4) == -1)
+ exit(1);
+
+#else
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
+main()
+{
+ int s1, s2, l;
+ struct sockaddr_un a;
+#ifdef FD_SET
+ fd_set f;
+#else
+ int f;
+#endif
+
+ (void)alarm(5);
+ if ((s1 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ exit(1);
+ a.sun_family = AF_UNIX;
+ strcpy(a.sun_path, nam);
+ (void) unlink(nam);
+ if (bind(s1, (struct sockaddr *) &a, strlen(nam)+2) == -1)
+ exit(1);
+ if (listen(s1, 2))
+ exit(1);
+ if (fork() == 0)
+ {
+ if ((s2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1)
+ kill(getppid(), 3);
+ (void)connect(s2, (struct sockaddr *)&a, strlen(nam) + 2);
+ if (write(s2, "HELLO", 5) == -1)
+ kill(getppid(), 3);
+ exit(0);
+ }
+ l = sizeof(a);
+ close(0);
+ if (accept(s1, (struct sockaddr *)&a, &l))
+ exit(1);
+#endif
+
+
+#ifdef FD_SET
+ FD_SET(0, &f);
+#else
+ f = 1;
+#endif
+ if (select(1, &f, 0, 0, 0) == -1)
+ exit(1);
+ if (select(1, &f, &f, 0, 0) != 2)
+ exit(1);
+ exit(0);
+}
+],AC_NOTE(- select is ok),
+AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN))
+
+dnl
+dnl **** termcap or terminfo ****
+dnl
+AC_CHECKING(for tgetent)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+olibs="$LIBS"
+LIBS="-lcurses $olibs"
+AC_CHECKING(libcurses)
+AC_TRY_LINK(,[
+#ifdef __hpux
+__sorry_hpux_libcurses_is_totally_broken_in_10_10();
+#else
+tgetent((char *)0, (char *)0);
+#endif
+],,
+LIBS="-ltermcap $olibs"
+AC_CHECKING(libtermcap)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+LIBS="-ltermlib $olibs"
+AC_CHECKING(libtermlib)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+LIBS="-lncurses $olibs"
+AC_CHECKING(libncurses)
+AC_TRY_LINK(,tgetent((char *)0, (char *)0);,,
+AC_MSG_ERROR(!!! no tgetent - no screen))))))
+
+AC_TRY_RUN([
+main()
+{
+ exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1);
+}], AC_NOTE(- you use the termcap database),
+AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO))
+AC_CHECKING(ospeed)
+AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED))
+
+dnl
+dnl **** PTY specific things ****
+dnl
+AC_CHECKING(for /dev/ptc)
+if test -r /dev/ptc; then
+AC_DEFINE(HAVE_DEV_PTC)
+fi
+
+AC_CHECKING(for SVR4 ptys)
+sysvr4ptys=
+if test -c /dev/ptmx ; then
+AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS)
+sysvr4ptys=1])
+fi
+
+AC_CHECK_FUNCS(getpt)
+
+dnl check for openpty()
+if test -z "$sysvr4ptys"; then
+AC_CHECK_FUNCS(openpty,,
+[AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])])
+fi
+
+AC_CHECKING(for ptyranges)
+if test -d /dev/ptym ; then
+pdir='/dev/ptym'
+else
+pdir='/dev'
+fi
+dnl SCO uses ptyp%d
+AC_EGREP_CPP(yes,
+[#ifdef M_UNIX
+ yes;
+#endif
+], ptys=`echo /dev/ptyp??`, ptys=`echo $pdir/pty??`)
+dnl if test -c /dev/ptyp19; then
+dnl ptys=`echo /dev/ptyp??`
+dnl else
+dnl ptys=`echo $pdir/pty??`
+dnl fi
+if test "$ptys" != "$pdir/pty??" ; then
+p0=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\).$/\1/g' | sort -u | tr -d '\012'`
+p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\012'`
+AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0")
+AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1")
+fi
+
+dnl **** pty mode/group handling ****
+dnl
+dnl support provided by Luke Mewburn <lm@rmit.edu.au>, 931222
+AC_ARG_WITH(pty-mode, [ --with-pty-mode=mode default mode for ptys], [ ptymode="${withval}" ])
+AC_ARG_WITH(pty-group, [ --with-pty-group=group default group for ptys], [ ptygrp="${withval}" ])
+test -n "$ptymode" || ptymode=0620
+if test -n "$ptygrp" ; then
+AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
+AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
+else
+
+AC_CHECKING(default tty permissions/group)
+rm -f conftest_grp
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+main()
+{
+ struct stat sb;
+ char *x,*ttyname();
+ int om, m;
+ FILE *fp;
+
+ if (!(x = ttyname(0))) exit(1);
+ if (stat(x, &sb)) exit(1);
+ om = sb.st_mode;
+ if (om & 002) exit(0);
+ m = system("mesg y");
+ if (m == -1 || m == 127) exit(1);
+ if (stat(x, &sb)) exit(1);
+ m = sb.st_mode;
+ if (chmod(x, om)) exit(1);
+ if (m & 002) exit(0);
+ if (sb.st_gid == getgid()) exit(1);
+ if (!(fp=fopen("conftest_grp", "w")))
+ exit(1);
+ fprintf(fp, "%d\n", sb.st_gid);
+ fclose(fp);
+ exit(0);
+}
+],[
+ if test -f conftest_grp; then
+ ptygrp=`cat conftest_grp`
+ AC_NOTE([- pty mode: $ptymode, group: $ptygrp])
+ AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
+ AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
+ else
+ AC_NOTE(- ptys are world accessable)
+ fi
+],[
+ WRITEPATH=''
+ XTERMPATH=''
+ AC_PATH_PROG(WRITEPATH, write)
+ AC_PATH_PROG(XTERMPATH, xterm)
+ found=
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ findfollow=
+ lsfollow=
+ found=`find $WRITEPATH $XTERMPATH -follow -print 2>/dev/null`
+ if test -n "$found"; then
+ findfollow=-follow
+ lsfollow=L
+ fi
+ if test -n "$XTERMPATH"; then
+ ptygrpn=`ls -l$lsfollow $XTERMPATH | sed -n -e 1p | $AWK '{print $4}'`
+ if test tty != "$ptygrpn"; then
+ XTERMPATH=
+ fi
+ fi
+ fi
+ if test -n "$WRITEPATH$XTERMPATH"; then
+ found=`find $WRITEPATH $XTERMPATH $findfollow -perm -2000 -print`
+ if test -n "$found"; then
+ ptygrp=`ls -ln$lsfollow $found | sed -n -e 1p | $AWK '{print $4}'`
+ AC_NOTE([- pty mode: $ptymode, group: $ptygrp])
+ AC_DEFINE_UNQUOTED(PTYMODE, $ptymode)
+ AC_DEFINE_UNQUOTED(PTYGROUP,$ptygrp)
+ else
+ AC_NOTE(- ptys are world accessable)
+ fi
+ else
+ AC_NOTE(- can't determine - assume ptys are world accessable)
+ fi
+ ]
+)
+rm -f conftest_grp
+fi
+
+dnl
+dnl **** signal handling ****
+dnl
+if test -n "$posix" ; then
+
+dnl POSIX has reliable signals with void return type.
+AC_NOTE(assuming posix signal definition)
+AC_DEFINE(SIGVOID)
+
+else
+
+AC_CHECKING(return type of signal handlers)
+AC_TRY_COMPILE(
+[#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+extern void (*signal ()) ();], [int i;], AC_DEFINE(SIGVOID))
+AC_CHECKING(sigset)
+AC_TRY_LINK([
+#include <sys/types.h>
+#include <signal.h>
+],[
+#ifdef SIGVOID
+sigset(0, (void (*)())0);
+#else
+sigset(0, (int (*)())0);
+#endif
+], AC_DEFINE(USESIGSET))
+AC_CHECKING(signal implementation)
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef SIGCLD
+#define SIGCLD SIGCHLD
+#endif
+#ifdef USESIGSET
+#define signal sigset
+#endif
+
+int got;
+
+#ifdef SIGVOID
+void
+#endif
+hand()
+{
+ got++;
+}
+
+main()
+{
+ /* on hpux we use sigvec to get bsd signals */
+#ifdef __hpux
+ (void)signal(SIGCLD, hand);
+ kill(getpid(), SIGCLD);
+ kill(getpid(), SIGCLD);
+ if (got < 2)
+ exit(1);
+#endif
+ exit(0);
+}
+],,AC_DEFINE(SYSVSIGS))
+
+fi
+
+AC_OUTPUT(Makefile)
diff --git a/contrib/libreadline/examples/rlfe/extern.h b/contrib/libreadline/examples/rlfe/extern.h
new file mode 100644
index 0000000..37d4275
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/extern.h
@@ -0,0 +1,33 @@
+/* Copyright (c) 1993-2002
+ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
+ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
+ * Copyright (c) 1987 Oliver Laumann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING); if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ ****************************************************************
+ * $Id: extern.h,v 1.18 1994/05/31 12:31:57 mlschroe Exp $ FAU
+ */
+
+#if !defined(__GNUC__) || __GNUC__ < 2
+#undef __attribute__
+#define __attribute__(x)
+#endif
+
+/* pty.c */
+extern int OpenPTY __P((char **));
+extern void InitPTY __P((int));
+
diff --git a/contrib/libreadline/examples/rlfe/os.h b/contrib/libreadline/examples/rlfe/os.h
new file mode 100644
index 0000000..0008a5c
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/os.h
@@ -0,0 +1,530 @@
+/* Copyright (c) 1993-2002
+ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
+ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
+ * Copyright (c) 1987 Oliver Laumann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING); if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ ****************************************************************
+ * $Id: os.h,v 1.10 1994/05/31 12:32:22 mlschroe Exp $ FAU
+ */
+
+#include <stdio.h>
+#include <errno.h>
+
+#include <sys/param.h>
+
+/* In strict ANSI mode, HP-UX machines define __hpux but not hpux */
+#if defined(__hpux) && !defined(hpux)
+# define hpux
+#endif
+
+#if defined(__bsdi__) || defined(__386BSD__) || defined(_CX_UX) || defined(hpux) || defined(_IBMR2) || defined(linux)
+# include <signal.h>
+#endif /* __bsdi__ || __386BSD__ || _CX_UX || hpux || _IBMR2 || linux */
+
+#ifdef ISC
+# ifdef ENAMETOOLONG
+# undef ENAMETOOLONG
+# endif
+# ifdef ENOTEMPTY
+# undef ENOTEMPTY
+# endif
+# include <sys/bsdtypes.h>
+# include <net/errno.h>
+#endif
+
+#ifdef sun
+# define getpgrp __getpgrp
+# define exit __exit
+#endif
+#ifdef POSIX
+# include <unistd.h>
+# if defined(__STDC__)
+# include <stdlib.h>
+# endif /* __STDC__ */
+#endif /* POSIX */
+#ifdef sun
+# undef getpgrp
+# undef exit
+#endif /* sun */
+
+#ifndef linux /* all done in <errno.h> */
+extern int errno;
+#endif /* linux */
+#ifndef HAVE_STRERROR
+/* No macros, please */
+#undef strerror
+#endif
+
+#if !defined(SYSV) && !defined(linux)
+# ifdef NEWSOS
+# define strlen ___strlen___
+# include <strings.h>
+# undef strlen
+# else /* NEWSOS */
+# include <strings.h>
+# endif /* NEWSOS */
+#else /* SYSV */
+# if defined(SVR4) || defined(NEWSOS)
+# define strlen ___strlen___
+# include <string.h>
+# undef strlen
+# if !defined(NEWSOS) && !defined(__hpux)
+ extern size_t strlen(const char *);
+# endif
+# else /* SVR4 */
+# include <string.h>
+# endif /* SVR4 */
+#endif /* SYSV */
+
+#ifdef USEVARARGS
+# if defined(__STDC__)
+# include <stdarg.h>
+# define VA_LIST(var) va_list var;
+# define VA_DOTS ...
+# define VA_DECL
+# define VA_START(ap, fmt) va_start(ap, fmt)
+# define VA_ARGS(ap) ap
+# define VA_END(ap) va_end(ap)
+# else
+# include <varargs.h>
+# define VA_LIST(var) va_list var;
+# define VA_DOTS va_alist
+# define VA_DECL va_dcl
+# define VA_START(ap, fmt) va_start(ap)
+# define VA_ARGS(ap) ap
+# define VA_END(ap) va_end(ap)
+# endif
+#else
+# define VA_LIST(var)
+# define VA_DOTS p1, p2, p3, p4, p5, p6
+# define VA_DECL unsigned long VA_DOTS;
+# define VA_START(ap, fmt)
+# define VA_ARGS(ap) VA_DOTS
+# define VA_END(ap)
+# undef vsnprintf
+# define vsnprintf xsnprintf
+#endif
+
+#if !defined(sun) && !defined(B43) && !defined(ISC) && !defined(pyr) && !defined(_CX_UX)
+# include <time.h>
+#endif
+#include <sys/time.h>
+
+#ifdef M_UNIX /* SCO */
+# include <sys/stream.h>
+# include <sys/ptem.h>
+# define ftruncate(fd, s) chsize(fd, s)
+#endif
+
+#ifdef SYSV
+# define index strchr
+# define rindex strrchr
+# define bzero(poi,len) memset(poi,0,len)
+# define bcmp memcmp
+# define killpg(pgrp,sig) kill( -(pgrp), sig)
+#endif
+
+#ifndef HAVE_GETCWD
+# define getcwd(b,l) getwd(b)
+#endif
+
+#ifndef USEBCOPY
+# ifdef USEMEMMOVE
+# define bcopy(s,d,len) memmove(d,s,len)
+# else
+# ifdef USEMEMCPY
+# define bcopy(s,d,len) memcpy(d,s,len)
+# else
+# define NEED_OWN_BCOPY
+# define bcopy xbcopy
+# endif
+# endif
+#endif
+
+#ifdef hpux
+# define setreuid(ruid, euid) setresuid(ruid, euid, -1)
+# define setregid(rgid, egid) setresgid(rgid, egid, -1)
+#endif
+
+#if defined(HAVE_SETEUID) || defined(HAVE_SETREUID)
+# define USE_SETEUID
+#endif
+
+#if !defined(HAVE__EXIT) && !defined(_exit)
+#define _exit(x) exit(x)
+#endif
+
+#ifndef HAVE_UTIMES
+# define utimes utime
+#endif
+
+#ifdef BUILTIN_TELNET
+# include <netinet/in.h>
+# include <arpa/inet.h>
+#endif
+
+#if defined(USE_LOCALE) && (!defined(HAVE_SETLOCALE) || !defined(HAVE_STRFTIME))
+# undef USE_LOCALE
+#endif
+
+/*****************************************************************
+ * terminal handling
+ */
+
+#ifdef POSIX
+# include <termios.h>
+# ifdef hpux
+# include <bsdtty.h>
+# endif /* hpux */
+# ifdef NCCS
+# define MAXCC NCCS
+# else
+# define MAXCC 256
+# endif
+#else /* POSIX */
+# ifdef TERMIO
+# include <termio.h>
+# ifdef NCC
+# define MAXCC NCC
+# else
+# define MAXCC 256
+# endif
+# ifdef CYTERMIO
+# include <cytermio.h>
+# endif
+# else /* TERMIO */
+# include <sgtty.h>
+# endif /* TERMIO */
+#endif /* POSIX */
+
+#ifndef VDISABLE
+# ifdef _POSIX_VDISABLE
+# define VDISABLE _POSIX_VDISABLE
+# else
+# define VDISABLE 0377
+# endif /* _POSIX_VDISABLE */
+#endif /* !VDISABLE */
+
+
+/* on sgi, regardless of the stream head's read mode (RNORM/RMSGN/RMSGD)
+ * TIOCPKT mode causes data loss if our buffer is too small (IOSIZE)
+ * to hold the whole packet at first read().
+ * (Marc Boucher)
+ *
+ * matthew green:
+ * TIOCPKT is broken on dgux 5.4.1 generic AViiON mc88100
+ *
+ * Joe Traister: On AIX4, programs like irc won't work if screen
+ * uses TIOCPKT (select fails to return on pty read).
+ */
+#if defined(sgi) || defined(DGUX) || defined(_IBMR2)
+# undef TIOCPKT
+#endif
+
+/* linux ncurses is broken, we have to use our own tputs */
+#if defined(linux) && defined(TERMINFO)
+# define tputs xtputs
+#endif
+
+/* Alexandre Oliva: SVR4 style ptys don't work with osf */
+#ifdef __osf__
+# undef HAVE_SVR4_PTYS
+#endif
+
+/*****************************************************************
+ * utmp handling
+ */
+
+#ifdef GETUTENT
+ typedef char *slot_t;
+#else
+ typedef int slot_t;
+#endif
+
+#if defined(UTMPOK) || defined(BUGGYGETLOGIN)
+# if defined(SVR4) && !defined(DGUX) && !defined(__hpux) && !defined(linux)
+# include <utmpx.h>
+# define UTMPFILE UTMPX_FILE
+# define utmp utmpx
+# define getutent getutxent
+# define getutid getutxid
+# define getutline getutxline
+# define pututline pututxline
+# define setutent setutxent
+# define endutent endutxent
+# define ut_time ut_xtime
+# else /* SVR4 */
+# include <utmp.h>
+# endif /* SVR4 */
+# ifdef apollo
+ /*
+ * We don't have GETUTENT, so we dig into utmp ourselves.
+ * But we save the permanent filedescriptor and
+ * open utmp just when we need to.
+ * This code supports an unsorted utmp. jw.
+ */
+# define UTNOKEEP
+# endif /* apollo */
+
+# ifndef UTMPFILE
+# ifdef UTMP_FILE
+# define UTMPFILE UTMP_FILE
+# else
+# ifdef _PATH_UTMP
+# define UTMPFILE _PATH_UTMP
+# else
+# define UTMPFILE "/etc/utmp"
+# endif /* _PATH_UTMP */
+# endif
+# endif
+
+#endif /* UTMPOK || BUGGYGETLOGIN */
+
+#if !defined(UTMPOK) && defined(USRLIMIT)
+# undef USRLIMIT
+#endif
+
+#ifdef LOGOUTOK
+# ifndef LOGINDEFAULT
+# define LOGINDEFAULT 0
+# endif
+#else
+# ifdef LOGINDEFAULT
+# undef LOGINDEFAULT
+# endif
+# define LOGINDEFAULT 1
+#endif
+
+
+/*****************************************************************
+ * file stuff
+ */
+
+#ifndef F_OK
+#define F_OK 0
+#endif
+#ifndef X_OK
+#define X_OK 1
+#endif
+#ifndef W_OK
+#define W_OK 2
+#endif
+#ifndef R_OK
+#define R_OK 4
+#endif
+
+#ifndef S_IFIFO
+#define S_IFIFO 0010000
+#endif
+#ifndef S_IREAD
+#define S_IREAD 0000400
+#endif
+#ifndef S_IWRITE
+#define S_IWRITE 0000200
+#endif
+#ifndef S_IEXEC
+#define S_IEXEC 0000100
+#endif
+
+#if defined(S_IFIFO) && defined(S_IFMT) && !defined(S_ISFIFO)
+#define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO)
+#endif
+#if defined(S_IFSOCK) && defined(S_IFMT) && !defined(S_ISSOCK)
+#define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK)
+#endif
+#if defined(S_IFCHR) && defined(S_IFMT) && !defined(S_ISCHR)
+#define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR)
+#endif
+#if defined(S_IFDIR) && defined(S_IFMT) && !defined(S_ISDIR)
+#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
+#endif
+#if defined(S_IFLNK) && defined(S_IFMT) && !defined(S_ISLNK)
+#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
+#endif
+
+/*
+ * SunOS 4.1.3: `man 2V open' has only one line that mentions O_NOBLOCK:
+ *
+ * O_NONBLOCK Same as O_NDELAY above.
+ *
+ * on the very same SunOS 4.1.3, I traced the open system call and found
+ * that an open("/dev/ttyy08", O_RDWR|O_NONBLOCK|O_NOCTTY) was blocked,
+ * whereas open("/dev/ttyy08", O_RDWR|O_NDELAY |O_NOCTTY) went through.
+ *
+ * For this simple reason I now favour O_NDELAY. jw. 4.5.95
+ */
+#if defined(sun) && !defined(SVR4)
+# undef O_NONBLOCK
+#endif
+
+#if !defined(O_NONBLOCK) && defined(O_NDELAY)
+# define O_NONBLOCK O_NDELAY
+#endif
+
+#if !defined(FNBLOCK) && defined(FNONBLOCK)
+# define FNBLOCK FNONBLOCK
+#endif
+#if !defined(FNBLOCK) && defined(FNDELAY)
+# define FNBLOCK FNDELAY
+#endif
+#if !defined(FNBLOCK) && defined(O_NONBLOCK)
+# define FNBLOCK O_NONBLOCK
+#endif
+
+#ifndef POSIX
+#undef mkfifo
+#define mkfifo(n,m) mknod(n,S_IFIFO|(m),0)
+#endif
+
+#if !defined(HAVE_LSTAT) && !defined(lstat)
+# define lstat stat
+#endif
+
+/*****************************************************************
+ * signal handling
+ */
+
+#ifdef SIGVOID
+# define SIGRETURN
+# define sigret_t void
+#else
+# define SIGRETURN return 0;
+# define sigret_t int
+#endif
+
+/* Geeeee, reverse it? */
+#if defined(SVR4) || (defined(SYSV) && defined(ISC)) || defined(_AIX) || defined(linux) || defined(ultrix) || defined(__386BSD__) || defined(__bsdi__) || defined(POSIX) || defined(NeXT)
+# define SIGHASARG
+#endif
+
+#ifdef SIGHASARG
+# define SIGPROTOARG (int)
+# define SIGDEFARG (sigsig) int sigsig;
+# define SIGARG 0
+#else
+# define SIGPROTOARG (void)
+# define SIGDEFARG ()
+# define SIGARG
+#endif
+
+#ifndef SIGCHLD
+#define SIGCHLD SIGCLD
+#endif
+
+#if defined(POSIX) || defined(hpux)
+# define signal xsignal
+#else
+# ifdef USESIGSET
+# define signal sigset
+# endif /* USESIGSET */
+#endif
+
+/* used in screen.c and attacher.c */
+#ifndef NSIG /* kbeal needs these w/o SYSV */
+# define NSIG 32
+#endif /* !NSIG */
+
+
+/*****************************************************************
+ * Wait stuff
+ */
+
+#if (!defined(sysV68) && !defined(M_XENIX)) || defined(NeXT) || defined(M_UNIX)
+# include <sys/wait.h>
+#endif
+
+#ifndef WTERMSIG
+# ifndef BSDWAIT /* if wait is NOT a union: */
+# define WTERMSIG(status) (status & 0177)
+# else
+# define WTERMSIG(status) status.w_T.w_Termsig
+# endif
+#endif
+
+#ifndef WSTOPSIG
+# ifndef BSDWAIT /* if wait is NOT a union: */
+# define WSTOPSIG(status) ((status >> 8) & 0377)
+# else
+# define WSTOPSIG(status) status.w_S.w_Stopsig
+# endif
+#endif
+
+/* NET-2 uses WCOREDUMP */
+#if defined(WCOREDUMP) && !defined(WIFCORESIG)
+# define WIFCORESIG(status) WCOREDUMP(status)
+#endif
+
+#ifndef WIFCORESIG
+# ifndef BSDWAIT /* if wait is NOT a union: */
+# define WIFCORESIG(status) (status & 0200)
+# else
+# define WIFCORESIG(status) status.w_T.w_Coredump
+# endif
+#endif
+
+#ifndef WEXITSTATUS
+# ifndef BSDWAIT /* if wait is NOT a union: */
+# define WEXITSTATUS(status) ((status >> 8) & 0377)
+# else
+# define WEXITSTATUS(status) status.w_T.w_Retcode
+# endif
+#endif
+
+
+/*****************************************************************
+ * select stuff
+ */
+
+#if defined(M_XENIX) || defined(M_UNIX) || defined(_SEQUENT_)
+#include <sys/select.h> /* for timeval + FD... */
+#endif
+
+/*
+ * SunOS 3.5 - Tom Schmidt - Micron Semiconductor, Inc - 27-Jul-93
+ * tschmidt@vax.micron.com
+ */
+#ifndef FD_SET
+# ifndef SUNOS3
+typedef struct fd_set { int fds_bits[1]; } fd_set;
+# endif
+# define FD_ZERO(fd) ((fd)->fds_bits[0] = 0)
+# define FD_SET(b, fd) ((fd)->fds_bits[0] |= 1 << (b))
+# define FD_ISSET(b, fd) ((fd)->fds_bits[0] & 1 << (b))
+# define FD_SETSIZE 32
+#endif
+
+
+/*****************************************************************
+ * user defineable stuff
+ */
+
+#ifndef TERMCAP_BUFSIZE
+# define TERMCAP_BUFSIZE 2048
+#endif
+
+#ifndef MAXPATHLEN
+# define MAXPATHLEN 1024
+#endif
+
+/*
+ * you may try to vary this value. Use low values if your (VMS) system
+ * tends to choke when pasting. Use high values if you want to test
+ * how many characters your pty's can buffer.
+ */
+#define IOSIZE 4096
+
diff --git a/contrib/libreadline/examples/rlfe/pty.c b/contrib/libreadline/examples/rlfe/pty.c
new file mode 100644
index 0000000..f89d44c
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/pty.c
@@ -0,0 +1,387 @@
+/* Copyright (c) 1993-2002
+ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de)
+ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de)
+ * Copyright (c) 1987 Oliver Laumann
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program (see the file COPYING); if not, write to the
+ * Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+ *
+ ****************************************************************
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <signal.h>
+
+#include "config.h"
+#include "screen.h"
+
+#ifndef sun
+# include <sys/ioctl.h>
+#endif
+
+/* for solaris 2.1, Unixware (SVR4.2) and possibly others */
+#ifdef HAVE_SVR4_PTYS
+# include <sys/stropts.h>
+#endif
+
+#if defined(sun) && defined(LOCKPTY) && !defined(TIOCEXCL)
+# include <sys/ttold.h>
+#endif
+
+#ifdef ISC
+# include <sys/tty.h>
+# include <sys/sioctl.h>
+# include <sys/pty.h>
+#endif
+
+#ifdef sgi
+# include <sys/sysmacros.h>
+#endif /* sgi */
+
+#include "extern.h"
+
+/*
+ * if no PTYRANGE[01] is in the config file, we pick a default
+ */
+#ifndef PTYRANGE0
+# define PTYRANGE0 "qpr"
+#endif
+#ifndef PTYRANGE1
+# define PTYRANGE1 "0123456789abcdef"
+#endif
+
+/* SVR4 pseudo ttys don't seem to work with SCO-5 */
+#ifdef M_UNIX
+# undef HAVE_SVR4_PTYS
+#endif
+
+extern int eff_uid;
+
+/* used for opening a new pty-pair: */
+static char PtyName[32], TtyName[32];
+
+#if !(defined(sequent) || defined(_SEQUENT_) || defined(HAVE_SVR4_PTYS))
+# ifdef hpux
+static char PtyProto[] = "/dev/ptym/ptyXY";
+static char TtyProto[] = "/dev/pty/ttyXY";
+# else
+# ifdef M_UNIX
+static char PtyProto[] = "/dev/ptypXY";
+static char TtyProto[] = "/dev/ttypXY";
+# else
+static char PtyProto[] = "/dev/ptyXY";
+static char TtyProto[] = "/dev/ttyXY";
+# endif
+# endif /* hpux */
+#endif
+
+static void initmaster __P((int));
+
+#if defined(sun)
+/* sun's utmp_update program opens the salve side, thus corrupting
+ */
+int pty_preopen = 1;
+#else
+int pty_preopen = 0;
+#endif
+
+/*
+ * Open all ptys with O_NOCTTY, just to be on the safe side
+ * (RISCos mips breaks otherwise)
+ */
+#ifndef O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
+/***************************************************************/
+
+static void
+initmaster(f)
+int f;
+{
+#ifdef POSIX
+ tcflush(f, TCIOFLUSH);
+#else
+# ifdef TIOCFLUSH
+ (void) ioctl(f, TIOCFLUSH, (char *) 0);
+# endif
+#endif
+#ifdef LOCKPTY
+ (void) ioctl(f, TIOCEXCL, (char *) 0);
+#endif
+}
+
+void
+InitPTY(f)
+int f;
+{
+ if (f < 0)
+ return;
+#if defined(I_PUSH) && defined(HAVE_SVR4_PTYS) && !defined(sgi) && !defined(linux) && !defined(__osf__) && !defined(M_UNIX)
+ if (ioctl(f, I_PUSH, "ptem"))
+ Panic(errno, "InitPTY: cannot I_PUSH ptem");
+ if (ioctl(f, I_PUSH, "ldterm"))
+ Panic(errno, "InitPTY: cannot I_PUSH ldterm");
+# ifdef sun
+ if (ioctl(f, I_PUSH, "ttcompat"))
+ Panic(errno, "InitPTY: cannot I_PUSH ttcompat");
+# endif
+#endif
+}
+
+/***************************************************************/
+
+#if defined(OSX) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ register int f;
+ if ((f = open_controlling_pty(TtyName)) < 0)
+ return -1;
+ initmaster(f);
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if (defined(sequent) || defined(_SEQUENT_)) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ char *m, *s;
+ register int f;
+
+ if ((f = getpseudotty(&s, &m)) < 0)
+ return -1;
+#ifdef _SEQUENT_
+ fvhangup(s);
+#endif
+ strncpy(PtyName, m, sizeof(PtyName));
+ strncpy(TtyName, s, sizeof(TtyName));
+ initmaster(f);
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if defined(__sgi) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ int f;
+ char *name, *_getpty();
+ sigret_t (*sigcld)__P(SIGPROTOARG);
+
+ /*
+ * SIGCHLD set to SIG_DFL for _getpty() because it may fork() and
+ * exec() /usr/adm/mkpts
+ */
+ sigcld = signal(SIGCHLD, SIG_DFL);
+ name = _getpty(&f, O_RDWR | O_NONBLOCK, 0600, 0);
+ signal(SIGCHLD, sigcld);
+
+ if (name == 0)
+ return -1;
+ initmaster(f);
+ *ttyn = name;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if defined(MIPS) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ register int f;
+ struct stat buf;
+
+ strcpy(PtyName, "/dev/ptc");
+ if ((f = open(PtyName, O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0)
+ return -1;
+ if (fstat(f, &buf) < 0)
+ {
+ close(f);
+ return -1;
+ }
+ sprintf(TtyName, "/dev/ttyq%d", minor(buf.st_rdev));
+ initmaster(f);
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if defined(HAVE_SVR4_PTYS) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ register int f;
+ char *m, *ptsname();
+ int unlockpt __P((int)), grantpt __P((int));
+#if defined(HAVE_GETPT) && defined(linux)
+ int getpt __P((void));
+#endif
+ sigret_t (*sigcld)__P(SIGPROTOARG);
+
+ strcpy(PtyName, "/dev/ptmx");
+#if defined(HAVE_GETPT) && defined(linux)
+ if ((f = getpt()) == -1)
+#else
+ if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
+#endif
+ return -1;
+
+ /*
+ * SIGCHLD set to SIG_DFL for grantpt() because it fork()s and
+ * exec()s pt_chmod
+ */
+ sigcld = signal(SIGCHLD, SIG_DFL);
+ if ((m = ptsname(f)) == NULL || grantpt(f) || unlockpt(f))
+ {
+ signal(SIGCHLD, sigcld);
+ close(f);
+ return -1;
+ }
+ signal(SIGCHLD, sigcld);
+ strncpy(TtyName, m, sizeof(TtyName));
+ initmaster(f);
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if defined(_AIX) && defined(HAVE_DEV_PTC) && !defined(PTY_DONE)
+#define PTY_DONE
+
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ register int f;
+
+ /* a dumb looking loop replaced by mycrofts code: */
+ strcpy (PtyName, "/dev/ptc");
+ if ((f = open (PtyName, O_RDWR | O_NOCTTY)) < 0)
+ return -1;
+ strncpy(TtyName, ttyname(f), sizeof(TtyName));
+ if (eff_uid && access(TtyName, R_OK | W_OK))
+ {
+ close(f);
+ return -1;
+ }
+ initmaster(f);
+# ifdef _IBMR2
+ pty_preopen = 1;
+# endif
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#if defined(HAVE_OPENPTY) && !defined(PTY_DONE)
+#define PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ int f, s;
+ if (openpty(&f, &s, TtyName, NULL, NULL) != 0)
+ return -1;
+ close(s);
+ initmaster(f);
+ pty_preopen = 1;
+ *ttyn = TtyName;
+ return f;
+}
+#endif
+
+/***************************************************************/
+
+#ifndef PTY_DONE
+int
+OpenPTY(ttyn)
+char **ttyn;
+{
+ register char *p, *q, *l, *d;
+ register int f;
+
+ debug("OpenPTY: Using BSD style ptys.\n");
+ strcpy(PtyName, PtyProto);
+ strcpy(TtyName, TtyProto);
+ for (p = PtyName; *p != 'X'; p++)
+ ;
+ for (q = TtyName; *q != 'X'; q++)
+ ;
+ for (l = PTYRANGE0; (*p = *l) != '\0'; l++)
+ {
+ for (d = PTYRANGE1; (p[1] = *d) != '\0'; d++)
+ {
+ debug1("OpenPTY tries '%s'\n", PtyName);
+ if ((f = open(PtyName, O_RDWR | O_NOCTTY)) == -1)
+ continue;
+ q[0] = *l;
+ q[1] = *d;
+ if (eff_uid && access(TtyName, R_OK | W_OK))
+ {
+ close(f);
+ continue;
+ }
+#if defined(sun) && defined(TIOCGPGRP) && !defined(SUNOS3)
+ /* Hack to ensure that the slave side of the pty is
+ * unused. May not work in anything other than SunOS4.1
+ */
+ {
+ int pgrp;
+
+ /* tcgetpgrp does not work (uses TIOCGETPGRP)! */
+ if (ioctl(f, TIOCGPGRP, (char *)&pgrp) != -1 || errno != EIO)
+ {
+ close(f);
+ continue;
+ }
+ }
+#endif
+ initmaster(f);
+ *ttyn = TtyName;
+ return f;
+ }
+ }
+ return -1;
+}
+#endif
+
diff --git a/contrib/libreadline/examples/rlfe/rlfe.c b/contrib/libreadline/examples/rlfe/rlfe.c
new file mode 100644
index 0000000..6d747dc
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/rlfe.c
@@ -0,0 +1,780 @@
+/* A front-end using readline to "cook" input lines.
+ *
+ * Copyright (C) 2004, 1999 Per Bothner
+ *
+ * This front-end program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as published
+ * by the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Some code from Johnson & Troan: "Linux Application Development"
+ * (Addison-Wesley, 1998) was used directly or for inspiration.
+ *
+ * 2003-11-07 Wolfgang Taeuber <wolfgang_taeuber@agilent.com>
+ * Specify a history file and the size of the history file with command
+ * line options; use EDITOR/VISUAL to set vi/emacs preference.
+ */
+
+/* PROBLEMS/TODO:
+ *
+ * Only tested under GNU/Linux and Mac OS 10.x; needs to be ported.
+ *
+ * Switching between line-editing-mode vs raw-char-mode depending on
+ * what tcgetattr returns is inherently not robust, plus it doesn't
+ * work when ssh/telnetting in. A better solution is possible if the
+ * tty system can send in-line escape sequences indicating the current
+ * mode, echo'd input, etc. That would also allow a user preference
+ * to set different colors for prompt, input, stdout, and stderr.
+ *
+ * When running mc -c under the Linux console, mc does not recognize
+ * mouse clicks, which mc does when not running under rlfe.
+ *
+ * Pasting selected text containing tabs is like hitting the tab character,
+ * which invokes readline completion. We don't want this. I don't know
+ * if this is fixable without integrating rlfe into a terminal emulator.
+ *
+ * Echo suppression is a kludge, but can only be avoided with better kernel
+ * support: We need a tty mode to disable "real" echoing, while still
+ * letting the inferior think its tty driver to doing echoing.
+ * Stevens's book claims SCR$ and BSD4.3+ have TIOCREMOTE.
+ *
+ * The latest readline may have some hooks we can use to avoid having
+ * to back up the prompt. (See HAVE_ALREADY_PROMPTED.)
+ *
+ * Desirable readline feature: When in cooked no-echo mode (e.g. password),
+ * echo characters are they are types with '*', but remove them when done.
+ *
+ * Asynchronous output while we're editing an input line should be
+ * inserted in the output view *before* the input line, so that the
+ * lines being edited (with the prompt) float at the end of the input.
+ *
+ * A "page mode" option to emulate more/less behavior: At each page of
+ * output, pause for a user command. This required parsing the output
+ * to keep track of line lengths. It also requires remembering the
+ * output, if we want an option to scroll back, which suggests that
+ * this should be integrated with a terminal emulator like xterm.
+ */
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <signal.h>
+#include <netdb.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <grp.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <sys/ioctl.h>
+#include <termios.h>
+
+#include "config.h"
+
+#ifdef READLINE_LIBRARY
+# include "readline.h"
+# include "history.h"
+#else
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
+
+#ifndef COMMAND
+#define COMMAND "/bin/bash"
+#endif
+#ifndef COMMAND_ARGS
+#define COMMAND_ARGS COMMAND
+#endif
+
+#ifndef ALT_COMMAND
+#define ALT_COMMAND "/bin/sh"
+#endif
+#ifndef ALT_COMMAND_ARGS
+#define ALT_COMMAND_ARGS ALT_COMMAND
+#endif
+
+#ifndef HAVE_MEMMOVE
+# if __GNUC__ > 1
+# define memmove(d, s, n) __builtin_memcpy(d, s, n)
+# else
+# define memmove(d, s, n) memcpy(d, s, n)
+# endif
+#else
+# define memmove(d, s, n) memcpy(d, s, n)
+#endif
+
+#define APPLICATION_NAME "rlfe"
+
+static int in_from_inferior_fd;
+static int out_to_inferior_fd;
+static void set_edit_mode ();
+static void usage_exit ();
+static char *hist_file = 0;
+static int hist_size = 0;
+
+/* Unfortunately, we cannot safely display echo from the inferior process.
+ The reason is that the echo bit in the pty is "owned" by the inferior,
+ and if we try to turn it off, we could confuse the inferior.
+ Thus, when echoing, we get echo twice: First readline echoes while
+ we're actually editing. Then we send the line to the inferior, and the
+ terminal driver send back an extra echo.
+ The work-around is to remember the input lines, and when we see that
+ line come back, we supress the output.
+ A better solution (supposedly available on SVR4) would be a smarter
+ terminal driver, with more flags ... */
+#define ECHO_SUPPRESS_MAX 1024
+char echo_suppress_buffer[ECHO_SUPPRESS_MAX];
+int echo_suppress_start = 0;
+int echo_suppress_limit = 0;
+
+/*#define DEBUG*/
+
+#ifdef DEBUG
+FILE *logfile = NULL;
+#define DPRINT0(FMT) (fprintf(logfile, FMT), fflush(logfile))
+#define DPRINT1(FMT, V1) (fprintf(logfile, FMT, V1), fflush(logfile))
+#define DPRINT2(FMT, V1, V2) (fprintf(logfile, FMT, V1, V2), fflush(logfile))
+#else
+#define DPRINT0(FMT) ((void) 0) /* Do nothing */
+#define DPRINT1(FMT, V1) ((void) 0) /* Do nothing */
+#define DPRINT2(FMT, V1, V2) ((void) 0) /* Do nothing */
+#endif
+
+struct termios orig_term;
+
+/* Pid of child process. */
+static pid_t child = -1;
+
+static void
+sig_child (int signo)
+{
+ int status;
+ wait (&status);
+ if (hist_file != 0)
+ {
+ write_history (hist_file);
+ if (hist_size)
+ history_truncate_file (hist_file, hist_size);
+ }
+ DPRINT0 ("(Child process died.)\n");
+ tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
+ exit (0);
+}
+
+volatile int propagate_sigwinch = 0;
+
+/* sigwinch_handler
+ * propagate window size changes from input file descriptor to
+ * master side of pty.
+ */
+void sigwinch_handler(int signal) {
+ propagate_sigwinch = 1;
+}
+
+
+/* get_slave_pty() returns an integer file descriptor.
+ * If it returns < 0, an error has occurred.
+ * Otherwise, it has returned the slave file descriptor.
+ */
+
+int get_slave_pty(char *name) {
+ struct group *gptr;
+ gid_t gid;
+ int slave = -1;
+
+ /* chown/chmod the corresponding pty, if possible.
+ * This will only work if the process has root permissions.
+ * Alternatively, write and exec a small setuid program that
+ * does just this.
+ */
+ if ((gptr = getgrnam("tty")) != 0) {
+ gid = gptr->gr_gid;
+ } else {
+ /* if the tty group does not exist, don't change the
+ * group on the slave pty, only the owner
+ */
+ gid = -1;
+ }
+
+ /* Note that we do not check for errors here. If this is code
+ * where these actions are critical, check for errors!
+ */
+ chown(name, getuid(), gid);
+ /* This code only makes the slave read/writeable for the user.
+ * If this is for an interactive shell that will want to
+ * receive "write" and "wall" messages, OR S_IWGRP into the
+ * second argument below.
+ */
+ chmod(name, S_IRUSR|S_IWUSR);
+
+ /* open the corresponding slave pty */
+ slave = open(name, O_RDWR);
+ return (slave);
+}
+
+/* Certain special characters, such as ctrl/C, we want to pass directly
+ to the inferior, rather than letting readline handle them. */
+
+static char special_chars[20];
+static int special_chars_count;
+
+static void
+add_special_char(int ch)
+{
+ if (ch != 0)
+ special_chars[special_chars_count++] = ch;
+}
+
+static int eof_char;
+
+static int
+is_special_char(int ch)
+{
+ int i;
+#if 0
+ if (ch == eof_char && rl_point == rl_end)
+ return 1;
+#endif
+ for (i = special_chars_count; --i >= 0; )
+ if (special_chars[i] == ch)
+ return 1;
+ return 0;
+}
+
+static char buf[1024];
+/* buf[0 .. buf_count-1] is the what has been emitted on the current line.
+ It is used as the readline prompt. */
+static int buf_count = 0;
+
+int do_emphasize_input = 1;
+int current_emphasize_input;
+
+char *start_input_mode = "\033[1m";
+char *end_input_mode = "\033[0m";
+
+int num_keys = 0;
+
+static void maybe_emphasize_input (int on)
+{
+ if (on == current_emphasize_input
+ || (on && ! do_emphasize_input))
+ return;
+ fprintf (rl_outstream, on ? start_input_mode : end_input_mode);
+ fflush (rl_outstream);
+ current_emphasize_input = on;
+}
+
+static void
+null_prep_terminal (int meta)
+{
+}
+
+static void
+null_deprep_terminal ()
+{
+ maybe_emphasize_input (0);
+}
+
+static int
+pre_input_change_mode (void)
+{
+ return 0;
+}
+
+char pending_special_char;
+
+static void
+line_handler (char *line)
+{
+ if (line == NULL)
+ {
+ char buf[1];
+ DPRINT0("saw eof!\n");
+ buf[0] = '\004'; /* ctrl/d */
+ write (out_to_inferior_fd, buf, 1);
+ }
+ else
+ {
+ static char enter[] = "\r";
+ /* Send line to inferior: */
+ int length = strlen (line);
+ if (length > ECHO_SUPPRESS_MAX-2)
+ {
+ echo_suppress_start = 0;
+ echo_suppress_limit = 0;
+ }
+ else
+ {
+ if (echo_suppress_limit + length > ECHO_SUPPRESS_MAX - 2)
+ {
+ if (echo_suppress_limit - echo_suppress_start + length
+ <= ECHO_SUPPRESS_MAX - 2)
+ {
+ memmove (echo_suppress_buffer,
+ echo_suppress_buffer + echo_suppress_start,
+ echo_suppress_limit - echo_suppress_start);
+ echo_suppress_limit -= echo_suppress_start;
+ echo_suppress_start = 0;
+ }
+ else
+ {
+ echo_suppress_limit = 0;
+ }
+ echo_suppress_start = 0;
+ }
+ memcpy (echo_suppress_buffer + echo_suppress_limit,
+ line, length);
+ echo_suppress_limit += length;
+ echo_suppress_buffer[echo_suppress_limit++] = '\r';
+ echo_suppress_buffer[echo_suppress_limit++] = '\n';
+ }
+ write (out_to_inferior_fd, line, length);
+ if (pending_special_char == 0)
+ {
+ write (out_to_inferior_fd, enter, sizeof(enter)-1);
+ if (*line)
+ add_history (line);
+ }
+ free (line);
+ }
+ rl_callback_handler_remove ();
+ buf_count = 0;
+ num_keys = 0;
+ if (pending_special_char != 0)
+ {
+ write (out_to_inferior_fd, &pending_special_char, 1);
+ pending_special_char = 0;
+ }
+}
+
+/* Value of rl_getc_function.
+ Use this because readline should read from stdin, not rl_instream,
+ points to the pty (so readline has monitor its terminal modes). */
+
+int
+my_rl_getc (FILE *dummy)
+{
+ int ch = rl_getc (stdin);
+ if (is_special_char (ch))
+ {
+ pending_special_char = ch;
+ return '\r';
+ }
+ return ch;
+}
+
+int
+main(int argc, char** argv)
+{
+ char *path;
+ int i;
+ int master;
+ char *name;
+ int in_from_tty_fd;
+ struct sigaction act;
+ struct winsize ws;
+ struct termios t;
+ int maxfd;
+ fd_set in_set;
+ static char empty_string[1] = "";
+ char *prompt = empty_string;
+ int ioctl_err = 0;
+ int arg_base = 1;
+
+#ifdef DEBUG
+ logfile = fopen("/tmp/rlfe.log", "w");
+#endif
+
+ while (arg_base<argc)
+ {
+ if (argv[arg_base][0] != '-')
+ break;
+ if (arg_base+1 >= argc )
+ usage_exit();
+ switch(argv[arg_base][1])
+ {
+ case 'h':
+ arg_base++;
+ hist_file = argv[arg_base];
+ break;
+ case 's':
+ arg_base++;
+ hist_size = atoi(argv[arg_base]);
+ if (hist_size<0)
+ usage_exit();
+ break;
+ default:
+ usage_exit();
+ }
+ arg_base++;
+ }
+ if (hist_file)
+ read_history (hist_file);
+
+ set_edit_mode ();
+
+ rl_readline_name = APPLICATION_NAME;
+
+ if ((master = OpenPTY (&name)) < 0)
+ {
+ perror("ptypair: could not open master pty");
+ exit(1);
+ }
+
+ DPRINT1("pty name: '%s'\n", name);
+
+ /* set up SIGWINCH handler */
+ act.sa_handler = sigwinch_handler;
+ sigemptyset(&(act.sa_mask));
+ act.sa_flags = 0;
+ if (sigaction(SIGWINCH, &act, NULL) < 0)
+ {
+ perror("ptypair: could not handle SIGWINCH ");
+ exit(1);
+ }
+
+ if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) < 0)
+ {
+ perror("ptypair: could not get window size");
+ exit(1);
+ }
+
+ if ((child = fork()) < 0)
+ {
+ perror("cannot fork");
+ exit(1);
+ }
+
+ if (child == 0)
+ {
+ int slave; /* file descriptor for slave pty */
+
+ /* We are in the child process */
+ close(master);
+
+#ifdef TIOCSCTTY
+ if ((slave = get_slave_pty(name)) < 0)
+ {
+ perror("ptypair: could not open slave pty");
+ exit(1);
+ }
+#endif
+
+ /* We need to make this process a session group leader, because
+ * it is on a new PTY, and things like job control simply will
+ * not work correctly unless there is a session group leader
+ * and process group leader (which a session group leader
+ * automatically is). This also disassociates us from our old
+ * controlling tty.
+ */
+ if (setsid() < 0)
+ {
+ perror("could not set session leader");
+ }
+
+ /* Tie us to our new controlling tty. */
+#ifdef TIOCSCTTY
+ if (ioctl(slave, TIOCSCTTY, NULL))
+ {
+ perror("could not set new controlling tty");
+ }
+#else
+ if ((slave = get_slave_pty(name)) < 0)
+ {
+ perror("ptypair: could not open slave pty");
+ exit(1);
+ }
+#endif
+
+ /* make slave pty be standard in, out, and error */
+ dup2(slave, STDIN_FILENO);
+ dup2(slave, STDOUT_FILENO);
+ dup2(slave, STDERR_FILENO);
+
+ /* at this point the slave pty should be standard input */
+ if (slave > 2)
+ {
+ close(slave);
+ }
+
+ /* Try to restore window size; failure isn't critical */
+ if (ioctl(STDOUT_FILENO, TIOCSWINSZ, &ws) < 0)
+ {
+ perror("could not restore window size");
+ }
+
+ /* now start the shell */
+ {
+ static char* command_args[] = { COMMAND_ARGS, NULL };
+ static char* alt_command_args[] = { ALT_COMMAND_ARGS, NULL };
+ if (argc <= 1)
+ {
+ execvp (COMMAND, command_args);
+ execvp (ALT_COMMAND, alt_command_args);
+ }
+ else
+ execvp (argv[arg_base], &argv[arg_base]);
+ }
+
+ /* should never be reached */
+ exit(1);
+ }
+
+ /* parent */
+ signal (SIGCHLD, sig_child);
+
+ /* Note that we only set termios settings for standard input;
+ * the master side of a pty is NOT a tty.
+ */
+ tcgetattr(STDIN_FILENO, &orig_term);
+
+ t = orig_term;
+ eof_char = t.c_cc[VEOF];
+ /* add_special_char(t.c_cc[VEOF]);*/
+ add_special_char(t.c_cc[VINTR]);
+ add_special_char(t.c_cc[VQUIT]);
+ add_special_char(t.c_cc[VSUSP]);
+#if defined (VDISCARD)
+ add_special_char(t.c_cc[VDISCARD]);
+#endif
+
+ t.c_lflag &= ~(ICANON | ISIG | ECHO | ECHOCTL | ECHOE | \
+ ECHOK | ECHOKE | ECHONL | ECHOPRT );
+ t.c_iflag &= ~ICRNL;
+ t.c_iflag |= IGNBRK;
+ t.c_cc[VMIN] = 1;
+ t.c_cc[VTIME] = 0;
+ tcsetattr(STDIN_FILENO, TCSANOW, &t);
+ in_from_inferior_fd = master;
+ out_to_inferior_fd = master;
+ rl_instream = fdopen (master, "r");
+ rl_getc_function = my_rl_getc;
+
+ rl_prep_term_function = null_prep_terminal;
+ rl_deprep_term_function = null_deprep_terminal;
+ rl_pre_input_hook = pre_input_change_mode;
+ rl_callback_handler_install (prompt, line_handler);
+
+ in_from_tty_fd = STDIN_FILENO;
+ FD_ZERO (&in_set);
+ maxfd = in_from_inferior_fd > in_from_tty_fd ? in_from_inferior_fd
+ : in_from_tty_fd;
+ for (;;)
+ {
+ int num;
+ FD_SET (in_from_inferior_fd, &in_set);
+ FD_SET (in_from_tty_fd, &in_set);
+
+ num = select(maxfd+1, &in_set, NULL, NULL, NULL);
+
+ if (propagate_sigwinch)
+ {
+ struct winsize ws;
+ if (ioctl (STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
+ {
+ ioctl (master, TIOCSWINSZ, &ws);
+ }
+ propagate_sigwinch = 0;
+ continue;
+ }
+
+ if (num <= 0)
+ {
+ perror ("select");
+ exit (-1);
+ }
+ if (FD_ISSET (in_from_tty_fd, &in_set))
+ {
+ extern int readline_echoing_p;
+ struct termios term_master;
+ int do_canon = 1;
+ int do_icrnl = 1;
+ int ioctl_ret;
+
+ DPRINT1("[tty avail num_keys:%d]\n", num_keys);
+
+ /* If we can't get tty modes for the master side of the pty, we
+ can't handle non-canonical-mode programs. Always assume the
+ master is in canonical echo mode if we can't tell. */
+ ioctl_ret = tcgetattr(master, &term_master);
+
+ if (ioctl_ret >= 0)
+ {
+ do_canon = (term_master.c_lflag & ICANON) != 0;
+ do_icrnl = (term_master.c_lflag & ICRNL) != 0;
+ readline_echoing_p = (term_master.c_lflag & ECHO) != 0;
+ DPRINT1 ("echo,canon,crnl:%03d\n",
+ 100 * readline_echoing_p
+ + 10 * do_canon
+ + 1 * do_icrnl);
+ }
+ else
+ {
+ if (ioctl_err == 0)
+ DPRINT1("tcgetattr on master fd failed: errno = %d\n", errno);
+ ioctl_err = 1;
+ }
+
+ if (do_canon == 0 && num_keys == 0)
+ {
+ char ch[10];
+ int count = read (STDIN_FILENO, ch, sizeof(ch));
+ DPRINT1("[read %d chars from stdin: ", count);
+ DPRINT2(" \"%.*s\"]\n", count, ch);
+ if (do_icrnl)
+ {
+ int i = count;
+ while (--i >= 0)
+ {
+ if (ch[i] == '\r')
+ ch[i] = '\n';
+ }
+ }
+ maybe_emphasize_input (1);
+ write (out_to_inferior_fd, ch, count);
+ }
+ else
+ {
+ if (num_keys == 0)
+ {
+ int i;
+ /* Re-install callback handler for new prompt. */
+ if (prompt != empty_string)
+ free (prompt);
+ if (prompt == NULL)
+ {
+ DPRINT0("New empty prompt\n");
+ prompt = empty_string;
+ }
+ else
+ {
+ if (do_emphasize_input && buf_count > 0)
+ {
+ prompt = malloc (buf_count + strlen (end_input_mode)
+ + strlen (start_input_mode) + 5);
+ sprintf (prompt, "\001%s\002%.*s\001%s\002",
+ end_input_mode,
+ buf_count, buf,
+ start_input_mode);
+ }
+ else
+ {
+ prompt = malloc (buf_count + 1);
+ memcpy (prompt, buf, buf_count);
+ prompt[buf_count] = '\0';
+ }
+ DPRINT1("New prompt '%s'\n", prompt);
+#if 0 /* ifdef HAVE_RL_ALREADY_PROMPTED */
+ /* Doesn't quite work when do_emphasize_input is 1. */
+ rl_already_prompted = buf_count > 0;
+#else
+ if (buf_count > 0)
+ write (1, "\r", 1);
+#endif
+ }
+
+ rl_callback_handler_install (prompt, line_handler);
+ }
+ num_keys++;
+ maybe_emphasize_input (1);
+ rl_callback_read_char ();
+ }
+ }
+ else /* output from inferior. */
+ {
+ int i;
+ int count;
+ int old_count;
+ if (buf_count > (sizeof(buf) >> 2))
+ buf_count = 0;
+ count = read (in_from_inferior_fd, buf+buf_count,
+ sizeof(buf) - buf_count);
+ DPRINT2("read %d from inferior, buf_count=%d", count, buf_count);
+ DPRINT2(": \"%.*s\"", count, buf+buf_count);
+ maybe_emphasize_input (0);
+ if (count <= 0)
+ {
+ DPRINT0 ("(Connection closed by foreign host.)\n");
+ tcsetattr(STDIN_FILENO, TCSANOW, &orig_term);
+ exit (0);
+ }
+ old_count = buf_count;
+
+ /* Look for any pending echo that we need to suppress. */
+ while (echo_suppress_start < echo_suppress_limit
+ && count > 0
+ && buf[buf_count] == echo_suppress_buffer[echo_suppress_start])
+ {
+ count--;
+ buf_count++;
+ echo_suppress_start++;
+ }
+ DPRINT1("suppressed %d characters of echo.\n", buf_count-old_count);
+
+ /* Write to the terminal anything that was not suppressed. */
+ if (count > 0)
+ write (1, buf + buf_count, count);
+
+ /* Finally, look for a prompt candidate.
+ * When we get around to going input (from the keyboard),
+ * we will consider the prompt to be anything since the last
+ * line terminator. So we need to save that text in the
+ * initial part of buf. However, anything before the
+ * most recent end-of-line is not interesting. */
+ buf_count += count;
+#if 1
+ for (i = buf_count; --i >= old_count; )
+#else
+ for (i = buf_count - 1; i-- >= buf_count - count; )
+#endif
+ {
+ if (buf[i] == '\n' || buf[i] == '\r')
+ {
+ i++;
+ memmove (buf, buf+i, buf_count - i);
+ buf_count -= i;
+ break;
+ }
+ }
+ DPRINT2("-> i: %d, buf_count: %d\n", i, buf_count);
+ }
+ }
+}
+
+static void set_edit_mode ()
+{
+ int vi = 0;
+ char *shellopts;
+
+ shellopts = getenv ("SHELLOPTS");
+ while (shellopts != 0)
+ {
+ if (strncmp ("vi", shellopts, 2) == 0)
+ {
+ vi = 1;
+ break;
+ }
+ shellopts = index (shellopts + 1, ':');
+ }
+
+ if (!vi)
+ {
+ if (getenv ("EDITOR") != 0)
+ vi |= strcmp (getenv ("EDITOR"), "vi") == 0;
+ }
+
+ if (vi)
+ rl_variable_bind ("editing-mode", "vi");
+ else
+ rl_variable_bind ("editing-mode", "emacs");
+}
+
+
+static void usage_exit ()
+{
+ fprintf (stderr, "Usage: rlfe [-h histfile] [-s size] cmd [arg1] [arg2] ...\n\n");
+ exit (1);
+}
diff --git a/contrib/libreadline/examples/rlfe/screen.h b/contrib/libreadline/examples/rlfe/screen.h
new file mode 100644
index 0000000..5b040c3
--- /dev/null
+++ b/contrib/libreadline/examples/rlfe/screen.h
@@ -0,0 +1,2 @@
+/* Dummy header to avoid modifying pty.c */
+#include "os.h"
diff --git a/contrib/libreadline/examples/rlptytest.c b/contrib/libreadline/examples/rlptytest.c
new file mode 100644
index 0000000..79257db
--- /dev/null
+++ b/contrib/libreadline/examples/rlptytest.c
@@ -0,0 +1,337 @@
+/*
+ *
+ * Another test harness for the readline callback interface.
+ *
+ * Author: Bob Rossi <bob@brasko.net>
+ */
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <curses.h>
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <signal.h>
+
+#if 0 /* LINUX */
+#include <pty.h>
+#else
+#include <util.h>
+#endif
+
+#ifdef READLINE_LIBRARY
+# include "readline.h"
+#else
+# include <readline/readline.h>
+#endif
+
+/**
+ * Master/Slave PTY used to keep readline off of stdin/stdout.
+ */
+static int masterfd = -1;
+static int slavefd;
+
+void
+sigint (s)
+ int s;
+{
+ tty_reset (STDIN_FILENO);
+ close (masterfd);
+ close (slavefd);
+ printf ("\n");
+ exit (0);
+}
+
+static int
+user_input()
+{
+ int size;
+ const int MAX = 1024;
+ char *buf = (char *)malloc(MAX+1);
+
+ size = read (STDIN_FILENO, buf, MAX);
+ if (size == -1)
+ return -1;
+
+ size = write (masterfd, buf, size);
+ if (size == -1)
+ return -1;
+
+ return 0;
+}
+
+static int
+readline_input()
+{
+ const int MAX = 1024;
+ char *buf = (char *)malloc(MAX+1);
+ int size;
+
+ size = read (masterfd, buf, MAX);
+ if (size == -1)
+ {
+ free( buf );
+ buf = NULL;
+ return -1;
+ }
+
+ buf[size] = 0;
+
+ /* Display output from readline */
+ if ( size > 0 )
+ fprintf(stderr, "%s", buf);
+
+ free( buf );
+ buf = NULL;
+ return 0;
+}
+
+static void
+rlctx_send_user_command(char *line)
+{
+ /* This happens when rl_callback_read_char gets EOF */
+ if ( line == NULL )
+ return;
+
+ if (strcmp (line, "exit") == 0) {
+ tty_reset (STDIN_FILENO);
+ close (masterfd);
+ close (slavefd);
+ printf ("\n");
+ exit (0);
+ }
+
+ /* Don't add the enter command */
+ if ( line && *line != '\0' )
+ add_history(line);
+}
+
+static void
+custom_deprep_term_function ()
+{
+}
+
+static int
+init_readline (int inputfd, int outputfd)
+{
+ FILE *inputFILE, *outputFILE;
+
+ inputFILE = fdopen (inputfd, "r");
+ if (!inputFILE)
+ return -1;
+
+ outputFILE = fdopen (outputfd, "w");
+ if (!outputFILE)
+ return -1;
+
+ rl_instream = inputFILE;
+ rl_outstream = outputFILE;
+
+ /* Tell readline what the prompt is if it needs to put it back */
+ rl_callback_handler_install("(rltest): ", rlctx_send_user_command);
+
+ /* Set the terminal type to dumb so the output of readline can be
+ * understood by tgdb */
+ if ( rl_reset_terminal("dumb") == -1 )
+ return -1;
+
+ /* For some reason, readline can not deprep the terminal.
+ * However, it doesn't matter because no other application is working on
+ * the terminal besides readline */
+ rl_deprep_term_function = custom_deprep_term_function;
+
+ using_history();
+ read_history(".history");
+
+ return 0;
+}
+
+static int
+main_loop(void)
+{
+ fd_set rset;
+ int max;
+
+ max = (masterfd > STDIN_FILENO) ? masterfd : STDIN_FILENO;
+ max = (max > slavefd) ? max : slavefd;
+
+ for (;;)
+ {
+ /* Reset the fd_set, and watch for input from GDB or stdin */
+ FD_ZERO(&rset);
+
+ FD_SET(STDIN_FILENO, &rset);
+ FD_SET(slavefd, &rset);
+ FD_SET(masterfd, &rset);
+
+ /* Wait for input */
+ if (select(max + 1, &rset, NULL, NULL, NULL) == -1)
+ {
+ if (errno == EINTR)
+ continue;
+ else
+ return -1;
+ }
+
+ /* Input received through the pty: Handle it
+ * Wrote to masterfd, slave fd has that input, alert readline to read it.
+ */
+ if (FD_ISSET(slavefd, &rset))
+ rl_callback_read_char();
+
+ /* Input received through the pty.
+ * Readline read from slavefd, and it wrote to the masterfd.
+ */
+ if (FD_ISSET(masterfd, &rset))
+ if ( readline_input() == -1 )
+ return -1;
+
+ /* Input received: Handle it, write to masterfd (input to readline) */
+ if (FD_ISSET(STDIN_FILENO, &rset))
+ if ( user_input() == -1 )
+ return -1;
+ }
+
+ return 0;
+}
+
+/* The terminal attributes before calling tty_cbreak */
+static struct termios save_termios;
+static struct winsize size;
+static enum { RESET, TCBREAK } ttystate = RESET;
+
+/* tty_cbreak: Sets terminal to cbreak mode. Also known as noncanonical mode.
+ * 1. Signal handling is still turned on, so the user can still type those.
+ * 2. echo is off
+ * 3. Read in one char at a time.
+ *
+ * fd - The file descriptor of the terminal
+ *
+ * Returns: 0 on sucess, -1 on error
+ */
+int tty_cbreak(int fd){
+ struct termios buf;
+ int ttysavefd = -1;
+
+ if(tcgetattr(fd, &save_termios) < 0)
+ return -1;
+
+ buf = save_termios;
+ buf.c_lflag &= ~(ECHO | ICANON);
+ buf.c_iflag &= ~(ICRNL | INLCR);
+ buf.c_cc[VMIN] = 1;
+ buf.c_cc[VTIME] = 0;
+
+#if defined (VLNEXT) && defined (_POSIX_VDISABLE)
+ buf.c_cc[VLNEXT] = _POSIX_VDISABLE;
+#endif
+
+#if defined (VDSUSP) && defined (_POSIX_VDISABLE)
+ buf.c_cc[VDSUSP] = _POSIX_VDISABLE;
+#endif
+
+ /* enable flow control; only stty start char can restart output */
+#if 0
+ buf.c_iflag |= (IXON|IXOFF);
+#ifdef IXANY
+ buf.c_iflag &= ~IXANY;
+#endif
+#endif
+
+ /* disable flow control; let ^S and ^Q through to pty */
+ buf.c_iflag &= ~(IXON|IXOFF);
+#ifdef IXANY
+ buf.c_iflag &= ~IXANY;
+#endif
+
+ if(tcsetattr(fd, TCSAFLUSH, &buf) < 0)
+ return -1;
+
+ ttystate = TCBREAK;
+ ttysavefd = fd;
+
+ /* set size */
+ if(ioctl(fd, TIOCGWINSZ, (char *)&size) < 0)
+ return -1;
+
+#ifdef DEBUG
+ err_msg("%d rows and %d cols\n", size.ws_row, size.ws_col);
+#endif
+
+ return (0);
+}
+
+int
+tty_off_xon_xoff (int fd)
+{
+ struct termios buf;
+ int ttysavefd = -1;
+
+ if(tcgetattr(fd, &buf) < 0)
+ return -1;
+
+ buf.c_iflag &= ~(IXON|IXOFF);
+
+ if(tcsetattr(fd, TCSAFLUSH, &buf) < 0)
+ return -1;
+
+ return 0;
+}
+
+/* tty_reset: Sets the terminal attributes back to their previous state.
+ * PRE: tty_cbreak must have already been called.
+ *
+ * fd - The file descrioptor of the terminal to reset.
+ *
+ * Returns: 0 on success, -1 on error
+ */
+int tty_reset(int fd)
+{
+ if(ttystate != TCBREAK)
+ return (0);
+
+ if(tcsetattr(fd, TCSAFLUSH, &save_termios) < 0)
+ return (-1);
+
+ ttystate = RESET;
+
+ return 0;
+}
+
+int
+main()
+{
+ int val;
+ val = openpty (&masterfd, &slavefd, NULL, NULL, NULL);
+ if (val == -1)
+ return -1;
+
+ val = tty_off_xon_xoff (masterfd);
+ if (val == -1)
+ return -1;
+
+ val = init_readline (slavefd, slavefd);
+ if (val == -1)
+ return -1;
+
+ val = tty_cbreak (STDIN_FILENO);
+ if (val == -1)
+ return -1;
+
+ signal (SIGINT, sigint);
+
+ val = main_loop ();
+
+ tty_reset (STDIN_FILENO);
+
+ if (val == -1)
+ return -1;
+
+ return 0;
+}
diff --git a/contrib/libreadline/examples/rltest.c b/contrib/libreadline/examples/rltest.c
index 99f083b..cb67bab 100644
--- a/contrib/libreadline/examples/rltest.c
+++ b/contrib/libreadline/examples/rltest.c
@@ -31,6 +31,12 @@
#include <stdio.h>
#include <sys/types.h>
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
# include "history.h"
diff --git a/contrib/libreadline/examples/rlversion.c b/contrib/libreadline/examples/rlversion.c
index 53949d1..6c86874 100644
--- a/contrib/libreadline/examples/rlversion.c
+++ b/contrib/libreadline/examples/rlversion.c
@@ -30,6 +30,12 @@
#include <sys/types.h>
#include "posixstat.h"
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
#ifdef READLINE_LIBRARY
# include "readline.h"
#else
diff --git a/contrib/libreadline/funmap.c b/contrib/libreadline/funmap.c
index 28c8cc6..9c760cc 100644
--- a/contrib/libreadline/funmap.c
+++ b/contrib/libreadline/funmap.c
@@ -176,6 +176,7 @@ static FUNMAP default_funmap[] = {
{ "vi-put", rl_vi_put },
{ "vi-redo", rl_vi_redo },
{ "vi-replace", rl_vi_replace },
+ { "vi-rubout", rl_vi_rubout },
{ "vi-search", rl_vi_search },
{ "vi-search-again", rl_vi_search_again },
{ "vi-set-mark", rl_vi_set_mark },
diff --git a/contrib/libreadline/histexpand.c b/contrib/libreadline/histexpand.c
index 2ab34cb..6847014 100644
--- a/contrib/libreadline/histexpand.c
+++ b/contrib/libreadline/histexpand.c
@@ -206,23 +206,24 @@ get_history_event (string, caller_index, delimiting_quote)
/* Only a closing `?' or a newline delimit a substring search string. */
for (local_index = i; c = string[i]; i++)
+ {
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int v;
- mbstate_t ps;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ /* These produce warnings because we're passing a const string to a
+ function that takes a non-const string. */
+ _rl_adjust_point ((char *)string, i, &ps);
+ if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
+ {
+ i += v - 1;
+ continue;
+ }
+ }
- memset (&ps, 0, sizeof (mbstate_t));
- /* These produce warnings because we're passing a const string to a
- function that takes a non-const string. */
- _rl_adjust_point ((char *)string, i, &ps);
- if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
- {
- i += v - 1;
- continue;
- }
- }
- else
#endif /* HANDLE_MULTIBYTE */
if ((!substring_okay && (whitespace (c) || c == ':' ||
(history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
@@ -230,6 +231,7 @@ get_history_event (string, caller_index, delimiting_quote)
string[i] == '\n' ||
(substring_okay && string[i] == '?'))
break;
+ }
which = i - local_index;
temp = (char *)xmalloc (1 + which);
diff --git a/contrib/libreadline/history.c b/contrib/libreadline/history.c
index d99b76e..a538f91 100644
--- a/contrib/libreadline/history.c
+++ b/contrib/libreadline/history.c
@@ -1,6 +1,6 @@
/* history.c -- standalone history library */
-/* Copyright (C) 1989-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1989-2005 Free Software Foundation, Inc.
This file contains the GNU History Library (the Library), a set of
routines for managing the text of previously typed lines.
@@ -204,7 +204,7 @@ history_get (offset)
int local_index;
local_index = offset - history_base;
- return (local_index >= history_length || local_index < 0 || !the_history)
+ return (local_index >= history_length || local_index < 0 || the_history == 0)
? (HIST_ENTRY *)NULL
: the_history[local_index];
}
@@ -340,7 +340,7 @@ replace_history_entry (which, line, data)
{
HIST_ENTRY *temp, *old_value;
- if (which >= history_length)
+ if (which < 0 || which >= history_length)
return ((HIST_ENTRY *)NULL);
temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
@@ -364,17 +364,15 @@ remove_history (which)
HIST_ENTRY *return_value;
register int i;
- if (which >= history_length || !history_length)
- return_value = (HIST_ENTRY *)NULL;
- else
- {
- return_value = the_history[which];
+ if (which < 0 || which >= history_length || history_length == 0 || the_history == 0)
+ return ((HIST_ENTRY *)NULL);
- for (i = which; i < history_length; i++)
- the_history[i] = the_history[i + 1];
+ return_value = the_history[which];
- history_length--;
- }
+ for (i = which; i < history_length; i++)
+ the_history[i] = the_history[i + 1];
+
+ history_length--;
return (return_value);
}
diff --git a/contrib/libreadline/input.c b/contrib/libreadline/input.c
index 044338e..0ec507e 100644
--- a/contrib/libreadline/input.c
+++ b/contrib/libreadline/input.c
@@ -1,6 +1,6 @@
/* input.c -- character input functions for readline. */
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -444,6 +444,10 @@ rl_getc (stream)
while (1)
{
+#if defined (__MINGW32__)
+ if (isatty (fileno (stream)))
+ return (getch ());
+#endif
result = read (fileno (stream), &c, sizeof (unsigned char));
if (result == sizeof (unsigned char))
@@ -519,6 +523,12 @@ _rl_read_mbchar (mbchar, size)
ps = ps_back;
continue;
}
+ else if (mbchar_bytes_length == 0)
+ {
+ mbchar[0] = '\0'; /* null wide character */
+ mb_len = 1;
+ break;
+ }
else if (mbchar_bytes_length > (size_t)(0))
break;
}
diff --git a/contrib/libreadline/isearch.c b/contrib/libreadline/isearch.c
index c1ea5b3..d7d8520 100644
--- a/contrib/libreadline/isearch.c
+++ b/contrib/libreadline/isearch.c
@@ -4,7 +4,7 @@
/* */
/* **************************************************************** */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -56,12 +56,17 @@
/* Variables exported to other files in the readline library. */
char *_rl_isearch_terminators = (char *)NULL;
+_rl_search_cxt *_rl_iscxt = 0;
+
/* Variables imported from other files in the readline library. */
extern HIST_ENTRY *_rl_saved_line_for_history;
-/* Forward declarations */
static int rl_search_history PARAMS((int, int));
+static _rl_search_cxt *_rl_isearch_init PARAMS((int));
+static void _rl_isearch_fini PARAMS((_rl_search_cxt *));
+static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
+
/* Last line found by the current incremental search, so we don't `find'
identical lines many times in a row. */
static char *prev_line_found;
@@ -72,6 +77,57 @@ static int last_isearch_string_len;
static char *default_isearch_terminators = "\033\012";
+_rl_search_cxt *
+_rl_scxt_alloc (type, flags)
+ int type, flags;
+{
+ _rl_search_cxt *cxt;
+
+ cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt));
+
+ cxt->type = type;
+ cxt->sflags = flags;
+
+ cxt->search_string = 0;
+ cxt->search_string_size = cxt->search_string_index = 0;
+
+ cxt->lines = 0;
+ cxt->allocated_line = 0;
+ cxt->hlen = cxt->hindex = 0;
+
+ cxt->save_point = rl_point;
+ cxt->save_mark = rl_mark;
+ cxt->save_line = where_history ();
+ cxt->last_found_line = cxt->save_line;
+ cxt->prev_line_found = 0;
+
+ cxt->save_undo_list = 0;
+
+ cxt->history_pos = 0;
+ cxt->direction = 0;
+
+ cxt->lastc = 0;
+
+ cxt->sline = 0;
+ cxt->sline_len = cxt->sline_index = 0;
+
+ cxt->search_terminators = 0;
+
+ return cxt;
+}
+
+void
+_rl_scxt_dispose (cxt, flags)
+ _rl_search_cxt *cxt;
+ int flags;
+{
+ FREE (cxt->search_string);
+ FREE (cxt->allocated_line);
+ FREE (cxt->lines);
+
+ free (cxt);
+}
+
/* Search backwards through the history looking for a string which is typed
interactively. Start with the current line. */
int
@@ -92,7 +148,7 @@ rl_forward_search_history (sign, key)
/* Display the current state of the search in the echo-area.
SEARCH_STRING contains the string that is being searched for,
- DIRECTION is zero for forward, or 1 for reverse,
+ DIRECTION is zero for forward, or non-zero for reverse,
WHERE is the history list number of the current line. If it is
-1, then this line is the starting one. */
static void
@@ -140,66 +196,23 @@ rl_display_search (search_string, reverse_p, where)
(*rl_redisplay_function) ();
}
-/* Search through the history looking for an interactively typed string.
- This is analogous to i-search. We start the search in the current line.
- DIRECTION is which direction to search; >= 0 means forward, < 0 means
- backwards. */
-static int
-rl_search_history (direction, invoking_key)
- int direction, invoking_key;
+static _rl_search_cxt *
+_rl_isearch_init (direction)
+ int direction;
{
- /* The string that the user types in to search for. */
- char *search_string;
-
- /* The current length of SEARCH_STRING. */
- int search_string_index;
-
- /* The amount of space that SEARCH_STRING has allocated to it. */
- int search_string_size;
-
- /* The list of lines to search through. */
- char **lines, *allocated_line;
-
- /* The length of LINES. */
- int hlen;
-
- /* Where we get LINES from. */
- HIST_ENTRY **hlist;
-
+ _rl_search_cxt *cxt;
register int i;
- int orig_point, orig_mark, orig_line, last_found_line;
- int c, found, failed, sline_len;
- int n, wstart, wlen;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
-
- /* The line currently being searched. */
- char *sline;
-
- /* Offset in that line. */
- int line_index;
-
- /* Non-zero if we are doing a reverse search. */
- int reverse;
+ HIST_ENTRY **hlist;
- /* The list of characters which terminate the search, but are not
- subsequently executed. If the variable isearch-terminators has
- been set, we use that value, otherwise we use ESC and C-J. */
- char *isearch_terminators;
+ cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0);
+ if (direction < 0)
+ cxt->sflags |= SF_REVERSE;
- RL_SETSTATE(RL_STATE_ISEARCH);
- orig_point = rl_point;
- orig_mark = rl_mark;
- last_found_line = orig_line = where_history ();
- reverse = direction < 0;
- hlist = history_list ();
- allocated_line = (char *)NULL;
-
- isearch_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
+ cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
: default_isearch_terminators;
/* Create an arrary of pointers to the lines that we want to search. */
+ hlist = history_list ();
rl_maybe_replace_line ();
i = 0;
if (hlist)
@@ -207,354 +220,447 @@ rl_search_history (direction, invoking_key)
/* Allocate space for this many lines, +1 for the current input line,
and remember those lines. */
- lines = (char **)xmalloc ((1 + (hlen = i)) * sizeof (char *));
- for (i = 0; i < hlen; i++)
- lines[i] = hlist[i]->line;
+ cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *));
+ for (i = 0; i < cxt->hlen; i++)
+ cxt->lines[i] = hlist[i]->line;
if (_rl_saved_line_for_history)
- lines[i] = _rl_saved_line_for_history->line;
+ cxt->lines[i] = _rl_saved_line_for_history->line;
else
{
/* Keep track of this so we can free it. */
- allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
- strcpy (allocated_line, &rl_line_buffer[0]);
- lines[i] = allocated_line;
+ cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
+ strcpy (cxt->allocated_line, &rl_line_buffer[0]);
+ cxt->lines[i] = cxt->allocated_line;
}
- hlen++;
+ cxt->hlen++;
/* The line where we start the search. */
- i = orig_line;
+ cxt->history_pos = cxt->save_line;
rl_save_prompt ();
/* Initialize search parameters. */
- search_string = (char *)xmalloc (search_string_size = 128);
- *search_string = '\0';
- search_string_index = 0;
- prev_line_found = (char *)0; /* XXX */
+ cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128);
+ cxt->search_string[cxt->search_string_index = 0] = '\0';
/* Normalize DIRECTION into 1 or -1. */
- direction = (direction >= 0) ? 1 : -1;
+ cxt->direction = (direction >= 0) ? 1 : -1;
- rl_display_search (search_string, reverse, -1);
+ cxt->sline = rl_line_buffer;
+ cxt->sline_len = strlen (cxt->sline);
+ cxt->sline_index = rl_point;
- sline = rl_line_buffer;
- sline_len = strlen (sline);
- line_index = rl_point;
+ _rl_iscxt = cxt; /* save globally */
- found = failed = 0;
- for (;;)
+ return cxt;
+}
+
+static void
+_rl_isearch_fini (cxt)
+ _rl_search_cxt *cxt;
+{
+ /* First put back the original state. */
+ strcpy (rl_line_buffer, cxt->lines[cxt->save_line]);
+
+ rl_restore_prompt ();
+
+ /* Save the search string for possible later use. */
+ FREE (last_isearch_string);
+ last_isearch_string = cxt->search_string;
+ last_isearch_string_len = cxt->search_string_index;
+ cxt->search_string = 0;
+
+ if (cxt->last_found_line < cxt->save_line)
+ rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0);
+ else
+ rl_get_next_history (cxt->last_found_line - cxt->save_line, 0);
+
+ /* If the string was not found, put point at the end of the last matching
+ line. If last_found_line == orig_line, we didn't find any matching
+ history lines at all, so put point back in its original position. */
+ if (cxt->sline_index < 0)
{
- rl_command_func_t *f = (rl_command_func_t *)NULL;
+ if (cxt->last_found_line == cxt->save_line)
+ cxt->sline_index = cxt->save_point;
+ else
+ cxt->sline_index = strlen (rl_line_buffer);
+ rl_mark = cxt->save_mark;
+ }
- /* Read a key and decide how to proceed. */
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ rl_point = cxt->sline_index;
+ /* Don't worry about where to put the mark here; rl_get_previous_history
+ and rl_get_next_history take care of it. */
+
+ rl_clear_message ();
+}
+
+int
+_rl_search_getchar (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c;
+
+ /* Read a key and decide how to proceed. */
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = cxt->lastc = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX);
#endif
- /* Translate the keys we do something with to opcodes. */
- if (c >= 0 && _rl_keymap[c].type == ISFUNC)
- {
- f = _rl_keymap[c].function;
-
- if (f == rl_reverse_search_history)
- c = reverse ? -1 : -2;
- else if (f == rl_forward_search_history)
- c = !reverse ? -1 : -2;
- else if (f == rl_rubout)
- c = -3;
- else if (c == CTRL ('G'))
- c = -4;
- else if (c == CTRL ('W')) /* XXX */
- c = -5;
- else if (c == CTRL ('Y')) /* XXX */
- c = -6;
- }
+ return c;
+}
- /* The characters in isearch_terminators (set from the user-settable
- variable isearch-terminators) are used to terminate the search but
- not subsequently execute the character as a command. The default
- value is "\033\012" (ESC and C-J). */
- if (strchr (isearch_terminators, c))
- {
- /* ESC still terminates the search, but if there is pending
- input or if input arrives within 0.1 seconds (on systems
- with select(2)) it is used as a prefix character
- with rl_execute_next. WATCH OUT FOR THIS! This is intended
- to allow the arrow keys to be used like ^F and ^B are used
- to terminate the search and execute the movement command.
- XXX - since _rl_input_available depends on the application-
- settable keyboard timeout value, this could alternatively
- use _rl_input_queued(100000) */
- if (c == ESC && _rl_input_available ())
- rl_execute_next (ESC);
- break;
- }
+/* Process just-read character C according to isearch context CXT. Return
+ -1 if the caller should just free the context and return, 0 if we should
+ break out of the loop, and 1 if we should continue to read characters. */
+int
+_rl_isearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ int n, wstart, wlen, limit, cval;
+ rl_command_func_t *f;
+
+ f = (rl_command_func_t *)NULL;
+
+ /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+ f = _rl_keymap[c].function;
+
+ if (f == rl_reverse_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2;
+ else if (f == rl_forward_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1;
+ else if (f == rl_rubout)
+ cxt->lastc = -3;
+ else if (c == CTRL ('G'))
+ cxt->lastc = -4;
+ else if (c == CTRL ('W')) /* XXX */
+ cxt->lastc = -5;
+ else if (c == CTRL ('Y')) /* XXX */
+ cxt->lastc = -6;
+ }
+
+ /* The characters in isearch_terminators (set from the user-settable
+ variable isearch-terminators) are used to terminate the search but
+ not subsequently execute the character as a command. The default
+ value is "\033\012" (ESC and C-J). */
+ if (strchr (cxt->search_terminators, cxt->lastc))
+ {
+ /* ESC still terminates the search, but if there is pending
+ input or if input arrives within 0.1 seconds (on systems
+ with select(2)) it is used as a prefix character
+ with rl_execute_next. WATCH OUT FOR THIS! This is intended
+ to allow the arrow keys to be used like ^F and ^B are used
+ to terminate the search and execute the movement command.
+ XXX - since _rl_input_available depends on the application-
+ settable keyboard timeout value, this could alternatively
+ use _rl_input_queued(100000) */
+ if (cxt->lastc == ESC && _rl_input_available ())
+ rl_execute_next (ESC);
+ return (0);
+ }
#define ENDSRCH_CHAR(c) \
((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G')))
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to c; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+ }
+ else
+#endif
+ if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to LASTC; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+
+ /* Now dispatch on the character. `Opcodes' affect the search string or
+ state. Other characters are added to the string. */
+ switch (cxt->lastc)
+ {
+ /* search again */
+ case -1:
+ if (cxt->search_string_index == 0)
{
- if (c >= 0 && strlen (mb) == 1 && ENDSRCH_CHAR (c))
+ if (last_isearch_string)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ cxt->search_string_size = 64 + last_isearch_string_len;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ strcpy (cxt->search_string, last_isearch_string);
+ cxt->search_string_index = last_isearch_string_len;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
break;
}
+ return (1);
}
+ else if (cxt->sflags & SF_REVERSE)
+ cxt->sline_index--;
+ else if (cxt->sline_index != cxt->sline_len)
+ cxt->sline_index++;
else
-#endif
- if (c >= 0 && ENDSRCH_CHAR (c))
+ rl_ding ();
+ break;
+
+ /* switch directions */
+ case -2:
+ cxt->direction = -cxt->direction;
+ if (cxt->direction < 0)
+ cxt->sflags |= SF_REVERSE;
+ else
+ cxt->sflags &= ~SF_REVERSE;
+ break;
+
+ /* delete character from search string. */
+ case -3: /* C-H, DEL */
+ /* This is tricky. To do this right, we need to keep a
+ stack of search positions for the current search, with
+ sentinels marking the beginning and end. But this will
+ do until we have a real isearch-undo. */
+ if (cxt->search_string_index == 0)
+ rl_ding ();
+ else
+ cxt->search_string[--cxt->search_string_index] = '\0';
+ break;
+
+ case -4: /* C-G, abort */
+ rl_replace_line (cxt->lines[cxt->save_line], 0);
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt();
+ rl_clear_message ();
+
+ return -1;
+
+ case -5: /* C-W */
+ /* skip over portion of line we already matched and yank word */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
{
- /* This sets rl_pending_input to c; it will be picked up the next
- time rl_read_key is called. */
- rl_execute_next (c);
+ rl_ding ();
break;
}
- switch (c)
+ /* if not in a word, move to one. */
+ cval = _rl_char_value (rl_line_buffer, wstart);
+ if (_rl_walphabetic (cval) == 0)
{
- case -1:
- if (search_string_index == 0)
- {
- if (last_isearch_string)
- {
- search_string_size = 64 + last_isearch_string_len;
- search_string = (char *)xrealloc (search_string, search_string_size);
- strcpy (search_string, last_isearch_string);
- search_string_index = last_isearch_string_len;
- rl_display_search (search_string, reverse, -1);
- break;
- }
- continue;
- }
- else if (reverse)
- --line_index;
- else if (line_index != sline_len)
- ++line_index;
- else
- rl_ding ();
+ rl_ding ();
break;
-
- /* switch directions */
- case -2:
- direction = -direction;
- reverse = direction < 0;
+ }
+ n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);;
+ while (n < rl_end)
+ {
+ cval = _rl_char_value (rl_line_buffer, n);
+ if (_rl_walphabetic (cval) == 0)
+ break;
+ n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);;
+ }
+ wlen = n - wstart + 1;
+ if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += wlen + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (; wstart < n; wstart++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ case -6: /* C-Y */
+ /* skip over portion of line we already matched and yank rest */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
+ {
+ rl_ding ();
break;
+ }
+ n = rl_end - wstart + 1;
+ if (cxt->search_string_index + n + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += n + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (n = wstart; n < rl_end; n++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ /* Add character to search string and continue search. */
+ default:
+ if (cxt->search_string_index + 2 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += 128;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int j, l;
+ for (j = 0, l = strlen (cxt->mb); j < l; )
+ cxt->search_string[cxt->search_string_index++] = cxt->mb[j++];
+ }
+ else
+#endif
+ cxt->search_string[cxt->search_string_index++] = c;
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+ }
- /* delete character from search string. */
- case -3: /* C-H, DEL */
- /* This is tricky. To do this right, we need to keep a
- stack of search positions for the current search, with
- sentinels marking the beginning and end. But this will
- do until we have a real isearch-undo. */
- if (search_string_index == 0)
- rl_ding ();
- else
- search_string[--search_string_index] = '\0';
-
- break;
+ for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; )
+ {
+ limit = cxt->sline_len - cxt->search_string_index + 1;
- case -4: /* C-G */
- rl_replace_line (lines[orig_line], 0);
- rl_point = orig_point;
- rl_mark = orig_mark;
- rl_restore_prompt();
- rl_clear_message ();
- if (allocated_line)
- free (allocated_line);
- free (lines);
- RL_UNSETSTATE(RL_STATE_ISEARCH);
- return 0;
-
- case -5: /* C-W */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* Search the current line. */
+ while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit))
+ {
+ if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index))
{
- rl_ding ();
+ cxt->sflags |= SF_FOUND;
break;
}
+ else
+ cxt->sline_index += cxt->direction;
+ }
+ if (cxt->sflags & SF_FOUND)
+ break;
- /* if not in a word, move to one. */
- if (rl_alphabetic(rl_line_buffer[wstart]) == 0)
- {
- rl_ding ();
- break;
- }
- n = wstart;
- while (n < rl_end && rl_alphabetic(rl_line_buffer[n]))
- n++;
- wlen = n - wstart + 1;
- if (search_string_index + wlen + 1 >= search_string_size)
- {
- search_string_size += wlen + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (; wstart < n; wstart++)
- search_string[search_string_index++] = rl_line_buffer[wstart];
- search_string[search_string_index] = '\0';
- break;
+ /* Move to the next line, but skip new copies of the line
+ we just found and lines shorter than the string we're
+ searching for. */
+ do
+ {
+ /* Move to the next line. */
+ cxt->history_pos += cxt->direction;
- case -6: /* C-Y */
- /* skip over portion of line we already matched */
- wstart = rl_point + search_string_index;
- if (wstart >= rl_end)
+ /* At limit for direction? */
+ if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen))
{
- rl_ding ();
+ cxt->sflags |= SF_FAILED;
break;
}
- n = rl_end - wstart + 1;
- if (search_string_index + n + 1 >= search_string_size)
- {
- search_string_size += n + 1;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
- for (n = wstart; n < rl_end; n++)
- search_string[search_string_index++] = rl_line_buffer[n];
- search_string[search_string_index] = '\0';
- break;
- default:
- /* Add character to search string and continue search. */
- if (search_string_index + 2 >= search_string_size)
- {
- search_string_size += 128;
- search_string = (char *)xrealloc (search_string, search_string_size);
- }
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- {
- int j, l;
- for (j = 0, l = strlen (mb); j < l; )
- search_string[search_string_index++] = mb[j++];
- }
- else
-#endif
- search_string[search_string_index++] = c;
- search_string[search_string_index] = '\0';
- break;
+ /* We will need these later. */
+ cxt->sline = cxt->lines[cxt->history_pos];
+ cxt->sline_len = strlen (cxt->sline);
}
+ while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) ||
+ (cxt->search_string_index > cxt->sline_len));
- for (found = failed = 0;;)
- {
- int limit = sline_len - search_string_index + 1;
+ if (cxt->sflags & SF_FAILED)
+ break;
- /* Search the current line. */
- while (reverse ? (line_index >= 0) : (line_index < limit))
- {
- if (STREQN (search_string, sline + line_index, search_string_index))
- {
- found++;
- break;
- }
- else
- line_index += direction;
- }
- if (found)
- break;
+ /* Now set up the line for searching... */
+ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0;
+ }
- /* Move to the next line, but skip new copies of the line
- we just found and lines shorter than the string we're
- searching for. */
- do
- {
- /* Move to the next line. */
- i += direction;
-
- /* At limit for direction? */
- if (reverse ? (i < 0) : (i == hlen))
- {
- failed++;
- break;
- }
-
- /* We will need these later. */
- sline = lines[i];
- sline_len = strlen (sline);
- }
- while ((prev_line_found && STREQ (prev_line_found, lines[i])) ||
- (search_string_index > sline_len));
+ if (cxt->sflags & SF_FAILED)
+ {
+ /* We cannot find the search string. Ding the bell. */
+ rl_ding ();
+ cxt->history_pos = cxt->last_found_line;
+ return 1;
+ }
- if (failed)
- break;
+ /* We have found the search string. Just display it. But don't
+ actually move there in the history list until the user accepts
+ the location. */
+ if (cxt->sflags & SF_FOUND)
+ {
+ cxt->prev_line_found = cxt->lines[cxt->history_pos];
+ rl_replace_line (cxt->lines[cxt->history_pos], 0);
+ rl_point = cxt->sline_index;
+ cxt->last_found_line = cxt->history_pos;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos);
+ }
- /* Now set up the line for searching... */
- line_index = reverse ? sline_len - search_string_index : 0;
- }
+ return 1;
+}
- if (failed)
- {
- /* We cannot find the search string. Ding the bell. */
- rl_ding ();
- i = last_found_line;
- continue; /* XXX - was break */
- }
+static int
+_rl_isearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ if (r >= 0)
+ _rl_isearch_fini (cxt);
+ _rl_scxt_dispose (cxt, 0);
+ _rl_iscxt = 0;
- /* We have found the search string. Just display it. But don't
- actually move there in the history list until the user accepts
- the location. */
- if (found)
- {
- prev_line_found = lines[i];
- rl_replace_line (lines[i], 0);
- rl_point = line_index;
- last_found_line = i;
- rl_display_search (search_string, reverse, (i == orig_line) ? -1 : i);
- }
- }
+ RL_UNSETSTATE(RL_STATE_ISEARCH);
- /* The searching is over. The user may have found the string that she
- was looking for, or else she may have exited a failing search. If
- LINE_INDEX is -1, then that shows that the string searched for was
- not found. We use this to determine where to place rl_point. */
+ return (r != 0);
+}
- /* First put back the original state. */
- strcpy (rl_line_buffer, lines[orig_line]);
+/* Search through the history looking for an interactively typed string.
+ This is analogous to i-search. We start the search in the current line.
+ DIRECTION is which direction to search; >= 0 means forward, < 0 means
+ backwards. */
+static int
+rl_search_history (direction, invoking_key)
+ int direction, invoking_key;
+{
+ _rl_search_cxt *cxt; /* local for now, but saved globally */
+ int c, r;
- rl_restore_prompt ();
+ RL_SETSTATE(RL_STATE_ISEARCH);
+ cxt = _rl_isearch_init (direction);
- /* Save the search string for possible later use. */
- FREE (last_isearch_string);
- last_isearch_string = search_string;
- last_isearch_string_len = search_string_index;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
- if (last_found_line < orig_line)
- rl_get_previous_history (orig_line - last_found_line, 0);
- else
- rl_get_next_history (last_found_line - orig_line, 0);
+ /* If we are using the callback interface, all we do is set up here and
+ return. The key is that we leave RL_STATE_ISEARCH set. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
- /* If the string was not found, put point at the end of the last matching
- line. If last_found_line == orig_line, we didn't find any matching
- history lines at all, so put point back in its original position. */
- if (line_index < 0)
+ r = -1;
+ for (;;)
{
- if (last_found_line == orig_line)
- line_index = orig_point;
- else
- line_index = strlen (rl_line_buffer);
- rl_mark = orig_mark;
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here (c == 0) */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
+ if (r <= 0)
+ break;
}
- rl_point = line_index;
- /* Don't worry about where to put the mark here; rl_get_previous_history
- and rl_get_next_history take care of it. */
-
- rl_clear_message ();
+ /* The searching is over. The user may have found the string that she
+ was looking for, or else she may have exited a failing search. If
+ LINE_INDEX is -1, then that shows that the string searched for was
+ not found. We use this to determine where to place rl_point. */
+ return (_rl_isearch_cleanup (cxt, r));
+}
- FREE (allocated_line);
- free (lines);
+#if defined (READLINE_CALLBACKS)
+/* Called from the callback functions when we are ready to read a key. The
+ callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH).
+ If _rl_isearch_dispatch finishes searching, this function is responsible
+ for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */
+int
+_rl_isearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
- RL_UNSETSTATE(RL_STATE_ISEARCH);
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
- return 0;
+ return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0;
}
+#endif
diff --git a/contrib/libreadline/macro.c b/contrib/libreadline/macro.c
index b73c3af..2975bf1 100644
--- a/contrib/libreadline/macro.c
+++ b/contrib/libreadline/macro.c
@@ -100,6 +100,8 @@ _rl_with_macro_input (string)
int
_rl_next_macro_key ()
{
+ int c;
+
if (rl_executing_macro == 0)
return (0);
@@ -109,7 +111,14 @@ _rl_next_macro_key ()
return (_rl_next_macro_key ());
}
+#if defined (READLINE_CALLBACKS)
+ c = rl_executing_macro[executing_macro_index++];
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD) && rl_executing_macro[executing_macro_index] == 0)
+ _rl_pop_executing_macro ();
+ return c;
+#else
return (rl_executing_macro[executing_macro_index++]);
+#endif
}
/* Save the currently executing macro on a stack of saved macros. */
diff --git a/contrib/libreadline/mbutil.c b/contrib/libreadline/mbutil.c
index 695845a..17dde53 100644
--- a/contrib/libreadline/mbutil.c
+++ b/contrib/libreadline/mbutil.c
@@ -1,6 +1,6 @@
/* mbutil.c -- readline multibyte character utility functions */
-/* Copyright (C) 2001-2004 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -77,18 +77,20 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
char *string;
int seed, count, find_non_zero;
{
- size_t tmp = 0;
+ size_t tmp;
mbstate_t ps;
- int point = 0;
+ int point;
wchar_t wc;
+ tmp = 0;
+
memset(&ps, 0, sizeof (mbstate_t));
if (seed < 0)
seed = 0;
if (count <= 0)
return seed;
- point = seed + _rl_adjust_point(string, seed, &ps);
+ point = seed + _rl_adjust_point (string, seed, &ps);
/* if this is true, means that seed was not pointed character
started byte. So correct the point and consume count */
if (seed < point)
@@ -134,7 +136,8 @@ _rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
break;
}
}
- return point;
+
+ return point;
}
static int
@@ -313,6 +316,28 @@ _rl_is_mbchar_matched (string, seed, end, mbchar, length)
return 0;
return 1;
}
+
+wchar_t
+_rl_char_value (buf, ind)
+ char *buf;
+ int ind;
+{
+ size_t tmp;
+ wchar_t wc;
+ mbstate_t ps;
+ int l;
+
+ if (MB_LEN_MAX == 1 || rl_byte_oriented)
+ return ((wchar_t) buf[ind]);
+ l = strlen (buf);
+ if (ind >= l - 1)
+ return ((wchar_t) buf[ind]);
+ memset (&ps, 0, sizeof (mbstate_t));
+ tmp = mbrtowc (&wc, buf + ind, l - ind, &ps);
+ if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
+ return ((wchar_t) buf[ind]);
+ return wc;
+}
#endif /* HANDLE_MULTIBYTE */
/* Find next `count' characters started byte point of the specified seed.
diff --git a/contrib/libreadline/misc.c b/contrib/libreadline/misc.c
index 403313a..d455832 100644
--- a/contrib/libreadline/misc.c
+++ b/contrib/libreadline/misc.c
@@ -1,6 +1,6 @@
/* misc.c -- miscellaneous bindable readline functions. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -63,6 +63,8 @@ void _rl_free_history_entry PARAMS((HIST_ENTRY *));
to preserve the value of rl_point from line to line. */
int _rl_history_preserve_point = 0;
+_rl_arg_cxt _rl_argcxt;
+
/* Saved target point for when _rl_history_preserve_point is set. Special
value of -1 means that point is at the end of the line. */
int _rl_history_saved_point = -1;
@@ -73,77 +75,74 @@ int _rl_history_saved_point = -1;
/* */
/* **************************************************************** */
-/* Handle C-u style numeric args, as well as M--, and M-digits. */
-static int
-rl_digit_loop ()
+int
+_rl_arg_overflow ()
{
- int key, c, sawminus, sawdigits;
+ if (rl_numeric_arg > 1000000)
+ {
+ _rl_argcxt = 0;
+ rl_explicit_arg = rl_numeric_arg = 0;
+ rl_ding ();
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ return 1;
+ }
+ return 0;
+}
+void
+_rl_arg_init ()
+{
rl_save_prompt ();
-
+ _rl_argcxt = 0;
RL_SETSTATE(RL_STATE_NUMERICARG);
- sawminus = sawdigits = 0;
- while (1)
- {
- if (rl_numeric_arg > 1000000)
- {
- sawdigits = rl_explicit_arg = rl_numeric_arg = 0;
- rl_ding ();
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return 1;
- }
- rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+}
- if (c < 0)
- {
- _rl_abort_internal ();
- return -1;
- }
+int
+_rl_arg_getchar ()
+{
+ int c;
- /* If we see a key bound to `universal-argument' after seeing digits,
- it ends the argument but is otherwise ignored. */
- if (_rl_keymap[c].type == ISFUNC &&
- _rl_keymap[c].function == rl_universal_argument)
- {
- if (sawdigits == 0)
- {
- rl_numeric_arg *= 4;
- continue;
- }
- else
- {
- RL_SETSTATE(RL_STATE_MOREINPUT);
- key = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- rl_restore_prompt ();
- rl_clear_message ();
- RL_UNSETSTATE(RL_STATE_NUMERICARG);
- return (_rl_dispatch (key, _rl_keymap));
- }
- }
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
- c = UNMETA (c);
+ return c;
+}
- if (_rl_digit_p (c))
- {
- rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + c - '0' : c - '0';
- sawdigits = rl_explicit_arg = 1;
- }
- else if (c == '-' && rl_explicit_arg == 0)
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+int
+_rl_arg_dispatch (cxt, c)
+ _rl_arg_cxt cxt;
+ int c;
+{
+ int key, r;
+
+ key = c;
+
+ /* If we see a key bound to `universal-argument' after seeing digits,
+ it ends the argument but is otherwise ignored. */
+ if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ if ((cxt & NUM_SAWDIGITS) == 0)
{
- rl_numeric_arg = sawminus = 1;
- rl_arg_sign = -1;
+ rl_numeric_arg *= 4;
+ return 1;
}
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_argcxt |= NUM_READONE;
+ return 0; /* XXX */
+ }
else
{
- /* Make M-- command equivalent to M--1 command. */
- if (sawminus && rl_numeric_arg == 1 && rl_explicit_arg == 0)
- rl_explicit_arg = 1;
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ key = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
rl_restore_prompt ();
rl_clear_message ();
RL_UNSETSTATE(RL_STATE_NUMERICARG);
@@ -151,35 +150,96 @@ rl_digit_loop ()
}
}
- /*NOTREACHED*/
-}
+ c = UNMETA (c);
-/* Add the current digit to the argument in progress. */
-int
-rl_digit_argument (ignore, key)
- int ignore, key;
-{
- rl_execute_next (key);
- return (rl_digit_loop ());
+ if (_rl_digit_p (c))
+ {
+ r = _rl_digit_value (c);
+ rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r;
+ rl_explicit_arg = 1;
+ _rl_argcxt |= NUM_SAWDIGITS;
+ }
+ else if (c == '-' && rl_explicit_arg == 0)
+ {
+ rl_numeric_arg = 1;
+ _rl_argcxt |= NUM_SAWMINUS;
+ rl_arg_sign = -1;
+ }
+ else
+ {
+ /* Make M-- command equivalent to M--1 command. */
+ if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0)
+ rl_explicit_arg = 1;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+
+ r = _rl_dispatch (key, _rl_keymap);
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* At worst, this will cause an extra redisplay. Otherwise,
+ we have to wait until the next character comes in. */
+ if (rl_done == 0)
+ (*rl_redisplay_function) ();
+ r = 0;
+ }
+ return r;
+ }
+
+ return 1;
}
-/* What to do when you abort reading an argument. */
-int
-rl_discard_argument ()
+/* Handle C-u style numeric args, as well as M--, and M-digits. */
+static int
+rl_digit_loop ()
{
- rl_ding ();
- rl_clear_message ();
- _rl_init_argument ();
- return 0;
+ int c, r;
+
+ while (1)
+ {
+ if (_rl_arg_overflow ())
+ return 1;
+
+ c = _rl_arg_getchar ();
+
+ if (c < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_arg_dispatch (_rl_argcxt, c);
+ if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+ break;
+ }
}
/* Create a default argument. */
-int
-_rl_init_argument ()
+void
+_rl_reset_argument ()
{
rl_numeric_arg = rl_arg_sign = 1;
rl_explicit_arg = 0;
- return 0;
+ _rl_argcxt = 0;
+}
+
+/* Start a numeric argument with initial value KEY */
+int
+rl_digit_argument (ignore, key)
+ int ignore, key;
+{
+ _rl_arg_init ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_arg_dispatch (_rl_argcxt, key);
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ return 0;
+ }
+ else
+ {
+ rl_execute_next (key);
+ return (rl_digit_loop ());
+ }
}
/* C-u, universal argument. Multiply the current argument by 4.
@@ -189,8 +249,43 @@ int
rl_universal_argument (count, key)
int count, key;
{
+ _rl_arg_init ();
rl_numeric_arg *= 4;
- return (rl_digit_loop ());
+
+ return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ());
+}
+
+int
+_rl_arg_callback (cxt)
+ _rl_arg_cxt cxt;
+{
+ int c, r;
+
+ c = _rl_arg_getchar ();
+
+ if (_rl_argcxt & NUM_READONE)
+ {
+ _rl_argcxt &= ~NUM_READONE;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ rl_execute_next (c);
+ return 0;
+ }
+
+ r = _rl_arg_dispatch (cxt, c);
+ return (r != 1);
+}
+
+/* What to do when you abort reading an argument. */
+int
+rl_discard_argument ()
+{
+ rl_ding ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+
+ return 0;
}
/* **************************************************************** */
@@ -225,8 +320,10 @@ _rl_free_history_entry (entry)
{
if (entry == 0)
return;
- if (entry->line)
- free (entry->line);
+
+ FREE (entry->line);
+ FREE (entry->timestamp);
+
free (entry);
}
@@ -242,6 +339,7 @@ rl_maybe_replace_line ()
{
temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
free (temp->line);
+ FREE (temp->timestamp);
free (temp);
}
return 0;
@@ -274,6 +372,7 @@ rl_maybe_save_line ()
{
_rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
+ _rl_saved_line_for_history->timestamp = (char *)NULL;
_rl_saved_line_for_history->data = (char *)rl_undo_list;
}
diff --git a/contrib/libreadline/readline.c b/contrib/libreadline/readline.c
index a70d80f..5e9767a 100644
--- a/contrib/libreadline/readline.c
+++ b/contrib/libreadline/readline.c
@@ -1,7 +1,7 @@
/* readline.c -- a general facility for reading lines of input
with emacs style editing and completion. */
-/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -68,11 +68,11 @@
#include "xmalloc.h"
#ifndef RL_LIBRARY_VERSION
-# define RL_LIBRARY_VERSION "5.0"
+# define RL_LIBRARY_VERSION "5.1"
#endif
#ifndef RL_READLINE_VERSION
-# define RL_READLINE_VERSION 0x0500
+# define RL_READLINE_VERSION 0x0501
#endif
extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
@@ -87,6 +87,9 @@ static void bind_arrow_keys PARAMS((void));
static void readline_default_bindings PARAMS((void));
static void reset_default_bindings PARAMS((void));
+static int _rl_subseq_result PARAMS((int, Keymap, int, int));
+static int _rl_subseq_getchar PARAMS((int));
+
/* **************************************************************** */
/* */
/* Line editing input utility */
@@ -104,6 +107,7 @@ int rl_gnu_readline_p = 1;
By default, it is the standard emacs keymap. */
Keymap _rl_keymap = emacs_standard_keymap;
+
/* The current style of editing. */
int rl_editing_mode = emacs_mode;
@@ -219,6 +223,9 @@ char *_rl_comment_begin;
/* Keymap holding the function currently being executed. */
Keymap rl_executing_keymap;
+/* Keymap we're currently using to dispatch. */
+Keymap _rl_dispatching_keymap;
+
/* Non-zero means to erase entire line, including prompt, on empty input lines. */
int rl_erase_empty_line = 0;
@@ -230,6 +237,9 @@ int rl_num_chars_to_read;
char *rl_line_buffer = (char *)NULL;
int rl_line_buffer_len = 0;
+/* Key sequence `contexts' */
+_rl_keyseq_cxt *_rl_kscxt = 0;
+
/* Forward declarations used by the display, termcap, and history code. */
/* **************************************************************** */
@@ -251,6 +261,10 @@ int _rl_convert_meta_chars_to_ascii = 1;
rather than as a meta-prefixed escape sequence. */
int _rl_output_meta_chars = 0;
+/* Non-zero means to look at the termios special characters and bind
+ them to equivalent readline functions at startup. */
+int _rl_bind_stty_chars = 1;
+
/* **************************************************************** */
/* */
/* Top Level Functions */
@@ -291,14 +305,16 @@ readline (prompt)
rl_set_prompt (prompt);
rl_initialize ();
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
#if defined (HANDLE_SIGNALS)
rl_set_signals ();
#endif
value = readline_internal ();
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
#if defined (HANDLE_SIGNALS)
rl_clear_signals ();
@@ -388,6 +404,36 @@ readline_internal_teardown (eof)
return (eof ? (char *)NULL : savestring (the_line));
}
+void
+_rl_internal_char_cleanup ()
+{
+#if defined (VI_MODE)
+ /* In vi mode, when you exit insert mode, the cursor moves back
+ over the previous character. We explicitly check for that here. */
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+ rl_vi_check ();
+#endif /* VI_MODE */
+
+ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ rl_newline (1, '\n');
+ }
+
+ if (rl_done == 0)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ /* If the application writer has told us to erase the entire line if
+ the only character typed was something bound to rl_newline, do so. */
+ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
+ rl_point == 0 && rl_end == 0)
+ _rl_erase_entire_line ();
+}
+
STATIC_CALLBACK int
#if defined (READLINE_CALLBACKS)
readline_internal_char ()
@@ -410,12 +456,21 @@ readline_internal_charloop ()
code = setjmp (readline_top_level);
if (code)
- (*rl_redisplay_function) ();
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ /* If we get here, we're not being called from something dispatched
+ from _rl_callback_read_char(), which sets up its own value of
+ readline_top_level (saving and restoring the old, of course), so
+ we can just return here. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+ }
if (rl_pending_input == 0)
{
/* Then initialize the argument and number of keys read. */
- _rl_init_argument ();
+ _rl_reset_argument ();
rl_key_sequence_length = 0;
}
@@ -449,27 +504,7 @@ readline_internal_charloop ()
if (rl_pending_input == 0 && lk == _rl_last_command_was_kill)
_rl_last_command_was_kill = 0;
-#if defined (VI_MODE)
- /* In vi mode, when you exit insert mode, the cursor moves back
- over the previous character. We explicitly check for that here. */
- if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
- rl_vi_check ();
-#endif /* VI_MODE */
-
- if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
- {
- (*rl_redisplay_function) ();
- rl_newline (1, '\n');
- }
-
- if (rl_done == 0)
- (*rl_redisplay_function) ();
-
- /* If the application writer has told us to erase the entire line if
- the only character typed was something bound to rl_newline, do so. */
- if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
- rl_point == 0 && rl_end == 0)
- _rl_erase_entire_line ();
+ _rl_internal_char_cleanup ();
#if defined (READLINE_CALLBACKS)
return 0;
@@ -519,6 +554,107 @@ _rl_set_the_line ()
the_line = rl_line_buffer;
}
+#if defined (READLINE_CALLBACKS)
+_rl_keyseq_cxt *
+_rl_keyseq_cxt_alloc ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt));
+
+ cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0;
+
+ cxt->okey = 0;
+ cxt->ocxt = _rl_kscxt;
+ cxt->childval = 42; /* sentinel value */
+
+ return cxt;
+}
+
+void
+_rl_keyseq_cxt_dispose (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ free (cxt);
+}
+
+void
+_rl_keyseq_chain_dispose ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ while (_rl_kscxt)
+ {
+ cxt = _rl_kscxt;
+ _rl_kscxt = _rl_kscxt->ocxt;
+ _rl_keyseq_cxt_dispose (cxt);
+ }
+}
+#endif
+
+static int
+_rl_subseq_getchar (key)
+ int key;
+{
+ int k;
+
+ if (key == ESC)
+ RL_SETSTATE(RL_STATE_METANEXT);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ k = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (key == ESC)
+ RL_UNSETSTATE(RL_STATE_METANEXT);
+
+ return k;
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_dispatch_callback (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ int nkey, r;
+
+ /* For now */
+#if 1
+ /* The first time this context is used, we want to read input and dispatch
+ on it. When traversing the chain of contexts back `up', we want to use
+ the value from the next context down. We're simulating recursion using
+ a chain of contexts. */
+ if ((cxt->flags & KSEQ_DISPATCHED) == 0)
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+ }
+ else
+ r = cxt->childval;
+#else
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+#endif
+
+ /* For now */
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ return r;
+ }
+
+ if (r != -3) /* magic value that says we added to the chain */
+ _rl_kscxt = cxt->ocxt;
+ if (_rl_kscxt)
+ _rl_kscxt->childval = r;
+ if (r != -3)
+ _rl_keyseq_cxt_dispose (cxt);
+
+ return r;
+}
+#endif /* READLINE_CALLBACKS */
+
/* Do the command associated with KEY in MAP.
If the associated command is really a keymap, then read
another key, and dispatch into that map. */
@@ -527,6 +663,7 @@ _rl_dispatch (key, map)
register int key;
Keymap map;
{
+ _rl_dispatching_keymap = map;
return _rl_dispatch_subseq (key, map, 0);
}
@@ -539,6 +676,9 @@ _rl_dispatch_subseq (key, map, got_subseq)
int r, newkey;
char *macro;
rl_command_func_t *func;
+#if defined (READLINE_CALLBACKS)
+ _rl_keyseq_cxt *cxt;
+#endif
if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
{
@@ -572,10 +712,6 @@ _rl_dispatch_subseq (key, map, got_subseq)
rl_executing_keymap = map;
-#if 0
- _rl_suppress_redisplay = (map[key].function == rl_insert) && _rl_input_available ();
-#endif
-
rl_dispatching = 1;
RL_SETSTATE(RL_STATE_DISPATCHING);
r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
@@ -607,6 +743,10 @@ _rl_dispatch_subseq (key, map, got_subseq)
}
else
{
+#if defined (READLINE_CALLBACKS)
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ _rl_keyseq_chain_dispose ();
+#endif
_rl_abort_internal ();
return -1;
}
@@ -628,58 +768,43 @@ _rl_dispatch_subseq (key, map, got_subseq)
#endif
rl_key_sequence_length++;
+ _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key);
- if (key == ESC)
- RL_SETSTATE(RL_STATE_METANEXT);
- RL_SETSTATE(RL_STATE_MOREINPUT);
- newkey = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
- if (key == ESC)
- RL_UNSETSTATE(RL_STATE_METANEXT);
+ /* Allocate new context here. Use linked contexts (linked through
+ cxt->ocxt) to simulate recursion */
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* Return 0 only the first time, to indicate success to
+ _rl_callback_read_char. The rest of the time, we're called
+ from _rl_dispatch_callback, so we return 3 to indicate
+ special handling is necessary. */
+ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
+ cxt = _rl_keyseq_cxt_alloc ();
+
+ if (got_subseq)
+ cxt->flags |= KSEQ_SUBSEQ;
+ cxt->okey = key;
+ cxt->oldmap = map;
+ cxt->dmap = _rl_dispatching_keymap;
+ cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function;
+
+ RL_SETSTATE (RL_STATE_MULTIKEY);
+ _rl_kscxt = cxt;
+
+ return r; /* don't indicate immediate success */
+ }
+#endif
+ newkey = _rl_subseq_getchar (key);
if (newkey < 0)
{
_rl_abort_internal ();
return -1;
}
- r = _rl_dispatch_subseq (newkey, FUNCTION_TO_KEYMAP (map, key), got_subseq || map[ANYOTHERKEY].function);
-
- if (r == -2)
- /* We didn't match anything, and the keymap we're indexed into
- shadowed a function previously bound to that prefix. Call
- the function. The recursive call to _rl_dispatch_subseq has
- already taken care of pushing any necessary input back onto
- the input queue with _rl_unget_char. */
- {
-#if 0
- r = _rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key));
-#else
- /* XXX - experimental code -- might never be executed. Save
- for later. */
- Keymap m = FUNCTION_TO_KEYMAP (map, key);
- int type = m[ANYOTHERKEY].type;
- func = m[ANYOTHERKEY].function;
- if (type == ISFUNC && func == rl_do_lowercase_version)
- r = _rl_dispatch (_rl_to_lower (key), map);
- else
- r = _rl_dispatch (ANYOTHERKEY, m);
-#endif
- }
- else if (r && map[ANYOTHERKEY].function)
- {
- /* We didn't match (r is probably -1), so return something to
- tell the caller that it should try ANYOTHERKEY for an
- overridden function. */
- _rl_unget_char (key);
- return -2;
- }
- else if (r && got_subseq)
- {
- /* OK, back up the chain. */
- _rl_unget_char (key);
- return -1;
- }
+ r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function);
+ return _rl_subseq_result (r, map, key, got_subseq);
}
else
{
@@ -703,9 +828,69 @@ _rl_dispatch_subseq (key, map, got_subseq)
_rl_vi_textmod_command (key))
_rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
#endif
+
return (r);
}
+static int
+_rl_subseq_result (r, map, key, got_subseq)
+ int r;
+ Keymap map;
+ int key, got_subseq;
+{
+ Keymap m;
+ int type, nt;
+ rl_command_func_t *func, *nf;
+
+ if (r == -2)
+ /* We didn't match anything, and the keymap we're indexed into
+ shadowed a function previously bound to that prefix. Call
+ the function. The recursive call to _rl_dispatch_subseq has
+ already taken care of pushing any necessary input back onto
+ the input queue with _rl_unget_char. */
+ {
+ m = _rl_dispatching_keymap;
+ type = m[ANYOTHERKEY].type;
+ func = m[ANYOTHERKEY].function;
+ if (type == ISFUNC && func == rl_do_lowercase_version)
+ r = _rl_dispatch (_rl_to_lower (key), map);
+ else if (type == ISFUNC && func == rl_insert)
+ {
+ /* If the function that was shadowed was self-insert, we
+ somehow need a keymap with map[key].func == self-insert.
+ Let's use this one. */
+ nt = m[key].type;
+ nf = m[key].function;
+
+ m[key].type = type;
+ m[key].function = func;
+ r = _rl_dispatch (key, m);
+ m[key].type = nt;
+ m[key].function = nf;
+ }
+ else
+ r = _rl_dispatch (ANYOTHERKEY, m);
+ }
+ else if (r && map[ANYOTHERKEY].function)
+ {
+ /* We didn't match (r is probably -1), so return something to
+ tell the caller that it should try ANYOTHERKEY for an
+ overridden function. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -2;
+ }
+ else if (r && got_subseq)
+ {
+ /* OK, back up the chain. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -1;
+ }
+
+ return r;
+}
+
/* **************************************************************** */
/* */
/* Initializations */
@@ -863,7 +1048,8 @@ readline_initialize_everything ()
static void
readline_default_bindings ()
{
- rl_tty_set_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ rl_tty_set_default_bindings (_rl_keymap);
}
/* Reset the default bindings for the terminal special characters we're
@@ -871,8 +1057,11 @@ readline_default_bindings ()
static void
reset_default_bindings ()
{
- rl_tty_unset_default_bindings (_rl_keymap);
- rl_tty_set_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ {
+ rl_tty_unset_default_bindings (_rl_keymap);
+ rl_tty_set_default_bindings (_rl_keymap);
+ }
}
/* Bind some common arrow key sequences in MAP. */
@@ -906,6 +1095,13 @@ bind_arrow_keys_internal (map)
rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
+#if defined (__MINGW32__)
+ rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
+#endif
+
_rl_keymap = xkeymap;
}
diff --git a/contrib/libreadline/rldefs.h b/contrib/libreadline/rldefs.h
index 0d60040..0f6c874 100644
--- a/contrib/libreadline/rldefs.h
+++ b/contrib/libreadline/rldefs.h
@@ -2,7 +2,7 @@
for readline. This should be included after any files that define
system-specific constants like _POSIX_VERSION or USG. */
-/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file contains the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -38,7 +38,11 @@
# if defined (HAVE_TERMIO_H)
# define TERMIO_TTY_DRIVER
# else
-# define NEW_TTY_DRIVER
+# if !defined (__MINGW32__)
+# define NEW_TTY_DRIVER
+# else
+# define NO_TTY_DRIVER
+# endif
# endif
#endif
diff --git a/contrib/libreadline/rlmbutil.h b/contrib/libreadline/rlmbutil.h
index 77cc026..11adacb 100644
--- a/contrib/libreadline/rlmbutil.h
+++ b/contrib/libreadline/rlmbutil.h
@@ -97,6 +97,21 @@ extern int _rl_read_mbstring PARAMS((int, char *, int));
extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
+extern wchar_t _rl_char_value PARAMS((char *, int));
+extern int _rl_walphabetic PARAMS((wchar_t));
+
+#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
+#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
+
+#define MB_NEXTCHAR(b,s,c,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_next_mbchar ((b), (s), (c), (f)) \
+ : ((s) + (c)))
+#define MB_PREVCHAR(b,s,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_prev_mbchar ((b), (s), (f)) \
+ : ((s) - 1))
+
#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
#define MB_NULLWCH(x) ((x) == 0)
@@ -111,6 +126,16 @@ extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1))
#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2))
+#define _rl_char_value(buf,ind) ((buf)[(ind)])
+
+#define _rl_walphabetic(c) (rl_alphabetic (c))
+
+#define _rl_to_wupper(c) (_rl_to_upper (c))
+#define _rl_to_wlower(c) (_rl_to_lower (c))
+
+#define MB_NEXTCHAR(b,s,c,f) ((s) + (c))
+#define MB_PREVCHAR(b,s,f) ((s) - 1)
+
#define MB_INVALIDCH(x) (0)
#define MB_NULLWCH(x) (0)
diff --git a/contrib/libreadline/rlprivate.h b/contrib/libreadline/rlprivate.h
index c3cee91..1c216ea 100644
--- a/contrib/libreadline/rlprivate.h
+++ b/contrib/libreadline/rlprivate.h
@@ -1,7 +1,7 @@
/* rlprivate.h -- functions and variables global to the readline library,
but not intended for use by applications. */
-/* Copyright (C) 1999-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -30,6 +30,95 @@
/*************************************************************************
* *
+ * Global structs undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+/* search types */
+#define RL_SEARCH_ISEARCH 0x01 /* incremental search */
+#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */
+#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */
+
+/* search flags */
+#define SF_REVERSE 0x01
+#define SF_FOUND 0x02
+#define SF_FAILED 0x04
+
+typedef struct __rl_search_context
+{
+ int type;
+ int sflags;
+
+ char *search_string;
+ int search_string_index;
+ int search_string_size;
+
+ char **lines;
+ char *allocated_line;
+ int hlen;
+ int hindex;
+
+ int save_point;
+ int save_mark;
+ int save_line;
+ int last_found_line;
+ char *prev_line_found;
+
+ UNDO_LIST *save_undo_list;
+
+ int history_pos;
+ int direction;
+
+ int lastc;
+#if defined (HANDLE_MULTIBYTE)
+ char mb[MB_LEN_MAX];
+#endif
+
+ char *sline;
+ int sline_len;
+ int sline_index;
+
+ char *search_terminators;
+} _rl_search_cxt;
+
+/* Callback data for reading numeric arguments */
+#define NUM_SAWMINUS 0x01
+#define NUM_SAWDIGITS 0x02
+#define NUM_READONE 0x04
+
+typedef int _rl_arg_cxt;
+
+/* A context for reading key sequences longer than a single character when
+ using the callback interface. */
+#define KSEQ_DISPATCHED 0x01
+#define KSEQ_SUBSEQ 0x02
+#define KSEQ_RECURSIVE 0x04
+
+typedef struct __rl_keyseq_context
+{
+ int flags;
+ int subseq_arg;
+ int subseq_retval; /* XXX */
+ Keymap dmap;
+
+ Keymap oldmap;
+ int okey;
+ struct __rl_keyseq_context *ocxt;
+ int childval;
+} _rl_keyseq_cxt;
+
+ /* fill in more as needed */
+/* `Generic' callback data and functions */
+typedef struct __rl_callback_generic_arg
+{
+ int count;
+ int i1, i2;
+ /* add here as needed */
+} _rl_callback_generic_arg;
+
+typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *));
+
+/*************************************************************************
+ * *
* Global functions undocumented in texinfo manual and not in readline.h *
* *
*************************************************************************/
@@ -54,6 +143,8 @@ extern int readline_echoing_p;
extern int rl_key_sequence_length;
extern int rl_byte_oriented;
+extern _rl_keyseq_cxt *_rl_kscxt;
+
/* display.c */
extern int rl_display_fixed;
@@ -100,6 +191,16 @@ extern void readline_internal_setup PARAMS((void));
extern char *readline_internal_teardown PARAMS((int));
extern int readline_internal_char PARAMS((void));
+extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void));
+extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *));
+extern void _rl_keyseq_chain_dispose PARAMS((void));
+
+extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *));
+
+/* callback.c */
+extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int));
+extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *));
+
#endif /* READLINE_CALLBACKS */
/* bind.c */
@@ -132,6 +233,15 @@ extern void _rl_insert_typein PARAMS((int));
extern int _rl_unget_char PARAMS((int));
extern int _rl_pushed_input_available PARAMS((void));
+/* isearch.c */
+extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int));
+extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int));
+
+extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int));
+extern int _rl_isearch_callback PARAMS((_rl_search_cxt *));
+
+extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
+
/* macro.c */
extern void _rl_with_macro_input PARAMS((char *));
extern int _rl_next_macro_key PARAMS((void));
@@ -141,7 +251,12 @@ extern void _rl_add_macro_char PARAMS((int));
extern void _rl_kill_kbd_macro PARAMS((void));
/* misc.c */
-extern int _rl_init_argument PARAMS((void));
+extern int _rl_arg_overflow PARAMS((void));
+extern void _rl_arg_init PARAMS((void));
+extern int _rl_arg_getchar PARAMS((void));
+extern int _rl_arg_callback PARAMS((_rl_arg_cxt));
+extern void _rl_reset_argument PARAMS((void));
+
extern void _rl_start_using_history PARAMS((void));
extern int _rl_free_saved_history_line PARAMS((void));
extern void _rl_set_insert_mode PARAMS((int, int));
@@ -157,11 +272,15 @@ extern void _rl_init_line_state PARAMS((void));
extern void _rl_set_the_line PARAMS((void));
extern int _rl_dispatch PARAMS((int, Keymap));
extern int _rl_dispatch_subseq PARAMS((int, Keymap, int));
+extern void _rl_internal_char_cleanup PARAMS((void));
/* rltty.c */
extern int _rl_disable_tty_signals PARAMS((void));
extern int _rl_restore_tty_signals PARAMS((void));
+/* search.c */
+extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *));
+
/* terminal.c */
extern void _rl_get_screen_size PARAMS((int, int));
extern int _rl_init_terminal_io PARAMS((const char *));
@@ -217,6 +336,10 @@ extern void _rl_vi_done_inserting PARAMS((void));
extern const char *_rl_possible_control_prefixes[];
extern const char *_rl_possible_meta_prefixes[];
+/* callback.c */
+extern _rl_callback_func_t *_rl_callback_func;
+extern _rl_callback_generic_arg *_rl_callback_data;
+
/* complete.c */
extern int _rl_complete_show_all;
extern int _rl_complete_show_unmodified;
@@ -231,11 +354,14 @@ extern int _rl_page_completions;
extern int _rl_vis_botlin;
extern int _rl_last_c_pos;
extern int _rl_suppress_redisplay;
+extern int _rl_want_redisplay;
extern char *rl_display_prompt;
/* isearch.c */
extern char *_rl_isearch_terminators;
+extern _rl_search_cxt *_rl_iscxt;
+
/* macro.c */
extern char *_rl_executing_macro;
@@ -243,6 +369,8 @@ extern char *_rl_executing_macro;
extern int _rl_history_preserve_point;
extern int _rl_history_saved_point;
+extern _rl_arg_cxt _rl_argcxt;
+
/* readline.c */
extern int _rl_horizontal_scroll_mode;
extern int _rl_mark_modified_lines;
@@ -250,6 +378,7 @@ extern int _rl_bell_preference;
extern int _rl_meta_flag;
extern int _rl_convert_meta_chars_to_ascii;
extern int _rl_output_meta_chars;
+extern int _rl_bind_stty_chars;
extern char *_rl_comment_begin;
extern unsigned char _rl_parsing_conditionalized_out;
extern Keymap _rl_keymap;
@@ -259,6 +388,9 @@ extern int _rl_last_command_was_kill;
extern int _rl_eof_char;
extern procenv_t readline_top_level;
+/* search.c */
+extern _rl_search_cxt *_rl_nscxt;
+
/* terminal.c */
extern int _rl_enable_keypad;
extern int _rl_enable_meta;
diff --git a/contrib/libreadline/rltty.c b/contrib/libreadline/rltty.c
index 1a31f35..9a0326e 100644
--- a/contrib/libreadline/rltty.c
+++ b/contrib/libreadline/rltty.c
@@ -1,7 +1,7 @@
/* rltty.c -- functions to prepare and restore the terminal for readline's
use. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -152,7 +152,9 @@ set_winsize (tty)
#endif /* TIOCGWINSZ */
}
-#if defined (NEW_TTY_DRIVER)
+#if defined (NO_TTY_DRIVER)
+/* Nothing */
+#elif defined (NEW_TTY_DRIVER)
/* Values for the `flags' field of a struct bsdtty. This tells which
elements of the struct bsdtty have been fetched from the system and
@@ -233,6 +235,7 @@ get_tty_settings (tty, tiop)
tiop->flags = tiop->lflag = 0;
+ errno = 0;
if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
return -1;
tiop->flags |= SGTTY_SET;
@@ -518,6 +521,7 @@ get_tty_settings (tty, tiop)
{
set_winsize (tty);
+ errno = 0;
if (_get_tty_settings (tty, tiop) < 0)
return -1;
@@ -631,9 +635,23 @@ prepare_terminal_settings (meta_flag, oldtio, tiop)
#endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */
}
-#endif /* NEW_TTY_DRIVER */
+#endif /* !NEW_TTY_DRIVER */
/* Put the terminal in CBREAK mode so that we can detect key presses. */
+#if defined (NO_TTY_DRIVER)
+void
+rl_prep_terminal (meta_flag)
+ int meta_flag;
+{
+ readline_echoing_p = 1;
+}
+
+void
+rl_deprep_terminal ()
+{
+}
+
+#else /* ! NO_TTY_DRIVER */
void
rl_prep_terminal (meta_flag)
int meta_flag;
@@ -651,16 +669,43 @@ rl_prep_terminal (meta_flag)
if (get_tty_settings (tty, &tio) < 0)
{
+#if defined (ENOTSUP)
+ /* MacOS X, at least, lies about the value of errno if tcgetattr fails. */
+ if (errno == ENOTTY || errno == ENOTSUP)
+#else
+ if (errno == ENOTTY)
+#endif
+ readline_echoing_p = 1; /* XXX */
release_sigint ();
return;
}
otio = tio;
- rl_tty_unset_default_bindings (_rl_keymap);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we restore the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ rl_tty_unset_default_bindings (vi_insertion_keymap);
+ else
+#endif
+ rl_tty_unset_default_bindings (_rl_keymap);
+ }
save_tty_chars (&otio);
RL_SETSTATE(RL_STATE_TTYCSAVED);
- _rl_bind_tty_special_chars (_rl_keymap, tio);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we set the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ _rl_bind_tty_special_chars (vi_insertion_keymap, tio);
+ else
+#endif
+ _rl_bind_tty_special_chars (_rl_keymap, tio);
+ }
prepare_terminal_settings (meta_flag, otio, &tio);
@@ -710,6 +755,7 @@ rl_deprep_terminal ()
release_sigint ();
}
+#endif /* !NO_TTY_DRIVER */
/* **************************************************************** */
/* */
@@ -721,6 +767,10 @@ int
rl_restart_output (count, key)
int count, key;
{
+#if defined (__MINGW32__)
+ return 0;
+#else /* !__MING32__ */
+
int fildes = fileno (rl_outstream);
#if defined (TIOCSTART)
#if defined (apollo)
@@ -748,12 +798,17 @@ rl_restart_output (count, key)
#endif /* !TIOCSTART */
return 0;
+#endif /* !__MINGW32__ */
}
int
rl_stop_output (count, key)
int count, key;
{
+#if defined (__MINGW32__)
+ return 0;
+#else
+
int fildes = fileno (rl_instream);
#if defined (TIOCSTOP)
@@ -776,6 +831,7 @@ rl_stop_output (count, key)
#endif /* !TIOCSTOP */
return 0;
+#endif /* !__MINGW32__ */
}
/* **************************************************************** */
@@ -784,9 +840,16 @@ rl_stop_output (count, key)
/* */
/* **************************************************************** */
+#if !defined (NO_TTY_DRIVER)
#define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func)
+#endif
-#if defined (NEW_TTY_DRIVER)
+#if defined (NO_TTY_DRIVER)
+
+#define SET_SPECIAL(sc, func)
+#define RESET_SPECIAL(c)
+
+#elif defined (NEW_TTY_DRIVER)
static void
set_special_char (kmap, tiop, sc, func)
Keymap kmap;
@@ -867,6 +930,7 @@ void
rltty_set_default_bindings (kmap)
Keymap kmap;
{
+#if !defined (NO_TTY_DRIVER)
TIOTYPE ttybuff;
int tty;
static int called = 0;
@@ -875,6 +939,7 @@ rltty_set_default_bindings (kmap)
if (get_tty_settings (tty, &ttybuff) == 0)
_rl_bind_tty_special_chars (kmap, ttybuff);
+#endif
}
/* New public way to set the system default editing chars to their readline
@@ -912,7 +977,7 @@ rl_tty_unset_default_bindings (kmap)
#if defined (HANDLE_SIGNALS)
-#if defined (NEW_TTY_DRIVER)
+#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER)
int
_rl_disable_tty_signals ()
{
diff --git a/contrib/libreadline/search.c b/contrib/libreadline/search.c
index ce7d54e..8013916 100644
--- a/contrib/libreadline/search.c
+++ b/contrib/libreadline/search.c
@@ -1,6 +1,6 @@
/* search.c - code for non-incremental searching in emacs and vi modes. */
-/* Copyright (C) 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
This file is part of the Readline Library (the Library), a set of
routines for providing Emacs style line input to programs that ask
@@ -53,6 +53,8 @@
#endif
#define abs(x) (((x) >= 0) ? (x) : -(x))
+_rl_search_cxt *_rl_nscxt = 0;
+
extern HIST_ENTRY *_rl_saved_line_for_history;
/* Functions imported from the rest of the library. */
@@ -68,13 +70,19 @@ static int rl_history_search_pos;
static char *history_search_string;
static int history_string_size;
+static UNDO_LIST *noninc_saved_undo_list;
static void make_history_line_current PARAMS((HIST_ENTRY *));
static int noninc_search_from_pos PARAMS((char *, int, int));
-static void noninc_dosearch PARAMS((char *, int));
-static void noninc_search PARAMS((int, int));
+static int noninc_dosearch PARAMS((char *, int));
+static int noninc_search PARAMS((int, int));
static int rl_history_search_internal PARAMS((int, int));
static void rl_history_search_reinit PARAMS((void));
+static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int));
+static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int));
+static void _rl_nsearch_abort PARAMS((_rl_search_cxt *));
+static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int));
+
/* Make the data from the history entry ENTRY be the contents of the
current line. This doesn't do anything with rl_point; the caller
must set it. */
@@ -82,12 +90,15 @@ static void
make_history_line_current (entry)
HIST_ENTRY *entry;
{
-#if 0
- rl_replace_line (entry->line, 1);
- rl_undo_list = (UNDO_LIST *)entry->data;
-#else
_rl_replace_text (entry->line, 0, rl_end);
_rl_fix_point (1);
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ /* POSIX.2 says that the `U' command doesn't affect the copy of any
+ command lines to the edit line. We're going to implement that by
+ making the undo list start after the matching line is copied to the
+ current editing buffer. */
+ rl_free_undo_list ();
#endif
if (_rl_saved_line_for_history)
@@ -130,8 +141,8 @@ noninc_search_from_pos (string, pos, dir)
/* Search for a line in the history containing STRING. If DIR is < 0, the
search is backwards through previous entries, else through subsequent
- entries. */
-static void
+ entries. Returns 1 if the search was successful, 0 otherwise. */
+static int
noninc_dosearch (string, dir)
char *string;
int dir;
@@ -142,7 +153,7 @@ noninc_dosearch (string, dir)
if (string == 0 || *string == '\0' || noninc_history_pos < 0)
{
rl_ding ();
- return;
+ return 0;
}
pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);
@@ -153,7 +164,7 @@ noninc_dosearch (string, dir)
rl_clear_message ();
rl_point = 0;
rl_ding ();
- return;
+ return 0;
}
noninc_history_pos = pos;
@@ -164,7 +175,7 @@ noninc_dosearch (string, dir)
#if defined (VI_MODE)
if (rl_editing_mode != vi_mode)
#endif
- history_set_pos (oldpos);
+ history_set_pos (oldpos);
make_history_line_current (entry);
@@ -172,27 +183,24 @@ noninc_dosearch (string, dir)
rl_mark = rl_end;
rl_clear_message ();
+ return 1;
}
-/* Search non-interactively through the history list. DIR < 0 means to
- search backwards through the history of previous commands; otherwise
- the search is for commands subsequent to the current position in the
- history list. PCHAR is the character to use for prompting when reading
- the search string; if not specified (0), it defaults to `:'. */
-static void
-noninc_search (dir, pchar)
- int dir;
- int pchar;
+static _rl_search_cxt *
+_rl_nsearch_init (dir, pchar)
+ int dir, pchar;
{
- int saved_point, saved_mark, c;
+ _rl_search_cxt *cxt;
char *p;
-#if defined (HANDLE_MULTIBYTE)
- char mb[MB_LEN_MAX];
-#endif
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0);
+ if (dir < 0)
+ cxt->sflags |= SF_REVERSE; /* not strictly needed */
+
+ cxt->direction = dir;
+ cxt->history_pos = cxt->save_line;
rl_maybe_save_line ();
- saved_point = rl_point;
- saved_mark = rl_mark;
/* Clear the undo list, since reading the search string should create its
own undo list, and the whole list will end up being freed when we
@@ -207,99 +215,169 @@ noninc_search (dir, pchar)
rl_message (p, 0, 0);
free (p);
-#define SEARCH_RETURN rl_restore_prompt (); RL_UNSETSTATE(RL_STATE_NSEARCH); return
-
RL_SETSTATE(RL_STATE_NSEARCH);
- /* Read the search string. */
- while (1)
+
+ _rl_nscxt = cxt;
+
+ return cxt;
+}
+
+static int
+_rl_nsearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ _rl_scxt_dispose (cxt, 0);
+ _rl_nscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_NSEARCH);
+
+ return (r != 1);
+}
+
+static void
+_rl_nsearch_abort (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt ();
+
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+}
+
+/* Process just-read character C according to search context CXT. Return -1
+ if the caller should abort the search, 0 if we should break out of the
+ loop, and 1 if we should continue to read characters. */
+static int
+_rl_nsearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ switch (c)
{
- RL_SETSTATE(RL_STATE_MOREINPUT);
- c = rl_read_key ();
- RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ case CTRL('W'):
+ rl_unix_word_rubout (1, c);
+ break;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- c = _rl_read_mbstring (c, mb, MB_LEN_MAX);
-#endif
+ case CTRL('U'):
+ rl_unix_line_discard (1, c);
+ break;
- if (c == 0)
- break;
+ case RETURN:
+ case NEWLINE:
+ return 0;
- switch (c)
+ case CTRL('H'):
+ case RUBOUT:
+ if (rl_point == 0)
{
- case CTRL('H'):
- case RUBOUT:
- if (rl_point == 0)
- {
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- SEARCH_RETURN;
- }
- _rl_rubout_char (1, c);
- break;
-
- case CTRL('W'):
- rl_unix_word_rubout (1, c);
- break;
-
- case CTRL('U'):
- rl_unix_line_discard (1, c);
- break;
-
- case RETURN:
- case NEWLINE:
- goto dosearch;
- /* NOTREACHED */
- break;
-
- case CTRL('C'):
- case CTRL('G'):
- rl_maybe_unsave_line ();
- rl_clear_message ();
- rl_point = saved_point;
- rl_mark = saved_mark;
- rl_ding ();
- SEARCH_RETURN;
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ _rl_rubout_char (1, c);
+ break;
+
+ case CTRL('C'):
+ case CTRL('G'):
+ rl_ding ();
+ _rl_nsearch_abort (cxt);
+ return -1;
- default:
+ default:
#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_insert_text (mb);
- else
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (cxt->mb);
+ else
#endif
- _rl_insert_char (1, c);
- break;
- }
- (*rl_redisplay_function) ();
+ _rl_insert_char (1, c);
+ break;
}
- dosearch:
- rl_mark = saved_mark;
+ (*rl_redisplay_function) ();
+ return 1;
+}
+
+/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return
+ -1 if the search should be aborted, any other value means to clean up
+ using _rl_nsearch_cleanup (). Returns 1 if the search was successful,
+ 0 otherwise. */
+static int
+_rl_nsearch_dosearch (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_mark = cxt->save_mark;
/* If rl_point == 0, we want to re-use the previous search string and
start from the saved history position. If there's no previous search
string, punt. */
if (rl_point == 0)
{
- if (!noninc_search_string)
+ if (noninc_search_string == 0)
{
rl_ding ();
- SEARCH_RETURN;
+ rl_restore_prompt ();
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+ return -1;
}
}
else
{
/* We want to start the search from the current history position. */
- noninc_history_pos = where_history ();
+ noninc_history_pos = cxt->save_line;
FREE (noninc_search_string);
noninc_search_string = savestring (rl_line_buffer);
+
+ /* If we don't want the subsequent undo list generated by the search
+ matching a history line to include the contents of the search string,
+ we need to clear rl_line_buffer here. For now, we just clear the
+ undo list generated by reading the search string. (If the search
+ fails, the old undo list will be restored by rl_maybe_unsave_line.) */
+ rl_free_undo_list ();
}
rl_restore_prompt ();
- noninc_dosearch (noninc_search_string, dir);
- RL_UNSETSTATE(RL_STATE_NSEARCH);
+ return (noninc_dosearch (noninc_search_string, cxt->direction));
+}
+
+/* Search non-interactively through the history list. DIR < 0 means to
+ search backwards through the history of previous commands; otherwise
+ the search is for commands subsequent to the current position in the
+ history list. PCHAR is the character to use for prompting when reading
+ the search string; if not specified (0), it defaults to `:'. */
+static int
+noninc_search (dir, pchar)
+ int dir;
+ int pchar;
+{
+ _rl_search_cxt *cxt;
+ int c, r;
+
+ cxt = _rl_nsearch_init (dir, pchar);
+
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ /* Read the search string. */
+ r = 0;
+ while (1)
+ {
+ c = _rl_search_getchar (cxt);
+
+ if (c == 0)
+ break;
+
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r < 0)
+ return 1;
+ else if (r == 0)
+ break;
+ }
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
}
/* Search forward through the history list for a string. If the vi-mode
@@ -308,8 +386,7 @@ int
rl_noninc_forward_search (count, key)
int count, key;
{
- noninc_search (1, (key == '?') ? '?' : 0);
- return 0;
+ return noninc_search (1, (key == '?') ? '?' : 0);
}
/* Reverse search the history list for a string. If the vi-mode code
@@ -318,8 +395,7 @@ int
rl_noninc_reverse_search (count, key)
int count, key;
{
- noninc_search (-1, (key == '/') ? '/' : 0);
- return 0;
+ return noninc_search (-1, (key == '/') ? '/' : 0);
}
/* Search forward through the history list for the last string searched
@@ -328,13 +404,15 @@ int
rl_noninc_forward_search_again (count, key)
int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, 1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, 1);
+ return (r != 1);
}
/* Reverse search in the history list for the last string searched
@@ -343,15 +421,34 @@ int
rl_noninc_reverse_search_again (count, key)
int count, key;
{
+ int r;
+
if (!noninc_search_string)
{
rl_ding ();
return (-1);
}
- noninc_dosearch (noninc_search_string, -1);
- return 0;
+ r = noninc_dosearch (noninc_search_string, -1);
+ return (r != 1);
}
+#if defined (READLINE_CALLBACKS)
+int
+_rl_nsearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r != 0)
+ return 1;
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+#endif
+
static int
rl_history_search_internal (count, dir)
int count, dir;
diff --git a/contrib/libreadline/shlib/Makefile.in b/contrib/libreadline/shlib/Makefile.in
index e6db619..c2225d6 100644
--- a/contrib/libreadline/shlib/Makefile.in
+++ b/contrib/libreadline/shlib/Makefile.in
@@ -53,6 +53,7 @@ host_os = @host_os@
prefix = @prefix@
exec_prefix = @exec_prefix@
includedir = @includedir@
+bindir = @bindir@
libdir = @libdir@
datadir = @datadir@
localedir = $(datadir)/locale
@@ -65,7 +66,7 @@ LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@ @CFLAGS@
-DEFS = @DEFS@
+DEFS = @DEFS@ @CROSS_COMPILE@
LOCAL_DEFS = @LOCAL_DEFS@
#
@@ -84,12 +85,18 @@ SHOBJ_LIBS = @SHOBJ_LIBS@
SHLIB_XLDFLAGS = @LDFLAGS@ @SHLIB_XLDFLAGS@
SHLIB_LIBS = @SHLIB_LIBS@
+
+SHLIB_DOT = @SHLIB_DOT@
+SHLIB_LIBPREF = @SHLIB_LIBPREF@
SHLIB_LIBSUFF = @SHLIB_LIBSUFF@
SHLIB_LIBVERSION = @SHLIB_LIBVERSION@
+SHLIB_DLLVERSION = @SHLIB_DLLVERSION@
SHLIB_STATUS = @SHLIB_STATUS@
+TERMCAP_LIB = @TERMCAP_LIB@
+
# shared library versioning
SHLIB_MAJOR= @SHLIB_MAJOR@
# shared library systems like SVR4's do not use minor versions
@@ -109,8 +116,8 @@ CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) $(INCLUDES) $(LOCAL_CFLAGS) $(CFLAGS
# The name of the main library target.
-SHARED_READLINE = libreadline.$(SHLIB_LIBVERSION)
-SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION)
+SHARED_READLINE = $(SHLIB_LIBPREF)readline$(SHLIB_DOT)$(SHLIB_LIBVERSION)
+SHARED_HISTORY = $(SHLIB_LIBPREF)history$(SHLIB_DOT)$(SHLIB_LIBVERSION)
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
# The C code source files for this library.
@@ -174,13 +181,13 @@ installdirs: $(topdir)/support/mkdirs
-$(SHELL) $(topdir)/support/mkdirs $(DESTDIR)$(libdir)
install: installdirs $(SHLIB_STATUS)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -i "$(INSTALL_DATA)" $(SHARED_READLINE)
@echo install: you may need to run ldconfig
uninstall:
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -U $(SHARED_HISTORY)
- $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -U $(SHARED_READLINE)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_HISTORY)
+ $(SHELL) $(topdir)/support/shlib-install -O $(host_os) -d $(DESTDIR)$(libdir) -b $(DESTDIR)$(bindir) -U $(SHARED_READLINE)
@echo uninstall: you may need to run ldconfig
clean mostlyclean: force
diff --git a/contrib/libreadline/signals.c b/contrib/libreadline/signals.c
index 8e9c0ae..f344ed8 100644
--- a/contrib/libreadline/signals.c
+++ b/contrib/libreadline/signals.c
@@ -1,6 +1,6 @@
/* signals.c -- signal handling support for readline. */
-/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -131,7 +131,11 @@ rl_signal_handler (sig)
#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS)
/* Since the signal will not be blocked while we are in the signal
handler, ignore it until rl_clear_signals resets the catcher. */
+# if defined (SIGALRM)
if (sig == SIGINT || sig == SIGALRM)
+# else
+ if (sig == SIGINT)
+# endif
rl_set_sighandler (sig, SIG_IGN, &dummy_cxt);
#endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */
@@ -141,14 +145,18 @@ rl_signal_handler (sig)
rl_free_line_state ();
/* FALLTHROUGH */
+ case SIGTERM:
#if defined (SIGTSTP)
case SIGTSTP:
case SIGTTOU:
case SIGTTIN:
#endif /* SIGTSTP */
+#if defined (SIGALRM)
case SIGALRM:
- case SIGTERM:
+#endif
+#if defined (SIGQUIT)
case SIGQUIT:
+#endif
rl_cleanup_after_signal ();
#if defined (HAVE_POSIX_SIGNALS)
@@ -164,7 +172,11 @@ rl_signal_handler (sig)
signal (sig, SIG_ACK);
#endif
+#if defined (HAVE_KILL)
kill (getpid (), sig);
+#else
+ raise (sig); /* assume we have raise */
+#endif
/* Let the signal that we just sent through. */
#if defined (HAVE_POSIX_SIGNALS)
@@ -281,8 +293,11 @@ rl_set_signals ()
{
rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
+#if defined (SIGQUIT)
rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
+#endif
+#if defined (SIGALRM)
oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
if (oh == (SigHandler *)SIG_IGN)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
@@ -294,6 +309,7 @@ rl_set_signals ()
if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART))
rl_sigaction (SIGALRM, &old_alrm, &dummy);
#endif /* HAVE_POSIX_SIGNALS */
+#endif /* SIGALRM */
#if defined (SIGTSTP)
rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp);
@@ -332,8 +348,12 @@ rl_clear_signals ()
rl_sigaction (SIGINT, &old_int, &dummy);
rl_sigaction (SIGTERM, &old_term, &dummy);
+#if defined (SIGQUIT)
rl_sigaction (SIGQUIT, &old_quit, &dummy);
+#endif
+#if defined (SIGALRM)
rl_sigaction (SIGALRM, &old_alrm, &dummy);
+#endif
#if defined (SIGTSTP)
rl_sigaction (SIGTSTP, &old_tstp, &dummy);
@@ -368,7 +388,8 @@ void
rl_cleanup_after_signal ()
{
_rl_clean_up_for_exit ();
- (*rl_deprep_term_function) ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
rl_clear_signals ();
rl_clear_pending_input ();
}
@@ -377,7 +398,8 @@ rl_cleanup_after_signal ()
void
rl_reset_after_signal ()
{
- (*rl_prep_term_function) (_rl_meta_flag);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
rl_set_signals ();
}
@@ -398,7 +420,7 @@ rl_free_line_state ()
_rl_kill_kbd_macro ();
rl_clear_message ();
- _rl_init_argument ();
+ _rl_reset_argument ();
}
#endif /* HANDLE_SIGNALS */
diff --git a/contrib/libreadline/support/config.guess b/contrib/libreadline/support/config.guess
index 9a8a499..6d90d6f 100755
--- a/contrib/libreadline/support/config.guess
+++ b/contrib/libreadline/support/config.guess
@@ -1162,7 +1162,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-[DGKLNPTVWXY]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
diff --git a/contrib/libreadline/support/shlib-install b/contrib/libreadline/support/shlib-install
index a15b7d8..2cd252a 100755
--- a/contrib/libreadline/support/shlib-install
+++ b/contrib/libreadline/support/shlib-install
@@ -3,7 +3,7 @@
# shlib-install - install a shared library and do any necessary host-specific
# post-installation configuration (like ldconfig)
#
-# usage: shlib-install [-D] -O host_os -d installation-dir -i install-prog [-U] library
+# usage: shlib-install [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library
#
# Chet Ramey
# chet@po.cwru.edu
@@ -15,7 +15,7 @@ INSTALLDIR=/usr/local/lib
LDCONFIG=ldconfig
PROGNAME=`basename $0`
-USAGE="$PROGNAME [-D] -O host_os -d installation-dir -i install-prog [-U] library"
+USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library"
# process options
@@ -23,6 +23,7 @@ while [ $# -gt 0 ]; do
case "$1" in
-O) shift; host_os="$1"; shift ;;
-d) shift; INSTALLDIR="$1"; shift ;;
+ -b) shift; BINDIR="$1" ; shift ;;
-i) shift; INSTALLPROG="$1" ; shift ;;
-D) echo=echo ; shift ;;
-U) uninstall=true ; shift ;;
@@ -64,11 +65,30 @@ fi
# post-install/uninstall
# HP-UX and Darwin/MacOS X require that a shared library have execute permission
+# Cygwin installs both a dll (which must go in $BINDIR) and an implicit
+# link library (in $libdir)
case "$host_os" in
hpux*|darwin*|macosx*)
if [ -z "$uninstall" ]; then
chmod 555 ${INSTALLDIR}/${LIBNAME}
fi ;;
+cygwin*)
+ IMPLIBNAME=`echo ${LIBNAME} \
+ | sed -e 's,^cyg,lib,' -e 's,[0-9]*.dll$,.dll.a,'`
+ if [ -z "$uninstall" ]; then
+ ${echo} $RM ${BINDIR}/${LIBNAME}.${OLDSUFF}
+ if [ -f "$BINDIR/$LIBNAME" ]; then
+ ${echo} $MV $BINDIR/$LIBNAME $BINDIR/$LIBNAME.$OLDSUFF
+ fi
+ ${echo} $MV ${INSTALLDIR}/${LIBNAME} ${BINDIR}/${LIBNAME}
+ ${echo} chmod a+x ${BINDIR}/${LIBNAME}
+ ${echo} eval ${INSTALLPROG} ${LIBNAME}.a \
+ ${INSTALLDIR}/${IMPLIBNAME}
+ else
+ ${echo} ${RM} ${BINDIR}/${LIBNAME}
+ ${echo} ${RM} ${INSTALLDIR}/${IMPLIBNAME}
+ fi ;;
+
*) ;;
esac
@@ -163,6 +183,12 @@ hpux1*)
fi
;;
+cygwin*)
+ # Links to .dlls don't work. Hence shobj-conf used DLLVERSION.dll
+ # instead of so.SHLIB_MAJOR.SHLIB_MINOR. The postinstall above
+ # took care of everything else.
+ ;;
+
*) ;;
esac
diff --git a/contrib/libreadline/support/shobj-conf b/contrib/libreadline/support/shobj-conf
index 4c13717..0e306bc 100755
--- a/contrib/libreadline/support/shobj-conf
+++ b/contrib/libreadline/support/shobj-conf
@@ -41,9 +41,13 @@ SHOBJ_LIBS=
SHLIB_XLDFLAGS=
SHLIB_LIBS=
+
+SHLIB_DOT='.'
+SHLIB_LIBPREF='lib'
SHLIB_LIBSUFF='so'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
+SHLIB_DLLVERSION='$(SHLIB_MAJOR)'
PROGNAME=`basename $0`
USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
@@ -78,10 +82,14 @@ sunos4*)
sunos5*-*gcc*|solaris2*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
- # This line works for the Solaris linker in /usr/ccs/bin/ld
- SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
- # This line works for the GNU ld
-# SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ ld_used=`gcc -print-prog-name=ld`
+ if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then
+ # This line works for the GNU ld
+ SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ else
+ # This line works for the Solaris linker in /usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
+ fi
# SHLIB_XLDFLAGS='-R $(libdir)'
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
@@ -116,7 +124,7 @@ freebsd2* | netbsd*)
;;
# FreeBSD-3.x ELF
-freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
+freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
@@ -146,7 +154,7 @@ darwin*|macosx*)
SHLIB_LIBSUFF='dylib'
case "${host_os}" in
- darwin7*) SHOBJ_LDFLAGS=''
+ darwin[78]*) SHOBJ_LDFLAGS=''
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
;;
*) SHOBJ_LDFLAGS='-dynamic'
@@ -408,7 +416,39 @@ sysv5uw7*)
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
;;
-
+
+sysv5UnixWare*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5UnixWare*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
dgux*-*gcc*)
SHOBJ_CFLAGS=-fpic
SHOBJ_LD='${CC}'
@@ -430,6 +470,24 @@ msdos*)
SHLIB_STATUS=unsupported
;;
+cygwin*)
+ SHOBJ_LD='$(CC)'
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
+ SHLIB_LIBPREF='cyg'
+ SHLIB_LIBSUFF='dll'
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBS='$(TERMCAP_LIB)'
+
+ SHLIB_DOT=
+ # For official cygwin releases, DLLVERSION will be defined in the
+ # environment of configure, and will be incremented any time the API
+ # changes in a non-backwards compatible manner. Otherwise, it is just
+ # SHLIB_MAJOR.
+ if [ -n "$DLLVERSION" ] ; then
+ SHLIB_DLLVERSION="$DLLVERSION"
+ fi
+ ;;
+
#
# Rely on correct gcc configuration for everything else
#
@@ -457,8 +515,14 @@ echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
+
+echo SHLIB_DOT=\'"$SHLIB_DOT"\'
+
+echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\'
echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
+
echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
+echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\'
echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
diff --git a/contrib/libreadline/text.c b/contrib/libreadline/text.c
index d917e99..9053e96 100644
--- a/contrib/libreadline/text.c
+++ b/contrib/libreadline/text.c
@@ -1,6 +1,6 @@
/* text.c -- text handling commands for readline. */
-/* Copyright (C) 1987-2004 Free Software Foundation, Inc.
+/* Copyright (C) 1987-2005 Free Software Foundation, Inc.
This file is part of the GNU Readline Library, a library for
reading lines of text with interactive input and history editing.
@@ -62,6 +62,11 @@
static int rl_change_case PARAMS((int, int));
static int _rl_char_search PARAMS((int, int, int));
+#if defined (READLINE_CALLBACKS)
+static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *));
+static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *));
+#endif
+
/* **************************************************************** */
/* */
/* Insert and Delete */
@@ -420,8 +425,7 @@ rl_end_of_line (count, key)
return 0;
}
-/* XXX - these might need changes for multibyte characters */
-/* Move forward a word. We do what Emacs does. */
+/* Move forward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_forward_word (count, key)
int count, key;
@@ -438,68 +442,80 @@ rl_forward_word (count, key)
/* If we are not in a word, move forward until we are in one.
Then, move forward until we hit a non-alphabetic character. */
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c))
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c))
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
}
if (rl_point == rl_end)
return 0;
- while (++rl_point < rl_end)
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
{
- c = rl_line_buffer[rl_point];
- if (rl_alphabetic (c) == 0)
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c) == 0)
break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
}
+
--count;
}
return 0;
}
-/* Move backward a word. We do what Emacs does. */
+/* Move backward a word. We do what Emacs does. Handles multibyte chars. */
int
rl_backward_word (count, key)
int count, key;
{
- int c;
+ int c, p;
if (count < 0)
return (rl_forward_word (-count, key));
while (count)
{
- if (!rl_point)
+ if (rl_point == 0)
return 0;
/* Like rl_forward_word (), except that we look at the characters
just before point. */
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+
+ if (_rl_walphabetic (c) == 0)
{
- while (--rl_point)
+ rl_point = p;
+ while (rl_point > 0)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c))
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c))
break;
+ rl_point = p;
}
}
while (rl_point)
{
- c = rl_line_buffer[rl_point - 1];
- if (rl_alphabetic (c) == 0)
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c) == 0)
break;
else
- --rl_point;
+ rl_point = p;
}
--count;
@@ -756,10 +772,8 @@ _rl_insert_char (count, c)
return 0;
}
-#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#endif
/* We are inserting a single character.
If there is pending input, then make a string of all of the
pending characters that are bound to rl_insert, and insert
@@ -775,8 +789,8 @@ _rl_insert_char (count, c)
str[0] = c;
rl_insert_text (str);
}
-#if defined (HANDLE_MULTIBYTE)
}
+#if defined (HANDLE_MULTIBYTE)
else
{
rl_insert_text (incoming);
@@ -833,27 +847,63 @@ rl_insert (count, c)
}
/* Insert the next typed character verbatim. */
-int
-rl_quoted_insert (count, key)
- int count, key;
+static int
+_rl_insert_next (count)
+ int count;
{
int c;
-#if defined (HANDLE_SIGNALS)
- _rl_disable_tty_signals ();
-#endif
-
RL_SETSTATE(RL_STATE_MOREINPUT);
c = rl_read_key ();
RL_UNSETSTATE(RL_STATE_MOREINPUT);
#if defined (HANDLE_SIGNALS)
- _rl_restore_tty_signals ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_restore_tty_signals ();
#endif
return (_rl_insert_char (count, c));
}
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_insert_next_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ int count;
+
+ count = data->count;
+
+ /* Deregister function, let rl_callback_read_char deallocate data */
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return _rl_insert_next (count);
+}
+#endif
+
+int
+rl_quoted_insert (count, key)
+ int count, key;
+{
+ /* Let's see...should the callback interface futz with signal handling? */
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_disable_tty_signals ();
+#endif
+
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_insert_next_callback;
+ return (0);
+ }
+#endif
+
+ return _rl_insert_next (count);
+}
+
/* Insert a tab character. */
int
rl_tab_insert (count, key)
@@ -988,43 +1038,17 @@ _rl_rubout_char (count, key)
return -1;
}
+ orig_point = rl_point;
if (count > 1 || rl_explicit_arg)
{
- orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_backward_char (count, key);
- else
-#endif
- rl_backward_byte (count, key);
+ rl_backward_char (count, key);
rl_kill_text (orig_point, rl_point);
}
- else
+ else if (MB_CUR_MAX == 1 || rl_byte_oriented)
{
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
- {
-#endif
- c = rl_line_buffer[--rl_point];
- rl_delete_text (rl_point, rl_point + 1);
-#if defined (HANDLE_MULTIBYTE)
- }
- else
- {
- int orig_point;
-
- orig_point = rl_point;
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- c = rl_line_buffer[rl_point];
- rl_delete_text (rl_point, orig_point);
- }
-#endif /* HANDLE_MULTIBYTE */
-
- /* I don't think that the hack for end of line is needed for
- multibyte chars. */
-#if defined (HANDLE_MULTIBYTE)
- if (MB_CUR_MAX == 1 || rl_byte_oriented)
-#endif
+ c = rl_line_buffer[--rl_point];
+ rl_delete_text (rl_point, orig_point);
+ /* The erase-at-end-of-line hack is of questionable merit now. */
if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos)
{
int l;
@@ -1032,6 +1056,11 @@ _rl_rubout_char (count, key)
_rl_erase_at_end_of_line (l);
}
}
+ else
+ {
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, orig_point);
+ }
return 0;
}
@@ -1056,11 +1085,9 @@ rl_delete (count, key)
if (count > 1 || rl_explicit_arg)
{
int orig_point = rl_point;
-#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
rl_forward_char (count, key);
else
-#endif
rl_forward_byte (count, key);
r = rl_kill_text (orig_point, rl_point);
@@ -1070,11 +1097,8 @@ rl_delete (count, key)
else
{
int new_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- new_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
- else
- new_point = rl_point + 1;
-
+
+ new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
return (rl_delete_text (rl_point, new_point));
}
}
@@ -1113,6 +1137,10 @@ rl_delete_horizontal_space (count, ignore)
rl_delete_text (start, rl_point);
rl_point = start;
}
+
+ if (rl_point < 0)
+ rl_point = 0;
+
return 0;
}
@@ -1206,42 +1234,80 @@ static int
rl_change_case (count, op)
int count, op;
{
- register int start, end;
- int inword, c;
+ int start, next, end;
+ int inword, c, nc, nop;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc, nwc;
+ char mb[MB_LEN_MAX+1];
+ int mblen, p;
+ mbstate_t ps;
+#endif
start = rl_point;
rl_forward_word (count, 0);
end = rl_point;
+ if (op != UpCase && op != DownCase && op != CapCase)
+ {
+ rl_ding ();
+ return -1;
+ }
+
if (count < 0)
SWAP (start, end);
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
/* We are going to modify some text, so let's prepare to undo it. */
rl_modifying (start, end);
- for (inword = 0; start < end; start++)
+ inword = 0;
+ while (start < end)
{
- c = rl_line_buffer[start];
- switch (op)
- {
- case UpCase:
- rl_line_buffer[start] = _rl_to_upper (c);
- break;
+ c = _rl_char_value (rl_line_buffer, start);
+ /* This assumes that the upper and lower case versions are the same width. */
+ next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO);
- case DownCase:
- rl_line_buffer[start] = _rl_to_lower (c);
- break;
-
- case CapCase:
- rl_line_buffer[start] = (inword == 0) ? _rl_to_upper (c) : _rl_to_lower (c);
- inword = rl_alphabetic (rl_line_buffer[start]);
- break;
+ if (_rl_walphabetic (c) == 0)
+ {
+ inword = 0;
+ start = next;
+ continue;
+ }
- default:
- rl_ding ();
- return -1;
+ if (op == CapCase)
+ {
+ nop = inword ? DownCase : UpCase;
+ inword = 1;
+ }
+ else
+ nop = op;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c))
+ {
+ nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c);
+ rl_line_buffer[start] = nc;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ mbrtowc (&wc, rl_line_buffer + start, end - start, &ps);
+ nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc);
+ if (nwc != wc) /* just skip unchanged characters */
+ {
+ mblen = wcrtomb (mb, nwc, &ps);
+ if (mblen > 0)
+ mb[mblen] = '\0';
+ /* Assume the same width */
+ strncpy (rl_line_buffer + start, mb, mblen);
+ }
}
+#endif
+
+ start = next;
}
+
rl_point = end;
return 0;
}
@@ -1321,11 +1387,11 @@ rl_transpose_chars (count, key)
{
#if defined (HANDLE_MULTIBYTE)
char *dummy;
- int i, prev_point;
+ int i;
#else
char dummy[2];
#endif
- int char_length;
+ int char_length, prev_point;
if (count == 0)
return 0;
@@ -1340,20 +1406,12 @@ rl_transpose_chars (count, key)
if (rl_point == rl_end)
{
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
- --rl_point;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
count = 1;
}
-#if defined (HANDLE_MULTIBYTE)
prev_point = rl_point;
- if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
- rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
- else
-#endif
- rl_point--;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
#if defined (HANDLE_MULTIBYTE)
char_length = prev_point - rl_point;
@@ -1487,10 +1545,33 @@ _rl_char_search (count, fdir, bdir)
}
#endif /* !HANDLE_MULTIBYTE */
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_char_search_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_char_search (data->count, data->i1, data->i2));
+}
+#endif
+
int
rl_char_search (count, key)
int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = FFIND;
+ _rl_callback_data->i2 = BFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, FFIND, BFIND));
}
@@ -1498,6 +1579,17 @@ int
rl_backward_char_search (count, key)
int count, key;
{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = BFIND;
+ _rl_callback_data->i2 = FFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
return (_rl_char_search (count, BFIND, FFIND));
}
diff --git a/contrib/libreadline/tilde.c b/contrib/libreadline/tilde.c
index 154f7f8..d757f7a 100644
--- a/contrib/libreadline/tilde.c
+++ b/contrib/libreadline/tilde.c
@@ -43,7 +43,9 @@
#endif /* HAVE_STDLIB_H */
#include <sys/types.h>
+#if defined (HAVE_PWD_H)
#include <pwd.h>
+#endif
#include "tilde.h"
@@ -54,8 +56,12 @@ static void *xmalloc (), *xrealloc ();
#endif /* TEST || STATIC_MALLOC */
#if !defined (HAVE_GETPW_DECLS)
+# if defined (HAVE_GETPWUID)
extern struct passwd *getpwuid PARAMS((uid_t));
+# endif
+# if defined (HAVE_GETPWNAM)
extern struct passwd *getpwnam PARAMS((const char *));
+# endif
#endif /* !HAVE_GETPW_DECLS */
#if !defined (savestring)
@@ -277,6 +283,39 @@ isolate_tilde_prefix (fname, lenp)
return ret;
}
+#if 0
+/* Public function to scan a string (FNAME) beginning with a tilde and find
+ the portion of the string that should be passed to the tilde expansion
+ function. Right now, it just calls tilde_find_suffix and allocates new
+ memory, but it can be expanded to do different things later. */
+char *
+tilde_find_word (fname, flags, lenp)
+ const char *fname;
+ int flags, *lenp;
+{
+ int x;
+ char *r;
+
+ x = tilde_find_suffix (fname);
+ if (x == 0)
+ {
+ r = savestring (fname);
+ if (lenp)
+ *lenp = 0;
+ }
+ else
+ {
+ r = (char *)xmalloc (1 + x);
+ strncpy (r, fname, x);
+ r[x] = '\0';
+ if (lenp)
+ *lenp = x;
+ }
+
+ return r;
+}
+#endif
+
/* Return a string that is PREFIX concatenated with SUFFIX starting at
SUFFIND. */
static char *
@@ -347,7 +386,11 @@ tilde_expand_word (filename)
/* No preexpansion hook, or the preexpansion hook failed. Look in the
password database. */
dirname = (char *)NULL;
+#if defined (HAVE_GETPWNAM)
user_entry = getpwnam (username);
+#else
+ user_entry = 0;
+#endif
if (user_entry == 0)
{
/* If the calling program has a special syntax for expanding tildes,
@@ -372,8 +415,9 @@ tilde_expand_word (filename)
free (username);
dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
}
-
+#if defined (HAVE_GETPWENT)
endpwent ();
+#endif
return (dirname);
}
diff --git a/contrib/libreadline/tilde.h b/contrib/libreadline/tilde.h
index f8182c9..c58ce20 100644
--- a/contrib/libreadline/tilde.h
+++ b/contrib/libreadline/tilde.h
@@ -71,6 +71,9 @@ extern char *tilde_expand PARAMS((const char *));
tilde. If there is no expansion, call tilde_expansion_failure_hook. */
extern char *tilde_expand_word PARAMS((const char *));
+/* Find the portion of the string beginning with ~ that should be expanded. */
+extern char *tilde_find_word PARAMS((const char *, int, int *));
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/libreadline/undo.c b/contrib/libreadline/undo.c
index 25c287b..fedfa12 100644
--- a/contrib/libreadline/undo.c
+++ b/contrib/libreadline/undo.c
@@ -237,7 +237,12 @@ rl_revert_line (count, key)
{
while (rl_undo_list)
rl_do_undo ();
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_point = rl_mark = 0; /* rl_end should be set correctly */
+#endif
}
+
return 0;
}
diff --git a/contrib/libreadline/vi_keymap.c b/contrib/libreadline/vi_keymap.c
index 53a67c6..4b48c75 100644
--- a/contrib/libreadline/vi_keymap.c
+++ b/contrib/libreadline/vi_keymap.c
@@ -130,7 +130,7 @@ KEYMAP_ENTRY_ARRAY vi_movement_keymap = {
{ ISFUNC, rl_revert_line }, /* U */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* V */
{ ISFUNC, rl_vi_next_word }, /* W */
- { ISFUNC, rl_rubout }, /* X */
+ { ISFUNC, rl_vi_rubout }, /* X */
{ ISFUNC, rl_vi_yank_to }, /* Y */
{ ISFUNC, (rl_command_func_t *)0x0 }, /* Z */
OpenPOWER on IntegriCloud