From 8df809e4ce2319cccd91b14a74e13c879faaf357 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Fri, 9 Jun 2006 13:58:40 +0000 Subject: [PATCH] Move readline configuration into the readline package --- compiler/Makefile | 3 ++- configure.ac | 36 +----------------------------------- libraries/Makefile | 6 +----- libraries/configure.ac | 2 +- mk/config.mk.in | 12 ------------ 5 files changed, 5 insertions(+), 54 deletions(-) diff --git a/compiler/Makefile b/compiler/Makefile index 94a9c85..dcc2cdd 100644 --- a/compiler/Makefile +++ b/compiler/Makefile @@ -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 diff --git a/configure.ac b/configure.ac index 29ed29f..9dafbfb 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/libraries/Makefile b/libraries/Makefile index cc4ee0f..618916e 100644 --- a/libraries/Makefile +++ b/libraries/Makefile @@ -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 diff --git a/libraries/configure.ac b/libraries/configure.ac index fe6cc33..0551d86 100644 --- a/libraries/configure.ac +++ b/libraries/configure.ac @@ -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 diff --git a/mk/config.mk.in b/mk/config.mk.in index 022e026..2e0f71c 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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@ -- 1.7.10.4