From: sof Date: Sun, 27 May 2001 23:53:47 +0000 (+0000) Subject: [project @ 2001-05-27 23:53:47 by sof] X-Git-Tag: Approximately_9120_patches~1861 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=13c670c3b50b0e2613458a73a1e05bb4a326f721;p=ghc-hetmet.git [project @ 2001-05-27 23:53:47 by sof] New configure script option, --enable-minimal-unix-deps, a Win32-specific option which lets you build a compiler that doesn't depend on cygwin tools to run. Well, you still need tools such as gcc and perl in the backend, but these don't have to be cygwin ports. --- diff --git a/configure.in b/configure.in index 91bd161..bb7748c 100644 --- a/configure.in +++ b/configure.in @@ -207,7 +207,6 @@ i[[3456]]86-*-mingw32*) # 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' @@ -434,6 +433,20 @@ if test x"$EnableWin32DLLs" = "xYES" ; then 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, @@ -479,11 +492,13 @@ AC_SYS_INTERPRETER() 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 ;; *) diff --git a/mk/config.mk.in b/mk/config.mk.in index c03574d..c078d1a 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -233,6 +233,22 @@ GhcLibHcOpts=-O -Rghc-timing # 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