a0b6775
diff -u -rup gdb-6.6-orig/configure gdb-6.6/configure
a0b6775
--- gdb-6.6-orig/configure	2006-11-15 00:26:39.000000000 +0100
a0b6775
+++ gdb-6.6/configure	2007-07-04 21:04:45.000000000 +0200
a0b6775
@@ -895,14 +895,14 @@ build_tools="build-texinfo build-byacc b
a0b6775
 
a0b6775
 # these libraries are used by various programs built for the host environment
a0b6775
 #
a0b6775
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
a0b6775
+host_libs="intl mmalloc libiberty opcodes bfd tcl tk itcl libgui zlib libcpp libdecnumber"
a0b6775
 
a0b6775
 # these tools are built for the host environment
a0b6775
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
a0b6775
 # know that we are building the simulator.
a0b6775
 # binutils, gas and ld appear in that order because it makes sense to run
a0b6775
 # "make check" in that particular order.
a0b6775
-host_tools="texinfo byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
a0b6775
+host_tools="byacc flex bison binutils gas ld fixincludes gcc sid sim gdb make patch prms send-pr gprof etc expect dejagnu ash bash bzip2 m4 autoconf automake libtool diff rcs fileutils shellutils time textutils wdiff find uudecode hello tar gzip indent recode release sed utils guile perl gawk findutils gettext zip fastjar gnattools"
a0b6775
 
a0b6775
 # libgcj represents the runtime libraries only used by gcj.
a0b6775
 libgcj="target-libffi \
a0b6775
@@ -1110,7 +1110,7 @@ case "${host}" in
a0b6775
     noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
a0b6775
     ;;
a0b6775
   powerpc-*-beos*)
a0b6775
-    noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
a0b6775
+    noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu"
a0b6775
     ;;
a0b6775
 esac
a0b6775
 
a0b6775
@@ -1290,7 +1290,7 @@ case "${target}" in
a0b6775
     noconfigdirs="$noconfigdirs target-newlib"
a0b6775
     case "${host}" in
a0b6775
       *-*-cygwin*) ;; # keep gdb and readline
a0b6775
-      *) noconfigdirs="$noconfigdirs gdb readline"
a0b6775
+      *) noconfigdirs="$noconfigdirs gdb"
a0b6775
 	 ;;
a0b6775
     esac
a0b6775
     ;;
a0b6775
@@ -1408,11 +1408,11 @@ case "${target}" in
a0b6775
     ;;
a0b6775
   ia64*-*-elf*)
a0b6775
     # No gdb support yet.
a0b6775
-    noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
a0b6775
+    noconfigdirs="$noconfigdirs mmalloc libgui itcl gdb"
a0b6775
     ;;
a0b6775
   ia64*-**-hpux*)
a0b6775
     # No gdb or ld support yet.
a0b6775
-    noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
a0b6775
+    noconfigdirs="$noconfigdirs ${libgcj} mmalloc libgui itcl gdb ld"
a0b6775
     ;;
a0b6775
   i370-*-opened*)
a0b6775
     ;;
a0b6775
diff -u -rup gdb-6.6-orig/configure.in gdb-6.6/configure.in
a0b6775
--- gdb-6.6-orig/configure.in	2006-12-18 08:22:58.000000000 +0100
a0b6775
+++ gdb-6.6/configure.in	2007-07-04 21:04:43.000000000 +0200
a0b6775
@@ -123,7 +123,7 @@ build_tools="build-texinfo build-byacc b
a0b6775
 
a0b6775
 # these libraries are used by various programs built for the host environment
a0b6775
 #
a0b6775
-host_libs="intl mmalloc libiberty opcodes bfd readline tcl tk itcl libgui zlib libcpp libdecnumber"
a0b6775
+host_libs="intl mmalloc libiberty opcodes bfd tcl tk itcl libgui zlib libcpp libdecnumber"
a0b6775
 
a0b6775
 # these tools are built for the host environment
a0b6775
 # Note, the powerpc-eabi build depends on sim occurring before gdb in order to
a0b6775
@@ -294,7 +294,7 @@ case "${host}" in
a0b6775
     noconfigdirs="$noconfigdirs patch diff make tk tcl expect dejagnu autoconf automake texinfo bison send-pr gprof rcs guile perl itcl gnuserv"
a0b6775
     ;;
a0b6775
   powerpc-*-beos*)
a0b6775
-    noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu readline"
a0b6775
+    noconfigdirs="$noconfigdirs tk itcl libgui gdb dejagnu"
a0b6775
     ;;
a0b6775
 esac
a0b6775
 
a0b6775
@@ -466,7 +466,7 @@ case "${target}" in
a0b6775
     noconfigdirs="$noconfigdirs target-newlib"
a0b6775
     case "${host}" in
a0b6775
       *-*-cygwin*) ;; # keep gdb and readline
a0b6775
-      *) noconfigdirs="$noconfigdirs gdb readline"
a0b6775
+      *) noconfigdirs="$noconfigdirs gdb"
a0b6775
 	 ;;
a0b6775
     esac
a0b6775
     ;;
a0b6775
@@ -584,11 +584,11 @@ case "${target}" in
a0b6775
     ;;
a0b6775
   ia64*-*-elf*)
a0b6775
     # No gdb support yet.
a0b6775
-    noconfigdirs="$noconfigdirs readline mmalloc libgui itcl gdb"
a0b6775
+    noconfigdirs="$noconfigdirs mmalloc libgui itcl gdb"
a0b6775
     ;;
a0b6775
   ia64*-**-hpux*)
a0b6775
     # No gdb or ld support yet.
a0b6775
-    noconfigdirs="$noconfigdirs ${libgcj} readline mmalloc libgui itcl gdb ld"
a0b6775
+    noconfigdirs="$noconfigdirs ${libgcj} mmalloc libgui itcl gdb ld"
a0b6775
     ;;
a0b6775
   i370-*-opened*)
a0b6775
     ;;
a0b6775
diff -u -rup gdb-6.6-orig/gdb/Makefile.in gdb-6.6/gdb/Makefile.in
a0b6775
--- gdb-6.6-orig/gdb/Makefile.in	2007-07-04 20:50:06.000000000 +0200
a0b6775
+++ gdb-6.6/gdb/Makefile.in	2007-07-04 20:58:56.000000000 +0200
a0b6775
@@ -123,10 +123,10 @@ BFD_SRC = $(srcdir)/$(BFD_DIR)
a0b6775
 BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC)
a0b6775
 
a0b6775
 # Where is the READLINE library?  Typically in ../readline.
a0b6775
-READLINE_DIR = ../readline
a0b6775
-READLINE = $(READLINE_DIR)/libreadline.a
a0b6775
-READLINE_SRC = $(srcdir)/$(READLINE_DIR)
a0b6775
-READLINE_CFLAGS = -I$(READLINE_SRC)/..
a0b6775
+# `readline' is required on the host.
a0b6775
+READLINE = -lreadline
a0b6775
+# Workaround a bug linking `bfd/elf-bfd.h' without `-I../bfd/..'.
a0b6775
+READLINE_CFLAGS = -I$(srcdir)/..
a0b6775
 
a0b6775
 # Where is expat?  This will be empty if expat was not available.
a0b6775
 LIBEXPAT = @LIBEXPAT@
a0b6775
@@ -595,9 +594,9 @@ remote_sim_h =	$(INCLUDE_DIR)/gdb/remote
a0b6775
 demangle_h =    $(INCLUDE_DIR)/demangle.h
a0b6775
 obstack_h =     $(INCLUDE_DIR)/obstack.h
a0b6775
 opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
a0b6775
-readline_h = 	$(READLINE_SRC)/readline.h
a0b6775
-readline_tilde_h =	$(READLINE_SRC)/tilde.h
a0b6775
-readline_history_h =	$(READLINE_SRC)/history.h
a0b6775
+readline_h =
a0b6775
+readline_tilde_h =
a0b6775
+readline_history_h =
a0b6775
 frv_desc_h =	$(OPCODES_SRC)/frv-desc.h
a0b6775
 sh_opc_h = 	$(OPCODES_SRC)/sh-opc.h
a0b6775
 gdb_callback_h = $(INCLUDE_DIR)/gdb/callback.h
a0b6775
diff -u -rup gdb-6.6-orig/gdb/configure gdb-6.6/gdb/configure
a0b6775
--- gdb-6.6-orig/gdb/configure	2007-07-04 20:50:06.000000000 +0200
a0b6775
+++ gdb-6.6/gdb/configure	2007-07-04 21:03:52.000000000 +0200
a0b6775
@@ -5697,6 +5697,61 @@ echo "$as_me: error: no termcap library 
a0b6775
    { (exit 1); exit 1; }; }
a0b6775
 fi
a0b6775
 
a0b6775
+# `-lreadline' is provided specifically by `Makefile.in'.
a0b6775
+saved_LIBS="$LIBS"
a0b6775
+LIBS="-lreadline $LIBS"
a0b6775
+cat >conftest.$ac_ext <<_ACEOF
a0b6775
+/* confdefs.h.  */
a0b6775
+_ACEOF
a0b6775
+cat confdefs.h >>conftest.$ac_ext
a0b6775
+cat >>conftest.$ac_ext <<_ACEOF
a0b6775
+/* end confdefs.h.  */
a0b6775
+
a0b6775
+int
a0b6775
+main ()
a0b6775
+{
a0b6775
+ main()
a0b6775
+  ;
a0b6775
+  return 0;
a0b6775
+}
a0b6775
+_ACEOF
a0b6775
+rm -f conftest.$ac_objext conftest$ac_exeext
a0b6775
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
a0b6775
+  (eval $ac_link) 2>conftest.er1
a0b6775
+  ac_status=$?
a0b6775
+  grep -v '^ *+' conftest.er1 >conftest.err
a0b6775
+  rm -f conftest.er1
a0b6775
+  cat conftest.err >&5
a0b6775
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
a0b6775
+  (exit $ac_status); } &&
a0b6775
+	 { ac_try='test -z "$ac_c_werror_flag"
a0b6775
+			 || test ! -s conftest.err'
a0b6775
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
a0b6775
+  (eval $ac_try) 2>&5
a0b6775
+  ac_status=$?
a0b6775
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
a0b6775
+  (exit $ac_status); }; } &&
a0b6775
+	 { ac_try='test -s conftest$ac_exeext'
a0b6775
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
a0b6775
+  (eval $ac_try) 2>&5
a0b6775
+  ac_status=$?
a0b6775
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
a0b6775
+  (exit $ac_status); }; }; then
a0b6775
+  :
a0b6775
+else
a0b6775
+  echo "$as_me: failed program was:" >&5
a0b6775
+sed 's/^/| /' conftest.$ac_ext >&5
a0b6775
+
a0b6775
+
a0b6775
+  { { echo "$as_me:$LINENO: error: no readline library found" >&5
a0b6775
+echo "$as_me: error: no readline library found" >&2;}
a0b6775
+   { (exit 1); exit 1; }; }
a0b6775
+
a0b6775
+fi
a0b6775
+rm -f conftest.err conftest.$ac_objext \
a0b6775
+      conftest$ac_exeext conftest.$ac_ext
a0b6775
+LIBS="$saved_LIBS"
a0b6775
+
a0b6775
 
a0b6775
       if test "X$prefix" = "XNONE"; then
a0b6775
     acl_final_prefix="$ac_default_prefix"
a0b6775
diff -u -rup gdb-6.6-orig/gdb/configure.ac gdb-6.6/gdb/configure.ac
a0b6775
--- gdb-6.6-orig/gdb/configure.ac	2007-07-04 20:50:06.000000000 +0200
a0b6775
+++ gdb-6.6/gdb/configure.ac	2007-07-04 21:02:41.000000000 +0200
a0b6775
@@ -321,6 +321,14 @@ if test "$ac_cv_search_tgetent" = no; th
a0b6775
   AC_MSG_ERROR([no termcap library found])
a0b6775
 fi
a0b6775
 
a0b6775
+# `-lreadline' is provided specifically by `Makefile.in'.
a0b6775
+saved_LIBS="$LIBS"
a0b6775
+LIBS="-lreadline $LIBS"
a0b6775
+AC_TRY_LINK(,[ main() ],,[
a0b6775
+  AC_MSG_ERROR([no readline library found])
a0b6775
+])
a0b6775
+LIBS="$saved_LIBS"
a0b6775
+
a0b6775
 AC_LIB_HAVE_LINKFLAGS([expat], [], [#include "expat.h"],
a0b6775
 		      [XML_Parser p = XML_ParserCreate (0);])
a0b6775
 if test "$HAVE_LIBEXPAT" != yes; then
a0b6775
diff -u -ru gdb-6.6-orig/gdb/doc/Makefile.in gdb-6.6/gdb/doc/Makefile.in
a0b6775
--- gdb-6.6-orig/gdb/doc/Makefile.in	2006-05-05 20:26:11.000000000 +0200
a0b6775
+++ gdb-6.6/gdb/doc/Makefile.in	2007-07-05 11:58:30.000000000 +0200
a0b6775
@@ -58,13 +58,14 @@
a0b6775
 
a0b6775
 # Where is the source dir for the READLINE library doc?  
a0b6775
 # Traditionally readline is in .. or .
a0b6775
-READLINE_DIR = ${gdbdir}/../readline/doc
a0b6775
+# `readline' is required on the host.
a0b6775
+#READLINE_DIR = ${gdbdir}/../readline/doc
a0b6775
 
a0b6775
 # The GDB/MI docs come from a sibling directory ../mi
a0b6775
 GDBMI_DIR = ${gdbdir}/mi
a0b6775
 
a0b6775
 SET_TEXINPUTS = \
a0b6775
-   TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(READLINE_DIR):$(GDBMI_DIR):$$TEXINPUTS
a0b6775
+   TEXINPUTS=${TEXIDIR}:.:$(srcdir):$(GDBMI_DIR):$$TEXINPUTS
a0b6775
 
a0b6775
 # Files which should be generated via 'info' and installed by 'install-info'
a0b6775
 INFO_DEPS = gdb.info gdbint.info stabs.info annotate.info
a0b6775
@@ -100,9 +101,7 @@
a0b6775
 GDB_DOC_SOURCE_INCLUDES = \
a0b6775
 	$(srcdir)/fdl.texi \
a0b6775
 	$(srcdir)/gpl.texi \
a0b6775
-	$(srcdir)/agentexpr.texi \
a0b6775
-	$(READLINE_DIR)/rluser.texi \
a0b6775
-	$(READLINE_DIR)/inc-hist.texinfo
a0b6775
+	$(srcdir)/agentexpr.texi
a0b6775
 GDB_DOC_BUILD_INCLUDES = \
a0b6775
 	gdb-cfg.texi \
a0b6775
 	GDBvn.texi
a0b6775
@@ -299,7 +298,7 @@
a0b6775
 
a0b6775
 # GDB MANUAL: info file
a0b6775
 gdb.info: ${GDB_DOC_FILES}
a0b6775
-	$(MAKEINFO) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) \
a0b6775
+	$(MAKEINFO) -I ${GDBMI_DIR} -I $(srcdir) \
a0b6775
 		-o gdb.info $(srcdir)/gdb.texinfo
a0b6775
 
a0b6775
 # GDB MANUAL: roff translations
a0b6775
@@ -375,7 +374,7 @@
a0b6775
 # GDB MANUAL: HTML file
a0b6775
 
a0b6775
 gdb_toc.html: ${GDB_DOC_FILES}
a0b6775
-	$(MAKEHTML) $(MAKEHTMLFLAGS) -I ${READLINE_DIR} -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
a0b6775
+	$(MAKEHTML) $(MAKEHTMLFLAGS) -I ${GDBMI_DIR} -I $(srcdir) $(srcdir)/gdb.texinfo
a0b6775
 
a0b6775
 # Clean these up before each run.  Avoids a catch 22 with not being
a0b6775
 # able to re-generate these files (to fix a corruption) because these
a0b6775
diff -u -ru gdb-6.6-orig/gdb/doc/gdb.texinfo gdb-6.6/gdb/doc/gdb.texinfo
a0b6775
--- gdb-6.6-orig/gdb/doc/gdb.texinfo	2007-07-04 20:50:06.000000000 +0200
a0b6775
+++ gdb-6.6/gdb/doc/gdb.texinfo	2007-07-05 13:07:55.000000000 +0200
a0b6775
@@ -153,8 +153,8 @@
a0b6775
 * GDB Bugs::                    Reporting bugs in @value{GDBN}
a0b6775
 * Formatting Documentation::    How to format and print @value{GDBN} documentation
a0b6775
 
a0b6775
-* Command Line Editing::        Command Line Editing
a0b6775
-* Using History Interactively:: Using History Interactively
a0b6775
+* Command Line Editing: (rluserman).       Command Line Editing
a0b6775
+* Using History Interactively: (history).  Using History Interactively
a0b6775
 * Installing GDB::              Installing GDB
a0b6775
 * Maintenance Commands::        Maintenance Commands
a0b6775
 * Remote Protocol::             GDB Remote Serial Protocol
a0b6775
@@ -15728,7 +15728,7 @@
a0b6775
 Show whether command line editing is enabled.
a0b6775
 @end table
a0b6775
 
a0b6775
-@xref{Command Line Editing}, for more details about the Readline
a0b6775
+@xref{Command Line Editing, , , rluserman, GNU Readline Library}, for more details about the Readline
a0b6775
 interface.  Users unfamiliar with @sc{gnu} Emacs or @code{vi} are
a0b6775
 encouraged to read that chapter.
a0b6775
 
a0b6775
@@ -15743,7 +15743,8 @@
a0b6775
 
a0b6775
 @value{GDBN} uses the @sc{gnu} History library, a part of the Readline
a0b6775
 package, to provide the history facility.  @xref{Using History
a0b6775
-Interactively}, for the detailed description of the History library.
a0b6775
+Interactively, , , history, GNU History Library}, for the detailed description
a0b6775
+of the History library.
a0b6775
 
a0b6775
 To issue a command to @value{GDBN} without affecting certain aspects of
a0b6775
 the state which is seen by users, prefix it with @samp{server }.  This
a0b6775
@@ -15794,7 +15795,7 @@
a0b6775
 @end table
a0b6775
 
a0b6775
 History expansion assigns special meaning to the character @kbd{!}.
a0b6775
-@xref{Event Designators}, for more details.
a0b6775
+@xref{Event Designators, , , history, GNU History Library}, for more details.
a0b6775
 
a0b6775
 @cindex history expansion, turn on/off
a0b6775
 Since @kbd{!} is also the logical not operator in C, history expansion
a0b6775
@@ -16867,7 +16868,7 @@
a0b6775
 @cindex TUI key bindings
a0b6775
 
a0b6775
 The TUI installs several key bindings in the readline keymaps
a0b6775
-(@pxref{Command Line Editing}).
a0b6775
+(@pxref{Command Line Editing, , , rluserman, GNU Readline Library}).
a0b6775
 They allow to leave or enter in the TUI mode or they operate
a0b6775
 directly on the TUI layout and windows.  The TUI also provides
a0b6775
 a @emph{SingleKey} keymap which binds several keys directly to
a0b6775
@@ -21934,15 +21935,6 @@
a0b6775
 things without first using the debugger to find the facts.
a0b6775
 @end itemize
a0b6775
 
a0b6775
-@c The readline documentation is distributed with the readline code
a0b6775
-@c and consists of the two following files:
a0b6775
-@c     rluser.texinfo
a0b6775
-@c     inc-hist.texinfo
a0b6775
-@c Use -I with makeinfo to point to the appropriate directory,
a0b6775
-@c environment var TEXINPUTS with TeX.
a0b6775
-@include rluser.texi
a0b6775
-@include inc-hist.texinfo
a0b6775
-
a0b6775
 
a0b6775
 @node Formatting Documentation
a0b6775
 @appendix Formatting Documentation
a0b6775
@@ -22111,9 +22103,6 @@
a0b6775
 @item gdb-@value{GDBVN}/opcodes
a0b6775
 source for the library of opcode tables and disassemblers
a0b6775
 
a0b6775
-@item gdb-@value{GDBVN}/readline
a0b6775
-source for the @sc{gnu} command-line interface
a0b6775
-
a0b6775
 @item gdb-@value{GDBVN}/glob
a0b6775
 source for the @sc{gnu} filename pattern-matching subroutine
a0b6775
 
a0b6775
@@ -22145,7 +22134,7 @@
a0b6775
 correct value by examining your system.)
a0b6775
 
a0b6775
 Running @samp{configure @var{host}} and then running @code{make} builds the
a0b6775
-@file{bfd}, @file{readline}, @file{mmalloc}, and @file{libiberty}
a0b6775
+@file{bfd}, @file{mmalloc}, and @file{libiberty}
a0b6775
 libraries, then @code{gdb} itself.  The configured source files, and the
a0b6775
 binaries, are left in the corresponding source directories.
a0b6775
 
a0b6775
@@ -22170,7 +22159,7 @@
a0b6775
 that subdirectory.  That is usually not what you want.  In particular,
a0b6775
 if you run the first @code{configure} from the @file{gdb} subdirectory
a0b6775
 of the @file{gdb-@var{version-number}} directory, you will omit the
a0b6775
-configuration of @file{bfd}, @file{readline}, and other sibling
a0b6775
+configuration of @file{bfd}, and other sibling
a0b6775
 directories of the @file{gdb} subdirectory.  This leads to build errors
a0b6775
 about missing include files such as @file{bfd/bfd.h}.
a0b6775