make the GhcThreaded setting lazy, because GhcUnregisterised might not be set yet
[ghc-hetmet.git] / mk / config.mk.in
index 871bb81..c716ab0 100644 (file)
@@ -357,11 +357,7 @@ endif
 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
+GhcThreaded = $(if $(findstring thr,$(GhcRTSWays)),YES,NO)
 
 # Option flags to pass to GHC when it's compiling modules in
 # fptools/libraries.  Typically these are things like -O or
@@ -524,7 +520,9 @@ prefix          := @prefix@
 # New autoconf (>= 2.60?) make a configure with a --datarootdir=DIR flag.
 # However, in order to support older autoconf's we don't use it.
 # datarootdir is set lower down instead.
-# datarootdir          = @datarootdir@
+# But, as datadir is defined in terms of datarootdir, we also need to
+# set it to the value (if any) that configure gives it here.
+datarootdir     := @datarootdir@
 
 exec_prefix     := @exec_prefix@
 bindir          := @bindir@