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