# Target platforms supported:
# i386, powerpc
# sparc has bitrotted
-ifneq "$(findstring $(HostArch_CPP), i386 powerpc)" ""
+ifneq "$(findstring $(HostArch_CPP), i386 x86_64 powerpc)" ""
GhcWithNativeCodeGen=YES
else
GhcWithNativeCodeGen=NO
HaveRtldNext = @HaveRtldNext@
HaveRtldLocal = @HaveRtldLocal@
-# Include GHCi in the compiler. Default to NO for the time being.
+# Whether to include GHCi in the compiler. Depends on whether the RTS linker
+# has support for this OS/ARCH combination.
-ifneq "$(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)" ""
+OsSupportsGHCi=$(strip $(patsubst $(HostOS_CPP), YES, $(findstring $(HostOS_CPP), mingw32 cygwin32 linux solaris2 freebsd netbsd openbsd darwin)))
+ArchSupportsGHCi=$(strip $(patsubst $(HostArch_CPP), YES, $(findstring $(HostArch_CPP), i386 powerpc powerpc64 sparc sparc64)))
+
+ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES"
GhcWithInterpreter=YES
else
GhcWithInterpreter=NO
#
# -O is pretty desirable, otherwise no inlining of prelude
# things (incl "+") happens when compiling with this compiler
+#
+# -fgenerics switches on generation of support code for
+# derivable type classes. This is now off by default,
+# but we switch it on for the libraries so that we generate
+# the code in case someone importing wants it
-GhcLibHcOpts=-O -Rghc-timing
+GhcLibHcOpts=-O -Rghc-timing -fgenerics
# Win32 only: Enable the RTS and libraries to be built as DLLs
DLLized=@EnableWin32DLLs@
LibGmp = @LibGmp@
#-----------------------------------------------------------------------------
-# Mingwex Library
+# GMP framework (Mac OS X)
#
-HaveLibMingwEx = @HaveLibMingwEx@
+HaveFrameworkGMP = @HaveFrameworkGMP@
#-----------------------------------------------------------------------------
-# HaskellSupport framework (Mac OS X)
-#
-HaveFrameworkHaskellSupport = @HaveFrameworkHaskellSupport@
-
-#-----------------------------------------------------------------------------
-# Regex library
-# (if present in libc use that one, otherwise use the one in the tree)
+# Mingwex Library
#
-HavePosixRegex = @HavePosixRegex@
+HaveLibMingwEx = @HaveLibMingwEx@
#-----------------------------------------------------------------------------
# Flex (currently unused, could be moved to glafp-utils)
#
RAWCPP_FLAGS = -undef -traditional
FIND = @FindCmd@
+SORT = @SortCmd@
INSTALL = @INSTALL@
#
# Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback