Make warning printing a bit less noisy
[ghc.git] / distrib / configure.ac.in
1 dnl
2 dnl Binary distribution configure script
3 dnl
4 #!/bin/sh
5 #
6
7 AC_INIT([The Glorious Glasgow Haskell Compilation System], [@ProjectVersion@], [glasgow-haskell-bugs@haskell.org], [ghc])
8
9 FP_FIND_ROOT
10
11 BootingFromHc=NO
12 AC_SUBST(BootingFromHc)
13
14 dnl--------------------------------------------------------------------
15 dnl * Deal with arguments telling us gmp is somewhere odd
16 dnl--------------------------------------------------------------------
17
18 FP_ARG_GMP
19
20 GMP_INCLUDE_DIRS=
21 GMP_LIB_DIRS=
22 if test "x$gmp_libraries" != "xNONE"; then
23   LDFLAGS="-L$gmp_libraries $LDFLAGS"
24   GMP_LIB_DIRS=$gmp_libraries
25 fi
26 if test "x$gmp_includes" != "xNONE"; then
27   CPPFLAGS="-I$gmp_includes $CPPFLAGS"
28   GMP_INCLUDE_DIRS=$gmp_includes
29 fi
30 AC_SUBST(GMP_INCLUDE_DIRS)
31 AC_SUBST(GMP_LIB_DIRS)
32
33 #
34 dnl ** Check Perl installation **
35 #
36 AC_PATH_PROG(PerlCmd,perl)
37 if test -z "$PerlCmd"; then
38    echo "You must install perl before you can continue"
39    echo "Perhaps it is already installed, but not in your PATH?"
40    exit 1
41 fi
42 FPTOOLS_SHEBANG_PERL
43
44 #
45 dnl ** figure out how to do a BSD-ish install **
46 #
47 AC_PROG_INSTALL
48
49 #
50 dnl ** how to do symlinks **
51 #
52 AC_PROG_LN_S()
53
54 #
55 dnl ** how to invoke `ar' and `ranlib'
56 #
57 FP_PROG_AR_NEEDS_RANLIB
58
59 #
60 dnl ** Find the path to sed **
61 #
62 AC_PATH_PROG(SedCmd,sed)
63
64 #
65 dnl ** How to invoke cpp directly **
66 #
67 FP_HAVE_GCC
68 AC_PROG_CPP
69
70 #
71 dnl ** Check gcc version and flags we need to pass it **
72 #
73 FP_GCC_EXTRA_FLAGS
74
75 CONF_CC_OPTS="@CONF_CC_OPTS@"
76 CONF_LD_OPTS="@CONF_LD_OPTS@"
77 AC_SUBST(CONF_CC_OPTS)
78 AC_SUBST(CONF_LD_OPTS)
79
80 #
81 AC_CONFIG_FILES(extra-gcc-opts mk/config.mk mk/install.mk)
82 AC_OUTPUT
83
84 echo "****************************************************"
85 echo "Configuration done, ready to 'make install'"
86 echo "(see README and INSTALL files for more info.)"
87 echo "****************************************************"