This file controls bootstrapping from .hc files. It has been
slightly broken for a while. So fix it to work with 6.0.x
compilers: the library paths have changed since 5.04.x

--- mk/bootstrap.mk.orig	Fri Jul 25 00:08:25 2003
+++ mk/bootstrap.mk	Thu Aug 21 19:07:39 2003
@@ -17,11 +17,15 @@
 # Reset TOP
 TOP:=$(TOP_SAVED)
 
+include $(TOP)/mk/suffix.mk
+
 # -----------------------------------------------------------------------------
 # Set the platform-specific options to send to the C compiler.  These should
 # match the list in machdepCCOpts in ghc/compiler/DriverFlags.hs.
 #
 
+GhcCanonVersion=600
+
 PLATFORM_CC_OPTS =
 PLATFORM_HC_BOOT_CC_OPTS =
 
@@ -68,8 +72,9 @@
 
 HC_BOOT_CC_OPTS = $(PLATFORM_HC_BOOT_CC_OPTS) $(PLATFORM_CC_OPTS) $(CC_OPTS)
 
-SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/libraries/base/include -I$(FPTOOLS_TOP_ABS)/libraries/unix/include
+SRC_CC_OPTS += -I$(FPTOOLS_TOP_ABS)/ghc/includes -I$(FPTOOLS_TOP_ABS)/libraries/base/include -I$(FPTOOLS_TOP_ABS)/libraries/unix/include -I$(FPTOOLS_TOP_ABS)/libraries/readline/include
 
+
 # -----------------------------------------------------------------------------
 # Linking: we have to give all the libraries explicitly.
 
@@ -89,6 +94,10 @@
    -L$(FPTOOLS_TOP_ABS)/libraries/base		\
    -L$(FPTOOLS_TOP_ABS)/libraries/base/cbits	\
    -L$(FPTOOLS_TOP_ABS)/libraries/haskell98	\
+   -L$(FPTOOLS_TOP_ABS)/libraries/haskell-src	\
+   -L$(FPTOOLS_TOP_ABS)/libraries/readline	\
+   -L$(FPTOOLS_TOP_ABS)/libraries/unix    	\
+   -L$(FPTOOLS_TOP_ABS)/libraries/unix/cbits	\
    -u "$(UNDERSCORE)GHCziBase_Izh_static_info" \
    -u "$(UNDERSCORE)GHCziBase_Czh_static_info" \
    -u "$(UNDERSCORE)GHCziFloat_Fzh_static_info" \
@@ -121,11 +130,7 @@
    -u "$(UNDERSCORE)GHCziWeak_runFinalizzerBatch_closure" \
    -u "$(UNDERSCORE)__stginit_Prelude"
 
-HC_BOOT_LIBS = -lHShaskell98 -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm $(EXTRA_HC_BOOT_LIBS)
-
-ifeq "$(GhcLibsWithReadline)" "YES"
-HC_BOOT_LIBS += $(patsubst %, -l%, $(LibsReadline))
-endif
+HC_BOOT_LIBS = -lHShaskell98 -lHSreadline -lHShaskell-src -lHSunix -lHSunix_cbits -lHSbase -lHSbase_cbits -lHSrts -lgmp -lm -lreadline -lncurses $(EXTRA_HC_BOOT_LIBS)
 
 ifeq "$(HaveLibDL)" "YES"
 HC_BOOT_LIBS += -ldl
