2 dnl Binary distribution configure script
7 AC_INIT([The Glorious Glasgow Haskell Compilation System], [@ProjectVersion@], [glasgow-haskell-bugs@haskell.org], [ghc])
12 AC_SUBST(BootingFromHc)
14 dnl--------------------------------------------------------------------
15 dnl * Deal with arguments telling us gmp is somewhere odd
16 dnl--------------------------------------------------------------------
21 dnl ** Check Perl installation **
23 AC_PATH_PROG(PerlCmd,perl)
24 if test -z "$PerlCmd"; then
25 echo "You must install perl before you can continue"
26 echo "Perhaps it is already installed, but not in your PATH?"
32 dnl ** figure out how to do a BSD-ish install **
37 dnl ** how to do symlinks **
42 dnl ** Find the path to sed **
44 AC_PATH_PROG(SedCmd,gsed sed,sed)
47 dnl ** How to invoke gcc/cpp **
49 FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
52 AC_SUBST(WhatGccIsCalled)
58 dnl ** Check gcc version and flags we need to pass it **
62 FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS])
63 FPTOOLS_SET_C_LD_FLAGS([build],[CONF_CC_OPTS_STAGE0],[CONF_LD_OPTS_STAGE0])
64 FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_LD_OPTS_STAGE1])
65 FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_LD_OPTS_STAGE2])
67 AC_SUBST(CONF_CC_OPTS_STAGE0)
68 AC_SUBST(CONF_CC_OPTS_STAGE1)
69 AC_SUBST(CONF_CC_OPTS_STAGE2)
70 AC_SUBST(CONF_LD_OPTS_STAGE0)
71 AC_SUBST(CONF_LD_OPTS_STAGE1)
72 AC_SUBST(CONF_LD_OPTS_STAGE2)
75 dnl ** how to invoke `ar' and `ranlib'
77 FP_PROG_AR_NEEDS_RANLIB
80 AC_CONFIG_FILES(extra-gcc-opts mk/config.mk mk/install.mk)
84 # http://savannah.gnu.org/bugs/index.php?1516
85 # $(eval ...) inside conditionals causes errors
86 # with make 3.80, so warn the user if it looks like they're about to
88 # We would use "grep -q" here, but Solaris's grep doesn't support it.
90 if $1 --version 2>&1 | head -1 | grep 'GNU Make 3\.80' > /dev/null
93 echo "WARNING: It looks like \"$1\" is GNU make 3.80."
94 echo "This version cannot be used to build GHC."
95 echo "Please use GNU make >= 3.81."
102 echo "****************************************************"
103 echo "Configuration done, ready to 'make install'"
104 echo "(see README and INSTALL files for more info.)"
105 echo "****************************************************"