public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move readline to the readline/readline subdirectory
@ 2019-10-23 21:39 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2019-10-23 21:39 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6999161a2a3b3cbd918570e094199184331d4f81

commit 6999161a2a3b3cbd918570e094199184331d4f81
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Oct 5 16:39:44 2019 -0600

    Move readline to the readline/readline subdirectory
    
    readline turns out to be a bit of a stumbling block for the project to
    move gdbsupport (and then gdbserver) to the top-level.
    
    The issue is that readline headers are intended to be included with
    names like "readline/readline.h".  To support this, gdb effectively
    adds a -I option pointing to the top-level source directory -- but,
    importantly, this option is not used when the system readline is used.
    
    For gdbsupport, a -I option like this would always be needed, but that
    in turn would break the system readline case.  This was PR build/17077,
    fixed in commit a8a5dbcab8df0b3a9e04745d4fe8d64740acb323.
    
    Previously, we had discussed this on the gdb-patches list in terms of
    removing readline from the tree
    
        https://sourceware.org/ml/gdb-patches/2019-09/msg00317.html
    
    However, Eli expressed some concerns, and Joel did as well (off-list).
    
    Given those concerns, and the fact that a patch-free local readline is
    relatively new in gdb (it was locally patched for years), I changed my
    mind and decided to handle this situation by moving the readline
    sources down a level.
    
    That is, upstream readline is now in readline/readline, and the
    top-level readline directory just contains the minimal configury
    needed to build that.
    
    This fixes the problem because, when gdb unconditionally adds a
    -I$(top_srcdir), this will not find readline headers.  A separate -I
    will be needed instead, which is exactly what's needed for
    --with-system-readline.
    
    gdb/ChangeLog
    2019-10-23  Tom Tromey  <tom@tromey.com>
    
    	* Makefile.in (READLINE_DIR): Update.
    
    gdb/doc/ChangeLog
    2019-10-23  Tom Tromey  <tom@tromey.com>
    
    	* Makefile.in (READLINE_DIR): Update.
    
    readline/ChangeLog
    2019-10-23  Tom Tromey  <tom@tromey.com>
    
    	Move old contents to readline/ subdirectory.
    	* aclocal.m4, configure, configure.ac, .gitignore, Makefile.am,
    	Makefile.in, README: New files.
    
    Change-Id: Ice156a2ee09ea68722b48f64d97146d7428ea9e4

Diff:
---
 gdb/ChangeLog                                      |    4 +
 gdb/Makefile.in                                    |    4 +-
 gdb/doc/ChangeLog                                  |    4 +
 gdb/doc/Makefile.in                                |    2 +-
 readline/.gitignore                                |   35 +-
 readline/ChangeLog                                 |    6 +
 readline/Makefile.am                               |   20 +
 readline/Makefile.in                               | 1073 ++-
 readline/README                                    |  202 +-
 readline/aclocal.m4                                | 5004 ++----------
 readline/configure                                 | 5931 ++------------
 readline/configure.ac                              |  337 +-
 readline/readline/.gitignore                       |   37 +
 readline/{ => readline}/CHANGELOG                  |    0
 readline/{ => readline}/CHANGES                    |    0
 readline/{ => readline}/COPYING                    |    0
 readline/{ => readline}/ChangeLog.gdb              |    2 +-
 readline/{ => readline}/INSTALL                    |    0
 readline/{ => readline}/MANIFEST                   |    0
 readline/readline/Makefile.in                      |  616 ++
 readline/{ => readline}/NEWS                       |    0
 readline/readline/README                           |  196 +
 readline/{ => readline}/USAGE                      |    0
 readline/readline/aclocal.m4                       | 4262 ++++++++++
 readline/{ => readline}/ansi_stdlib.h              |    0
 readline/{ => readline}/bind.c                     |    0
 readline/{ => readline}/callback.c                 |    0
 readline/{ => readline}/chardefs.h                 |    0
 readline/{ => readline}/colors.c                   |    0
 readline/{ => readline}/colors.h                   |    0
 readline/{ => readline}/compat.c                   |    0
 readline/{ => readline}/complete.c                 |    0
 readline/{ => readline}/config.h.in                |    0
 readline/readline/configure                        | 8203 ++++++++++++++++++++
 readline/readline/configure.ac                     |  320 +
 readline/{ => readline}/cross-build/cygwin.cache   |    0
 readline/{ => readline}/display.c                  |    0
 readline/{ => readline}/doc/ChangeLog.gdb          |    2 +-
 readline/{ => readline}/doc/Makefile.in            |    0
 readline/{ => readline}/doc/fdl.texi               |    0
 readline/{ => readline}/doc/history.3              |    0
 readline/{ => readline}/doc/history.texi           |    0
 readline/{ => readline}/doc/hstech.texi            |    0
 readline/{ => readline}/doc/hsuser.texi            |    0
 readline/{ => readline}/doc/readline.3             |    0
 readline/{ => readline}/doc/rlman.texi             |    0
 readline/{ => readline}/doc/rltech.texi            |    0
 readline/{ => readline}/doc/rluser.texi            |    0
 readline/{ => readline}/doc/rluserman.texi         |    0
 readline/{ => readline}/doc/texi2dvi               |    0
 readline/{ => readline}/doc/texi2html              |    0
 readline/{ => readline}/doc/version.texi           |    0
 readline/{ => readline}/emacs_keymap.c             |    0
 readline/{ => readline}/examples/ChangeLog.gdb     |    2 +-
 readline/{ => readline}/examples/Inputrc           |    0
 readline/{ => readline}/examples/Makefile.in       |    0
 .../examples/autoconf/BASH_CHECK_LIB_TERMCAP       |    0
 .../examples/autoconf/RL_LIB_READLINE_VERSION      |    0
 .../examples/autoconf/wi_LIB_READLINE              |    0
 readline/{ => readline}/examples/excallback.c      |    0
 readline/{ => readline}/examples/fileman.c         |    0
 readline/{ => readline}/examples/hist_erasedups.c  |    0
 readline/{ => readline}/examples/hist_purgecmd.c   |    0
 readline/{ => readline}/examples/histexamp.c       |    0
 readline/{ => readline}/examples/manexamp.c        |    0
 readline/{ => readline}/examples/readlinebuf.h     |    0
 readline/{ => readline}/examples/rl-callbacktest.c |    0
 readline/{ => readline}/examples/rl-fgets.c        |    0
 readline/{ => readline}/examples/rl.c              |    0
 readline/{ => readline}/examples/rlbasic.c         |    0
 readline/{ => readline}/examples/rlcat.c           |    0
 readline/{ => readline}/examples/rlevent.c         |    0
 readline/{ => readline}/examples/rlfe/ChangeLog    |    2 +-
 .../{ => readline}/examples/rlfe/ChangeLog.gdb     |    2 +-
 readline/{ => readline}/examples/rlfe/Makefile.in  |    0
 readline/{ => readline}/examples/rlfe/README       |    0
 readline/{ => readline}/examples/rlfe/config.h.in  |    0
 readline/{ => readline}/examples/rlfe/configure    |    0
 readline/{ => readline}/examples/rlfe/configure.in |    0
 readline/{ => readline}/examples/rlfe/extern.h     |    0
 readline/{ => readline}/examples/rlfe/os.h         |    0
 readline/{ => readline}/examples/rlfe/pty.c        |    0
 readline/{ => readline}/examples/rlfe/rlfe.c       |    0
 readline/{ => readline}/examples/rlfe/screen.h     |    0
 readline/{ => readline}/examples/rlkeymaps.c       |    0
 readline/{ => readline}/examples/rlptytest.c       |    0
 readline/{ => readline}/examples/rltest.c          |    0
 readline/{ => readline}/examples/rlversion.c       |    0
 readline/{ => readline}/funmap.c                   |    0
 readline/{ => readline}/histexpand.c               |    0
 readline/{ => readline}/histfile.c                 |    0
 readline/{ => readline}/histlib.h                  |    0
 readline/{ => readline}/history.c                  |    0
 readline/{ => readline}/history.h                  |    0
 readline/{ => readline}/histsearch.c               |    0
 readline/{ => readline}/input.c                    |    0
 readline/{ => readline}/isearch.c                  |    0
 readline/{ => readline}/keymaps.c                  |    0
 readline/{ => readline}/keymaps.h                  |    0
 readline/{ => readline}/kill.c                     |    0
 readline/{ => readline}/macro.c                    |    0
 readline/{ => readline}/mbutil.c                   |    0
 readline/{ => readline}/misc.c                     |    0
 readline/{ => readline}/nls.c                      |    0
 readline/{ => readline}/parens.c                   |    0
 readline/{ => readline}/parse-colors.c             |    0
 readline/{ => readline}/parse-colors.h             |    0
 readline/{ => readline}/patchlevel                 |    0
 readline/{ => readline}/posixdir.h                 |    0
 readline/{ => readline}/posixjmp.h                 |    0
 readline/{ => readline}/posixselect.h              |    0
 readline/{ => readline}/posixstat.h                |    0
 readline/{ => readline}/readline.c                 |    0
 readline/{ => readline}/readline.h                 |    0
 readline/{ => readline}/readline.pc.in             |    0
 readline/{ => readline}/rlconf.h                   |    0
 readline/{ => readline}/rldefs.h                   |    0
 readline/{ => readline}/rlmbutil.h                 |    0
 readline/{ => readline}/rlprivate.h                |    0
 readline/{ => readline}/rlshell.h                  |    0
 readline/{ => readline}/rlstdc.h                   |    0
 readline/{ => readline}/rltty.c                    |    0
 readline/{ => readline}/rltty.h                    |    0
 readline/{ => readline}/rltypedefs.h               |    0
 readline/{ => readline}/rlwinsize.h                |    0
 readline/{ => readline}/savestring.c               |    0
 readline/{ => readline}/search.c                   |    0
 readline/{ => readline}/shell.c                    |    0
 readline/{ => readline}/shlib/Makefile.in          |    0
 readline/{ => readline}/signals.c                  |    0
 readline/{ => readline}/support/config.guess       |    0
 readline/{ => readline}/support/config.rpath       |    0
 readline/{ => readline}/support/config.sub         |    0
 readline/{ => readline}/support/install.sh         |    0
 readline/{ => readline}/support/mkdirs             |    0
 readline/{ => readline}/support/mkdist             |    0
 readline/{ => readline}/support/mkinstalldirs      |    0
 readline/{ => readline}/support/shlib-install      |    0
 readline/{ => readline}/support/shobj-conf         |    0
 readline/{ => readline}/support/wcwidth.c          |    0
 readline/{ => readline}/tcap.h                     |    0
 readline/{ => readline}/terminal.c                 |    0
 readline/{ => readline}/text.c                     |    0
 readline/{ => readline}/tilde.c                    |    0
 readline/{ => readline}/tilde.h                    |    0
 readline/{ => readline}/undo.c                     |    0
 readline/{ => readline}/util.c                     |    0
 readline/{ => readline}/vi_keymap.c                |    0
 readline/{ => readline}/vi_mode.c                  |    0
 readline/{ => readline}/xfree.c                    |    0
 readline/{ => readline}/xmalloc.c                  |    0
 readline/{ => readline}/xmalloc.h                  |    0
 152 files changed, 15669 insertions(+), 10597 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a976d8f..7dd596e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-23  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (READLINE_DIR): Update.
+
 2019-10-23  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
 	* infcall.c (call_function_by_hand_dummy): Fix the function
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 553b3ff..fe599b4 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -174,8 +174,8 @@ LIBDECNUMBER = $(LIBDECNUMBER_DIR)/libdecnumber.a
 LIBDECNUMBER_SRC = $(srcdir)/$(LIBDECNUMBER_DIR)
 LIBDECNUMBER_CFLAGS = -I$(LIBDECNUMBER_DIR) -I$(LIBDECNUMBER_SRC)
 
-# Where is the READLINE library?  Typically in ../readline.
-READLINE_DIR = ../readline
+# Where is the READLINE library?  Typically in ../readline/readline.
+READLINE_DIR = ../readline/readline
 READLINE_SRC = $(srcdir)/$(READLINE_DIR)
 READLINE = @READLINE@
 READLINE_DEPS = @READLINE_DEPS@
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b81c2cc..0d0d905 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2019-10-23  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (READLINE_DIR): Update.
+
 2019-10-23  Christian Biesinger  <cbiesinger@google.com>
 
 	* python.texi (Threads In Python): Add a note for how to get the
diff --git a/gdb/doc/Makefile.in b/gdb/doc/Makefile.in
index 2bb8a30..2673499 100644
--- a/gdb/doc/Makefile.in
+++ b/gdb/doc/Makefile.in
@@ -74,7 +74,7 @@ BUGURL_TEXI = @REPORT_BUGS_TEXI@
 
 # Where is the source dir for the READLINE library doc?  
 # Traditionally readline is in .. or .
-READLINE_DIR = ${gdbdir}/../readline/doc
+READLINE_DIR = ${gdbdir}/../readline/readline/doc
 READLINE_TEXI_INCFLAG = @READLINE_TEXI_INCFLAG@
 
 # The GDB/MI docs come from a sibling directory ../mi
diff --git a/readline/.gitignore b/readline/.gitignore
index be107bb..5f060a1 100644
--- a/readline/.gitignore
+++ b/readline/.gitignore
@@ -1,37 +1,4 @@
-Makefile
-
-*.o
-*.a
-*.so
-*.sl
-*.dll
-
+autom4te.cache
 config.cache
-config.h
 config.log
 config.status
-
-doc/Makefile
-examples/Makefile
-shlib/Makefile
-
-examples/fileman
-examples/hist_erasedups
-examples/hist_purgecmd
-examples/histexamp
-examples/rl
-examples/rl-callbacktest
-examples/rlbasic
-examples/rlcat
-examples/rlevent
-examples/rltest
-examples/rlversion
-
-libhistory.so.*
-libreadline.so.*
-
-*.dylib
-
-readline.pc
-
-stamp-h
diff --git a/readline/ChangeLog b/readline/ChangeLog
new file mode 100644
index 0000000..936dc31
--- /dev/null
+++ b/readline/ChangeLog
@@ -0,0 +1,6 @@
+2019-10-23  Tom Tromey  <tom@tromey.com>
+
+	Move old contents to readline/ subdirectory.
+	* aclocal.m4, configure, configure.ac, .gitignore, Makefile.am,
+	Makefile.in, README: New files.
+
diff --git a/readline/Makefile.am b/readline/Makefile.am
new file mode 100644
index 0000000..50b10b2
--- /dev/null
+++ b/readline/Makefile.am
@@ -0,0 +1,20 @@
+# Copyright (C) 2019 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+
+AUTOMAKE_OPTIONS = no-dist foreign
+SUBDIRS = readline
+ACLOCAL_AMFLAGS = -I . -I ../config
diff --git a/readline/Makefile.in b/readline/Makefile.in
index bcbd18b..1c68a53 100644
--- a/readline/Makefile.in
+++ b/readline/Makefile.in
@@ -1,616 +1,517 @@
-## -*- text -*- ##
-# Master Makefile for the GNU readline library.
-# Copyright (C) 1994-2018 Free Software Foundation, Inc.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
+# @configure_input@
 
-#   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 3 of the License, or
-#   (at your option) any later version.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
-#   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.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
 
-#   You should have received a copy of the GNU General Public License
-#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
 
-RL_LIBRARY_VERSION = @LIBVERSION@
-RL_LIBRARY_NAME = readline
-
-PACKAGE = @PACKAGE_NAME@
-VERSION = @PACKAGE_VERSION@
+@SET_MAKE@
 
+# Copyright (C) 2019 Free Software Foundation, Inc.
+
+# This file is part of GDB.
+
+# 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 3 of the License, 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, see <http://www.gnu.org/licenses/>.
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/override.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
 PACKAGE_NAME = @PACKAGE_NAME@
 PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
-
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-VPATH = @srcdir@
+subdirs = @subdirs@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-BUILD_DIR = @BUILD_DIR@
+AUTOMAKE_OPTIONS = no-dist foreign
+SUBDIRS = readline
+ACLOCAL_AMFLAGS = -I . -I ../config
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
 
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-recursive
 
-CC = @CC@
-RANLIB = @RANLIB@
-AR = @AR@
-ARFLAGS = @ARFLAGS@
-RM = rm -f
-CP = cp
-MV = mv
+dvi-am:
 
-@SET_MAKE@
-SHELL = @MAKE_SHELL@
+html: html-recursive
 
-prefix = @prefix@
-exec_prefix = @exec_prefix@
+html-am:
 
-datarootdir = @datarootdir@
+info: info-recursive
 
-bindir = @bindir@
-libdir = @libdir@
-mandir = @mandir@
-includedir = @includedir@
-datadir = @datadir@
-localedir = @localedir@
-pkgconfigdir = ${libdir}/pkgconfig
+info-am:
 
-infodir = @infodir@
+install-data-am:
 
-docdir = @docdir@
+install-dvi: install-dvi-recursive
 
-man3dir = $(mandir)/man3
+install-dvi-am:
 
-# Support an alternate destination root directory for package building
-DESTDIR =
+install-exec-am:
 
-# Programs to make tags files.
-ETAGS = etags
-CTAGS = ctags -tw
-
-CFLAGS = @CFLAGS@
-LOCAL_CFLAGS = @LOCAL_CFLAGS@ -DRL_LIBRARY_VERSION='"$(RL_LIBRARY_VERSION)"'
-CPPFLAGS = @CPPFLAGS@
-
-DEFS = @DEFS@ @CROSS_COMPILE@
-LOCAL_DEFS = @LOCAL_DEFS@
-
-TERMCAP_LIB = @TERMCAP_LIB@
-
-# For libraries which include headers from other libraries.
-INCLUDES = -I. -I$(srcdir)
-
-XCCFLAGS = $(ASAN_CFLAGS) $(DEFS) $(LOCAL_DEFS) $(INCLUDES) $(CPPFLAGS)
-CCFLAGS = $(XCCFLAGS) $(LOCAL_CFLAGS) $(CFLAGS)
-
-# could add -Werror here
-GCC_LINT_FLAGS = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-qual \
-		 -Wwrite-strings -Wstrict-prototypes \
-		 -Wmissing-prototypes -Wno-implicit -pedantic
-GCC_LINT_CFLAGS = $(XCCFLAGS) $(GCC_LINT_FLAGS) @CFLAGS@ @LOCAL_CFLAGS@
-
-ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer
-ASAN_XLDFLAGS = -fsanitize=address
-
-install_examples = @EXAMPLES_INSTALL_TARGET@
-
-.c.o:
-	${RM} $@
-	$(CC) -c $(CCFLAGS) $<
-
-# The name of the main library target.
-LIBRARY_NAME = libreadline.a
-STATIC_LIBS = libreadline.a libhistory.a
-
-# The C code source files for this library.
-CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
-	   $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
-	   $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
-	   $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
-	   $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
-	   $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
-	   $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c $(srcdir)/xfree.c \
-	   $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
-	   $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
-	   $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
-	   $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
-	   $(srcdir)/mbutil.c
-
-# The header files for this library.
-HSOURCES = $(srcdir)/readline.h $(srcdir)/rldefs.h $(srcdir)/chardefs.h \
-	   $(srcdir)/keymaps.h $(srcdir)/history.h $(srcdir)/histlib.h \
-	   $(srcdir)/posixstat.h $(srcdir)/posixdir.h $(srcdir)/posixjmp.h \
-	   $(srcdir)/tilde.h $(srcdir)/rlconf.h $(srcdir)/rltty.h \
-	   $(srcdir)/ansi_stdlib.h $(srcdir)/tcap.h $(srcdir)/rlstdc.h \
-	   $(srcdir)/xmalloc.h $(srcdir)/rlprivate.h $(srcdir)/rlshell.h \
-	   $(srcdir)/rltypedefs.h $(srcdir)/rlmbutil.h \
-	   $(srcdir)/colors.h $(srcdir)/parse-colors.h
-
-HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o
-TILDEOBJ = tilde.o
-COLORSOBJ = colors.o parse-colors.o
-OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
-	  rltty.o complete.o bind.o isearch.o display.o signals.o \
-	  util.o kill.o undo.o macro.o input.o callback.o terminal.o \
-	  text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \
-	  xmalloc.o xfree.o compat.o
-
-# The texinfo files which document this library.
-DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
-DOCOBJECT = doc/readline.dvi
-DOCSUPPORT = doc/Makefile
-DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
-
-CREATED_MAKEFILES = Makefile doc/Makefile examples/Makefile shlib/Makefile
-CREATED_CONFIGURE = config.status config.h config.cache config.log \
-		    stamp-config stamp-h readline.pc
-CREATED_TAGS = TAGS tags
-
-INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
-		    rlstdc.h rlconf.h rltypedefs.h
-
-OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/INSTALL $(srcdir)/README
-OTHER_INSTALLED_DOCS = CHANGES INSTALL README
-
-##########################################################################
-TARGETS = @STATIC_TARGET@ @SHARED_TARGET@
-INSTALL_TARGETS = @STATIC_INSTALL_TARGET@ @SHARED_INSTALL_TARGET@
-
-all: $(TARGETS)
-
-everything: all examples
-
-asan:
-	${MAKE} ${MFLAGS} ASAN_CFLAGS='${ASAN_XCFLAGS}' ASAN_LDFLAGS='${ASAN_XLDFLAGS}' everything
-
-static: $(STATIC_LIBS)
-
-libreadline.a: $(OBJECTS)
-	$(RM) $@
-	$(AR) $(ARFLAGS) $@ $(OBJECTS)
-	-test -n "$(RANLIB)" && $(RANLIB) $@
-
-libhistory.a: $(HISTOBJ) xmalloc.o xfree.o
-	$(RM) $@
-	$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o
-	-test -n "$(RANLIB)" && $(RANLIB) $@
-
-# Since tilde.c is shared between readline and bash, make sure we compile
-# it with the right flags when it's built as part of readline
-tilde.o:	tilde.c
-	rm -f $@
-	$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
-
-readline: $(OBJECTS) readline.h rldefs.h chardefs.h ./libreadline.a
-	$(CC) $(CCFLAGS) -DREADLINE_LIBRARY -o $@ $(top_srcdir)/examples/rl.c ./libreadline.a ${TERMCAP_LIB}
-
-lint:	force
-	$(MAKE) $(MFLAGS) CCFLAGS='$(GCC_LINT_CFLAGS)' static
-
-Makefile makefile: config.status $(srcdir)/Makefile.in
-	CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
-
-Makefiles makefiles: config.status $(srcdir)/Makefile.in
-	@for mf in $(CREATED_MAKEFILES); do \
-		CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
-	done
-
-config.status: configure
-	$(SHELL) ./config.status --recheck
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
 
-config.h:	stamp-h
+install-man:
 
-stamp-h: config.status $(srcdir)/config.h.in
-	CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
-	echo > $@
+install-pdf: install-pdf-recursive
 
-#$(srcdir)/configure: $(srcdir)/configure.ac	## Comment-me-out in distribution
-#	cd $(srcdir) && autoconf	## Comment-me-out in distribution
+install-pdf-am:
 
+install-ps: install-ps-recursive
 
-shared:	force
-	-test -d shlib || mkdir shlib
-	( cd shlib ; ${MAKE} ${MFLAGS} all )
+install-ps-am:
 
-documentation: force
-	-test -d doc || mkdir doc
-	-( cd doc && $(MAKE) $(MFLAGS) )
-
-examples: force
-	-test -d examples || mkdir examples
-	-(cd examples && ${MAKE} ${MFLAGS} all )
-
-force:
-
-## GDB LOCAL
-## Don't mess with people's installed readline's.
-## This tries to install this version of readline over whatever
-## version is already installed on the system (which could be a
-## newer version). There is no real reason for us to install
-## readline along with GDB. GDB links statically against readline,
-## so it doesn't depend on us installing it on the system.
-
-install:
-
-#install:	$(INSTALL_TARGETS)
-
-install-headers: installdirs ${INSTALLED_HEADERS}
-	for f in ${INSTALLED_HEADERS}; do \
-		$(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(includedir)/readline ; \
-	done
-
-uninstall-headers:
-	-test -n "$(includedir)" && cd $(DESTDIR)$(includedir)/readline && \
-		${RM} ${INSTALLED_HEADERS}
-
-maybe-uninstall-headers: uninstall-headers
-
-install-pc: installdirs
-	-$(INSTALL_DATA) $(BUILD_DIR)/readline.pc $(DESTDIR)$(pkgconfigdir)/readline.pc
-
-uninstall-pc:
-	-test -n "$(pkgconfigdir)" && cd $(DESTDIR)$(pkgconfigdir) && \
-		${RM} readline.pc
-
-maybe-uninstall-pc: uninstall-pc
-
-install-static: installdirs $(STATIC_LIBS) install-headers install-doc ${install_examples} install-pc
-	-$(MV) $(DESTDIR)$(libdir)/libreadline.a $(DESTDIR)$(libdir)/libreadline.old
-	$(INSTALL_DATA) libreadline.a $(DESTDIR)$(libdir)/libreadline.a
-	-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libreadline.a
-	-$(MV) $(DESTDIR)$(libdir)/libhistory.a $(DESTDIR)$(libdir)/libhistory.old
-	$(INSTALL_DATA) libhistory.a $(DESTDIR)$(libdir)/libhistory.a
-	-test -n "$(RANLIB)" && $(RANLIB) $(DESTDIR)$(libdir)/libhistory.a
-
-installdirs: $(srcdir)/support/mkinstalldirs
-	-$(SHELL) $(srcdir)/support/mkinstalldirs $(DESTDIR)$(includedir) \
-		$(DESTDIR)$(includedir)/readline $(DESTDIR)$(libdir) \
-		$(DESTDIR)$(infodir) $(DESTDIR)$(man3dir) $(DESTDIR)$(docdir) \
-		$(DESTDIR)$(pkgconfigdir)
-
-uninstall: uninstall-headers uninstall-doc uninstall-examples uninstall-pc
-	-test -n "$(DESTDIR)$(libdir)" && cd $(DESTDIR)$(libdir) && \
-		${RM} libreadline.a libreadline.old libhistory.a libhistory.old $(SHARED_LIBS)
-	-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
-
-install-shared: installdirs install-headers shared install-doc install-pc
-	( cd shlib ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
-	
-uninstall-shared: maybe-uninstall-headers maybe-uninstall-pc
-	-( cd shlib; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
-
-install-examples: installdirs install-headers
-	-( cd examples ; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} install )
-	
-uninstall-examples: maybe-uninstall-headers
-	-( cd examples; ${MAKE} ${MFLAGS} DESTDIR=${DESTDIR} uninstall )
-
-install-doc:	installdirs
-	$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir)
-	-( if test -d doc ; then \
-		cd doc && \
-		${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} install; \
-	  fi )
-
-uninstall-doc:
-	-( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} )
-	-( if test -d doc ; then \
-		cd doc && \
-		${MAKE} ${MFLAGS} infodir=$(infodir) DESTDIR=${DESTDIR} uninstall; \
-	  fi )
-
-TAGS:	force
-	-( cd $(srcdir) && $(ETAGS) $(CSOURCES) $(HSOURCES) )
-
-tags:	force
-	-( cd $(srcdir) && $(CTAGS) $(CSOURCES) $(HSOURCES) )
-
-clean:	force
-	$(RM) $(OBJECTS) $(STATIC_LIBS)
-	$(RM) readline readline.exe
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
-	-( cd doc && $(MAKE) $(MFLAGS) $@ )
-	-( cd examples && $(MAKE) $(MFLAGS) $@ )
-
-mostlyclean: clean
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
-	-( cd doc && $(MAKE) $(MFLAGS) $@ )
-	-( cd examples && $(MAKE) $(MFLAGS) $@ )
-
-distclean maintainer-clean: clean
-	( cd shlib && $(MAKE) $(MFLAGS) $@ )
-	-( cd doc && $(MAKE) $(MFLAGS) $@ )
-	-( cd examples && $(MAKE) $(MFLAGS) $@ )
-	$(RM) Makefile
-	$(RM) $(CREATED_CONFIGURE)
-	$(RM) $(CREATED_TAGS)
-
-readline.pc:	config.status $(srcdir)/readline.pc.in
-	$(SHELL) config.status
-
-info dvi html pdf ps:
-	-( cd doc && $(MAKE) $(MFLAGS) $@ )
-
-install-info:
-install-dvi:
-install-html:
-install-pdf:
-install-ps:
-check:
-installcheck:
-
-dist:   force
-	@echo Readline distributions are created using $(srcdir)/support/mkdist.
-	@echo Here is a sample of the necessary commands:
-	@echo bash $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r $(RL_LIBRARY_NAME) $(RL_LIBRARY_VERSION)
-	@echo tar cf $(RL_LIBRARY_NAME)-${RL_LIBRARY_VERSION}.tar ${RL_LIBRARY_NAME}-$(RL_LIBRARY_VERSION)
-	@echo gzip $(RL_LIBRARY_NAME)-$(RL_LIBRARY_VERSION).tar
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	cscope cscopelist-am ctags ctags-am distclean \
+	distclean-generic distclean-tags dvi dvi-am html html-am info \
+	info-am install install-am install-data install-data-am \
+	install-dvi install-dvi-am install-exec install-exec-am \
+	install-html install-html-am install-info install-info-am \
+	install-man install-pdf install-pdf-am install-ps \
+	install-ps-am install-strip installcheck installcheck-am \
+	installdirs installdirs-am maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+	pdf-am ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
-
-# Dependencies
-bind.o: ansi_stdlib.h posixstat.h
-bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-bind.o: history.h
-callback.o: rlconf.h
-callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-compat.o: ${BUILD_DIR}/config.h
-compat.o: rlstdc.h rltypedefs.h
-complete.o: ansi_stdlib.h posixdir.h posixstat.h
-complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-display.o: ansi_stdlib.h posixstat.h
-display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-display.o: tcap.h
-display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-display.o: history.h rlstdc.h
-funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
-funmap.o: ${BUILD_DIR}/config.h
-histexpand.o: ansi_stdlib.h
-histexpand.o: history.h histlib.h rlstdc.h rltypedefs.h
-histexpand.o: ${BUILD_DIR}/config.h
-histfile.o: ansi_stdlib.h
-histfile.o: history.h histlib.h rlstdc.h rltypedefs.h
-histfile.o: ${BUILD_DIR}/config.h
-history.o: ansi_stdlib.h
-history.o: history.h histlib.h rlstdc.h rltypedefs.h
-history.o: ${BUILD_DIR}/config.h
-histsearch.o: ansi_stdlib.h
-histsearch.o: history.h histlib.h rlstdc.h rltypedefs.h
-histsearch.o: ${BUILD_DIR}/config.h
-input.o: ansi_stdlib.h
-input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-isearch.o: ansi_stdlib.h history.h rlstdc.h
-keymaps.o: emacs_keymap.c vi_keymap.c
-keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
-keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
-kill.o: ansi_stdlib.h
-kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-kill.o: history.h rlstdc.h
-macro.o: ansi_stdlib.h
-macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-macro.o: history.h rlstdc.h
-mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
-misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-misc.o: history.h rlstdc.h ansi_stdlib.h
-nls.o: ansi_stdlib.h
-nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h  
-nls.o: history.h rlstdc.h  
-parens.o: rlconf.h
-parens.o: ${BUILD_DIR}/config.h
-parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-readline.o: history.h rlstdc.h
-readline.o: posixstat.h ansi_stdlib.h posixjmp.h
-rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-rltty.o: rltty.h
-rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-savestring.o: ${BUILD_DIR}/config.h
-search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-search.o: ansi_stdlib.h history.h rlstdc.h
-shell.o: ${BUILD_DIR}/config.h
-shell.o: ansi_stdlib.h
-signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-signals.o: history.h rlstdc.h
-terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-terminal.o: tcap.h
-terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-terminal.o: history.h rlstdc.h
-text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-text.o: history.h rlstdc.h ansi_stdlib.h
-tilde.o: ansi_stdlib.h
-tilde.o: ${BUILD_DIR}/config.h
-tilde.o: tilde.h
-undo.o: ansi_stdlib.h
-undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-undo.o: history.h rlstdc.h
-util.o: posixjmp.h ansi_stdlib.h
-util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
-vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
-vi_mode.o: history.h ansi_stdlib.h rlstdc.h
-xfree.o: ${BUILD_DIR}/config.h
-xfree.o: ansi_stdlib.h
-xmalloc.o: ${BUILD_DIR}/config.h
-xmalloc.o: ansi_stdlib.h
-
-colors.o: ${BUILD_DIR}/config.h colors.h
-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-colors.o: rlconf.h  
-colors.o: ansi_stdlib.h posixstat.h
-parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h
-parse-colors.o: rldefs.h rlconf.h
-parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
-
-bind.o: rlshell.h
-histfile.o: rlshell.h
-nls.o: rlshell.h
-readline.o: rlshell.h
-shell.o: rlshell.h
-terminal.o: rlshell.h
-histexpand.o: rlshell.h
-
-bind.o: rlprivate.h
-callback.o: rlprivate.h
-complete.o: rlprivate.h
-display.o: rlprivate.h
-input.o: rlprivate.h
-isearch.o: rlprivate.h
-kill.o: rlprivate.h
-macro.o: rlprivate.h
-mbutil.o: rlprivate.h
-misc.o: rlprivate.h
-nls.o: rlprivate.h   
-parens.o: rlprivate.h
-readline.o: rlprivate.h
-rltty.o: rlprivate.h 
-search.o: rlprivate.h
-signals.o: rlprivate.h
-terminal.o: rlprivate.h
-text.o: rlprivate.h
-undo.o: rlprivate.h
-util.o: rlprivate.h
-vi_mode.o: rlprivate.h
-colors.o: rlprivate.h
-parse-colors.o: rlprivate.h
-
-bind.o: xmalloc.h
-callback.o: xmalloc.h
-complete.o: xmalloc.h
-display.o: xmalloc.h
-funmap.o: xmalloc.h
-histexpand.o: xmalloc.h
-histfile.o: xmalloc.h
-history.o: xmalloc.h
-input.o: xmalloc.h
-isearch.o: xmalloc.h
-keymaps.o: xmalloc.h
-kill.o: xmalloc.h
-macro.o: xmalloc.h
-mbutil.o: xmalloc.h
-misc.o: xmalloc.h
-readline.o: xmalloc.h
-savestring.o: xmalloc.h
-search.o: xmalloc.h
-shell.o: xmalloc.h
-terminal.o: xmalloc.h
-text.o: xmalloc.h
-tilde.o: xmalloc.h
-undo.o: xmalloc.h
-util.o: xmalloc.h
-vi_mode.o: xmalloc.h
-xfree.o: xmalloc.h
-xmalloc.o: xmalloc.h
-colors.o: xmalloc.h
-parse-colors.o: xmalloc.h
-
-complete.o: rlmbutil.h
-display.o: rlmbutil.h
-histexpand.o: rlmbutil.h
-input.o: rlmbutil.h    
-isearch.o: rlmbutil.h
-mbutil.o: rlmbutil.h
-misc.o: rlmbutil.h
-readline.o: rlmbutil.h
-search.o: rlmbutil.h 
-text.o: rlmbutil.h
-vi_mode.o: rlmbutil.h
-
-bind.o: $(srcdir)/bind.c
-callback.o: $(srcdir)/callback.c
-compat.o: $(srcdir)/compat.c
-complete.o: $(srcdir)/complete.c
-display.o: $(srcdir)/display.c
-funmap.o: $(srcdir)/funmap.c
-input.o: $(srcdir)/input.c
-isearch.o: $(srcdir)/isearch.c
-keymaps.o: $(srcdir)/keymaps.c $(srcdir)/emacs_keymap.c $(srcdir)/vi_keymap.c
-kill.o: $(srcdir)/kill.c
-macro.o: $(srcdir)/macro.c
-mbutil.o: $(srcdir)/mbutil.c
-misc.o: $(srcdir)/misc.c
-nls.o: $(srcdir)/nls.c
-parens.o: $(srcdir)/parens.c
-readline.o: $(srcdir)/readline.c
-rltty.o: $(srcdir)/rltty.c
-savestring.o: $(srcdir)/savestring.c
-search.o: $(srcdir)/search.c
-shell.o: $(srcdir)/shell.c
-signals.o: $(srcdir)/signals.c
-terminal.o: $(srcdir)/terminal.c
-text.o: $(srcdir)/text.c
-tilde.o: $(srcdir)/tilde.c
-undo.o: $(srcdir)/undo.c
-util.o: $(srcdir)/util.c
-vi_mode.o: $(srcdir)/vi_mode.c
-xfree.o: $(srcdir)/xfree.c
-xmalloc.o: $(srcdir)/xmalloc.c
-
-colors.o: $(srcdir)/parse-colors.c
-parse-colors.o: $(srcdir)/parse-colors.c
-
-histexpand.o: $(srcdir)/histexpand.c
-histfile.o: $(srcdir)/histfile.c
-history.o: $(srcdir)/history.c
-histsearch.o: $(srcdir)/histsearch.c
-
-bind.o: bind.c
-callback.o: callback.c
-compat.o: compat.c
-complete.o: complete.c
-display.o: display.c
-funmap.o: funmap.c
-input.o: input.c
-isearch.o: isearch.c
-keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c
-kill.o: kill.c
-macro.o: macro.c
-mbutil.o: mbutil.c
-misc.o: misc.c
-nls.o: nls.c
-parens.o: parens.c
-readline.o: readline.c
-rltty.o: rltty.c
-savestring.o: savestring.c
-search.o: search.c
-shell.o: shell.c
-signals.o: signals.c
-terminal.o: terminal.c
-text.o: text.c
-tilde.o: tilde.c
-undo.o: undo.c
-util.o: util.c
-vi_mode.o: vi_mode.c
-xfree.o: xfree.c
-xmalloc.o: xmalloc.c
-
-histexpand.o: histexpand.c
-histfile.o: histfile.c
-history.o: history.c
-histsearch.o: histsearch.c
diff --git a/readline/README b/readline/README
index 4fb0804..9500004 100644
--- a/readline/README
+++ b/readline/README
@@ -1,196 +1,14 @@
-Introduction
-============
+This is an import of readline that is used by gdb.
 
-This is the Gnu Readline library, version 8.0.
+To send patches, follow the gdb patch submission instructions in
+../gdb/CONTRIBUTE.  For maintainers, see ../gdb/MAINTAINERS.
 
-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
-Emacs and vi editing modes are available.  The Readline library includes
-additional functions to maintain a list of previously-entered command
-lines, to recall and perhaps reedit those lines, and perform csh-like
-history expansion on previous commands.
+If you need to patch readline, please document the changes here.
 
-The history facilites are also placed into a separate library, the
-History library, as part of the build process.  The History library
-may be used without Readline in applications which desire its
-capabilities.
+To import, copy the upstream readline sources into the "readline"
+subdirectory, remembering to (1) remove any files that were deleted
+upstream, and (2) merge the one small configure.ac patch that gdb
+carries.
 
-The Readline library is free software, distributed under the terms of
-the [GNU] General Public License as published by the Free Software
-Foundation, version 3 of the License.  For more information, see the
-file COPYING.
-
-To build the library, try typing `./configure', then `make'.  The
-configuration process is automated, so no further intervention should
-be necessary.  Readline builds with `gcc' by default if it is
-available.  If you want to use `cc' instead, type
-
-        CC=cc ./configure
-
-if you are using a Bourne-style shell.  If you are not, the following
-may work:
-
-        env CC=cc ./configure
-
-Read the file INSTALL in this directory for more information about how
-to customize and control the build process.
-
-The file rlconf.h contains C preprocessor defines that enable and disable
-certain Readline features.
-
-The special make target `everything' will build the static and shared
-libraries (if the target platform supports them) and the examples.
-
-Examples
-========
-
-There are several example programs that use Readline features in the
-examples directory.  The `rl' program is of particular interest.  It
-is a command-line interface to Readline, suitable for use in shell
-scripts in place of `read'.
-
-Shared Libraries
-================
-
-There is skeletal support for building shared versions of the
-Readline and History libraries.  The configure script creates
-a Makefile in the `shlib' subdirectory, and typing `make shared'
-will cause shared versions of the Readline and History libraries
-to be built on supported platforms.
-
-If `configure' is given the `--enable-shared' option, it will attempt
-to build the shared libraries by default on supported platforms.
-
-Configure calls the script support/shobj-conf to test whether or
-not shared library creation is supported and to generate the values
-of variables that are substituted into shlib/Makefile.  If you
-try to build shared libraries on an unsupported platform, `make'
-will display a message asking you to update support/shobj-conf for
-your platform.
-
-If you need to update support/shobj-conf, you will need to create
-a `stanza' for your operating system and compiler.  The script uses
-the value of host_os and ${CC} as determined by configure.  For
-instance, FreeBSD 4.2 with any version of gcc is identified as
-`freebsd4.2-gcc*'.
-
-In the stanza for your operating system-compiler pair, you will need to
-define several variables.  They are:
-
-SHOBJ_CC	The C compiler used to compile source files into shareable
-		object files.  This is normally set to the value of ${CC}
-		by configure, and should not need to be changed.
-
-SHOBJ_CFLAGS	Flags to pass to the C compiler ($SHOBJ_CC) to create
-		position-independent code.  If you are using gcc, this
-		should probably be set to `-fpic'.
-
-SHOBJ_LD	The link editor to be used to create the shared library from
-		the object files created by $SHOBJ_CC.  If you are using
-		gcc, a value of `gcc' will probably work.
-
-SHOBJ_LDFLAGS	Flags to pass to SHOBJ_LD to enable shared object creation.
-		If you are using gcc, `-shared' may be all that is necessary.
-		These should be the flags needed for generic shared object
-		creation.
-
-SHLIB_XLDFLAGS	Additional flags to pass to SHOBJ_LD for shared library
-		creation.  Many systems use the -R option to the link
-		editor to embed a path within the library for run-time
-		library searches.  A reasonable value for such systems would
-		be `-R$(libdir)'.
-
-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'.
-
-SHLIB_LIBVERSION The string to append to the filename to indicate the version
-		of the shared library.  It should begin with $(SHLIB_LIBSUFF),
-		and possibly include version information that allows the
-		run-time loader to load the version of the shared library
-		appropriate for a particular program.  Systems using shared
-		libraries similar to SunOS 4.x use major and minor library
-		version numbers; for those systems a value of
-		`$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' is appropriate.
-		Systems based on System V Release 4 don't use minor 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.
-
-You should look at the existing stanzas in support/shobj-conf for ideas.
-
-Once you have updated support/shobj-conf, re-run configure and type
-`make shared'.  The shared libraries will be created in the shlib
-subdirectory.
-
-If shared libraries are created, `make install' will install them. 
-You may install only the shared libraries by running `make
-install-shared' from the top-level build directory.  Running `make
-install' in the shlib subdirectory will also work.  If you don't want
-to install any created shared libraries, run `make install-static'. 
-
-Documentation
-=============
-
-The documentation for the Readline and History libraries appears in
-the `doc' subdirectory.  There are three texinfo files and a
-Unix-style manual page describing the facilities available in the
-Readline library.  The texinfo files include both user and
-programmer's manuals.  HTML versions of the manuals appear in the
-`doc' subdirectory as well. 
-
-Usage
-=====
-
-Our position on the use of Readline through a shared-library linking
-mechanism is that there is no legal difference between shared-library
-linking and static linking--either kind of linking combines various
-modules into a single larger work.  The conditions for using Readline
-in a larger work are stated in section 3 of the GNU GPL.
-
-Reporting Bugs
-==============
-
-Bug reports for Readline should be sent to:
-
-        bug-readline@gnu.org
-
-When reporting a bug, please include the following information:
-
-        * the version number and release status of Readline (e.g., 4.2-release)
-        * the machine and OS that it is running on
-        * a list of the compilation flags or the contents of `config.h', if
-          appropriate
-        * a description of the bug
-        * a recipe for recreating the bug reliably
-        * a fix for the bug if you have one!
-
-If you would like to contact the Readline maintainer directly, send mail
-to bash-maintainers@gnu.org.
-
-Since Readline is developed along with bash, the bug-bash@gnu.org mailing
-list (mirrored to the Usenet newsgroup gnu.bash.bug) often contains
-Readline bug reports and fixes. 
-
-Chet Ramey
-chet.ramey@case.edu
+If your import removes the need for a local patch, please remember to
+update this file.
diff --git a/readline/aclocal.m4 b/readline/aclocal.m4
index 1413267..27228d7 100644
--- a/readline/aclocal.m4
+++ b/readline/aclocal.m4
@@ -1,4262 +1,792 @@
-nl
-dnl Bash specific tests
-dnl
-dnl Some derived from PDKSH 5.1.3 autoconf tests
-dnl
-
-AC_DEFUN(BASH_C_LONG_LONG,
-[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
-[if test "$GCC" = yes; then
-  ac_cv_c_long_long=yes
-else
-AC_TRY_RUN([
-int
-main()
-{
-long long foo = 0;
-exit(sizeof(long long) < sizeof(long));
-}
-], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
-fi])
-if test $ac_cv_c_long_long = yes; then
-  AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
-fi
-])
-
-dnl
-dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
-dnl (< changed to <=) added.
-dnl
-AC_DEFUN(BASH_C_LONG_DOUBLE,
-[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
-[if test "$GCC" = yes; then
-  ac_cv_c_long_double=yes
-else
-AC_TRY_RUN([
-int
-main()
-{
-  /* The Stardent Vistra knows sizeof(long double), but does not
-     support it. */
-  long double foo = 0.0;
-  /* On Ultrix 4.3 cc, long double is 4 and double is 8.  */
-  /* On IRIX 5.3, the compiler converts long double to double with a warning,
-     but compiles this successfully. */
-  exit(sizeof(long double) <= sizeof(double));
-}
-], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
-fi])
-if test $ac_cv_c_long_double = yes; then
-  AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
-fi
-])
-
-dnl
-dnl Check for <inttypes.h>.  This is separated out so that it can be
-dnl AC_REQUIREd.
-dnl
-dnl BASH_HEADER_INTTYPES
-AC_DEFUN(BASH_HEADER_INTTYPES,
-[
- AC_CHECK_HEADERS(inttypes.h)
-])
-
-dnl
-dnl check for typedef'd symbols in header files, but allow the caller to
-dnl specify the include files to be checked in addition to the default
-dnl 
-dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
-AC_DEFUN(BASH_CHECK_TYPE,
-[
-AC_REQUIRE([AC_HEADER_STDC])dnl
-AC_REQUIRE([BASH_HEADER_INTTYPES])
-AC_MSG_CHECKING(for $1)
-AC_CACHE_VAL(bash_cv_type_$1,
-[AC_EGREP_CPP($1, [#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-$2
-], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
-AC_MSG_RESULT($bash_cv_type_$1)
-ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
-	AC_DEFINE($4)
-	fi])
-if test $bash_cv_type_$1 = no; then
-  AC_DEFINE_UNQUOTED($1, $3)
-fi
-])
-
-dnl
-dnl BASH_CHECK_DECL(FUNC)
-dnl
-dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
-dnl AC_CHECK_DECL
-dnl
-AC_DEFUN(BASH_CHECK_DECL,
-[
-AC_REQUIRE([AC_HEADER_STDC])
-AC_REQUIRE([BASH_HEADER_INTTYPES])
-AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
-[AC_TRY_LINK(
-[
-#if STDC_HEADERS
-#  include <stdlib.h>
-#endif
-#if HAVE_INTTYPES_H
-#  include <inttypes.h>
-#endif
-],
-[return !$1;],
-bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
-bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-if test $bash_cv_decl_$1 = yes; then
-  AC_DEFINE_UNQUOTED($bash_tr_func, 1)
-else
-  AC_DEFINE_UNQUOTED($bash_tr_func, 0)
-fi
-])
-
-AC_DEFUN(BASH_DECL_PRINTF,
-[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
-AC_CACHE_VAL(bash_cv_printf_declared,
-[AC_TRY_RUN([
-#include <stdio.h>
-#ifdef __STDC__
-typedef int (*_bashfunc)(const char *, ...);
-#else
-typedef int (*_bashfunc)();
-#endif
-main()
-{
-_bashfunc pf;
-pf = (_bashfunc) printf;
-exit(pf == 0);
-}
-], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
-   [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
-    bash_cv_printf_declared=yes]
-)])
-AC_MSG_RESULT($bash_cv_printf_declared)
-if test $bash_cv_printf_declared = yes; then
-AC_DEFINE(PRINTF_DECLARED)
-fi
-])
-
-AC_DEFUN(BASH_DECL_SBRK,
-[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
-AC_CACHE_VAL(bash_cv_sbrk_declared,
-[AC_EGREP_HEADER(sbrk, unistd.h,
- bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
-AC_MSG_RESULT($bash_cv_sbrk_declared)
-if test $bash_cv_sbrk_declared = yes; then
-AC_DEFINE(SBRK_DECLARED)
-fi
-])
-
-dnl
-dnl Check for sys_siglist[] or _sys_siglist[]
-dnl
-AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST,
-[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
-AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif], [ char *msg = _sys_siglist[2]; ],
-  bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
-  [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
-AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
-if test $bash_cv_decl_under_sys_siglist = yes; then
-AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
-fi
-])
-
-AC_DEFUN(BASH_UNDER_SYS_SIGLIST,
-[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
-AC_MSG_CHECKING([for _sys_siglist in system C library])
-AC_CACHE_VAL(bash_cv_under_sys_siglist,
-[AC_TRY_RUN([
-#include <sys/types.h>
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifndef UNDER_SYS_SIGLIST_DECLARED
-extern char *_sys_siglist[];
-#endif
-main()
-{
-char *msg = (char *)_sys_siglist[2];
-exit(msg == 0);
-}],
-	bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
-	[AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
-	 bash_cv_under_sys_siglist=no])])
-AC_MSG_RESULT($bash_cv_under_sys_siglist)
-if test $bash_cv_under_sys_siglist = yes; then
-AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
-fi
-])
-
-AC_DEFUN(BASH_SYS_SIGLIST,
-[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
-AC_MSG_CHECKING([for sys_siglist in system C library])
-AC_CACHE_VAL(bash_cv_sys_siglist,
-[AC_TRY_RUN([
-#include <sys/types.h>
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if !HAVE_DECL_SYS_SIGLIST
-extern char *sys_siglist[];
-#endif
-main()
-{
-char *msg = sys_siglist[2];
-exit(msg == 0);
-}],
-	bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
-	[AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
-	 bash_cv_sys_siglist=no])])
-AC_MSG_RESULT($bash_cv_sys_siglist)
-if test $bash_cv_sys_siglist = yes; then
-AC_DEFINE(HAVE_SYS_SIGLIST)
-fi
-])
-
-dnl Check for the various permutations of sys_siglist and make sure we
-dnl compile in siglist.o if they're not defined
-AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [
-AC_REQUIRE([BASH_SYS_SIGLIST])
-AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
-AC_REQUIRE([BASH_FUNC_STRSIGNAL])
-if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
-  SIGLIST_O=siglist.o
-else
-  SIGLIST_O=
-fi
-AC_SUBST([SIGLIST_O])
-])
-
-dnl Check for sys_errlist[] and sys_nerr, check for declaration
-AC_DEFUN(BASH_SYS_ERRLIST,
-[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
-AC_CACHE_VAL(bash_cv_sys_errlist,
-[AC_TRY_LINK([#include <errno.h>],
-[extern char *sys_errlist[];
- extern int sys_nerr;
- char *msg = sys_errlist[sys_nerr - 1];],
-    bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
-AC_MSG_RESULT($bash_cv_sys_errlist)
-if test $bash_cv_sys_errlist = yes; then
-AC_DEFINE(HAVE_SYS_ERRLIST)
-fi
-])
-
-dnl
-dnl Check if dup2() does not clear the close on exec flag
-dnl
-AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK,
-[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
-AC_CACHE_VAL(bash_cv_dup2_broken,
-[AC_TRY_RUN([
-#include <sys/types.h>
-#include <fcntl.h>
-main()
-{
-  int fd1, fd2, fl;
-  fd1 = open("/dev/null", 2);
-  if (fcntl(fd1, 2, 1) < 0)
-    exit(1);
-  fd2 = dup2(fd1, 1);
-  if (fd2 < 0)
-    exit(2);
-  fl = fcntl(fd2, 1, 0);
-  /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
-  exit(fl != 1);
-}
-], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
-    [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
-     bash_cv_dup2_broken=no])
-])
-AC_MSG_RESULT($bash_cv_dup2_broken)
-if test $bash_cv_dup2_broken = yes; then
-AC_DEFINE(DUP2_BROKEN)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_STRSIGNAL,
-[AC_MSG_CHECKING([for the existence of strsignal])
-AC_CACHE_VAL(bash_cv_have_strsignal,
-[AC_TRY_LINK([#include <sys/types.h>
-#include <signal.h>],
-[char *s = (char *)strsignal(2);],
- bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
-AC_MSG_RESULT($bash_cv_have_strsignal)
-if test $bash_cv_have_strsignal = yes; then
-AC_DEFINE(HAVE_STRSIGNAL)
-fi
-])
-
-dnl Check to see if opendir will open non-directories (not a nice thing)
-AC_DEFUN(BASH_FUNC_OPENDIR_CHECK,
-[AC_REQUIRE([AC_HEADER_DIRENT])dnl
-AC_MSG_CHECKING(if opendir() opens non-directories)
-AC_CACHE_VAL(bash_cv_opendir_not_robust,
-[AC_TRY_RUN([
-#include <stdio.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-main()
-{
-DIR *dir;
-int fd, err;
-err = mkdir("bash-aclocal", 0700);
-if (err < 0) {
-  perror("mkdir");
-  exit(1);
-}
-unlink("bash-aclocal/not_a_directory");
-fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
-write(fd, "\n", 1);
-close(fd);
-dir = opendir("bash-aclocal/not_a_directory");
-unlink("bash-aclocal/not_a_directory");
-rmdir("bash-aclocal");
-exit (dir == 0);
-}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
-    [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
-     bash_cv_opendir_not_robust=no]
-)])
-AC_MSG_RESULT($bash_cv_opendir_not_robust)
-if test $bash_cv_opendir_not_robust = yes; then
-AC_DEFINE(OPENDIR_NOT_ROBUST)
-fi
-])
-
-dnl
-AC_DEFUN(BASH_TYPE_SIGHANDLER,
-[AC_MSG_CHECKING([whether signal handlers are of type void])
-AC_CACHE_VAL(bash_cv_void_sighandler,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-#undef signal
-#endif
-#ifdef __cplusplus
-extern "C"
-#endif
-void (*signal ()) ();],
-[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
-AC_MSG_RESULT($bash_cv_void_sighandler)
-if test $bash_cv_void_sighandler = yes; then
-AC_DEFINE(VOID_SIGHANDLER)
-fi
-])
-
-dnl
-dnl A signed 16-bit integer quantity
-dnl
-AC_DEFUN(BASH_TYPE_BITS16_T,
-[
-if test "$ac_cv_sizeof_short" = 2; then
-  AC_CHECK_TYPE(bits16_t, short)
-elif test "$ac_cv_sizeof_char" = 2; then
-  AC_CHECK_TYPE(bits16_t, char)
-else
-  AC_CHECK_TYPE(bits16_t, short)
-fi
-])
-
-dnl
-dnl An unsigned 16-bit integer quantity
-dnl
-AC_DEFUN(BASH_TYPE_U_BITS16_T,
-[
-if test "$ac_cv_sizeof_short" = 2; then
-  AC_CHECK_TYPE(u_bits16_t, unsigned short)
-elif test "$ac_cv_sizeof_char" = 2; then
-  AC_CHECK_TYPE(u_bits16_t, unsigned char)
-else
-  AC_CHECK_TYPE(u_bits16_t, unsigned short)
-fi
-])
-
-dnl
-dnl A signed 32-bit integer quantity
-dnl
-AC_DEFUN(BASH_TYPE_BITS32_T,
-[
-if test "$ac_cv_sizeof_int" = 4; then
-  AC_CHECK_TYPE(bits32_t, int)
-elif test "$ac_cv_sizeof_long" = 4; then
-  AC_CHECK_TYPE(bits32_t, long)
-else
-  AC_CHECK_TYPE(bits32_t, int)
-fi
-])
-
-dnl
-dnl An unsigned 32-bit integer quantity
-dnl
-AC_DEFUN(BASH_TYPE_U_BITS32_T,
-[
-if test "$ac_cv_sizeof_int" = 4; then
-  AC_CHECK_TYPE(u_bits32_t, unsigned int)
-elif test "$ac_cv_sizeof_long" = 4; then
-  AC_CHECK_TYPE(u_bits32_t, unsigned long)
-else
-  AC_CHECK_TYPE(u_bits32_t, unsigned int)
-fi
-])
-
-AC_DEFUN(BASH_TYPE_PTRDIFF_T,
-[
-if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
-  AC_CHECK_TYPE(ptrdiff_t, int)
-elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
-  AC_CHECK_TYPE(ptrdiff_t, long)
-elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
-  AC_CHECK_TYPE(ptrdiff_t, [long long])
-else
-  AC_CHECK_TYPE(ptrdiff_t, int)
-fi
-])
-
-dnl
-dnl A signed 64-bit quantity
-dnl
-AC_DEFUN(BASH_TYPE_BITS64_T,
-[
-if test "$ac_cv_sizeof_char_p" = 8; then
-  AC_CHECK_TYPE(bits64_t, char *)
-elif test "$ac_cv_sizeof_double" = 8; then
-  AC_CHECK_TYPE(bits64_t, double)
-elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
-  AC_CHECK_TYPE(bits64_t, [long long])
-elif test "$ac_cv_sizeof_long" = 8; then
-  AC_CHECK_TYPE(bits64_t, long)
-else
-  AC_CHECK_TYPE(bits64_t, double)
-fi
-])
-
-AC_DEFUN(BASH_TYPE_LONG_LONG,
-[
-AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
-[AC_TRY_LINK([
-long long ll = 1; int i = 63;],
-[
-long long llm = (long long) -1;
-return ll << i | ll >> i | llm / ll | llm % ll;
-], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
-if test "$bash_cv_type_long_long" = 'long long'; then
-  AC_DEFINE(HAVE_LONG_LONG, 1)
-fi
-])
-
-AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG,
-[
-AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
-[AC_TRY_LINK([
-unsigned long long ull = 1; int i = 63;],
-[
-unsigned long long ullmax = (unsigned long long) -1;
-return ull << i | ull >> i | ullmax / ull | ullmax % ull;
-], bash_cv_type_unsigned_long_long='unsigned long long',
-   bash_cv_type_unsigned_long_long='unsigned long')])
-if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
-  AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
-fi
-])
-
-dnl
-dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
-dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
-dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3).  To simplify
-dnl matters, this just checks for rlim_t, quad_t, or long.
-dnl
-AC_DEFUN(BASH_TYPE_RLIMIT,
-[AC_MSG_CHECKING(for size and type of struct rlimit fields)
-AC_CACHE_VAL(bash_cv_type_rlimit,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/resource.h>],
-[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
-AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-main()
-{
-#ifdef HAVE_QUAD_T
-  struct rlimit rl;
-  if (sizeof(rl.rlim_cur) == sizeof(quad_t))
-    exit(0);
-#endif
-  exit(1);
-}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
-        [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
-         bash_cv_type_rlimit=long])])
-])
-AC_MSG_RESULT($bash_cv_type_rlimit)
-if test $bash_cv_type_rlimit = quad_t; then
-AC_DEFINE(RLIMTYPE, quad_t)
-elif test $bash_cv_type_rlimit = rlim_t; then
-AC_DEFINE(RLIMTYPE, rlim_t)
-fi
-])
-
-AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
-[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
-[AC_TRY_LINK([
-#include <signal.h>
-],[ sig_atomic_t x; ],
-ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
-if test "$ac_cv_have_sig_atomic_t" = "no"
-then
-    AC_CHECK_TYPE(sig_atomic_t,int)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_LSTAT,
-[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
-dnl inline function in <sys/stat.h>.
-AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
-[AC_TRY_LINK([
-#include <sys/types.h>
-#include <sys/stat.h>
-],[ lstat(".",(struct stat *)0); ],
-bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
-if test $bash_cv_func_lstat = yes; then
-  AC_DEFINE(HAVE_LSTAT)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_INET_ATON,
-[
-AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
-[AC_TRY_LINK([
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
-bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
-if test $bash_cv_func_inet_aton = yes; then
-  AC_DEFINE(HAVE_INET_ATON)
-else
-  AC_LIBOBJ(inet_aton)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_GETENV,
-[AC_MSG_CHECKING(to see if getenv can be redefined)
-AC_CACHE_VAL(bash_cv_getenv_redef,
-[AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-#ifndef __STDC__
-#  ifndef const
-#    define const
-#  endif
-#endif
-char *
-getenv (name)
-#if defined (__linux__) || defined (__bsdi__) || defined (convex)
-     const char *name;
-#else
-     char const *name;
-#endif /* !__linux__ && !__bsdi__ && !convex */
-{
-return "42";
-}
-main()
-{
-char *s;
-/* The next allows this program to run, but does not allow bash to link
-   when it redefines getenv.  I'm not really interested in figuring out
-   why not. */
-#if defined (NeXT)
-exit(1);
-#endif
-s = getenv("ABCDE");
-exit(s == 0);	/* force optimizer to leave getenv in */
-}
-], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
-   [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
-    bash_cv_getenv_redef=yes]
-)])
-AC_MSG_RESULT($bash_cv_getenv_redef)
-if test $bash_cv_getenv_redef = yes; then
-AC_DEFINE(CAN_REDEFINE_GETENV)
-fi
-])
-
-# We should check for putenv before calling this
-AC_DEFUN(BASH_FUNC_STD_PUTENV,
-[
-AC_REQUIRE([AC_HEADER_STDC])
-AC_REQUIRE([AC_C_PROTOTYPES])
-AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
-[AC_TRY_LINK([
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifndef __STDC__
-#  ifndef const
-#    define const
-#  endif
-#endif
-#ifdef PROTOTYPES
-extern int putenv (char *);
-#else
-extern int putenv ();
-#endif
-],
-[return (putenv == 0);],
-bash_cv_std_putenv=yes, bash_cv_std_putenv=no
-)])
-if test $bash_cv_std_putenv = yes; then
-AC_DEFINE(HAVE_STD_PUTENV)
-fi
-])
-
-# We should check for unsetenv before calling this
-AC_DEFUN(BASH_FUNC_STD_UNSETENV,
-[
-AC_REQUIRE([AC_HEADER_STDC])
-AC_REQUIRE([AC_C_PROTOTYPES])
-AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
-[AC_TRY_LINK([
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-#ifndef __STDC__
-#  ifndef const
-#    define const
-#  endif
-#endif
-#ifdef PROTOTYPES
-extern int unsetenv (const char *);
-#else
-extern int unsetenv ();
-#endif
-],
-[return (unsetenv == 0);],
-bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
-)])
-if test $bash_cv_std_unsetenv = yes; then
-AC_DEFINE(HAVE_STD_UNSETENV)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS,
-[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
-AC_CACHE_VAL(bash_cv_ulimit_maxfds,
-[AC_TRY_RUN([
-main()
-{
-long maxfds = ulimit(4, 0L);
-exit (maxfds == -1L);
-}
-], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
-   [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
-    bash_cv_ulimit_maxfds=no]
-)])
-AC_MSG_RESULT($bash_cv_ulimit_maxfds)
-if test $bash_cv_ulimit_maxfds = yes; then
-AC_DEFINE(ULIMIT_MAXFDS)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_GETCWD,
-[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory with 0 size])
-AC_CACHE_VAL(bash_cv_getcwd_malloc,
-[AC_TRY_RUN([
-#include <stdio.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-main()
-{
-	char	*xpwd;
-	xpwd = getcwd(0, 0);
-	exit (xpwd == 0);
-}
-], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
-   [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
-    bash_cv_getcwd_malloc=no]
-)])
-AC_MSG_RESULT($bash_cv_getcwd_malloc)
-if test $bash_cv_getcwd_malloc = no; then
-AC_DEFINE(GETCWD_BROKEN)
-AC_LIBOBJ(getcwd)
-fi
-])
-
-dnl
-dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
-dnl system, we can't use AC_PREREQ
-dnl
-AC_DEFUN(BASH_FUNC_GETHOSTBYNAME,
-[if test "X$bash_cv_have_gethostbyname" = "X"; then
-_bash_needmsg=yes
-else
-AC_MSG_CHECKING(for gethostbyname in socket library)
-_bash_needmsg=
-fi
-AC_CACHE_VAL(bash_cv_have_gethostbyname,
-[AC_TRY_LINK([#include <netdb.h>],
-[ struct hostent *hp;
-  hp = gethostbyname("localhost");
-], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
-)
-if test "X$_bash_needmsg" = Xyes; then
-    AC_MSG_CHECKING(for gethostbyname in socket library)
-fi
-AC_MSG_RESULT($bash_cv_have_gethostbyname)
-if test "$bash_cv_have_gethostbyname" = yes; then
-AC_DEFINE(HAVE_GETHOSTBYNAME)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH,
-[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
-AC_CACHE_VAL(bash_cv_fnm_extmatch,
-[AC_TRY_RUN([
-#include <fnmatch.h>
-
-main()
-{
-#ifdef FNM_EXTMATCH
-  exit (0);
-#else
-  exit (1);
-#endif
-}
-], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
-    [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
-     bash_cv_fnm_extmatch=no])
-])
-AC_MSG_RESULT($bash_cv_fnm_extmatch)
-if test $bash_cv_fnm_extmatch = yes; then
-AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_POSIX_SETJMP,
-[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
-AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
-AC_CACHE_VAL(bash_cv_func_sigsetjmp,
-[AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/types.h>
-#include <signal.h>
-#include <setjmp.h>
-
-main()
-{
-#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
-exit (1);
-#else
-
-int code;
-sigset_t set, oset;
-sigjmp_buf xx;
-
-/* get the mask */
-sigemptyset(&set);
-sigemptyset(&oset);
-sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
-sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
-
-/* save it */
-code = sigsetjmp(xx, 1);
-if (code)
-  exit(0);	/* could get sigmask and compare to oset here. */
-
-/* change it */
-sigaddset(&set, SIGINT);
-sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
-
-/* and siglongjmp */
-siglongjmp(xx, 10);
-exit(1);
-#endif
-}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
-    [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
-     bash_cv_func_sigsetjmp=missing]
-)])
-AC_MSG_RESULT($bash_cv_func_sigsetjmp)
-if test $bash_cv_func_sigsetjmp = present; then
-AC_DEFINE(HAVE_POSIX_SIGSETJMP)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_STRCOLL,
-[
-AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
-AC_CACHE_VAL(bash_cv_func_strcoll_broken,
-[AC_TRY_RUN([
-#include <stdio.h>
-#if defined (HAVE_LOCALE_H)
-#include <locale.h>
-#endif
-
-main(c, v)
-int     c;
-char    *v[];
-{
-        int     r1, r2;
-        char    *deflocale, *defcoll;
-
-#ifdef HAVE_SETLOCALE
-        deflocale = setlocale(LC_ALL, "");
-	defcoll = setlocale(LC_COLLATE, "");
-#endif
-
-#ifdef HAVE_STRCOLL
-	/* These two values are taken from tests/glob-test. */
-        r1 = strcoll("abd", "aXd");
-#else
-	r1 = 0;
-#endif
-        r2 = strcmp("abd", "aXd");
-
-	/* These two should both be greater than 0.  It is permissible for
-	   a system to return different values, as long as the sign is the
-	   same. */
-
-        /* Exit with 1 (failure) if these two values are both > 0, since
-	   this tests whether strcoll(3) is broken with respect to strcmp(3)
-	   in the default locale. */
-	exit (r1 > 0 && r2 > 0);
-}
-], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
-   [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
-    bash_cv_func_strcoll_broken=no]
-)])
-AC_MSG_RESULT($bash_cv_func_strcoll_broken)
-if test $bash_cv_func_strcoll_broken = yes; then
-AC_DEFINE(STRCOLL_BROKEN)
-fi
-])
-
-AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT,
-[AC_MSG_CHECKING([for printf floating point output in hex notation])
-AC_CACHE_VAL(bash_cv_printf_a_format,
-[AC_TRY_RUN([
-#include <stdio.h>
-#include <string.h>
-
-int
-main()
-{
-	double y = 0.0;
-	char abuf[1024];
-
-	sprintf(abuf, "%A", y);
-	exit(strchr(abuf, 'P') == (char *)0);
-}
-], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
-   [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
-    bash_cv_printf_a_format=no]
-)])
-AC_MSG_RESULT($bash_cv_printf_a_format)
-if test $bash_cv_printf_a_format = yes; then
-AC_DEFINE(HAVE_PRINTF_A_FORMAT)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC,
-[
-AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
-#include <sys/types.h>
-#include <termios.h>
-])
-])
-
-AC_DEFUN(BASH_STRUCT_TERMIO_LDISC,
-[
-AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
-#include <sys/types.h>
-#include <termio.h>
-])
-])
-
-dnl
-dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
-dnl
-dnl sets bash_cv_struct_stat_st_blocks
-dnl
-dnl unused for now; we'll see how AC_CHECK_MEMBERS works
-dnl
-AC_DEFUN(BASH_STRUCT_ST_BLOCKS,
-[
-AC_MSG_CHECKING([for struct stat.st_blocks])
-AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
-[AC_TRY_COMPILE(
-[
-#include <sys/types.h>
-#include <sys/stat.h>
-],
-[
-main()
-{
-static struct stat a;
-if (a.st_blocks) return 0;
-return 0;
-}
-], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
-])
-AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
-if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
-AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
-fi
-])
-
-AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
-[
-if test "X$bash_cv_termcap_lib" = "X"; then
-_bash_needmsg=yes
-else
-AC_MSG_CHECKING(which library has the termcap functions)
-_bash_needmsg=
-fi
-AC_CACHE_VAL(bash_cv_termcap_lib,
-[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
-  [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
-    [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
-        [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
-	    [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
-                [AC_CHECK_LIB(ncursesw, tgetent, bash_cv_termcap_lib=libncursesw,
-	            bash_cv_termcap_lib=gnutermcap)])])])])])])
-if test "X$_bash_needmsg" = "Xyes"; then
-AC_MSG_CHECKING(which library has the termcap functions)
-fi
-AC_MSG_RESULT(using $bash_cv_termcap_lib)
-if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
-LDFLAGS="$LDFLAGS -L./lib/termcap"
-TERMCAP_LIB="./lib/termcap/libtermcap.a"
-TERMCAP_DEP="./lib/termcap/libtermcap.a"
-elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
-TERMCAP_LIB=-ltermcap
-TERMCAP_DEP=
-elif test $bash_cv_termcap_lib = libtinfo; then
-TERMCAP_LIB=-ltinfo
-TERMCAP_DEP=
-elif test $bash_cv_termcap_lib = libncurses; then
-TERMCAP_LIB=-lncurses
-TERMCAP_DEP=
-elif test $bash_cv_termcap_lib = libc; then
-TERMCAP_LIB=
-TERMCAP_DEP=
-else
-TERMCAP_LIB=-lcurses
-TERMCAP_DEP=
-fi
-])
-
-dnl
-dnl Check for the presence of getpeername in libsocket.
-dnl If libsocket is present, check for libnsl and add it to LIBS if
-dnl it's there, since most systems with libsocket require linking
-dnl with libnsl as well.  This should only be called if getpeername
-dnl was not found in libc.
-dnl
-dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
-dnl	  AS WELL
-dnl
-AC_DEFUN(BASH_CHECK_LIB_SOCKET,
-[
-if test "X$bash_cv_have_socklib" = "X"; then
-_bash_needmsg=
-else
-AC_MSG_CHECKING(for socket library)
-_bash_needmsg=yes
-fi
-AC_CACHE_VAL(bash_cv_have_socklib,
-[AC_CHECK_LIB(socket, getpeername,
-        bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
-if test "X$_bash_needmsg" = Xyes; then
-  AC_MSG_RESULT($bash_cv_have_socklib)
-  _bash_needmsg=
-fi
-if test $bash_cv_have_socklib = yes; then
-  # check for libnsl, add it to LIBS if present
-  if test "X$bash_cv_have_libnsl" = "X"; then
-    _bash_needmsg=
-  else
-    AC_MSG_CHECKING(for libnsl)
-    _bash_needmsg=yes
-  fi
-  AC_CACHE_VAL(bash_cv_have_libnsl,
-	   [AC_CHECK_LIB(nsl, t_open,
-		 bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
-  if test "X$_bash_needmsg" = Xyes; then
-    AC_MSG_RESULT($bash_cv_have_libnsl)
-    _bash_needmsg=
-  fi
-  if test $bash_cv_have_libnsl = yes; then
-    LIBS="-lsocket -lnsl $LIBS"
-  else
-    LIBS="-lsocket $LIBS"
-  fi
-  AC_DEFINE(HAVE_LIBSOCKET)
-  AC_DEFINE(HAVE_GETPEERNAME)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
-[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(for struct dirent.d_ino)
-AC_CACHE_VAL(bash_cv_dirent_has_dino,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-],[
-struct dirent d; int z; z = d.d_ino;
-], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
-AC_MSG_RESULT($bash_cv_dirent_has_dino)
-if test $bash_cv_dirent_has_dino = yes; then
-AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
-[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(for struct dirent.d_fileno)
-AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-],[
-struct dirent d; int z; z = d.d_fileno;
-], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
-AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
-if test $bash_cv_dirent_has_d_fileno = yes; then
-AC_DEFINE(HAVE_STRUCT_DIRENT_D_FILENO)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_DIRENT_D_NAMLEN,
-[AC_REQUIRE([AC_HEADER_DIRENT])
-AC_MSG_CHECKING(for struct dirent.d_namlen)
-AC_CACHE_VAL(bash_cv_dirent_has_d_namlen,
-[AC_TRY_COMPILE([
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-#if defined(HAVE_DIRENT_H)
-# include <dirent.h>
-#else
-# define dirent direct
-# ifdef HAVE_SYS_NDIR_H
-#  include <sys/ndir.h>
-# endif /* SYSNDIR */
-# ifdef HAVE_SYS_DIR_H
-#  include <sys/dir.h>
-# endif /* SYSDIR */
-# ifdef HAVE_NDIR_H
-#  include <ndir.h>
-# endif
-#endif /* HAVE_DIRENT_H */
-],[
-struct dirent d; int z; z = d.d_namlen;
-], bash_cv_dirent_has_d_namlen=yes, bash_cv_dirent_has_d_namlen=no)])
-AC_MSG_RESULT($bash_cv_dirent_has_d_namlen)
-if test $bash_cv_dirent_has_d_namlen = yes; then
-AC_DEFINE(HAVE_STRUCT_DIRENT_D_NAMLEN)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_TIMEVAL,
-[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
-AC_CACHE_VAL(bash_cv_struct_timeval,
-[
-AC_EGREP_HEADER(struct timeval, sys/time.h,
-		bash_cv_struct_timeval=yes,
-		AC_EGREP_HEADER(struct timeval, time.h,
-			bash_cv_struct_timeval=yes,
-			bash_cv_struct_timeval=no))
-])
-AC_MSG_RESULT($bash_cv_struct_timeval)
-if test $bash_cv_struct_timeval = yes; then
-  AC_DEFINE(HAVE_TIMEVAL)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_TIMEZONE,
-[AC_MSG_CHECKING(for struct timezone in sys/time.h and time.h)
-AC_CACHE_VAL(bash_cv_struct_timezone,
-[
-AC_EGREP_HEADER(struct timezone, sys/time.h,
-		bash_cv_struct_timezone=yes,
-		AC_EGREP_HEADER(struct timezone, time.h,
-			bash_cv_struct_timezone=yes,
-			bash_cv_struct_timezone=no))
-])
-AC_MSG_RESULT($bash_cv_struct_timezone)
-if test $bash_cv_struct_timezone = yes; then
-  AC_DEFINE(HAVE_STRUCT_TIMEZONE)
-fi
-])
-
-AC_DEFUN(BASH_STRUCT_WINSIZE,
-[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
-AC_CACHE_VAL(bash_cv_struct_winsize_header,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [struct winsize x;],
-  bash_cv_struct_winsize_header=ioctl_h,
-  [AC_TRY_COMPILE([#include <sys/types.h>
-#include <termios.h>], [struct winsize x;],
-  bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
-])])
-if test $bash_cv_struct_winsize_header = ioctl_h; then
-  AC_MSG_RESULT(sys/ioctl.h)
-  AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
-elif test $bash_cv_struct_winsize_header = termios_h; then
-  AC_MSG_RESULT(termios.h)
-  AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
-else
-  AC_MSG_RESULT(not found)
-fi
-])
-
-dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
-AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE,
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_MSG_CHECKING(for type of signal functions)
-AC_CACHE_VAL(bash_cv_signal_vintage,
-[
-  AC_TRY_LINK([#include <signal.h>],[
-    sigset_t ss;
-    struct sigaction sa;
-    sigemptyset(&ss); sigsuspend(&ss);
-    sigaction(SIGINT, &sa, (struct sigaction *) 0);
-    sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
-  ], bash_cv_signal_vintage=posix,
-  [
-    AC_TRY_LINK([#include <signal.h>], [
-	int mask = sigmask(SIGINT);
-	sigsetmask(mask); sigblock(mask); sigpause(mask);
-    ], bash_cv_signal_vintage=4.2bsd,
-    [
-      AC_TRY_LINK([
-	#include <signal.h>
-	RETSIGTYPE foo() { }], [
-		int mask = sigmask(SIGINT);
-		sigset(SIGINT, foo); sigrelse(SIGINT);
-		sighold(SIGINT); sigpause(SIGINT);
-        ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7
-    )]
-  )]
-)
-])
-AC_MSG_RESULT($bash_cv_signal_vintage)
-if test "$bash_cv_signal_vintage" = posix; then
-AC_DEFINE(HAVE_POSIX_SIGNALS)
-elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
-AC_DEFINE(HAVE_BSD_SIGNALS)
-elif test "$bash_cv_signal_vintage" = svr3; then
-AC_DEFINE(HAVE_USG_SIGHOLD)
-fi
-])
-
-dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
-AC_DEFUN(BASH_SYS_PGRP_SYNC,
-[AC_REQUIRE([AC_FUNC_GETPGRP])
-AC_MSG_CHECKING(whether pgrps need synchronization)
-AC_CACHE_VAL(bash_cv_pgrp_pipe,
-[AC_TRY_RUN([
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-main()
-{
-# ifdef GETPGRP_VOID
-#  define getpgID()	getpgrp()
-# else
-#  define getpgID()	getpgrp(0)
-#  define setpgid(x,y)	setpgrp(x,y)
-# endif
-	int pid1, pid2, fds[2];
-	int status;
-	char ok;
-
-	switch (pid1 = fork()) {
-	  case -1:
-	    exit(1);
-	  case 0:
-	    setpgid(0, getpid());
-	    exit(0);
-	}
-	setpgid(pid1, pid1);
-
-	sleep(2);	/* let first child die */
-
-	if (pipe(fds) < 0)
-	  exit(2);
-
-	switch (pid2 = fork()) {
-	  case -1:
-	    exit(3);
-	  case 0:
-	    setpgid(0, pid1);
-	    ok = getpgID() == pid1;
-	    write(fds[1], &ok, 1);
-	    exit(0);
-	}
-	setpgid(pid2, pid1);
-
-	close(fds[1]);
-	if (read(fds[0], &ok, 1) != 1)
-	  exit(4);
-	wait(&status);
-	wait(&status);
-	exit(ok ? 0 : 5);
-}
-], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
-   [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
-    bash_cv_pgrp_pipe=no])
-])
-AC_MSG_RESULT($bash_cv_pgrp_pipe)
-if test $bash_cv_pgrp_pipe = yes; then
-AC_DEFINE(PGRP_PIPE)
-fi
-])
-
-AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS,
-[AC_REQUIRE([AC_TYPE_SIGNAL])
-AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
-AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
-AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
-[AC_TRY_RUN([
-#include <signal.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-typedef RETSIGTYPE sigfunc();
-
-volatile int nsigint;
-
-#ifdef HAVE_POSIX_SIGNALS
-sigfunc *
-set_signal_handler(sig, handler)
-     int sig;
-     sigfunc *handler;
-{
-  struct sigaction act, oact;
-  act.sa_handler = handler;
-  act.sa_flags = 0;
-  sigemptyset (&act.sa_mask);
-  sigemptyset (&oact.sa_mask);
-  sigaction (sig, &act, &oact);
-  return (oact.sa_handler);
-}
-#else
-#define set_signal_handler(s, h) signal(s, h)
-#endif
-
-RETSIGTYPE
-sigint(s)
-int s;
-{
-  nsigint++;
-}
-
-main()
-{
-	nsigint = 0;
-	set_signal_handler(SIGINT, sigint);
-	kill((int)getpid(), SIGINT);
-	kill((int)getpid(), SIGINT);
-	exit(nsigint != 2);
-}
-], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
-   [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
-    bash_cv_must_reinstall_sighandlers=no]
-)])
-AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
-if test $bash_cv_must_reinstall_sighandlers = yes; then
-AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
-fi
-])
-
-dnl check that some necessary job control definitions are present
-AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
-[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
-AC_MSG_CHECKING(for presence of necessary job control definitions)
-AC_CACHE_VAL(bash_cv_job_control_missing,
-[AC_TRY_COMPILE([
-#include <sys/types.h>
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <signal.h>
-
-/* add more tests in here as appropriate */
-
-/* signal type */
-#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
-#error
-#endif
-
-/* signals and tty control. */
-#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
-#error
-#endif
-
-/* process control */
-#if !defined (WNOHANG) || !defined (WUNTRACED) 
-#error
-#endif
-
-/* Posix systems have tcgetpgrp and waitpid. */
-#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
-#error
-#endif
-
-#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
-#error
-#endif
-
-/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
-#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
-#error
-#endif
-
-], , bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing
-)])
-AC_MSG_RESULT($bash_cv_job_control_missing)
-if test $bash_cv_job_control_missing = missing; then
-AC_DEFINE(JOB_CONTROL_MISSING)
-fi
-])
-
-dnl check whether named pipes are present
-dnl this requires a previous check for mkfifo, but that is awkward to specify
-AC_DEFUN(BASH_SYS_NAMED_PIPES,
-[AC_MSG_CHECKING(for presence of named pipes)
-AC_CACHE_VAL(bash_cv_sys_named_pipes,
-[AC_TRY_RUN([
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/* Add more tests in here as appropriate. */
-main()
-{
-int fd, err;
-
-#if defined (HAVE_MKFIFO)
-exit (0);
-#endif
-
-#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
-exit (1);
-#endif
-
-#if defined (NeXT)
-exit (1);
-#endif
-err = mkdir("bash-aclocal", 0700);
-if (err < 0) {
-  perror ("mkdir");
-  exit(1);
-}
-fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
-if (fd == -1) {
-  rmdir ("bash-aclocal");
-  exit (1);
-}
-close(fd);
-unlink ("bash-aclocal/sh-np-autoconf");
-rmdir ("bash-aclocal");
-exit(0);
-}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
-    [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
-     bash_cv_sys_named_pipes=missing]
-)])
-AC_MSG_RESULT($bash_cv_sys_named_pipes)
-if test $bash_cv_sys_named_pipes = missing; then
-AC_DEFINE(NAMED_PIPES_MISSING)
-fi
-])
-
-AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR,
-[AC_MSG_CHECKING(for default mail directory)
-AC_CACHE_VAL(bash_cv_mail_dir,
-[if test -d /var/mail; then
-   bash_cv_mail_dir=/var/mail
- elif test -d /var/spool/mail; then
-   bash_cv_mail_dir=/var/spool/mail
- elif test -d /usr/mail; then
-   bash_cv_mail_dir=/usr/mail
- elif test -d /usr/spool/mail; then
-   bash_cv_mail_dir=/usr/spool/mail
- else
-   bash_cv_mail_dir=unknown
- fi
-])
-AC_MSG_RESULT($bash_cv_mail_dir)
-AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
-])
-
-AC_DEFUN(BASH_HAVE_TIOCGWINSZ,
-[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
-AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
-  bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
-AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
-if test $bash_cv_tiocgwinsz_in_ioctl = yes; then   
-AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
-fi
-])
-
-AC_DEFUN(BASH_HAVE_TIOCSTAT,
-[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
-AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = TIOCSTAT;],
-  bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
-AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
-if test $bash_cv_tiocstat_in_ioctl = yes; then   
-AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
-fi
-])
-
-AC_DEFUN(BASH_HAVE_FIONREAD,
-[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
-AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#include <sys/ioctl.h>], [int x = FIONREAD;],
-  bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
-AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
-if test $bash_cv_fionread_in_ioctl = yes; then   
-AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
-fi
-])
-
-dnl
-dnl See if speed_t is declared in <sys/types.h>.  Some versions of linux
-dnl require a definition of speed_t each time <termcap.h> is included,
-dnl but you can only get speed_t if you include <termios.h> (on some
-dnl versions) or <sys/types.h> (on others).
-dnl
-AC_DEFUN(BASH_CHECK_SPEED_T,
-[AC_MSG_CHECKING(for speed_t in sys/types.h)
-AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
-[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
-  bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
-AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
-if test $bash_cv_speed_t_in_sys_types = yes; then   
-AC_DEFINE(SPEED_T_IN_SYS_TYPES)
-fi
-])
-
-AC_DEFUN(BASH_CHECK_GETPW_FUNCS,
-[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
-AC_CACHE_VAL(bash_cv_getpw_declared,
-[AC_EGREP_CPP(getpwuid,
-[
-#include <sys/types.h>
-#ifdef HAVE_UNISTD_H
-#  include <unistd.h>
-#endif
-#include <pwd.h>
-],
-bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
-AC_MSG_RESULT($bash_cv_getpw_declared)
-if test $bash_cv_getpw_declared = yes; then
-AC_DEFINE(HAVE_GETPW_DECLS)
-fi
-])
-
-AC_DEFUN(BASH_CHECK_DEV_FD,
-[AC_MSG_CHECKING(whether /dev/fd is available)
-AC_CACHE_VAL(bash_cv_dev_fd,
-[bash_cv_dev_fd=""
-if test -d /dev/fd  && (exec test -r /dev/fd/0 < /dev/null) ; then
-# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
-   if (exec test -r /dev/fd/3 3</dev/null) ; then
-     bash_cv_dev_fd=standard
-   else
-     bash_cv_dev_fd=absent
-   fi
-fi
-if test -z "$bash_cv_dev_fd" ; then 
-  if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
-    bash_cv_dev_fd=whacky
-  else
-    bash_cv_dev_fd=absent
-  fi
-fi
-])
-AC_MSG_RESULT($bash_cv_dev_fd)
-if test $bash_cv_dev_fd = "standard"; then
-  AC_DEFINE(HAVE_DEV_FD)
-  AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
-elif test $bash_cv_dev_fd = "whacky"; then
-  AC_DEFINE(HAVE_DEV_FD)
-  AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
-fi
-])
-
-AC_DEFUN(BASH_CHECK_DEV_STDIN,
-[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
-AC_CACHE_VAL(bash_cv_dev_stdin,
-[if (exec test -r /dev/stdin[...]

[diff truncated at 100000 bytes]


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-23 21:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 21:39 [binutils-gdb] Move readline to the readline/readline subdirectory Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).