GhcThreaded was bogusly off by default due to things being in the wrong order
[ghc-hetmet.git] / mk / config.mk.in
index 5b89981..a670cd5 100644 (file)
@@ -218,11 +218,6 @@ GhcStage1HcOpts=
 GhcStage2HcOpts=
 GhcStage3HcOpts=
 
-ifneq "$(findstring thr, $(GhcRTSWays))" ""
-GhcThreaded=YES
-else
-GhcThreaded=NO
-endif
 GhcProfiled=NO
 GhcDebugged=NO
 
@@ -361,6 +356,13 @@ endif
 # be set in build.mk, which hasn't been read yet.
 GhcRTSWays += $(if $(findstring NO, $(GhcUnregisterised)),thr thr_p thr_debug,)
 
+# We can only build GHCi threaded if we have a threaded RTS:
+ifneq "$(findstring thr, $(GhcRTSWays))" ""
+GhcThreaded=YES
+else
+GhcThreaded=NO
+endif
+
 # Option flags to pass to GHC when it's compiling modules in
 # fptools/libraries.  Typically these are things like -O or
 # -dcore-lint or -H32m.  The ones that are *essential* are wired into
@@ -504,6 +506,9 @@ FPTOOLS_TOP_ABS             = @hardtop@
 # The platform specific version of 'hardtop'.
 FPTOOLS_TOP_ABS_PLATFORM = @hardtop_plat@
 
+# This gets used in the default docdir
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+
 BIN_DIST_NAME=ghc-$(ProjectVersion)
 BIN_DIST_TOPDIR=$(FPTOOLS_TOP_ABS)
 BIN_DIST_DIR=$(BIN_DIST_TOPDIR)/$(BIN_DIST_NAME)
@@ -548,6 +553,21 @@ endif # Windows
 
 headerdir = $(libdir)/include
 
+# New autoconf (>= 2.60?) make a configure with --docdir=DIR etc flags.
+# However, in order to support older autoconf's we don't use them.
+
+#docdir    = @docdir@
+#htmldir   = @htmldir@
+#dvidir    = @dvidir@
+#pdfdir    = @pdfdir@
+#psdir     = @psdir@
+
+docdir    = $(datarootdir)/doc/ghc
+htmldir   = $(docdir)
+dvidir    = $(docdir)
+pdfdir    = $(docdir)
+psdir     = $(docdir)
+
 # Default place for putting interface files is $(libdir)
 # (overriden for packages in package.mk)
 ifacedir               = $(libdir)