-ifeq "$(MinimalUnixDeps)" "YES"
-SRC_HC_OPTS += -DMINIMAL_UNIX_DEPS
-ghc_501_at_least = $(shell if (test $(CANON_HC_VERSION) -gt 5000); then echo YES; else echo NO; fi)
-
-ifneq "$(ghc_501_at_least)" "YES"
-boot ::
- $(CP) ../lib/std/cbits/system.c main
-C_SRCS += main/system.c
+ifeq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+ghc_501_at_least = $(shell if (test $(CANON_HC_VERSION) -ge 5010); then echo YES; else echo NO; fi)
+
+# -----------------------------------------------
+# GHCi calls the C procedure 'rawSystem'; but alas GHC 4.08
+# does not have this. Everything is fine if you are compiling
+# GHC with GHC 5.02 or better, but lacking that we have the following
+# hack:
+# copy rawSystem.c from hslibs/lang/cbits
+# into main/ (where it'll be compiled and linked with the compiler)
+# (the Haskell-side code is ifdefed into main/SysTools.lhs)
+
+ifneq "$(ghc_502_at_least)" "YES"
+C_SRCS += main/rawSystem.c