Move readline configuration into the readline package
authorSimon Marlow <simonmar@microsoft.com>
Fri, 9 Jun 2006 13:58:40 +0000 (13:58 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Fri, 9 Jun 2006 13:58:40 +0000 (13:58 +0000)
compiler/Makefile
configure.ac
libraries/Makefile
libraries/configure.ac
mk/config.mk.in

index 94a9c85..dcc2cdd 100644 (file)
@@ -438,7 +438,8 @@ SRC_HC_OPTS += -package readline -DUSE_READLINE
 PKG_DEPENDS += readline
 endif
 else
-ifeq "$(GhcLibsWithReadline)" "YES"
+-include $(FPTOOLS_TOP)/libraries/readline/config.mk
+ifeq "$(READLINE_BUILD_PACKAGE)" "yes"
 SRC_HC_OPTS += -package readline -DUSE_READLINE
 PKG_DEPENDS += readline
 endif
index 29ed29f..9dafbfb 100644 (file)
@@ -13,7 +13,7 @@ dnl
 # see what flags are available. (Better yet, read the documentation!)
 #
 
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5], [glasgow-haskell-bugs@haskell.org], [ghc])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5.20060608], [glasgow-haskell-bugs@haskell.org], [ghc])
 
 FP_SETUP_PROJECT_VERSION
 
@@ -1119,40 +1119,6 @@ dnl    the order of these tests matters: bfd needs liberty
 AC_CHECK_LIB(iberty, xmalloc)
 AC_CHECK_LIB(bfd,    bfd_init)
 
-dnl ** check for readline, for Hugs and hslibs' Readline
-dnl ncurses supersedes termcap and curses, but for compatibility,
-dnl we have to check for all...
-AC_CHECK_LIB(ncurses, tputs, HaveLibTermcap=YES; LibTermcap=ncurses,
-  AC_CHECK_LIB(termcap, tputs, HaveLibTermcap=YES; LibTermcap=termcap,
-    AC_CHECK_LIB(curses, tputs, HaveLibTermcap=YES; LibTermcap=curses,
-      HaveLibTermcap=NO; LibTermcap=not-installed)))
-
-if test $HaveLibTermcap = YES ; then
-  LIBS="-l$LibTermcap $LIBS"
-  AC_CHECK_LIB(readline, readline, HaveLibReadline=YES, HaveLibReadline=NO)
-fi
-
-if test $HaveLibTermcap = YES && test x"$HaveLibReadline" = xYES ; then
-  AC_DEFINE([HAVE_READLINE_LIBS], [1], [Define to 1 if readline plus any additional libs needed for it exist.])
-  LibsReadline="readline $LibTermcap"
-else
-  AC_DEFINE([HAVE_READLINE_LIBS], [0], [Define to 1 if readline plus any additional libs needed for it exist.])
-  LibsReadline=
-fi
-AC_SUBST(LibsReadline)
-
-if test "$HaveLibReadline"; then
-  AC_CHECK_LIB(readline, rl_erase_empty_line,
-    [AC_DEFINE([HAVE_READLINE_4], [1], [Define to 1 if readline has version >= 4.0.])],
-    [AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has version >= 4.0.])])
-  AC_CHECK_LIB(readline, rl_free_undo_list,
-    [AC_DEFINE([HAVE_READLINE_4_2], [1], [Define to 1 if readline has version >= 4.2.])],
-    [AC_DEFINE([HAVE_READLINE_4_2], [0], [Define to 1 if readline has version >= 4.2.])])
-else
-  AC_DEFINE([HAVE_READLINE_4], [0], [Define to 1 if readline has version >= 4.0.])
-  AC_DEFINE([HAVE_READLINE_4_2], [0], [Define to 1 if readline has version >= 4.2.])
-fi
-
 dnl ** check for math library
 AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
 if test x"$fp_libm_not_needed" = xdunno; then
index cc4ee0f..618916e 100644 (file)
@@ -9,7 +9,7 @@ include $(TOP)/mk/boilerplate.mk
 # want the Makefile.
 MFLAGS += -f Makefile
 
-SUBDIRS = base haskell98 template-haskell
+SUBDIRS = base haskell98 template-haskell readline
 
 ifeq "$(GhcLibsWithUnix)" "YES"
 SUBDIRS += unix
@@ -43,10 +43,6 @@ SUBDIRS += $(wildcard ObjectIO)
 endif
 endif
 
-ifeq "$(GhcLibsWithReadline)" "YES"
-SUBDIRS += $(wildcard readline)
-endif
-
 # -----------------------------------------------------------------------------
 
 DIST_CLEAN_FILES += config.cache config.status
index fe6cc33..0551d86 100644 (file)
@@ -2,6 +2,6 @@
 AC_INIT([Haskell hierarchical libraries], [1.0], [libraries@haskell.org], [libraries])
 AC_CONFIG_SRCDIR([libraries-footer.txt])
 
-AC_CONFIG_SUBDIRS([base network unix X11 HGL OpenGL GLUT OpenAL ALUT time])
+AC_CONFIG_SUBDIRS([base network unix X11 HGL OpenGL GLUT OpenAL ALUT time readline])
 
 AC_OUTPUT
index 022e026..2e0f71c 100644 (file)
@@ -377,18 +377,6 @@ ifeq "$(TargetArch_CPP)" "ia64"
 SplitObjs=NO
 endif
 
-# Build the Haskell Readline bindings?
-#
-GhcLibsWithReadline=@GhcLibsWithReadline@
-
-# Libraries needed for linking with readline
-LibsReadline=@LibsReadline@
-
-# Include path to readline.h
-# (no path == in standard include path)
-#
-ReadlineIncludePath=
-
 # Math library
 LIBM=@LIBM@