1 dnl == autoconf source for the Glasgow FP tools ==
2 dnl (run "grep '^dnl \*' configure.ac | sed -e 's/dnl / /g; s/\*\*/ +/g;'"
3 dnl (or some such) to see the outline of this file)
6 # (c) The University of Glasgow 1994-2004
8 # Configure script template for GHC
10 # Process with 'autoreconf' to get a working configure script.
12 # For the generated configure script, do "./configure --help" to
13 # see what flags are available. (Better yet, read the documentation!)
16 AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.11], [glasgow-haskell-bugs@haskell.org], [ghc])
18 # Set this to YES for a released version, otherwise NO
21 # The primary version (e.g. 6.7, 6.6.1) is set in the AC_INIT line
22 # above. If this is not a released version, then we will append the
23 # date to the version number (e.g. 6.7.20070204). The date is
24 # constructed by finding the date of the most recent patch in the
25 # darcs repository. If this is a source distribution (not a darcs
26 # checkout), then we ship a file 'VERSION' containing the full version
27 # when the source distribution was created.
29 if test ! -f mk/config.h.in; then
30 echo "mk/config.h.in doesn't exist: perhaps you haven't run 'sh boot'?"
34 AC_SUBST([CONFIGURE_ARGS], [$ac_configure_args])
36 FP_SETUP_PROJECT_VERSION
38 # Hmmm, we fix the RPM release number to 1 here... Is this convenient?
39 AC_SUBST([release], [1])
41 # First off, a distrib sanity check..
42 AC_CONFIG_SRCDIR([mk/config.mk.in])
44 dnl * We require autoconf version 2.52
45 dnl We need 2.50 due to the use of AC_SYS_LARGEFILE and AC_MSG_NOTICE.
46 dnl We need 2.52 due to the use of AS_TR_CPP and AS_TR_SH.
49 # -------------------------------------------------------------------------
50 # Prepare to generate the following header files
53 AC_CONFIG_HEADER(mk/config.h)
55 # No, semi-sadly, we don't do `--srcdir'...
56 if test x"$srcdir" != 'x.' ; then
57 echo "This configuration does not support the \`--srcdir' option.."
61 dnl--------------------------------------------------------------------
62 dnl * Deal with arguments telling us gmp is somewhere odd
63 dnl--------------------------------------------------------------------
69 if test "x$gmp_libraries" != "xNONE"; then
70 LDFLAGS="-L$gmp_libraries $LDFLAGS"
71 GMP_LIB_DIRS=$gmp_libraries
73 if test "x$gmp_includes" != "xNONE"; then
74 CPPFLAGS="-I$gmp_includes $CPPFLAGS"
75 GMP_INCLUDE_DIRS=$gmp_includes
77 AC_SUBST(GMP_INCLUDE_DIRS)
78 AC_SUBST(GMP_LIB_DIRS)
80 dnl--------------------------------------------------------------------
81 dnl * Choose host(/target/build) platform
82 dnl--------------------------------------------------------------------
84 dnl Guess host/target/build platform(s) if necessary.
87 # "$host" defaults to "$target"
88 if test "x$host" = xNONE ; then
92 dnl ** canonicalize platform names
93 BuildPlatform=`/bin/sh $srcdir/config.sub $build` || exit 1
94 HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
95 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
97 if test x"$TargetPlatform" != x"$HostPlatform" ; then
99 GHC configuration does not support differing host/target (i.e., cross-compiling)])
102 case $HostPlatform in
104 AC_MSG_WARN([GHC does not support the Cygwin target at the moment])
105 AC_MSG_WARN([I'm assuming you wanted to build for i386-unknown-mingw32])
106 HostPlatform=i386-unknown-mingw32
113 # The following will be more difficult when we *are* cross-compiling.
114 # Suitable names to slam in *_CPP are in platform.h.in.
115 # We also record the architecture, vendor, and operating system (OS)
117 case $HostPlatform in
118 alpha*-dec-osf[[12]]*)
119 HostPlatform=alpha-dec-osf1 # canonicalise for our purposes
120 TargetPlatform=alpha-dec-osf1 # this will work for now... (hack)
121 BuildPlatform=alpha-dec-osf1 # hack
122 HostPlatform_CPP='alpha_dec_osf1'
127 alpha*-dec-osf[[345]]*)
128 HostPlatform=alpha-dec-osf3 # canonicalise for our purposes
129 TargetPlatform=alpha-dec-osf3 # this will work for now... (hack)
130 BuildPlatform=alpha-dec-osf3 # hack
131 HostPlatform_CPP='alpha_dec_osf3'
136 alpha*-unknown-linux*)
137 HostPlatform=alpha-unknown-linux
138 TargetPlatform=alpha-unknown-linux
139 BuildPlatform=alpha-unknown-linux
140 HostPlatform_CPP='alpha_unknown_linux'
142 HostVendor_CPP='unknown'
145 alpha*-unknown-freebsd*)
146 HostPlatform=alpha-unknown-freebsd
147 TargetPlatform=alpha-unknown-freebsd
148 BuildPlatform=alpha-unknown-freebsd
149 HostPlatform_CPP='alpha_unknown_freebsd'
151 HostVendor_CPP='unknown'
154 alpha*-unknown-openbsd*)
155 HostPlatform=alpha-unknown-openbsd
156 TargetPlatform=alpha-unknown-openbsd
157 BuildPlatform=alpha-unknown-openbsd
158 HostPlatform_CPP='alpha_unknown_openbsd'
160 HostVendor_CPP='unknown'
163 amd64-*-openbsd*|x86_64-*-openbsd*)
164 HostPlatform=x86_64-unknown-openbsd
165 TargetPlatform=x86_64-unknown-openbsd
166 BuildPlatform=x86_64-unknown-openbsd
167 HostPlatform_CPP='x86_64_unknown_openbsd'
168 HostArch_CPP='x86_64'
169 HostVendor_CPP='unknown'
172 amd64-*-freebsd*|x86_64-*-freebsd*)
173 HostPlatform=x86_64-unknown-freebsd
174 TargetPlatform=x86_64-unknown-freebsd
175 BuildPlatform=x86_64-unknown-freebsd
176 HostPlatform_CPP='x86_64_unknown_freebsd'
177 HostArch_CPP='x86_64'
178 HostVendor_CPP='unknown'
181 amd64-*-netbsd*|x86_64-*-netbsd*)
182 HostPlatform=x86_64-unknown-netbsd
183 TargetPlatform=x86_64-unknown-netbsd
184 BuildPlatform=x86_64-unknown-netbsd
185 HostPlatform_CPP='x86_64_unknown_netbsd'
186 HostArch_CPP='x86_64'
187 HostVendor_CPP='unknown'
191 HostPlatform=arm-unknown-linux # hack again
192 TargetPlatform=arm-unknown-linux
193 BuildPlatform=arm-unknown-linux
194 HostPlatform_CPP='arm_unknown_linux'
196 HostVendor_CPP='unknown'
200 HostPlatform=arm-unknown-openbsd
201 TargetPlatform=arm-unknown-openbsd
202 BuildPlatform=arm-unknown-openbsd
203 HostPlatform_CPP='arm_unknown_openbsd'
205 HostVendor_CPP='unknown'
209 HostPlatform=hppa-unknown-linux # hack again
210 TargetPlatform=hppa-unknown-linux
211 BuildPlatform=hppa-unknown-linux
212 HostPlatform_CPP='hppa_unknown_linux'
214 HostVendor_CPP='unknown'
218 HostPlatform=hppa-unknown-openbsd # hack again
219 TargetPlatform=hppa-unknown-openbsd
220 BuildPlatform=hppa-unknown-openbsd
221 HostPlatform_CPP='hppa_unknown_openbsd'
223 HostVendor_CPP='unknown'
227 HostPlatform=hppa1.1-hp-hpux # canonicalise for our purposes (hack)
228 TargetPlatform=hppa1.1-hp-hpux
229 BuildPlatform=hppa1.1-hp-hpux
230 HostPlatform_CPP='hppa1_1_hp_hpux'
231 HostArch_CPP='hppa1_1'
235 i[[3456]]86-*-linuxaout*)
236 HostPlatform=i386-unknown-linuxaout # hack again
237 TargetPlatform=i386-unknown-linuxaout
238 BuildPlatform=i386-unknown-linuxaout
239 HostPlatform_CPP='i386_unknown_linuxaout'
241 HostVendor_CPP='unknown'
242 HostOS_CPP='linuxaout'
244 i[[3456]]86-*-linux*)
245 HostPlatform=i386-unknown-linux # hack again
246 TargetPlatform=i386-unknown-linux
247 BuildPlatform=i386-unknown-linux
248 HostPlatform_CPP='i386_unknown_linux'
250 HostVendor_CPP='unknown'
253 i[[3456]]86-*-kfreebsd*-gnu)
254 HostPlatform=i386-unknown-kfreebsdgnu # hack again
255 TargetPlatform=i386-unknown-kfreebsdgnu
256 BuildPlatform=i386-unknown-kfreebsdgnu
257 HostPlatform_CPP='i386_unknown_kfreebsdgnu'
259 HostVendor_CPP='unknown'
260 HostOS_CPP='kfreebsdgnu'
262 i[[3456]]86-*-freebsd[[3-9]]*) # FreeBSD 3.0+ uses ELF
263 HostPlatform=i386-unknown-freebsd # hack again
264 TargetPlatform=i386-unknown-freebsd
265 BuildPlatform=i386-unknown-freebsd
266 HostPlatform_CPP='i386_unknown_freebsd'
268 HostVendor_CPP='unknown'
271 i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out
272 HostPlatform=i386-unknown-freebsd2 # hack again
273 TargetPlatform=i386-unknown-freebsd2
274 BuildPlatform=i386-unknown-freebsd2
275 HostPlatform_CPP='i386_unknown_freebsd2'
277 HostVendor_CPP='unknown'
278 HostOS_CPP='freebsd2'
280 i[[3456]]86-*-netbsd*)
281 HostPlatform=i386-unknown-netbsd # hack again
282 TargetPlatform=i386-unknown-netbsd
283 BuildPlatform=i386-unknown-netbsd
284 HostPlatform_CPP='i386_unknown_netbsd'
286 HostVendor_CPP='unknown'
289 i[[3456]]86-*-openbsd*)
290 HostPlatform=i386-unknown-openbsd # hack again
291 TargetPlatform=i386-unknown-openbsd
292 BuildPlatform=i386-unknown-openbsd
293 HostPlatform_CPP='i386_unknown_openbsd'
295 HostVendor_CPP='unknown'
298 i[[3456]]86-*-solaris2*)
299 HostPlatform=i386-unknown-solaris2 # hack again
300 TargetPlatform=i386-unknown-solaris2
301 BuildPlatform=i386-unknown-solaris2
302 HostPlatform_CPP='i386_unknown_solaris2'
304 HostVendor_CPP='unknown'
305 HostOS_CPP='solaris2'
307 i[[3456]]86-*-cygwin*)
308 HostPlatform=i386-unknown-cygwin32 # hack again
309 TargetPlatform=i386-unknown-cygwin32
310 BuildPlatform=i386-unknown-cygwin32
311 HostPlatform_CPP='i386_unknown_cygwin32'
313 HostVendor_CPP='unknown'
314 HostOS_CPP='cygwin32'
318 i[[3456]]86-*-mingw32*)
319 HostPlatform=i386-unknown-mingw32 # hack again
320 TargetPlatform=i386-unknown-mingw32
321 BuildPlatform=i386-unknown-mingw32
322 HostPlatform_CPP='i386_unknown_mingw32'
324 HostVendor_CPP='unknown'
329 i[[3456]]86-apple-darwin*)
330 HostPlatform=i386-apple-darwin
331 TargetPlatform=i386-apple-darwin #hack
332 BuildPlatform=i386-apple-darwin #hack
333 HostPlatform_CPP='i386_apple_darwin'
335 HostVendor_CPP='apple'
340 HostPlatform=i386-unknown-gnu
341 TargetPlatform=i386-unknown-gnu
342 BuildPlatform=i386-unknown-gnu
343 HostPlatform_CPP=i386_unknown_gnu
345 HostVendor_CPP=unknown
349 HostPlatform=ia64-unknown-linux # hack again
350 TargetPlatform=ia64-unknown-linux
351 BuildPlatform=ia64-unknown-linux
352 HostPlatform_CPP='ia64_unknown_linux'
354 HostVendor_CPP='unknown'
358 HostPlatform=x86_64-unknown-linux
359 TargetPlatform=x86_64-unknown-linux
360 BuildPlatform=x86_64-unknown-linux
361 HostPlatform_CPP='x86_64_unknown_linux'
362 HostArch_CPP='x86_64'
363 HostVendor_CPP='unknown'
366 x86_64-apple-darwin*)
367 HostPlatform=x86_64-apple-darwin
368 TargetPlatform=x86_64-apple-darwin
369 BuildPlatform=x86_64-apple-darwin
370 HostPlatform_CPP='x86_64_apple_darwin'
371 HostArch_CPP='x86_64'
372 HostVendor_CPP='apple'
377 HostPlatform=m68k-unknown-linux # hack again
378 TargetPlatform=m68k-unknown-linux
379 BuildPlatform=m68k-unknown-linux
380 HostPlatform_CPP='m68k_unknown_linux'
382 HostVendor_CPP='unknown'
386 HostPlatform_CPP='m68k_next_nextstep2'
388 HostVendor_CPP='next'
389 HostOS_CPP='nextstep2'
392 HostPlatform_CPP='m68k_next_nextstep3'
394 HostVendor_CPP='next'
395 HostOS_CPP='nextstep3'
397 i[[3456]]86-next-nextstep3)
398 HostPlatform=i386-next-nextstep3 # hack again
399 TargetPlatform=i386-next-nextstep3
400 BuildPlatform=i386-next-nextstep3
401 HostPlatform_CPP='i386_next_nextstep3'
403 HostVendor_CPP='next'
404 HostOS_CPP='nextstep3'
407 HostPlatform=m68k-unknown-openbsd
408 TargetPlatform=m68k-unknown-openbsd
409 BuildPlatform=m68k-unknown-openbsd
410 HostPlatform_CPP='m68k_unknown_openbsd'
412 HostVendor_CPP='unknown'
416 HostPlatform=m68k-unknown-netbsd
417 TargetPlatform=m68k-unknown-netbsd
418 BuildPlatform=m68k-unknown-netbsd
419 HostPlatform_CPP='m68k_unknown_netbsd'
421 HostVendor_CPP='unknown'
425 HostPlatform=m68k-sun-sunos4
426 TargetPlatform=m68k-sun-sunos4 #hack
427 BuildPlatform=m68k-sun-sunos4 #hack
428 HostPlatform_CPP='m68k_sun_sunos4'
434 HostPlatform=m88k-unknown-openbsd
435 TargetPlatform=m88k-unknown-openbsd
436 BuildPlatform=m88k-unknown-openbsd
437 HostPlatform_CPP='m88k_unknown_openbsd'
439 HostVendor_CPP='unknown'
443 HostPlatform=mips-unknown-linux # hack again
444 TargetPlatform=mips-unknown-linux
445 BuildPlatform=mips-unknown-linux
446 HostPlatform_CPP='mips_unknown_linux'
448 HostVendor_CPP='unknown'
452 HostPlatform=mipsel-unknown-linux # hack again
453 TargetPlatform=mipsel-unknown-linux
454 BuildPlatform=mipsel-unknown-linux
455 HostPlatform_CPP='mipsel_unknown_linux'
456 HostArch_CPP='mipsel'
457 HostVendor_CPP='unknown'
461 HostPlatform_CPP='mips_dec_ultrix'
462 HostArch_CPP='mipsel' # NB a little different
467 HostPlatform=mips-sgi-irix
468 TargetPlatform=mips-sgi-irix #hack
469 BuildPlatform=mips-sgi-irix #hack
470 HostPlatform_CPP='mips_sgi_irix'
471 HostArch_CPP='mipseb' # NB a little different
476 HostPlatform=rs6000-ibm-aix
477 TargetPlatform=rs6000-ibm-aix #hack
478 BuildPlatform=rs6000-ibm-aix #hack
479 HostPlatform_CPP='rs6000_ibm_aix'
480 HostArch_CPP='rs6000'
485 HostPlatform=powerpc-ibm-aix
486 TargetPlatform=powerpc-ibm-aix #hack
487 BuildPlatform=powerpc-ibm-aix #hack
488 HostPlatform_CPP='powerpc_ibm_aix'
489 HostArch_CPP='powerpc'
493 powerpc-apple-darwin*)
494 HostPlatform=powerpc-apple-darwin
495 TargetPlatform=powerpc-apple-darwin #hack
496 BuildPlatform=powerpc-apple-darwin #hack
497 HostPlatform_CPP='powerpc_apple_darwin'
498 HostArch_CPP='powerpc'
499 HostVendor_CPP='apple'
503 powerpc-unknown-linux*)
504 HostPlatform=powerpc-unknown-linux
505 TargetPlatform=powerpc-unknown-linux
506 BuildPlatform=powerpc-unknown-linux
507 HostPlatform_CPP='powerpc_unknown_linux'
508 HostArch_CPP='powerpc'
509 HostVendor_CPP='unknown'
512 powerpc-unknown-openbsd*)
513 HostPlatform=powerpc-unknown-openbsd
514 TargetPlatform=powerpc-unknown-openbsd
515 BuildPlatform=powerpc-unknown-openbsd
516 HostPlatform_CPP='powerpc_unknown_openbsd'
517 HostArch_CPP='powerpc'
518 HostVendor_CPP='unknown'
521 powerpc64-unknown-linux*)
522 HostPlatform=powerpc64-unknown-linux
523 TargetPlatform=powerpc64-unknown-linux
524 BuildPlatform=powerpc64-unknown-linux
525 HostPlatform_CPP='powerpc64_unknown_linux'
526 HostArch_CPP='powerpc64'
527 HostVendor_CPP='unknown'
532 HostPlatform=s390-ibm-linux
533 TargetPlatform=s390-ibm-linux #hack
534 BuildPlatform=s390-ibm-linux #hack
535 HostPlatform_CPP='s390_ibm_linux'
541 HostPlatform=sparc-sun-sunos4
542 TargetPlatform=sparc-sun-sunos4 #hack
543 BuildPlatform=sparc-sun-sunos4 #hack
544 HostPlatform_CPP='sparc_sun_sunos4'
550 HostPlatform=sparc-sun-solaris2
551 TargetPlatform=sparc-sun-solaris2 #hack
552 BuildPlatform=sparc-sun-solaris2 #hack
553 HostPlatform_CPP='sparc_sun_solaris2'
556 HostOS_CPP='solaris2'
559 HostPlatform=sparc-unknown-linux
560 TargetPlatform=sparc-unknown-linux
561 BuildPlatform=sparc-unknown-linux
562 HostPlatform_CPP='sparc_unknown_linux'
564 HostVendor_CPP='unknown'
568 HostPlatform=sparc-unknown-openbsd
569 TargetPlatform=sparc-unknown-openbsd
570 BuildPlatform=sparc-unknown-openbsd
571 HostPlatform_CPP='sparc_unknown_openbsd'
573 HostVendor_CPP='unknown'
577 HostPlatform=sparc64-unknown-openbsd
578 TargetPlatform=sparc64-unknown-openbsd
579 BuildPlatform=sparc64-unknown-openbsd
580 HostPlatform_CPP='sparc64_unknown_openbsd'
581 HostArch_CPP='sparc64'
582 HostVendor_CPP='unknown'
586 HostPlatform=vax-unknown-openbsd
587 TargetPlatform=vax-unknown-openbsd
588 BuildPlatform=vax-unknown-openbsd
589 HostPlatform_CPP='vax_unknown_openbsd'
591 HostVendor_CPP='unknown'
595 echo "Unrecognised platform: $HostPlatform"
599 echo "Canonicalised to: $HostPlatform"
600 test x"$HostPlatform" != x"$TargetPlatform" && echo "Target platform set to $TargetPlatform"
601 test x"$BuildPlatform" != x"$HostPlatform" && echo "Build platform set to $BuildPlatform"
603 BuildPlatform_CPP=$HostPlatform_CPP
604 TargetPlatform_CPP=$HostPlatform_CPP
605 BuildArch_CPP=$HostArch_CPP
606 TargetArch_CPP=$HostArch_CPP
607 BuildOS_CPP=$HostOS_CPP
609 TargetOS_CPP=$HostOS_CPP
610 BuildVendor_CPP=$HostVendor_CPP
611 TargetVendor_CPP=$HostVendor_CPP
613 AC_SUBST(BuildPlatform)
614 AC_SUBST(HostPlatform)
615 AC_SUBST(TargetPlatform)
616 AC_SUBST(HostPlatform_CPP)
617 AC_SUBST(BuildPlatform_CPP)
618 AC_SUBST(TargetPlatform_CPP)
620 AC_SUBST(HostArch_CPP)
621 AC_SUBST(BuildArch_CPP)
622 AC_SUBST(TargetArch_CPP)
625 AC_SUBST(HostOS_Full)
626 AC_SUBST(BuildOS_CPP)
627 AC_SUBST(TargetOS_CPP)
629 AC_SUBST(HostVendor_CPP)
630 AC_SUBST(BuildVendor_CPP)
631 AC_SUBST(TargetVendor_CPP)
636 dnl --------------------------------------------------------------
637 dnl * Project specific configuration options
638 dnl --------------------------------------------------------------
639 dnl What follows is a bunch of options that can either be configured
640 dnl through command line options to the configure script or by
641 dnl supplying defns in the build tree's mk/build.mk. Having the option to
642 dnl use either is considered a Feature.
644 dnl ** What command to use to compile compiler sources ?
645 dnl --------------------------------------------------------------
648 [AC_HELP_STRING([--with-ghc=ARG],
649 [Use ARG as the path to GHC [default=autodetect]])],
650 [WithGhc="$withval"],
651 [if test "$GHC" = ""; then
652 AC_PATH_PROG([GHC], [ghc])
655 # GHC is passed to Cabal, so we need a native path
656 if test "${WithGhc}" != "" && test "$HostPlatform" = "i386-unknown-mingw32"
658 if test "${OSTYPE}" = "msys"
660 WithGhc=`echo "${WithGhc}" | sed "s#^/\([a-zA-Z]\)/#\1:/#"`
662 # Canonicalise to <drive>:/path/to/ghc
663 WithGhc=`cygpath -m ${WithGhc}`
665 echo "Canonicalised to: ${WithGhc}"
670 [AC_HELP_STRING([--with-hc=ARG],
671 [Use ARG as the path to the compiler for compiling ordinary
672 Haskell code (default= value of --with-ghc)])],
678 AC_ARG_ENABLE(bootstrap-with-devel-snapshot,
679 [AC_HELP_STRING([--enable-bootstrap-with-devel-snapshot],
680 [Allow bootstrapping using a development snapshot of GHC. This is not guaranteed to work.])],
681 EnableBootstrapWithDevelSnaphost=YES,
682 EnableBootstrapWithDevelSnaphost=NO
685 if test "$WithGhc" != ""; then
686 FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl
688 if test "$GhcMajVersion" = "unknown" -o "$GhcMinVersion" = "unknown"; then
689 AC_MSG_ERROR([Cannot determine the version of $WithGhc. Is it really GHC?])
692 AC_SUBST(GhcVersion)dnl
693 AC_SUBST(GhcMajVersion)dnl
694 AC_SUBST(GhcMinVersion)dnl
695 AC_SUBST(GhcPatchLevel)dnl
696 GhcMinVersion2=`echo "$GhcMinVersion" | sed 's/^\\(.\\)$/0\\1/'`
697 GhcCanonVersion="$GhcMajVersion$GhcMinVersion2"
698 if test $GhcCanonVersion -ge 607; then ghc_ge_607=YES; else ghc_ge_607=NO; fi
699 if test $GhcCanonVersion -ge 609; then ghc_ge_609=YES; else ghc_ge_609=NO; fi
700 AC_SUBST(ghc_ge_607)dnl
701 AC_SUBST(ghc_ge_609)dnl
704 AC_PATH_PROGS(NHC,nhc nhc98)
705 AC_PATH_PROG(HBC,hbc)
707 dnl ** Which gcc to use?
708 dnl --------------------------------------------------------------
710 [AC_HELP_STRING([--with-gcc=ARG],
711 [Use ARG as the path to GCC [default=autodetect]])],
712 [WhatGccIsCalled="$withval"
713 if test "x$HostPlatform" = "xi386-unknown-mingw32" && \
714 test "${OSTYPE}" != "msys" && \
715 test "${withval}" != ""
717 # Canonicalise to <drive>:/path/to/gcc
718 withval=`cygpath -m ${withval}`
723 [WhatGccIsCalled="gcc"]
725 AC_SUBST(WhatGccIsCalled)
727 dnl ** Which ld to use?
728 dnl --------------------------------------------------------------
730 [AC_HELP_STRING([--with-ld=ARG],
731 [Use ARG as the path to LD [default=autodetect]])],
732 [if test "x$HostPlatform" = "xi386-unknown-mingw32" && \
733 test "${OSTYPE}" != "msys" && \
734 test "${withval}" != ""
736 # Canonicalise to <drive>:/path/to/ld
737 withval=`cygpath -m ${withval}`
745 dnl ** Build shared and/or static libs?
746 dnl --------------------------------------------------------------
747 AC_ARG_ENABLE(shared,
748 [AC_HELP_STRING([--enable-shared],
749 [Build shared libraries, if available (EXPERIMENTAL, non-working). [default=no]])],
750 [ if test x"$enableval" = x"yes"; then
751 AC_MSG_WARN([--enable-shared is experimental and not fully supported at this time])
759 AC_SUBST(BuildSharedLibs)
762 # AC_ARG_ENABLE(static,
763 # [AC_HELP_STRING([--enable-static],
764 # [Build static libraries. [default=yes]])],
765 # [ if test x"$enableval" = x"yes"; then
766 # BuildStaticLibs=YES
771 # [BuildStaticLibs=YES]
773 # AC_SUBST(BuildStaticLibs)
775 dnl ** Booting from .hc files?
776 dnl --------------------------------------------------------------
777 AC_ARG_ENABLE(hc-boot,
778 [AC_HELP_STRING([--enable-hc-boot],
779 [Boot the Glasgow Haskell Compiler from intermediate .hc files.
780 (This option is mostly of interest to porters.) [default=no]])],
781 [ if test x"$enableval" = x"yes"; then
789 AC_SUBST(BootingFromHc)
791 dnl ** Booting from unregisterised .hc files?
792 dnl --------------------------------------------------------------
793 AC_ARG_ENABLE(hc-boot-unregisterised,
794 [AC_HELP_STRING([--enable-hc-boot-unregisterised],
795 [ With --enable-hc-boot, treat the intermediate .hc files as
796 unregisterised rather than registerised code.
797 (This option is mostly of interest to porters.) [default=no]])],
798 [ if test x"$enableval" = x"yes"; then
799 BootingFromUnregisterisedHc=YES
801 BootingFromUnregisterisedHc=NO
804 [BootingFromUnregisterisedHc=NO]
806 AC_SUBST(BootingFromUnregisterisedHc)
808 if test "$BootingFromHc" = "NO"; then
809 if test "$BootingFromUnregisterisedHc" = "YES"; then
810 AC_MSG_ERROR([--enable-hc-boot-unregisterised requires --enable-hc-boot.])
814 dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
815 if test "$BootingFromHc" = "NO" -a -d "$srcdir/compiler"; then
816 if test "$WithGhc" = ""; then
817 AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
819 FP_COMPARE_VERSIONS([$GhcVersion],[-lt],[6.6],
820 [AC_MSG_ERROR([GHC version 6.6 or later is required to compile GHC.])])dnl
822 if test `expr $GhcMinVersion % 2` = "1"; then
823 echo $EnableBootstrapWithDevelSnaphost
824 if test "$EnableBootstrapWithDevelSnaphost" = "NO"; then
826 $WithGhc is a development snapshot of GHC, version $GhcVersion.
827 Bootstrapping using this version of GHC is not supported, and may not
828 work. Use --enable-bootstrap-with-devel-snapshot to try it anyway,
829 or --with-ghc to specify a different GHC to use.])
834 # This uses GHC, so put it after the "GHC is required" check above:
837 dnl ** Enable the construction of Win32 DLLs?
838 dnl --------------------------------------------------------------
840 dnl [ The ability to build the RTS and libraries as separate DLLs used
841 dnl to be supported, but isn't currently (updates to the RTS, compiler
842 dnl and build system would be required to bring it back again.)
843 dnl Hence, exposing it as an option is false advertisement, so better
844 dnl disable it to avoid confusion (but leave it commented-out rather
845 dnl than removed in order to remind ourselves to bring back the
846 dnl feature at some stage.) ]
848 dnl AC_ARG_ENABLE(win32-dlls,
849 dnl [ --enable-win32-dlls
850 dnl If on a Win32 platform running mingw32/cygwin, enable the
851 dnl construction of DLLs containing ghc-compiled code.
854 dnl case $HostOS_CPP in
857 dnl *) echo "Unrecognised win32 platform: $HostPlatform"
861 dnl EnableWin32DLLs=YES
863 dnl [EnableWin32DLLs=NO]
865 dnl AC_SUBST(EnableWin32DLLs)
866 dnl if test x"$EnableWin32DLLs" = "xYES" ; then
867 dnl AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
870 dnl ** Mac OS X: explicit deployment target
871 dnl --------------------------------------------------------------
872 AC_ARG_WITH([macosx-deployment-target],
873 [AC_HELP_STRING([--with-macosx-deployment-target=VERSION],
874 [Build for Mac OS VERSION and higher (default= version of build host)])],
875 [FP_MACOSX_DEPLOYMENT_TARGET="$withval"
876 if test "x$TargetOS_CPP-$TargetVendor_CPP" != "xdarwin-apple"; then
877 # ignore everywhere, but on Mac OS
878 AC_MSG_WARN([--macosx-deployment-target is only available on Mac OS X])
879 FP_MACOSX_DEPLOYMENT_TARGET=none
881 [FP_MACOSX_DEPLOYMENT_TARGET=none]
883 FP_CHECK_MACOSX_DEPLOYMENT_TARGET
884 AC_SUBST(MACOSX_DEPLOYMENT_VERSION)
885 AC_SUBST(MACOSX_DEPLOYMENT_SDK)
887 dnl --------------------------------------------------------------
888 dnl End of configure script option section
889 dnl --------------------------------------------------------------
892 dnl --------------------------------------------------------------
893 dnl * General configuration checks
894 dnl --------------------------------------------------------------
896 dnl ** Can the unix package be built?
897 dnl --------------------------------------------------------------
899 if test x"$TargetPlatform" = x"i386-unknown-mingw32"; then
904 AC_SUBST([GhcLibsWithUnix])
909 dnl ** look for `perl', but only in /bin on Windows
912 AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
913 if test -z "$PerlCmd"; then
914 echo "You must install the version of Perl shipped with GHC"
915 echo "(or a compatible one) in /bin."
920 AC_PATH_PROG(PerlCmd,perl)
921 if test -z "$PerlCmd"; then
922 echo "You must install perl before you can continue"
923 echo "Perhaps it is already installed, but not in your PATH?"
926 FPTOOLS_CHECK_PERL_VERSION
931 dnl ** does #! path/to/perl work? (sometimes it's too long...)
934 dnl ** check for Python
935 AC_PATH_PROG(PythonCmd,python)
937 dnl ** look for GCC and find out which version
938 dnl Figure out which C compiler to use. Gcc is preferred.
939 dnl If gcc, make sure it's at least 2.1
945 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
948 dnl ** Without optimization some INLINE trickery fails for GHCi
951 AC_SUBST(SRC_CC_OPTS)
953 dnl ** figure out how to do context diffs
956 dnl ** Find find command (for Win32's benefit)
959 dnl ** Find sort command (for the benefit of Win32 environs)
962 dnl Let's make sure install-sh is executable here. If we got it from
963 dnl a darcs repo, it might not be (see bug #978).
965 dnl ** figure out how to do a BSD-ish install
968 dnl If you can run configure, you certainly have /bin/sh
969 AC_DEFINE([HAVE_BIN_SH], [1], [Define to 1 if you have /bin/sh.])
971 dnl ** how to invoke `ar' and `ranlib'
972 FP_PROG_AR_NEEDS_RANLIB
973 FP_PROG_AR_SUPPORTS_INPUT
975 dnl ** Check to see whether ln -s works
979 dnl ** Find the path to sed
980 AC_PATH_PROG(SedCmd,sed)
983 dnl ** check for time command
984 AC_PATH_PROG(TimeCmd,time)
987 dnl if GNU tar is named gtar, look for it first.
988 AC_PATH_PROGS(TarCmd,gtar tar,tar)
990 dnl ** check for patch
991 dnl if GNU patch is named gpatch, look for it first
992 AC_PATH_PROGS(PatchCmd,gpatch patch, patch)
994 AC_PATH_PROG(HSCOLOUR,HsColour)
995 # HsColour is passed to Cabal, so we need a native path
996 if test "x$HostPlatform" = "xi386-unknown-mingw32" && \
997 test "${OSTYPE}" != "msys" && \
998 test "${HSCOLOUR}" != ""
1000 # Canonicalise to <drive>:/path/to/gcc
1001 HSCOLOUR=`cygpath -m ${HSCOLOUR}`
1004 dnl ** check for DocBook toolchain
1005 FP_CHECK_DOCBOOK_DTD
1006 FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /usr/share/xml/docbook/xsl-stylesheets* /usr/share/sgml/docbook/docbook-xsl-stylesheets* /usr/share/sgml/docbook/xsl-stylesheets* /opt/kde?/share/apps/ksgmltools2/docbook/xsl /usr/share/docbook-xsl /usr/share/sgml/docbkxsl /usr/local/share/xsl/docbook /sw/share/xml/xsl/docbook-xsl /opt/local/share/xsl/docbook-xsl])
1012 dnl ** check for ghc-pkg command
1015 dnl ** check for installed happy binary + version
1016 dnl (don't do it if we're booting from .hc files though.)
1017 if test "$BootingFromHc" = "NO"; then
1021 dnl ** check for installed alex binary + version
1022 dnl (don't do it if we're booting from .hc files though.)
1023 if test "$BootingFromHc" = "NO"; then
1027 dnl Check we have an acceptable version of windres
1030 dnl --------------------------------------------------
1031 dnl ### program checking section ends here ###
1032 dnl --------------------------------------------------
1034 dnl --------------------------------------------------
1035 dnl * Platform header file and syscall feature tests
1036 dnl ### checking the state of the local header files and syscalls ###
1038 dnl ** check for full ANSI header (.h) files
1041 dnl ** Enable large file support. NB. do this before testing the type of
1042 dnl off_t, because it will affect the result of that test.
1045 dnl ** check for specific header (.h) files that we are interested in
1046 AC_CHECK_HEADERS([bfd.h ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/mman.h sys/resource.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h time.h utime.h windows.h winsock.h sched.h])
1048 dnl ** check if it is safe to include both <time.h> and <sys/time.h>
1051 dnl ** do we have long longs?
1052 AC_CHECK_TYPES([long long])
1054 dnl ** what are the sizes of various types
1055 AC_CHECK_SIZEOF(char, 1)
1056 AC_CHECK_SIZEOF(double, 8)
1057 AC_CHECK_SIZEOF(float, 4)
1058 AC_CHECK_SIZEOF(int, 4)
1059 AC_CHECK_SIZEOF(long, 4)
1060 if test "$ac_cv_type_long_long" = yes; then
1061 AC_CHECK_SIZEOF(long long, 8)
1063 AC_CHECK_SIZEOF(short, 2)
1064 AC_CHECK_SIZEOF(unsigned char, 1)
1065 AC_CHECK_SIZEOF(unsigned int, 4)
1066 AC_CHECK_SIZEOF(unsigned long, 4)
1067 if test "$ac_cv_type_long_long" = yes; then
1068 AC_CHECK_SIZEOF(unsigned long long, 8)
1070 AC_CHECK_SIZEOF(unsigned short, 2)
1071 AC_CHECK_SIZEOF(void *, 4)
1073 dnl ** what are alignment constraints on various types
1074 FP_CHECK_ALIGNMENT(char)
1075 FP_CHECK_ALIGNMENT(double)
1076 FP_CHECK_ALIGNMENT(float)
1077 FP_CHECK_ALIGNMENT(int)
1078 FP_CHECK_ALIGNMENT(long)
1079 if test "$ac_cv_type_long_long" = yes; then
1080 FP_CHECK_ALIGNMENT(long long)
1082 FP_CHECK_ALIGNMENT(short)
1083 FP_CHECK_ALIGNMENT(unsigned char)
1084 FP_CHECK_ALIGNMENT(unsigned int)
1085 FP_CHECK_ALIGNMENT(unsigned long)
1086 if test "$ac_cv_type_long_long" = yes; then
1087 FP_CHECK_ALIGNMENT(unsigned long long)
1089 FP_CHECK_ALIGNMENT(unsigned short)
1090 FP_CHECK_ALIGNMENT(void *)
1092 FP_CHECK_FUNC([WinExec],
1093 [@%:@include <windows.h>], [WinExec("",0)])
1095 FP_CHECK_FUNC([GetModuleFileName],
1096 [@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)])
1098 dnl ** check return type of signal handlers
1099 dnl Foo: assumes we can use prototypes.
1100 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
1101 dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler,
1102 dnl [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1103 dnl #include <signal.h>
1107 dnl void (*signal (int, void (*)(int)))(int);
1110 dnl [ac_cv_type_signal_handler=void_int],
1111 dnl [ac_cv_type_signal_handler=int_void])])
1112 dnl if test "$ac_cv_type_signal_handler" = void_int; then
1113 dnl AC_DEFINE(VOID_INT_SIGNALS)
1116 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
1118 if test "$ac_cv_type_signal" = void; then
1119 AC_DEFINE([VOID_INT_SIGNALS], [1], [Define to 1 if signal handlers have type void (*)(int). Otherwise, they're assumed to have type int (*)(void).])
1122 dnl ** check for more functions
1123 dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too.
1124 AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r, sched_setaffinity])
1127 #include <sys/types.h>
1128 #include <sys/time.h>
1130 struct itimerval tval;
1131 tval.it_value.tv_sec = 1;
1132 tval.it_value.tv_usec = 0;
1133 tval.it_interval = tval.it_value;
1134 return setitimer(ITIMER_VIRTUAL, &tval, (void*)0) != 0;
1136 ],[AC_DEFINE([HAVE_SETITIMER_VIRTUAL], [1], [Define to 1 if setitimer accepts ITIMER_VIRTUAL, 0 else.])])
1138 dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if
1139 dnl ** _POSIX_C_SOURCE is defined
1140 AC_CHECK_DECLS([ctime_r], , ,
1141 [#define _POSIX_SOURCE 1
1142 #define _POSIX_C_SOURCE 199506L
1145 dnl ** For ghc/rts/gmp:
1146 AC_CHECK_FUNCS([getpagesize])
1148 dnl ** check whether this machine has gmp3 installed
1149 AC_CHECK_LIB(gmp, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
1150 AC_CHECK_LIB(gmp3, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp3,
1151 HaveLibGmp=NO; LibGmp=not-installed))
1152 if test $HaveLibGmp = YES; then
1153 AC_DEFINE([HAVE_LIB_GMP], [1], [Define to 1 if GMP library is installed.])
1155 AC_SUBST(HaveLibGmp)
1158 dnl ** (Mac OS X only: check for GMP.framework)
1160 case $HostPlatform in
1162 AC_MSG_CHECKING([for GMP.framework])
1164 LIBS="-framework GMP"
1165 AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
1166 if test $HaveFrameworkGMP = YES; then
1167 AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
1170 AC_MSG_RESULT([$HaveFrameworkGMP])
1173 AC_SUBST(HaveFrameworkGMP)
1175 dnl ** check for mingwex library
1176 AC_CHECK_LIB(mingwex, closedir, HaveLibMingwEx=YES, HaveLibMingwEx=NO)
1177 AC_SUBST(HaveLibMingwEx)
1179 if test $HaveLibMingwEx = YES ; then
1180 AC_DEFINE([HAVE_MINGWEX], [1], [Define to 1 if you have the mingwex library.])
1183 if test "$HaveLibGmp" = "NO"; then
1184 if test "$HostArch_CPP" = "ia64" -o "$HostArch_CPP" = "mipseb" ; then
1185 AC_MSG_ERROR([You need to install libgmp (the in-tree version does not work on IA64 or mips64).])
1189 dnl ** check whether this machine has BFD and liberty installed (used for debugging)
1190 dnl the order of these tests matters: bfd needs liberty
1191 AC_CHECK_LIB(iberty, xmalloc)
1192 AC_CHECK_LIB(bfd, bfd_init)
1194 dnl ** check for math library
1195 AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
1196 if test x"$fp_libm_not_needed" = xdunno; then
1197 AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=])
1201 dnl ################################################################
1202 dnl Check for libraries
1203 dnl ################################################################
1205 dnl ** check whether we need -ldl to get dlopen()
1207 AC_CHECK_LIB(dl, dlopen,
1209 AC_DEFINE([HAVE_LIBDL], [1], [Define to 1 if you need -ldl to get dlopen().])
1214 dnl --------------------------------------------------
1215 dnl * Miscellaneous feature tests
1216 dnl --------------------------------------------------
1218 dnl ** can we get alloca?
1221 dnl ** Working vfork?
1224 dnl ** determine whether or not const works
1227 dnl ** are we big endian?
1229 FPTOOLS_FLOAT_WORD_ORDER_BIGENDIAN
1231 dnl ** check for leading underscores in symbol names
1232 FP_LEADING_UNDERSCORE
1234 dnl ** check for ld, whether it has an -x option, and if it is GNU ld
1238 dnl ** check for Apple-style dead-stripping support
1239 dnl (.subsections-via-symbols assembler directive)
1242 AC_MSG_CHECKING(for .subsections_via_symbols)
1244 [AC_LANG_PROGRAM([], [__asm__ (".subsections_via_symbols");])],
1246 AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
1247 [Define to 1 if Apple-style dead-stripping is supported.])
1249 [AC_MSG_RESULT(no)])
1251 dnl *** check for GNU non-executable stack note support (ELF only)
1252 dnl (.section .note.GNU-stack,"",@progbits)
1254 AC_MSG_CHECKING(for GNU non-executable stack support)
1256 [AC_LANG_PROGRAM([__asm__ (".section .note.GNU-stack,\"\",@progbits");], [0])],
1258 AC_DEFINE([HAVE_GNU_NONEXEC_STACK],[1],
1259 [Define to 1 if GNU non-executable stack notes are supported.])
1261 [AC_MSG_RESULT(no)])
1263 dnl ** check for librt
1264 AC_CHECK_LIB(rt, clock_gettime)
1265 AC_CHECK_FUNCS(clock_gettime timer_create timer_settime)
1266 FP_CHECK_TIMER_CREATE
1268 dnl ** check for Apple's "interesting" long double compatibility scheme
1269 AC_MSG_CHECKING(for printf\$LDBLStub)
1270 AC_TRY_LINK_FUNC(printf\$LDBLStub,
1273 AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
1274 [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
1278 AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[0],
1279 [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
1283 AC_PATH_PROGS([GTK_CONFIG], [pkg-config])
1284 if test -n "$GTK_CONFIG"; then
1285 if $GTK_CONFIG gtk+-2.0 --atleast-version=2.0; then
1286 GTK_CONFIG="$GTK_CONFIG gtk+-2.0"
1288 AC_MSG_WARN([GTK+ not usable, need at least version 2.0])
1292 AC_SUBST([GTK_CONFIG])
1295 AC_CHECK_LIB(papi, PAPI_library_init, HavePapiLib=YES, HavePapiLib=NO)
1296 AC_CHECK_HEADER([papi.h], [HavePapiHeader=YES], [HavePapiHeader=NO])
1297 AC_SUBST(HavePapiLib)
1298 AC_SUBST(HavePapiHeader)
1300 if test "$HavePapiLib" = "YES" -a "$HavePapiHeader" = "YES"; then
1307 if test "$DIR_DOCBOOK_XSL" = "" ||
1308 test "$XsltprocCmd" = ""
1310 BUILD_DOCBOOK_HTML=NO
1312 BUILD_DOCBOOK_HTML=YES
1314 AC_SUBST(BUILD_DOCBOOK_HTML)
1316 if test "$DblatexCmd" = ""
1319 BUILD_DOCBOOK_PDF=NO
1321 BUILD_DOCBOOK_PS=YES
1322 BUILD_DOCBOOK_PDF=YES
1324 AC_SUBST(BUILD_DOCBOOK_PS)
1325 AC_SUBST(BUILD_DOCBOOK_PDF)
1327 AC_CONFIG_FILES([mk/config.mk mk/project.mk compiler/ghc.cabal ghc/ghc-bin.cabal ghc.spec extra-gcc-opts docs/users_guide/ug-book.xml])
1328 AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
1332 # http://savannah.gnu.org/bugs/index.php?1516
1333 # $(eval ...) inside conditionals causes errors
1334 # with make 3.80, so warn the user if it looks like they're about to
1336 # We would use "grep -q" here, but Solaris's grep doesn't support it.
1338 if $1 --version 2>&1 | head -1 | grep 'GNU Make 3\.80' > /dev/null
1341 echo "WARNING: It looks like \"$1\" is GNU make 3.80."
1342 echo "This version cannot be used to build GHC."
1343 echo "Please use GNU make >= 3.81."
1351 ----------------------------------------------------------------------
1352 Configure completed successfully.
1354 Building GHC version : $ProjectVersion
1356 Build platform : $BuildPlatform
1357 Host platform : $HostPlatform
1358 Target platform : $TargetPlatform
1361 if test "$BootingFromHc" = "YES"; then
1363 Bootstrapping from HC files.
1367 Bootstrapping using : $WithGhc
1368 which is version : $GhcVersion
1373 Using GCC : $WhatGccIsCalled
1374 which is version : $GccVersion
1382 if test "$HSCOLOUR" = ""; then
1384 HsColour was not found; documentation will not contain source links
1388 HsColour : $HSCOLOUR
1392 echo "Building DocBook HTML documentation: $BUILD_DOCBOOK_HTML"
1393 echo "Building DocBook PS documentation: $BUILD_DOCBOOK_PS"
1394 echo "Building DocBook PDF documentation: $BUILD_DOCBOOK_PDF"
1396 echo ["Building shared libraries : $BuildSharedLibs"]
1398 echo ["----------------------------------------------------------------------
1402 For a standard build of GHC (fully optimised with profiling), type (g)make.
1404 To make changes to the default build configuration, copy the file
1405 mk/build.mk.sample to mk/build.mk, and edit the settings in there.
1407 For more information on how to configure your GHC build, see
1408 http://hackage.haskell.org/trac/ghc/wiki/Building