# the gcc command-line used here with -mno-cygwin -mwin32
# to arrange for good things to happen.
CFLAGS="-mno-cygwin -mwin32 $CFLAGS"
- CPPFLAGS="-mno-cygwin -mwin32 $CPPFLAGS"
;;
m68k-next-nextstep2)
HostPlatform_CPP='m68k_next_nextstep2'
AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
fi
+dnl ** Building a Win32-friendlier compiler?
+dnl --------------------------------------------------------------
+AC_ARG_ENABLE(minimal-unix-deps,
+[ --enable-minimal-unix-deps
+ Build a compiler that minimizes dependencies on Unix-like tools
+ under Win32, allowing the user to operate the compiler without
+ having to install Cygwin toolchain (say). (You still need
+ that toolchain to build GHC from sources though).
+],
+[MinimalUnixDeps=YES],
+[MinimalUnixDeps=NO]
+)
+AC_SUBST(MinimalUnixDeps)
+
dnl ** Enable the building of the OpenGL/GLUT binding in hslibs?
dnl --------------------------------------------------------------
AC_ARG_ENABLE(hopengl,
dnl ** look for `perl', but only in /bin on Windows
case $HostOS_CPP in
cygwin32|mingw32)
- AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
- if test -z "$PerlCmd"; then
- echo "You must install the version of Perl shipped with GHC"
- echo "(or a compatible one) in /bin."
- exit 1
+ if test x"$MinimalUnixDeps" = "xNO"; then
+ AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
+ if test -z "$PerlCmd"; then
+ echo "You must install the version of Perl shipped with GHC"
+ echo "(or a compatible one) in /bin."
+ exit 1
+ fi
fi
;;
*)
# Win32 only: Enable the RTS and libraries to be built as DLLs
DLLized=@EnableWin32DLLs@
+# Win32 only: are we building a compiler that tries to reduce external
+# dependencies? i.e., one that doesn't assume that the user has got
+# the cygwin toolchain installed on his/her Win32 box.
+#
+# GHC is still dependent on GNU tools in the backend (gcc to further process
+# .c/.hc/.s/.o files + 'perl' to mangle and split), but using this
+# option a GHC distribution can be put together which includes a minimal
+# set of these open source tools).
+#
+# One reason why this is a good thing is that it saves the user installing
+# something like cygwin first. Another positive effect of a GHC install now
+# being self-contained is that it will continue to work even if the user
+# installs a different C compiler (this has caused version problems in the
+# past).
+MinimalUnixDeps=@MinimalUnixDeps@
+
# Don't split object files for libs if we're building DLLs, or booting from
# .hc files.
SplitObjs=YES