Commit 8df809e4 authored by Simon Marlow's avatar Simon Marlow

Move readline configuration into the readline package

parent 7434fb5b
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment