
New patches:

[PROOF OF CONCEPT: add --with-libedit flag to allow building a minimal version of the library against libedit.
judah.jacobson@gmail.com**20080108163020] {
hunk ./HsReadline_cbits.c 3
+#if HAVE_READLINE
hunk ./HsReadline_cbits.c 8
+#endif
hunk ./System/Console/Readline.hsc 39
+#if HAVE_READLINE
hunk ./System/Console/Readline.hsc 50
+
hunk ./System/Console/Readline.hsc 282
+
+#else // HAVE_READLINE
+    -- Libedit supports more functionality than this;
+    -- But the below is just enough to build ghci.
+    initialize,
+    readline,
+    addHistory,
+    setAttemptedCompletionFunction,
+    setBasicWordBreakCharacters,
+    getCompleterWordBreakCharacters,
+    setCompleterWordBreakCharacters,
+    resetTerminal,
+    getLineBuffer,
+    filenameCompletionFunction
+#endif
hunk ./System/Console/Readline.hsc 371
+
+#if HAVE_READLINE
hunk ./System/Console/Readline.hsc 496
+#endif
+
hunk ./System/Console/Readline.hsc 517
+#if HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 858
+#endif -- HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 872
+#if HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 986
+#endif
+
hunk ./System/Console/Readline.hsc 1004
+#if HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 1039
+#endif
+
hunk ./System/Console/Readline.hsc 1051
+#if HAVE_READLINE
hunk ./System/Console/Readline.hsc 1071
+#endif
+
hunk ./System/Console/Readline.hsc 1085
-                    matchPtrs <- mapM newCString (text':matches)
+                    let matches' = if null matches then [text'] else matches
+                    matchPtrs <- mapM newCString (text':matches')
hunk ./System/Console/Readline.hsc 1095
+#if HAVE_READLINE
hunk ./System/Console/Readline.hsc 1196
+#endif
+
hunk ./System/Console/Readline.hsc 1217
+#if HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 1235
+#endif
+
hunk ./System/Console/Readline.hsc 1249
+#if HAVE_READLINE
+
hunk ./System/Console/Readline.hsc 1391
+#endif
+
hunk ./System/Console/Readline.hsc 1411
+
hunk ./aclocal.m4 22
+
+AC_ARG_WITH([libedit],
+  [AC_HELP_STRING([--with-libedit],
+    [Let this package build against the libedit library.])],
+    [allow_libedit=yes],
+    [allow_libedit=no])
hunk ./configure.ac 38
-if test "x$readline_libraries" = "xNONE" && test "x$readline_includes" = "xNONE" ; then
+if test "x$readline_libraries" = "xNONE" && test "x$readline_includes" = "xNONE" && test "x$allow_libedit" = "xno" ; then
hunk ./configure.ac 76
-if (test "x$HaveLibReadline" = xYES || test "x$HaveFrameworkReadline" = xYES) && test "x$ReadlineIsLibedit" = xNO  ; then
+if (test "x$HaveLibReadline" = xYES || test "x$HaveFrameworkReadline" = xYES) && (test "x$ReadlineIsLibedit" = xNO) ; then
hunk ./configure.ac 78
+  AC_DEFINE([HAVE_READLINE], [1],[Define to 1 if compiling against GNU readline])
hunk ./configure.ac 80
-  AC_MSG_FAILURE([readline not found, so this package cannot be built])
hunk ./configure.ac 81
+  AC_DEFINE([HAVE_READLINE], [0],[Define to 1 if compiling against GNU readline])
+  if test "x$with_libedit" = xno ; then
+    AC_MSG_FAILURE([readline not found, so this package cannot be built])
+  fi
hunk ./configure.ac 87
+
hunk ./configure.ac 104
-if test "x$HAVE_READLINE" = xYES; then
+echo withlibedit: "x$with_libedit"
+if test "x$HAVE_READLINE" = xYES || test "x$with_libedit" = xyes ; then
}

Context:

[markup for URL
Ross Paterson <ross@soi.city.ac.uk>**20071107005425] 
[remove obsolete config.mk.in
Ross Paterson <ross@soi.city.ac.uk>**20071107005850
 
 This was used when building in the GHC tree using the old fptools build
 system, to pass parameters from configure to the Makefile.  With the new
 Cabal-based build system, they go via readline.buildinfo.
] 
[FIX: fix name of include file in sdist
Ross Paterson <ross@soi.city.ac.uk>**20071103163724] 
[Fix test for whether readline is really editline to work for MacOS 10.5
Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20071031105453] 
[Use configurations to allow building with older ghc & base lib
Duncan Coutts <duncan@haskell.org>**20071018111417
 Also specify build-type and cabal-version
] 
[bump the version number
Ian Lynagh <igloo@earth.li>**20071014105053] 
[Add interface for rl_completion_word_break_hook (version 5.0 or higher).
judah.jacobson@gmail.com**20070211231618] 
[Add get/set functions for the rl_attempted_completion_over variable.
judah.jacobson@gmail.com**20070211230806] 
[Add HsReadlineConfig.h to install-includes
Ian Lynagh <igloo@earth.li>**20070925214115
 Patch from Audrey Tang
] 
[clean config.mk
Simon Marlow <simonmar@microsoft.com>**20070914140737] 
[Add more entries to boring file
Ian Lynagh <igloo@earth.li>**20070913210720] 
[Add a boring file
Ian Lynagh <igloo@earth.li>**20070913204656] 
[TAG ghc-6.8 branched 2007-09-03
Ian Lynagh <igloo@earth.li>**20070903155838] 
[Link against GNUreadline.framework, if it's available.
judah.jacobson@gmail.com**20070906052628
 This can be overridden by setting --with-readline-includes or 
 --with-readline-libraries.
] 
[Remove redundant include/Makefile
Ian Lynagh <igloo@earth.li>**20070828205711] 
[Call the license LICENSE rather than COPYING for consistency
Ian Lynagh <igloo@earth.li>**20070828130747] 
[added a bit of documentation to the readline library
ijones@syntaxpolice.org**20070819083106] 
[--configure-option and --ghc-option are now provided by Cabal
Ross Paterson <ross@soi.city.ac.uk>**20070604115727] 
[Remove Makefile and package.conf.in (used in the old build system)
Ian Lynagh <igloo@earth.li>**20070524142629] 
[Remove unnecessary "import Prelude hiding (catch)"
Ian Lynagh <igloo@earth.li>**20070523222119] 
[We now depend on process
Ian Lynagh <igloo@earth.li>**20070523181523] 
[add install-includes: field
Simon Marlow <simonmar@microsoft.com>**20070517095014] 
[Make the Cabal build system honour configure flags
Roman Leshchinskiy <rl@cse.unsw.edu.au>**20070504042130
 
 The Cabal build system was ignoring --with-readline-includes and
 --with-readline-libraries.
] 
[Make configure fail if the package is not buildable
Ian Lynagh <igloo@earth.li>**20070430190918] 
[Follow Cabal changes in Setup.hs
Ian Lynagh <igloo@earth.li>**20070418114443] 
[readline no longer needs to hide build failure
Ian Lynagh <igloo@earth.li>**20070415215805
 The GHC build system now copes with it itself.
] 
[Fix configure with no --with-cc
Ian Lynagh <igloo@earth.li>**20070415194819] 
[Fix -Wall warnings
Ian Lynagh <igloo@earth.li>**20070411005013] 
[Add missing case in removePrefix
Ian Lynagh <igloo@earth.li>**20070411002555] 
[Pass configure opts down to ./configure, and add a nasty hack not to fail
Ian Lynagh <igloo@earth.li>**20070406182410
 If readline doesn't build then we still want to build the rest of GHC.
 For now readline simply ignores any failure when asked to build, but we
 really need to do something better here!
] 
[parse (but don't pass on) options for ./configure
Ian Lynagh <igloo@earth.li>**20070406153705] 
[Make syntax in .cabal file haddock-friendly
Ian Lynagh <igloo@earth.li>**20070308163504] 
[make Setup suitable for building the libraries with GHC
Ian Lynagh <igloo@earth.li>**20061112214707] 
[Match the types in the C source, not the documentation
Ian Lynagh <igloo@earth.li>**20070404122733] 
[Fix C/Haskell type mismatch
Ian Lynagh <igloo@earth.li>**20070404003613] 
[Give ld -Llibdir, not -Ilibdir
Ian Lynagh <igloo@earth.li>**20070305143239] 
[copy/paste-o
Ian Lynagh <igloo@earth.li>**20070305141749] 
[README about building from darcs
Ross Paterson <ross@soi.city.ac.uk>**20070218110201] 
[TAG 6.6 release
Ian Lynagh <igloo@earth.li>**20061011124740] 
[add boilerplate Setup.hs
Ross Paterson <ross@soi.city.ac.uk>**20060928231526] 
[Typo (this is the readline, not unix, package)
Ian Lynagh <igloo@earth.li>**20060823144042] 
[remove unnecessary #include "ghcconfig.h"
Ross Paterson <ross@soi.city.ac.uk>**20060809132127] 
[Make the configure test robust against libedit
Simon Marlow <simonmar@microsoft.com>**20060706120654
 See #766
 Thanks to Greg Wright for the fix.
] 
[make a start on Cabalizing readline
Ross Paterson <ross@soi.city.ac.uk>**20060609161024] 
[Move readline configuration into the readline package
Simon Marlow <simonmar@microsoft.com>**20060609135511
 
 Configuration of the readline package is now done with a
 package-private configure script, which takes it a step closer to
 being a standalone Cabal package.
 
 At the same time I added --with-readline-includes and
 --with-readline-libraries options to cater for systems where these
 libraries live in non-std places.
 
] 
[TAG Initial conversion from CVS complete
John Goerzen <jgoerzen@complete.org>**20060112154138] 
Patch bundle hash:
4cb6d9d1259a3a6421f9a6b5e5c909320db0cace
