Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 1196 lines (1077 sloc) 38.737 kb
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
1 dnl == autoconf source for the Glasgow FP tools ==
81cb761 [project @ 2003-08-18 14:54:40 by panne]
panne authored
2 dnl (run "grep '^dnl \*' configure.ac | sed -e 's/dnl / /g; s/\*\*/ +/g;'"
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
3 dnl (or some such) to see the outline of this file)
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
4 dnl
5 #
a97485b [project @ 2004-11-11 16:48:55 by simonmar]
simonmar authored
6 # (c) The AQUA Project, Glasgow University, 1994-2004
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
7 #
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
8 # Configure script template for the Glasgow functional programming tools
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
9 #
a97485b [project @ 2004-11-11 16:48:55 by simonmar]
simonmar authored
10 # Process with 'autoreconf' to get a working configure script.
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
11 #
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
12 # For the generated configure script, do "./configure --help" to
13 # see what flags are available. (Better yet, read the documentation!)
14 #
15
85d1f79 oops, undo accidental commit of version number
Simon Marlow authored
16 AC_INIT([The Glorious Glasgow Haskell Compilation System], [6.5], [glasgow-haskell-bugs@haskell.org], [ghc])
0065d5a Reorganisation of the source tree
Simon Marlow authored
17
18 FP_SETUP_PROJECT_VERSION
19
20 # Hmmm, we fix the RPM release number to 1 here... Is this convenient?
21 AC_SUBST([release], [1])
ced47f7 [project @ 2004-09-18 12:49:55 by panne]
panne authored
22
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
23 # First off, a distrib sanity check..
ced47f7 [project @ 2004-09-18 12:49:55 by panne]
panne authored
24 AC_CONFIG_SRCDIR([mk/config.mk.in])
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
25
da8f39a [project @ 2003-08-19 12:42:39 by panne]
panne authored
26 dnl * We require autoconf version 2.52
27 dnl We need 2.50 due to the use of AC_SYS_LARGEFILE and AC_MSG_NOTICE.
28 dnl We need 2.52 due to the use of AS_TR_CPP and AS_TR_SH.
907d2e9 [project @ 2004-09-22 08:36:58 by panne]
panne authored
29 AC_PREREQ([2.52])
493055c [project @ 2003-05-29 09:01:20 by simonmar]
simonmar authored
30
6fb805e [project @ 1999-12-07 14:46:31 by chak]
chak authored
31 dnl * Declare subdirectories that have a private configure script
32 dnl
33 dnl After the toplevel configuration is complete, the script will recurse into
13ec31c [project @ 2003-08-22 10:21:46 by panne]
panne authored
34 dnl these subdirectories if they exist. The use of a cache file makes repeated
35 dnl checks cheap.
0065d5a Reorganisation of the source tree
Simon Marlow authored
36 AC_CONFIG_SUBDIRS([libraries])
6fb805e [project @ 1999-12-07 14:46:31 by chak]
chak authored
37
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
38 # -------------------------------------------------------------------------
39 # Prepare to generate the following header files
40 #
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
41 #
42 AC_CONFIG_HEADER(mk/config.h)
02b6015 [project @ 1996-11-21 16:45:53 by simonm]
simonm authored
43
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
44 # No, semi-sadly, we don't do `--srcdir'...
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
45 if test x"$srcdir" != 'x.' ; then
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
46 echo "This configuration does not support the \`--srcdir' option.."
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
47 exit 1
48 fi
49
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
50 dnl--------------------------------------------------------------------
51 dnl * Choose host(/target/build) platform
52 dnl--------------------------------------------------------------------
53
54 dnl Guess host/target/build platform(s) if necessary.
ced47f7 [project @ 2004-09-18 12:49:55 by panne]
panne authored
55 AC_CANONICAL_TARGET
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
56
57 # "$host" defaults to "$target"
58 if test "x$host" = xNONE ; then
59 host=$target
60 fi
61
62 dnl ** canonicalize platform names
63 BuildPlatform=`/bin/sh $srcdir/config.sub $build` || exit 1
64 HostPlatform=`/bin/sh $srcdir/config.sub $host` || exit 1
65 TargetPlatform=`/bin/sh $srcdir/config.sub $target` || exit 1
66
67 if test x"$TargetPlatform" != x"$HostPlatform" ; then
68 echo "GHC configuration does not support differing host/target (i.e., cross-compiling)"
69 exit 1
70 fi
24f948c [project @ 1998-01-27 19:30:05 by sof]
sof authored
71
72 exeext=''
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
73 #
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
74 # The following will be more difficult when we *are* cross-compiling.
75 # Suitable names to slam in *_CPP are in platform.h.in.
76 # We also record the architecture, vendor, and operating system (OS)
77 # separately.
78 case $HostPlatform in
5f61335 [project @ 2001-07-23 22:26:18 by ken]
ken authored
79 alpha*-dec-osf[[12]]*)
ede4c6f igfoo No functionality changes
igfoo authored
80 HostPlatform=alpha-dec-osf1 # canonicalise for our purposes
81 TargetPlatform=alpha-dec-osf1 # this will work for now... (hack)
82 BuildPlatform=alpha-dec-osf1 # hack
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
83 HostPlatform_CPP='alpha_dec_osf1'
84 HostArch_CPP='alpha'
85 HostVendor_CPP='dec'
86 HostOS_CPP='osf1'
87 ;;
5f61335 [project @ 2001-07-23 22:26:18 by ken]
ken authored
88 alpha*-dec-osf[[345]]*)
ede4c6f igfoo No functionality changes
igfoo authored
89 HostPlatform=alpha-dec-osf3 # canonicalise for our purposes
90 TargetPlatform=alpha-dec-osf3 # this will work for now... (hack)
91 BuildPlatform=alpha-dec-osf3 # hack
23c9485 [project @ 1998-02-05 12:23:33 by simonm]
simonm authored
92 HostPlatform_CPP='alpha_dec_osf3'
93 HostArch_CPP='alpha'
94 HostVendor_CPP='dec'
95 HostOS_CPP='osf3'
96 ;;
b06bf9b [project @ 2003-07-23 14:52:25 by simonmar]
simonmar authored
97 alpha*-unknown-linux*)
ede4c6f igfoo No functionality changes
igfoo authored
98 HostPlatform=alpha-unknown-linux
99 TargetPlatform=alpha-unknown-linux
100 BuildPlatform=alpha-unknown-linux
0c0323c [project @ 2000-01-22 12:05:47 by simonmar]
simonmar authored
101 HostPlatform_CPP='alpha_unknown_linux'
102 HostArch_CPP='alpha'
103 HostVendor_CPP='unknown'
104 HostOS_CPP='linux'
105 ;;
5f61335 [project @ 2001-07-23 22:26:18 by ken]
ken authored
106 alpha*-unknown-freebsd*)
ede4c6f igfoo No functionality changes
igfoo authored
107 HostPlatform=alpha-unknown-freebsd
108 TargetPlatform=alpha-unknown-freebsd
109 BuildPlatform=alpha-unknown-freebsd
0c0323c [project @ 2000-01-22 12:05:47 by simonmar]
simonmar authored
110 HostPlatform_CPP='alpha_unknown_freebsd'
111 HostArch_CPP='alpha'
112 HostVendor_CPP='unknown'
113 HostOS_CPP='freebsd'
114 ;;
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
115 alpha*-unknown-openbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
116 HostPlatform=alpha-unknown-openbsd
117 TargetPlatform=alpha-unknown-openbsd
118 BuildPlatform=alpha-unknown-openbsd
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
119 HostPlatform_CPP='alpha_unknown_openbsd'
120 HostArch_CPP='alpha'
121 HostVendor_CPP='unknown'
122 HostOS_CPP='openbsd'
123 ;;
94b639b [project @ 2004-05-22 01:43:37 by dons]
dons authored
124 amd64-*-openbsd*|x86_64-*-openbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
125 HostPlatform=x86_64-unknown-openbsd
126 TargetPlatform=x86_64-unknown-openbsd
127 BuildPlatform=x86_64-unknown-openbsd
7f72889 [project @ 2004-04-18 05:05:22 by dons]
dons authored
128 HostPlatform_CPP='x86_64_unknown_openbsd'
129 HostArch_CPP='x86_64'
aeecdc1 [project @ 2004-04-18 02:37:27 by dons]
dons authored
130 HostVendor_CPP='unknown'
131 HostOS_CPP='openbsd'
132 ;;
1eff684 Accept amd64-*-freebsd architecture
Volker Stolz authored
133 amd64-*-freebsd*)
ede4c6f igfoo No functionality changes
igfoo authored
134 HostPlatform=x86_64-unknown-freebsd
135 TargetPlatform=x86_64-unknown-freebsd
136 BuildPlatform=x86_64-unknown-freebsd
137 HostPlatform_CPP='x86_64_unknown_freebsd'
138 HostArch_CPP='x86_64'
139 HostVendor_CPP='unknown'
140 HostOS_CPP='freebsd'
141 ;;
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
142 arm*-linux*)
143 HostPlatform=arm-unknown-linux # hack again
144 TargetPlatform=arm-unknown-linux
145 BuildPlatform=arm-unknown-linux
ede4c6f igfoo No functionality changes
igfoo authored
146 HostPlatform_CPP='arm_unknown_linux'
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
147 HostArch_CPP='arm'
148 HostVendor_CPP='unknown'
149 HostOS_CPP='linux'
150 ;;
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
151 arm*-openbsd*)
152 HostPlatform=arm-unknown-openbsd
153 TargetPlatform=arm-unknown-openbsd
154 BuildPlatform=arm-unknown-openbsd
ede4c6f igfoo No functionality changes
igfoo authored
155 HostPlatform_CPP='arm_unknown_openbsd'
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
156 HostArch_CPP='arm'
157 HostVendor_CPP='unknown'
158 HostOS_CPP='openbsd'
159 ;;
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
160 hppa*-*-linux*)
161 HostPlatform=hppa-unknown-linux # hack again
162 TargetPlatform=hppa-unknown-linux
163 BuildPlatform=hppa-unknown-linux
ede4c6f igfoo No functionality changes
igfoo authored
164 HostPlatform_CPP='hppa_unknown_linux'
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
165 HostArch_CPP='hppa'
ede4c6f igfoo No functionality changes
igfoo authored
166 HostVendor_CPP='unknown'
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
167 HostOS_CPP='linux'
168 ;;
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
169 hppa*-*-openbsd*)
170 HostPlatform=hppa-unknown-openbsd # hack again
171 TargetPlatform=hppa-unknown-openbsd
172 BuildPlatform=hppa-unknown-openbsd
ede4c6f igfoo No functionality changes
igfoo authored
173 HostPlatform_CPP='hppa_unknown_openbsd'
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
174 HostArch_CPP='hppa'
ede4c6f igfoo No functionality changes
igfoo authored
175 HostVendor_CPP='unknown'
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
176 HostOS_CPP='openbsd'
177 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
178 hppa1.1-hp-hpux*)
ede4c6f igfoo No functionality changes
igfoo authored
179 HostPlatform=hppa1.1-hp-hpux # canonicalise for our purposes (hack)
180 TargetPlatform=hppa1.1-hp-hpux
181 BuildPlatform=hppa1.1-hp-hpux
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
182 HostPlatform_CPP='hppa1_1_hp_hpux'
183 HostArch_CPP='hppa1_1'
184 HostVendor_CPP='hp'
185 HostOS_CPP='hpux'
186 ;;
a7e6cdb [project @ 1996-06-27 15:55:53 by partain]
partain authored
187 i[[3456]]86-*-linuxaout*)
ede4c6f igfoo No functionality changes
igfoo authored
188 HostPlatform=i386-unknown-linuxaout # hack again
189 TargetPlatform=i386-unknown-linuxaout
190 BuildPlatform=i386-unknown-linuxaout
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
191 HostPlatform_CPP='i386_unknown_linuxaout'
192 HostArch_CPP='i386'
193 HostVendor_CPP='unknown'
194 HostOS_CPP='linuxaout'
195 ;;
a7e6cdb [project @ 1996-06-27 15:55:53 by partain]
partain authored
196 i[[3456]]86-*-linux*)
ede4c6f igfoo No functionality changes
igfoo authored
197 HostPlatform=i386-unknown-linux # hack again
198 TargetPlatform=i386-unknown-linux
199 BuildPlatform=i386-unknown-linux
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
200 HostPlatform_CPP='i386_unknown_linux'
201 HostArch_CPP='i386'
202 HostVendor_CPP='unknown'
203 HostOS_CPP='linux'
204 ;;
6f917d9 [project @ 2006-01-09 14:25:44 by simonmar]
simonmar authored
205 i[[3456]]86-*-kfreebsd*-gnu)
206 HostPlatform=i386-unknown-kfreebsdgnu # hack again
207 TargetPlatform=i386-unknown-kfreebsdgnu
208 BuildPlatform=i386-unknown-kfreebsdgnu
209 HostPlatform_CPP='i386_unknown_kfreebsdgnu'
210 HostArch_CPP='i386'
211 HostVendor_CPP='unknown'
212 HostOS_CPP='kfreebsdgnu'
213 ;;
4efea26 [project @ 2000-01-25 10:31:08 by simonmar]
simonmar authored
214 i[[3456]]86-*-freebsd[[3-9]]*) # FreeBSD 3.0+ uses ELF
ede4c6f igfoo No functionality changes
igfoo authored
215 HostPlatform=i386-unknown-freebsd # hack again
216 TargetPlatform=i386-unknown-freebsd
217 BuildPlatform=i386-unknown-freebsd
0c0323c [project @ 2000-01-22 12:05:47 by simonmar]
simonmar authored
218 HostPlatform_CPP='i386_unknown_freebsd'
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
219 HostArch_CPP='i386'
220 HostVendor_CPP='unknown'
0c0323c [project @ 2000-01-22 12:05:47 by simonmar]
simonmar authored
221 HostOS_CPP='freebsd'
b7cf40b [project @ 1998-10-05 14:15:31 by simonm]
simonm authored
222 ;;
223 i[[3456]]86-*-freebsd2*) # Older FreeBSDs are a.out
ede4c6f igfoo No functionality changes
igfoo authored
224 HostPlatform=i386-unknown-freebsd2 # hack again
225 TargetPlatform=i386-unknown-freebsd2
226 BuildPlatform=i386-unknown-freebsd2
b7cf40b [project @ 1998-10-05 14:15:31 by simonm]
simonm authored
227 HostPlatform_CPP='i386_unknown_freebsd2'
228 HostArch_CPP='i386'
229 HostVendor_CPP='unknown'
230 HostOS_CPP='freebsd2'
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
231 ;;
a7e6cdb [project @ 1996-06-27 15:55:53 by partain]
partain authored
232 i[[3456]]86-*-netbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
233 HostPlatform=i386-unknown-netbsd # hack again
234 TargetPlatform=i386-unknown-netbsd
235 BuildPlatform=i386-unknown-netbsd
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
236 HostPlatform_CPP='i386_unknown_netbsd'
237 HostArch_CPP='i386'
238 HostVendor_CPP='unknown'
239 HostOS_CPP='netbsd'
240 ;;
3931854 [project @ 2000-08-04 23:31:43 by lewie]
lewie authored
241 i[[3456]]86-*-openbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
242 HostPlatform=i386-unknown-openbsd # hack again
243 TargetPlatform=i386-unknown-openbsd
244 BuildPlatform=i386-unknown-openbsd
3931854 [project @ 2000-08-04 23:31:43 by lewie]
lewie authored
245 HostPlatform_CPP='i386_unknown_openbsd'
246 HostArch_CPP='i386'
247 HostVendor_CPP='unknown'
248 HostOS_CPP='openbsd'
249 ;;
a7e6cdb [project @ 1996-06-27 15:55:53 by partain]
partain authored
250 i[[3456]]86-*-solaris2*)
ede4c6f igfoo No functionality changes
igfoo authored
251 HostPlatform=i386-unknown-solaris2 # hack again
252 TargetPlatform=i386-unknown-solaris2
253 BuildPlatform=i386-unknown-solaris2
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
254 HostPlatform_CPP='i386_unknown_solaris2'
255 HostArch_CPP='i386'
256 HostVendor_CPP='unknown'
257 HostOS_CPP='solaris2'
258 ;;
46518c8 [project @ 2000-11-07 10:20:03 by simonmar]
simonmar authored
259 i[[3456]]86-*-cygwin*)
ede4c6f igfoo No functionality changes
igfoo authored
260 HostPlatform=i386-unknown-cygwin32 # hack again
261 TargetPlatform=i386-unknown-cygwin32
262 BuildPlatform=i386-unknown-cygwin32
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
263 HostPlatform_CPP='i386_unknown_cygwin32'
264 HostArch_CPP='i386'
265 HostVendor_CPP='unknown'
266 HostOS_CPP='cygwin32'
ede4c6f igfoo No functionality changes
igfoo authored
267 exeext='.exe'
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
268 ;;
ca39263 [project @ 1999-01-26 09:59:18 by sof]
sof authored
269 i[[3456]]86-*-mingw32*)
ede4c6f igfoo No functionality changes
igfoo authored
270 HostPlatform=i386-unknown-mingw32 # hack again
271 TargetPlatform=i386-unknown-mingw32
272 BuildPlatform=i386-unknown-mingw32
ca39263 [project @ 1999-01-26 09:59:18 by sof]
sof authored
273 HostPlatform_CPP='i386_unknown_mingw32'
274 HostArch_CPP='i386'
275 HostVendor_CPP='unknown'
276 HostOS_CPP='mingw32'
ede4c6f igfoo No functionality changes
igfoo authored
277 exeext='.exe'
ca39263 [project @ 1999-01-26 09:59:18 by sof]
sof authored
278 ;;
246abe6 [project @ 2005-06-09 05:35:28 by wolfgang]
wolfgang authored
279 i[[3456]]86-apple-darwin*)
ede4c6f igfoo No functionality changes
igfoo authored
280 HostPlatform=i386-apple-darwin
281 TargetPlatform=i386-apple-darwin #hack
282 BuildPlatform=i386-apple-darwin #hack
283 HostPlatform_CPP='i386_apple_darwin'
284 HostArch_CPP='i386'
285 HostVendor_CPP='apple'
286 HostOS_CPP='darwin'
287 ;;
ccdb6d4 igfoo Move the very broad "i[[3456]]86-*-gnu*" HostPlatform pattern to the end...
igfoo authored
288 i[[3456]]86-*-gnu*)
289 HostPlatform=i386-unknown-gnu
290 TargetPlatform=i386-unknown-gnu
291 BuildPlatform=i386-unknown-gnu
292 HostPlatform_CPP=i386_unknown_gnu
293 HostArch_CPP=i386
294 HostVendor_CPP=unknown
295 HostOS_CPP=gnu
296 ;;
de67a09 [project @ 2002-05-14 08:09:07 by matthewc]
matthewc authored
297 ia64-*-linux*)
298 HostPlatform=ia64-unknown-linux # hack again
299 TargetPlatform=ia64-unknown-linux
300 BuildPlatform=ia64-unknown-linux
301 HostPlatform_CPP='ia64_unknown_linux'
302 HostArch_CPP='ia64'
303 HostVendor_CPP='unknown'
304 HostOS_CPP='linux'
305 ;;
6628972 [project @ 2003-08-27 13:56:37 by simonmar]
simonmar authored
306 x86_64-*-linux*)
307 HostPlatform=x86_64-unknown-linux
308 TargetPlatform=x86_64-unknown-linux
309 BuildPlatform=x86_64-unknown-linux
310 HostPlatform_CPP='x86_64_unknown_linux'
311 HostArch_CPP='x86_64'
312 HostVendor_CPP='unknown'
313 HostOS_CPP='linux'
ede4c6f igfoo No functionality changes
igfoo authored
314 ;;
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
315 m68k-*-linux*)
316 HostPlatform=m68k-unknown-linux # hack again
ede4c6f igfoo No functionality changes
igfoo authored
317 TargetPlatform=m68k-unknown-linux
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
318 BuildPlatform=m68k-unknown-linux
319 HostPlatform_CPP='m68k_unknown_linux'
320 HostArch_CPP='m68k'
321 HostVendor_CPP='unknown'
322 HostOS_CPP='linux'
323 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
324 m68k-next-nextstep2)
325 HostPlatform_CPP='m68k_next_nextstep2'
326 HostArch_CPP='m68k'
327 HostVendor_CPP='next'
328 HostOS_CPP='nextstep2'
329 ;;
330 m68k-next-nextstep3)
331 HostPlatform_CPP='m68k_next_nextstep3'
332 HostArch_CPP='m68k'
333 HostVendor_CPP='next'
334 HostOS_CPP='nextstep3'
335 ;;
a7e6cdb [project @ 1996-06-27 15:55:53 by partain]
partain authored
336 i[[3456]]86-next-nextstep3)
ede4c6f igfoo No functionality changes
igfoo authored
337 HostPlatform=i386-next-nextstep3 # hack again
338 TargetPlatform=i386-next-nextstep3
339 BuildPlatform=i386-next-nextstep3
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
340 HostPlatform_CPP='i386_next_nextstep3'
341 HostArch_CPP='i386'
342 HostVendor_CPP='next'
343 HostOS_CPP='nextstep3'
344 ;;
c1d0253 [project @ 2002-07-15 07:24:58 by chak]
chak authored
345 m68k-*-openbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
346 HostPlatform=m68k-unknown-openbsd
347 TargetPlatform=m68k-unknown-openbsd
348 BuildPlatform=m68k-unknown-openbsd
c1d0253 [project @ 2002-07-15 07:24:58 by chak]
chak authored
349 HostPlatform_CPP='m68k_unknown_openbsd'
350 HostArch_CPP='m68k'
351 HostVendor_CPP='unknown'
352 HostOS_CPP='openbsd'
353 ;;
3d27348 [project @ 2003-08-28 04:52:02 by dons]
dons authored
354 m68k-*-netbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
355 HostPlatform=m68k-unknown-netbsd
356 TargetPlatform=m68k-unknown-netbsd
357 BuildPlatform=m68k-unknown-netbsd
3d27348 [project @ 2003-08-28 04:52:02 by dons]
dons authored
358 HostPlatform_CPP='m68k_unknown_netbsd'
124bc71 [project @ 2002-12-08 09:28:07 by dons]
dons authored
359 HostArch_CPP='m68k'
3d27348 [project @ 2003-08-28 04:52:02 by dons]
dons authored
360 HostVendor_CPP='unknown'
124bc71 [project @ 2002-12-08 09:28:07 by dons]
dons authored
361 HostOS_CPP='netbsd'
362 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
363 m68k-sun-sunos4*)
ede4c6f igfoo No functionality changes
igfoo authored
364 HostPlatform=m68k-sun-sunos4
365 TargetPlatform=m68k-sun-sunos4 #hack
366 BuildPlatform=m68k-sun-sunos4 #hack
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
367 HostPlatform_CPP='m68k_sun_sunos4'
368 HostArch_CPP='m68k'
369 HostVendor_CPP='sun'
370 HostOS_CPP='sunos4'
371 ;;
ffe71d1 [project @ 2004-05-08 03:10:57 by dons]
dons authored
372 m88k-*-openbsd*)
ede4c6f igfoo No functionality changes
igfoo authored
373 HostPlatform=m88k-unknown-openbsd
374 TargetPlatform=m88k-unknown-openbsd
375 BuildPlatform=m88k-unknown-openbsd
ffe71d1 [project @ 2004-05-08 03:10:57 by dons]
dons authored
376 HostPlatform_CPP='m88k_unknown_openbsd'
377 HostArch_CPP='m88k'
378 HostVendor_CPP='unknown'
379 HostOS_CPP='openbsd'
380 ;;
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
381 mips-*-linux*)
382 HostPlatform=mips-unknown-linux # hack again
383 TargetPlatform=mips-unknown-linux
384 BuildPlatform=mips-unknown-linux
385 HostPlatform_CPP='mips_unknown_linux'
386 HostArch_CPP='mips'
387 HostVendor_CPP='unknown'
388 HostOS_CPP='linux'
389 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
390 mips-dec-ultrix*)
391 HostPlatform_CPP='mips_dec_ultrix'
392 HostArch_CPP='mipsel' # NB a little different
393 HostVendor_CPP='dec'
394 HostOS_CPP='ultrix'
395 ;;
396 mips-sgi-irix*)
ede4c6f igfoo No functionality changes
igfoo authored
397 HostPlatform=mips-sgi-irix
398 TargetPlatform=mips-sgi-irix #hack
399 BuildPlatform=mips-sgi-irix #hack
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
400 HostPlatform_CPP='mips_sgi_irix'
401 HostArch_CPP='mipseb' # NB a little different
402 HostVendor_CPP='sgi'
403 HostOS_CPP='irix'
404 ;;
eaa66db [project @ 1997-05-26 20:46:08 by andre]
andre authored
405 rs6000-ibm-aix*)
ede4c6f igfoo No functionality changes
igfoo authored
406 HostPlatform=rs6000-ibm-aix
407 TargetPlatform=rs6000-ibm-aix #hack
408 BuildPlatform=rs6000-ibm-aix #hack
eaa66db [project @ 1997-05-26 20:46:08 by andre]
andre authored
409 HostPlatform_CPP='rs6000_ibm_aix'
410 HostArch_CPP='rs6000'
411 HostVendor_CPP='ibm'
412 HostOS_CPP='aix'
413 ;;
10521d8 [project @ 1996-01-11 14:06:51 by partain]
partain authored
414 powerpc-ibm-aix*)
ede4c6f igfoo No functionality changes
igfoo authored
415 HostPlatform=powerpc-ibm-aix
416 TargetPlatform=powerpc-ibm-aix #hack
417 BuildPlatform=powerpc-ibm-aix #hack
10521d8 [project @ 1996-01-11 14:06:51 by partain]
partain authored
418 HostPlatform_CPP='powerpc_ibm_aix'
419 HostArch_CPP='powerpc'
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
420 HostVendor_CPP='ibm'
421 HostOS_CPP='aix'
422 ;;
5ca4a01 [project @ 2001-12-10 01:27:59 by sebc]
sebc authored
423 powerpc-apple-darwin*)
ede4c6f igfoo No functionality changes
igfoo authored
424 HostPlatform=powerpc-apple-darwin
425 TargetPlatform=powerpc-apple-darwin #hack
426 BuildPlatform=powerpc-apple-darwin #hack
427 HostPlatform_CPP='powerpc_apple_darwin'
428 HostArch_CPP='powerpc'
429 HostVendor_CPP='apple'
430 HostOS_CPP='darwin'
431 ;;
3c1a911 [project @ 2003-09-05 09:51:02 by simonmar]
simonmar authored
432 powerpc-unknown-linux*)
433 HostPlatform=powerpc-unknown-linux
434 TargetPlatform=powerpc-unknown-linux
435 BuildPlatform=powerpc-unknown-linux
436 HostPlatform_CPP='powerpc_unknown_linux'
437 HostArch_CPP='powerpc'
438 HostVendor_CPP='unknown'
439 HostOS_CPP='linux'
440 ;;
4a22a82 [project @ 2004-05-08 01:49:56 by dons]
dons authored
441 powerpc-unknown-openbsd*)
442 HostPlatform=powerpc-unknown-openbsd
443 TargetPlatform=powerpc-unknown-openbsd
444 BuildPlatform=powerpc-unknown-openbsd
445 HostPlatform_CPP='powerpc_unknown_openbsd'
446 HostArch_CPP='powerpc'
447 HostVendor_CPP='unknown'
448 HostOS_CPP='openbsd'
449 ;;
4d98fc2 [project @ 2004-11-10 03:27:04 by wolfgang]
wolfgang authored
450 powerpc64-unknown-linux*)
ede4c6f igfoo No functionality changes
igfoo authored
451 HostPlatform=powerpc64-unknown-linux
452 TargetPlatform=powerpc64-unknown-linux
453 BuildPlatform=powerpc64-unknown-linux
454 HostPlatform_CPP='powerpc64_unknown_linux'
455 HostArch_CPP='powerpc64'
4d98fc2 [project @ 2004-11-10 03:27:04 by wolfgang]
wolfgang authored
456 HostVendor_CPP='unknown'
ede4c6f igfoo No functionality changes
igfoo authored
457 HostOS_CPP='linux'
458 ;;
459
a608f14 [project @ 2003-09-21 13:07:07 by igloo]
igloo authored
460 s390-ibm-linux*)
461 HostPlatform=s390-ibm-linux
462 TargetPlatform=s390-ibm-linux #hack
463 BuildPlatform=s390-ibm-linux #hack
464 HostPlatform_CPP='s390_ibm_linux'
465 HostArch_CPP='s390'
466 HostVendor_CPP='ibm'
467 HostOS_CPP='linux'
468 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
469 sparc-sun-sunos4*)
ede4c6f igfoo No functionality changes
igfoo authored
470 HostPlatform=sparc-sun-sunos4
471 TargetPlatform=sparc-sun-sunos4 #hack
472 BuildPlatform=sparc-sun-sunos4 #hack
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
473 HostPlatform_CPP='sparc_sun_sunos4'
474 HostArch_CPP='sparc'
475 HostVendor_CPP='sun'
476 HostOS_CPP='sunos4'
477 ;;
478 sparc-sun-solaris2*)
ede4c6f igfoo No functionality changes
igfoo authored
479 HostPlatform=sparc-sun-solaris2
480 TargetPlatform=sparc-sun-solaris2 #hack
481 BuildPlatform=sparc-sun-solaris2 #hack
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
482 HostPlatform_CPP='sparc_sun_solaris2'
483 HostArch_CPP='sparc'
484 HostVendor_CPP='sun'
485 HostOS_CPP='solaris2'
486 ;;
4cdc197 [project @ 2003-08-16 11:19:07 by igloo]
igloo authored
487 sparc*-linux*)
488 HostPlatform=sparc-unknown-linux
489 TargetPlatform=sparc-unknown-linux
490 BuildPlatform=sparc-unknown-linux
491 HostPlatform_CPP='sparc_unknown_linux'
492 HostArch_CPP='sparc'
493 HostVendor_CPP='unknown'
494 HostOS_CPP='linux'
495 ;;
63b17be [project @ 2003-08-18 00:01:07 by dons]
dons authored
496 sparc-*-openbsd*)
497 HostPlatform=sparc-unknown-openbsd
498 TargetPlatform=sparc-unknown-openbsd
499 BuildPlatform=sparc-unknown-openbsd
500 HostPlatform_CPP='sparc_unknown_openbsd'
501 HostArch_CPP='sparc'
502 HostVendor_CPP='unknown'
503 HostOS_CPP='openbsd'
504 ;;
ffe71d1 [project @ 2004-05-08 03:10:57 by dons]
dons authored
505 sparc64-*-openbsd*)
506 HostPlatform=sparc64-unknown-openbsd
507 TargetPlatform=sparc64-unknown-openbsd
508 BuildPlatform=sparc64-unknown-openbsd
509 HostPlatform_CPP='sparc64_unknown_openbsd'
510 HostArch_CPP='sparc64'
511 HostVendor_CPP='unknown'
512 HostOS_CPP='openbsd'
513 ;;
514 vax-*-openbsd*)
515 HostPlatform=vax-unknown-openbsd
516 TargetPlatform=vax-unknown-openbsd
517 BuildPlatform=vax-unknown-openbsd
518 HostPlatform_CPP='vax_unknown_openbsd'
519 HostArch_CPP='vax'
520 HostVendor_CPP='unknown'
521 HostOS_CPP='openbsd'
522 ;;
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
523 *)
524 echo "Unrecognised platform: $HostPlatform"
525 exit 1
526 ;;
527 esac
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
528 echo "Canonicalised to: $HostPlatform"
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
529 test x"$HostPlatform" != x"$TargetPlatform" && echo "Target platform set to $TargetPlatform"
530 test x"$BuildPlatform" != x"$HostPlatform" && echo "Build platform set to $BuildPlatform"
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
531
532 BuildPlatform_CPP=$HostPlatform_CPP
533 TargetPlatform_CPP=$HostPlatform_CPP
534 BuildArch_CPP=$HostArch_CPP
535 TargetArch_CPP=$HostArch_CPP
536 BuildOS_CPP=$HostOS_CPP
cea3f84 [project @ 1997-06-09 07:43:21 by sof]
sof authored
537 HostOS_Full=$host_os
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
538 TargetOS_CPP=$HostOS_CPP
539 BuildVendor_CPP=$HostVendor_CPP
540 TargetVendor_CPP=$HostVendor_CPP
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
541
c0d30cb [project @ 2003-09-04 09:53:31 by simonmar]
simonmar authored
542 AC_SUBST(BuildPlatform)
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
543 AC_SUBST(HostPlatform)
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
544 AC_SUBST(TargetPlatform)
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
545 AC_SUBST(HostPlatform_CPP)
c0d30cb [project @ 2003-09-04 09:53:31 by simonmar]
simonmar authored
546 AC_SUBST(BuildPlatform_CPP)
547 AC_SUBST(TargetPlatform_CPP)
cea3f84 [project @ 1997-06-09 07:43:21 by sof]
sof authored
548
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
549 AC_SUBST(HostArch_CPP)
c0d30cb [project @ 2003-09-04 09:53:31 by simonmar]
simonmar authored
550 AC_SUBST(BuildArch_CPP)
551 AC_SUBST(TargetArch_CPP)
cea3f84 [project @ 1997-06-09 07:43:21 by sof]
sof authored
552
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
553 AC_SUBST(HostOS_CPP)
cea3f84 [project @ 1997-06-09 07:43:21 by sof]
sof authored
554 AC_SUBST(HostOS_Full)
c0d30cb [project @ 2003-09-04 09:53:31 by simonmar]
simonmar authored
555 AC_SUBST(BuildOS_CPP)
556 AC_SUBST(TargetOS_CPP)
cea3f84 [project @ 1997-06-09 07:43:21 by sof]
sof authored
557
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
558 AC_SUBST(HostVendor_CPP)
c0d30cb [project @ 2003-09-04 09:53:31 by simonmar]
simonmar authored
559 AC_SUBST(BuildVendor_CPP)
560 AC_SUBST(TargetVendor_CPP)
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
561
24f948c [project @ 1998-01-27 19:30:05 by sof]
sof authored
562 AC_SUBST(exeext)
563
e10230b [project @ 2003-06-10 11:57:02 by simonmar]
simonmar authored
564 dnl --------------------------------------------------------------
565 dnl * Calculate absolute path to build tree
566 dnl --------------------------------------------------------------
567
568 AC_MSG_CHECKING(for path to top of build tree)
569
570 hardtop=`pwd`
571
572 dnl Remove common automounter nonsense
573 dnl
574 hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|' | sed 's|^//\(.\)/|\1:/|' `
575
ede4c6f igfoo No functionality changes
igfoo authored
576 dnl Find 'hardtop_plat', the native format for 'hardtop'
577 dnl (i.e., right kind of \dnl slashes on a Win32 box, but with b-slashes
578 dnl being escaped).
e10230b [project @ 2003-06-10 11:57:02 by simonmar]
simonmar authored
579 dnl
ede4c6f igfoo No functionality changes
igfoo authored
580 dnl Note OSTYPE: On Cygwin we need to use 'cygpath' to convert
581 dnl /cygdrive/c/foo to c:/foo but we must not do that if we
582 dnl aren't building using Cygwin (notably msys), because
583 dnl cygpath doesn't exist. It seems that 'bash' sets
584 dnl OSTYPE to 'cygwin' or 'msys' respectively, but cygwin's
585 dnl 'sh' does not. So we hackily assume that if the shell
586 dnl hasn't set it to 'msys' then we must be in Cygwin.
587 dnl Sigh.
fccc859 [project @ 2004-04-21 08:43:43 by simonpj]
simonpj authored
588 dnl
ede4c6f igfoo No functionality changes
igfoo authored
589 dnl The Right Thing is probably to test $BuildPlatform
590 dnl instead, but we are sloppy about setting that correctly
591 dnl at the moment, so we just work around for now.
fccc859 [project @ 2004-04-21 08:43:43 by simonpj]
simonpj authored
592 dnl
ede4c6f igfoo No functionality changes
igfoo authored
593 dnl The quotes round "$(OSTYPE)" are essential, for the
594 dnl Cygwin-sh case where OSTYPE is not set.
524bacb [project @ 2001-11-07 20:14:21 by sof]
sof authored
595 case $HostPlatform in
8c08b1a [project @ 2001-11-08 18:51:03 by sof]
sof authored
596 i386-unknown-mingw32 | i386-unknown-cygwin32)
ede4c6f igfoo No functionality changes
igfoo authored
597 if test "${OSTYPE}" != "msys"
a69327e [project @ 2004-03-03 17:10:33 by simonpj]
simonpj authored
598 then
599 # convert $hardtop to a path that mingw will understand too
600 cyghardtop=${hardtop}
601 hardtop=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@/@g'`
602 hardtop_plat=`cygpath -w ${cyghardtop} | sed -e 's@\\\\@\\\\\\\\@g'`
603 else
604 hardtop_plat=${hardtop}
605 fi
606 ;;
524bacb [project @ 2001-11-07 20:14:21 by sof]
sof authored
607 *)
ede4c6f igfoo No functionality changes
igfoo authored
608 hardtop_plat=${hardtop}
609 ;;
524bacb [project @ 2001-11-07 20:14:21 by sof]
sof authored
610 esac
781ab03 [project @ 2001-11-27 07:49:15 by sof]
sof authored
611 AC_SUBST(hardtop)
524bacb [project @ 2001-11-07 20:14:21 by sof]
sof authored
612 AC_SUBST(hardtop_plat)
613
e10230b [project @ 2003-06-10 11:57:02 by simonmar]
simonmar authored
614 AC_MSG_RESULT(${hardtop})
615
560f42c [project @ 2005-02-23 13:57:27 by simonmar]
simonmar authored
616 # We don't support building in directories with spaces.
617 case "$hardtop" in
618 *' '*) AC_MSG_ERROR([
619 The build system does not support building in a directory containing
620 space characters. Suggestion: move the build tree somewhere else.])
621 ;;
622 esac
623
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
624 dnl --------------------------------------------------------------
625 dnl * Project specific configuration options
626 dnl --------------------------------------------------------------
627 dnl What follows is a bunch of options that can either be configured
628 dnl through command line options to the configure script or by
629 dnl supplying defns in the build tree's mk/build.mk. Having the option to
630 dnl use either is considered a Feature.
631
632 dnl ** What command to use to compile compiler sources ?
633 dnl --------------------------------------------------------------
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored
634
f30908b [project @ 2004-11-20 16:02:41 by panne]
panne authored
635 AC_ARG_WITH([ghc],
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
636 [AC_HELP_STRING([--with-ghc=ARG],
f30908b [project @ 2004-11-20 16:02:41 by panne]
panne authored
637 [Use ARG as the path to GHC [default=autodetect]])],
638 [WithGhc="$withval"],
639 [if test "$GHC" = ""; then
640 AC_PATH_PROG([GHC], [ghc])
dae2fd8 [project @ 2001-09-18 08:53:01 by simonmar]
simonmar authored
641 fi
f30908b [project @ 2004-11-20 16:02:41 by panne]
panne authored
642 WithGhc="$GHC"])
643 AC_SUBST([WithGhc])
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored
644
970e71d [project @ 2001-02-15 12:38:35 by simonmar]
simonmar authored
645 AC_ARG_WITH(hc,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
646 [AC_HELP_STRING([--with-hc=ARG],
647 [Use ARG as the path to the compiler for compiling ordinary
ede4c6f igfoo No functionality changes
igfoo authored
648 Haskell code (default= value of --with-ghc)])],
970e71d [project @ 2001-02-15 12:38:35 by simonmar]
simonmar authored
649 [WithHc="$withval"],
650 [WithHc=$WithGhc]
651 )
652 AC_SUBST(WithHc)
653
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored
654 if test "$WithGhc" != ""; then
655 FPTOOLS_GHC_VERSION([GhcVersion], [GhcMajVersion], [GhcMinVersion], [GhcPatchLevel])dnl
656 AC_SUBST(GhcVersion)dnl
657 AC_SUBST(GhcMajVersion)dnl
658 AC_SUBST(GhcMinVersion)dnl
659 AC_SUBST(GhcPatchLevel)dnl
660 fi
661
0065d5a Reorganisation of the source tree
Simon Marlow authored
662 # Check whether this GHC has readline installed
663 FP_GHC_HAS_READLINE
664
803963a [project @ 2000-11-02 14:27:01 by simonmar]
simonmar authored
665 AC_PATH_PROGS(NHC,nhc nhc98)
666 AC_PATH_PROG(HBC,hbc)
667
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
668 dnl ** Which gcc to use?
669 dnl --------------------------------------------------------------
b799828 [project @ 1998-08-18 20:40:42 by sof]
sof authored
670 AC_ARG_WITH(gcc,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
671 [AC_HELP_STRING([--with-gcc=ARG],
672 [Use ARG as the path to GCC [default=autodetect]])],
8146101 [project @ 2001-07-03 16:57:03 by sewardj]
sewardj authored
673 [WhatGccIsCalled="$withval"
a69327e [project @ 2004-03-03 17:10:33 by simonpj]
simonpj authored
674 if test "x$HostPlatform" = "xi386-unknown-mingw32"
675 then
fccc859 [project @ 2004-04-21 08:43:43 by simonpj]
simonpj authored
676 if test "${OSTYPE}" != "msys"
a69327e [project @ 2004-03-03 17:10:33 by simonpj]
simonpj authored
677 then
678 # Canonicalise to <drive>:/path/to/gcc
679 withval=`cygpath -w ${withval} | sed -e 's@\\\\@/@g' `
680 fi
55657e2 [project @ 2003-05-20 03:46:48 by sof]
sof authored
681 fi;
7fd32ef [project @ 2004-12-16 10:23:44 by simonmar]
simonmar authored
682 CC="$withval"
683 export CC
684 ],
cc463ba [project @ 2004-07-09 21:13:35 by sof]
sof authored
685 [WhatGccIsCalled="gcc"]
b799828 [project @ 1998-08-18 20:40:42 by sof]
sof authored
686 )
687 AC_SUBST(WhatGccIsCalled)
688
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
689 dnl ** Booting from .hc files?
690 dnl --------------------------------------------------------------
691 AC_ARG_ENABLE(hc-boot,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
692 [AC_HELP_STRING([--enable-hc-boot],
693 [Boot the Glasgow Haskell Compiler from intermediate .hc files.
694 (This option is mostly of interest to porters.) [default=no]])],
695 [ if test x"$enableval" = x"yes"; then
ede4c6f igfoo No functionality changes
igfoo authored
696 BootingFromHc=YES
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
697 else
ede4c6f igfoo No functionality changes
igfoo authored
698 BootingFromHc=NO
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
699 fi
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
700 ],
701 [BootingFromHc=NO]
702 )
703 AC_SUBST(BootingFromHc)
704
27d13cb [project @ 2001-07-23 22:33:52 by ken]
ken authored
705 dnl ** Booting from unregisterised .hc files?
706 dnl --------------------------------------------------------------
707 AC_ARG_ENABLE(hc-boot-unregisterised,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
708 [AC_HELP_STRING([--enable-hc-boot-unregisterised],
709 [ With --enable-hc-boot, treat the intermediate .hc files as
710 unregisterised rather than registerised code.
711 (This option is mostly of interest to porters.) [default=no]])],
712 [ if test x"$enableval" = x"yes"; then
ede4c6f igfoo No functionality changes
igfoo authored
713 BootingFromUnregisterisedHc=YES
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
714 else
ede4c6f igfoo No functionality changes
igfoo authored
715 BootingFromUnregisterisedHc=NO
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
716 fi
27d13cb [project @ 2001-07-23 22:33:52 by ken]
ken authored
717 ],
718 [BootingFromUnregisterisedHc=NO]
719 )
720 AC_SUBST(BootingFromUnregisterisedHc)
721
722 if test "$BootingFromHc" = "NO"; then
723 if test "$BootingFromUnregisterisedHc" = "YES"; then
724 AC_MSG_ERROR([--enable-hc-boot-unregisterised requires --enable-hc-boot.])
725 fi;
726 fi;
727
9eb4c72 [project @ 2003-02-17 11:18:45 by simonmar]
simonmar authored
728 dnl ** Must have GHC to build GHC, unless --enable-hc-boot is on
c21d7ce --enable-src-tree-haddock and friends are no longer required
Simon Marlow authored
729 if test "$BootingFromHc" = "NO" -a "$WithGhc" = "" -a -d "$srcdir/compiler"; then
9eb4c72 [project @ 2003-02-17 11:18:45 by simonmar]
simonmar authored
730 AC_MSG_ERROR([GHC is required unless bootstrapping from .hc files.])
731 fi;
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
732
88ffee6 [project @ 1999-05-04 08:35:12 by sof]
sof authored
733 dnl ** Enable the construction of Win32 DLLs?
734 dnl --------------------------------------------------------------
48d306a [project @ 2003-07-31 23:16:13 by sof]
sof authored
735 dnl
736 dnl [ The ability to build the RTS and libraries as separate DLLs used
ede4c6f igfoo No functionality changes
igfoo authored
737 dnl to be supported, but isn't currently (updates to the RTS, compiler
48d306a [project @ 2003-07-31 23:16:13 by sof]
sof authored
738 dnl and build system would be required to bring it back again.)
739 dnl Hence, exposing it as an option is false advertisement, so better
740 dnl disable it to avoid confusion (but leave it commented-out rather
ede4c6f igfoo No functionality changes
igfoo authored
741 dnl than removed in order to remind ourselves to bring back the
48d306a [project @ 2003-07-31 23:16:13 by sof]
sof authored
742 dnl feature at some stage.) ]
743 dnl
744 dnl AC_ARG_ENABLE(win32-dlls,
745 dnl [ --enable-win32-dlls
746 dnl If on a Win32 platform running mingw32/cygwin, enable the
ede4c6f igfoo No functionality changes
igfoo authored
747 dnl construction of DLLs containing ghc-compiled code.
48d306a [project @ 2003-07-31 23:16:13 by sof]
sof authored
748 dnl ],
749 dnl [
750 dnl case $HostOS_CPP in
751 dnl cygwin32) ;;
752 dnl mingw32) ;;
753 dnl *) echo "Unrecognised win32 platform: $HostPlatform"
754 dnl exit 1
755 dnl ;;
756 dnl esac
757 dnl EnableWin32DLLs=YES
758 dnl ],
759 dnl [EnableWin32DLLs=NO]
760 dnl )
761 dnl AC_SUBST(EnableWin32DLLs)
762 dnl if test x"$EnableWin32DLLs" = "xYES" ; then
763 dnl AC_DEFINE(HAVE_WIN32_DLL_SUPPORT)
764 dnl fi
88ffee6 [project @ 1999-05-04 08:35:12 by sof]
sof authored
765
c952d3e [project @ 2002-07-23 22:42:17 by krasimir]
krasimir authored
766 dnl ** Enable the building of the ObjectIO?
767 dnl --------------------------------------------------------------
768 AC_ARG_ENABLE(objectio,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
769 [AC_HELP_STRING([--enable-objectio],
770 [Build ObjectIO, a portable GUI library for Haskell. [default=no]])],
771 [ if test x"$enableval" = x"yes"; then
ede4c6f igfoo No functionality changes
igfoo authored
772 GhcLibsWithObjectIO=YES
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
773 else
ede4c6f igfoo No functionality changes
igfoo authored
774 GhcLibsWithObjectIO=NO
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
775 fi
c952d3e [project @ 2002-07-23 22:42:17 by krasimir]
krasimir authored
776 ],
777 [GhcLibsWithObjectIO=NO]
778 )
779 AC_SUBST(GhcLibsWithObjectIO)
780
a7d8f43 [project @ 2003-05-29 14:39:26 by sof]
sof authored
781 dnl ** .NET interop support?
782 dnl --------------------------------------------------------------
783 AC_ARG_ENABLE(dotnet,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
784 [AC_HELP_STRING([--enable-dotnet],
785 [Build .NET interop layer. [default=no]])],
786 [ if test x"$enableval" = x"yes"; then
ede4c6f igfoo No functionality changes
igfoo authored
787 DotnetSupport=YES; AC_DEFINE([WANT_DOTNET_SUPPORT], [1], [Define to 1 if you want to include .NET interop support.])
788 else
789 DotnetSupport=NO
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
790 fi],
a7d8f43 [project @ 2003-05-29 14:39:26 by sof]
sof authored
791 [DotnetSupport=NO]
792 )
793 AC_SUBST(DotnetSupport)
794
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
795 dnl --------------------------------------------------------------
796 dnl End of configure script option section
797 dnl --------------------------------------------------------------
798
799
800 dnl --------------------------------------------------------------
801 dnl * General configuration checks
802 dnl --------------------------------------------------------------
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
803
7ca6e18 [project @ 2003-11-15 19:37:13 by panne]
panne authored
804 dnl ** Can the unix package be built?
805 dnl --------------------------------------------------------------
806
807 if test x"$TargetPlatform" = x"i386-unknown-mingw32"; then
808 GhcLibsWithUnix=NO
809 else
810 GhcLibsWithUnix=YES
811 fi
812 AC_SUBST([GhcLibsWithUnix])
813
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
814 dnl ** does #! work?
815 AC_SYS_INTERPRETER()
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
816
dfc021e [project @ 2000-05-09 10:43:45 by rrt]
rrt authored
817 dnl ** look for `perl', but only in /bin on Windows
818 case $HostOS_CPP in
819 cygwin32|mingw32)
13c670c [project @ 2001-05-27 23:53:47 by sof]
sof authored
820 AC_CHECK_PROG(PerlCmd,perl,/bin/perl,,/bin)
821 if test -z "$PerlCmd"; then
822 echo "You must install the version of Perl shipped with GHC"
823 echo "(or a compatible one) in /bin."
824 exit 1
825 fi
dfc021e [project @ 2000-05-09 10:43:45 by rrt]
rrt authored
826 ;;
827 *)
828 AC_PATH_PROG(PerlCmd,perl)
829 if test -z "$PerlCmd"; then
830 echo "You must install perl before you can continue"
831 echo "Perhaps it is already installed, but not in your PATH?"
832 exit 1
833 else
834 FPTOOLS_CHECK_PERL_VERSION
835 fi
836 ;;
837 esac
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
838
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
839 dnl ** does #! path/to/perl work? (sometimes it's too long...)
90825aa [project @ 1998-07-24 10:42:33 by sof]
sof authored
840 FPTOOLS_SHEBANG_PERL
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
841
c6cda1d [project @ 2002-07-31 14:11:13 by simonmar]
simonmar authored
842 dnl ** check for Python
843 AC_PATH_PROG(PythonCmd,python)
844
6338b45 [project @ 2001-06-28 17:56:10 by rrt]
rrt authored
845 dnl ** look for GCC and find out which version
846 dnl Figure out which C compiler to use. Gcc is preferred.
847 dnl If gcc, make sure it's at least 2.1
848 dnl
f30908b [project @ 2004-11-20 16:02:41 by panne]
panne authored
849 FP_HAVE_GCC
c69886a [project @ 2004-12-16 10:36:57 by simonmar]
simonmar authored
850 FP_MINGW_GCC
0065d5a Reorganisation of the source tree
Simon Marlow authored
851 FP_GCC_NEEDS_NO_OMIT_LFPTR
862106e only pass -fno-unit-at-a-time to gcc if it is supported
Simon Marlow authored
852 FP_GCC_HAS_NO_UNIT_AT_A_TIME
6338b45 [project @ 2001-06-28 17:56:10 by rrt]
rrt authored
853
854 dnl ** figure out how to invoke cpp directly (gcc -E is no good)
855 AC_PROG_CPP
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
856
bf448f4 [project @ 2002-04-01 15:32:46 by panne]
panne authored
857 dnl ** Without optimization some INLINE trickery fails for GHCi
858 SRC_CC_OPTS="-O"
859
007ad2b [project @ 2003-08-20 07:07:59 by panne]
panne authored
860 dnl ** Try to add -mno-cygwin to the C compiler options
861 FP_CHECK_FLAG([-mno-cygwin], [
862 SRC_CC_OPTS="-mno-cygwin $SRC_CC_OPTS"
863 CPPFLAGS="-mno-cygwin $CPPFLAGS"])
bf448f4 [project @ 2002-04-01 15:32:46 by panne]
panne authored
864 AC_SUBST(SRC_CC_OPTS)
8b85c1c [project @ 2001-06-28 18:05:48 by rrt]
rrt authored
865
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
866 dnl ** figure out how to do context diffs
6a0b7a2 [project @ 2003-08-19 09:23:08 by panne]
panne authored
867 FP_PROG_CONTEXT_DIFF
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
868
8e0fe80 [project @ 2000-04-04 15:14:18 by rrt]
rrt authored
869 dnl ** Find find command (for Win32's benefit)
f5d11ad [project @ 2003-11-01 20:05:57 by panne]
panne authored
870 FP_PROG_FIND
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
871
7076820 [project @ 2005-03-01 19:16:14 by sof]
sof authored
872 dnl ** Find sort command (for the benefit of Win32 environs)
873 FP_PROG_SORT
874
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
875 dnl ** figure out how to do a BSD-ish install
876 AC_PROG_INSTALL
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
877
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
878 dnl If you can run configure, you certainly have /bin/sh
6b4abad [project @ 2003-08-19 14:22:14 by panne]
panne authored
879 AC_DEFINE([HAVE_BIN_SH], [1], [Define to 1 if you have /bin/sh.])
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
880
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
881 dnl ** how to invoke `ar' and `ranlib'
444a39a [project @ 2004-04-07 12:17:09 by panne]
panne authored
882 FP_PROG_AR_NEEDS_RANLIB
883 FP_PROG_AR_SUPPORTS_INPUT
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
884
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
885 dnl ** Check to see whether ln -s works
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
886 AC_PROG_LN_S
887
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
888
889 dnl ** Find the path to sed
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
890 AC_PATH_PROG(SedCmd,sed)
891
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
892
893 dnl ** check for time command
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
894 AC_PATH_PROG(TimeCmd,time)
895
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
896 dnl ** check for tar
897 dnl if GNU tar is named gtar, look for it first.
1fb1ab5 [project @ 1997-03-14 07:52:06 by simonpj]
simonpj authored
898 AC_PATH_PROGS(TarCmd,gtar tar,tar)
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
899
53386c3 [project @ 2004-08-15 20:28:02 by panne]
panne authored
900 dnl ** check for DocBook toolchain
901 FP_CHECK_DOCBOOK_DTD
b53005a [project @ 2005-03-03 21:03:06 by wolfgang]
wolfgang authored
902 FP_DIR_DOCBOOK_XSL([/usr/share/xml/docbook/stylesheet/nwalsh/current /usr/share/xml/docbook/stylesheet/nwalsh /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])
53386c3 [project @ 2004-08-15 20:28:02 by panne]
panne authored
903 FP_PROG_FO_PROCESSOR
904
a08aa16 [project @ 2003-05-17 14:49:45 by reid]
reid authored
905 dnl ** check for ghc-pkg command
7363193 [project @ 2004-08-28 16:20:35 by panne]
panne authored
906 FP_PROG_GHC_PKG
a08aa16 [project @ 2003-05-17 14:49:45 by reid]
reid authored
907
908 AC_ARG_WITH(greencard,
18abe9c [project @ 2003-12-18 10:46:49 by simonmar]
simonmar authored
909 [AC_HELP_STRING([--with-greencard=ARG],
910 [Use ARG as the path to greencard [default=autodetct]])],
a08aa16 [project @ 2003-05-17 14:49:45 by reid]
reid authored
911 [
cab3c5c [project @ 2003-08-27 15:18:29 by panne]
panne authored
912 GreenCardCmd=$withval;
a08aa16 [project @ 2003-05-17 14:49:45 by reid]
reid authored
913 FPTOOLS_GREENCARD(3.00)
914 ]
915 )
916
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
917 dnl ** check for installed happy binary + version
15d621f [project @ 1998-04-16 12:14:13 by sof]
sof authored
918 dnl (don't do it if we're booting from .hc files though.)
827b7c9 [project @ 2001-03-20 14:51:47 by simonmar]
simonmar authored
919 if test "$BootingFromHc" = "NO"; then
90825aa [project @ 1998-07-24 10:42:33 by sof]
sof authored
920 FPTOOLS_HAPPY
15d621f [project @ 1998-04-16 12:14:13 by sof]
sof authored
921 fi;
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
922
581517f [project @ 2002-07-23 10:09:51 by simonmar]
simonmar authored
923 dnl ** check for installed haddock
924 FPTOOLS_HADDOCK
925
e2314d3 [project @ 2003-08-13 12:34:04 by simonmar]
simonmar authored
926 dnl ** check for installed alex binary + version
927 dnl (don't do it if we're booting from .hc files though.)
928 if test "$BootingFromHc" = "NO"; then
929 FPTOOLS_ALEX
930 fi;
931
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
932 dnl --------------------------------------------------
933 dnl ### program checking section ends here ###
934 dnl --------------------------------------------------
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
935
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
936 dnl --------------------------------------------------
937 dnl * Platform header file and syscall feature tests
938 dnl ### checking the state of the local header files and syscalls ###
b035961 [project @ 1997-09-03 23:53:03 by sof]
sof authored
939
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
940 dnl ** check for full ANSI header (.h) files
941 AC_HEADER_STDC
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
942
cd580b8 [project @ 2003-05-27 14:02:04 by simonmar]
simonmar authored
943 dnl ** Enable large file support. NB. do this before testing the type of
944 dnl off_t, because it will affect the result of that test.
945 AC_SYS_LARGEFILE
946
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
947 dnl ** check for specific header (.h) files that we are interested in
cc8f20a [project @ 2004-09-02 15:18:04 by ross]
ross authored
948 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])
70331ad [project @ 2000-04-21 18:05:19 by panne]
panne authored
949
0aa75e6 [project @ 2004-08-30 18:31:34 by panne]
panne authored
950 AC_CHECK_HEADER([readline/readline.h], [HaveReadlineReadlineH=YES], [HaveReadlineReadlineH=NO])
951 AC_CHECK_HEADER([readline/history.h], [HaveReadlineHistoryH=YES], [HaveReadlineHistoryH=NO])
70331ad [project @ 2000-04-21 18:05:19 by panne]
panne authored
952
953 if test $HaveReadlineReadlineH = YES && test $HaveReadlineHistoryH = YES ; then
b9267a7 [project @ 2003-11-15 19:15:16 by panne]
panne authored
954 GhcLibsWithReadline=YES
6b4abad [project @ 2003-08-19 14:22:14 by panne]
panne authored
955 AC_DEFINE([HAVE_READLINE_HEADERS], [1], [Define to 1 if readline/readline.h and readline/history.h exist.])
70331ad [project @ 2000-04-21 18:05:19 by panne]
panne authored
956 else
b9267a7 [project @ 2003-11-15 19:15:16 by panne]
panne authored
957 GhcLibsWithReadline=NO
6b4abad [project @ 2003-08-19 14:22:14 by panne]
panne authored
958 AC_DEFINE([HAVE_READLINE_HEADERS], [0], [Define to 1 if readline/readline.h and readline/history.h exist.])
70331ad [project @ 2000-04-21 18:05:19 by panne]
panne authored
959 fi
b9267a7 [project @ 2003-11-15 19:15:16 by panne]
panne authored
960 AC_SUBST(GhcLibsWithReadline)
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
961
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
962 dnl ** check if it is safe to include both <time.h> and <sys/time.h>
963 AC_HEADER_TIME
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
964
4baf158 [project @ 1997-06-05 23:55:16 by sof]
sof authored
965 dnl ** how do we get a timezone name, and UTC offset ?
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
966 AC_STRUCT_TIMEZONE
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
967
08c5cc0 [project @ 1998-03-03 19:04:47 by reid]
reid authored
968 dnl ** do we have altzone?
0d9152a [project @ 2003-08-19 09:25:34 by panne]
panne authored
969 FP_DECL_ALTZONE
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
970
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
971 dnl ** do we have long longs?
66d0cd0 [project @ 2003-08-18 15:53:51 by panne]
panne authored
972 AC_CHECK_TYPES([long long])
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
973
08c5cc0 [project @ 1998-03-03 19:04:47 by reid]
reid authored
974 dnl ** what are the sizes of various types
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
975 AC_CHECK_SIZEOF(char, 1)
39adb26 [project @ 2000-01-26 10:44:07 by panne]
panne authored
976 AC_CHECK_SIZEOF(double, 8)
977 AC_CHECK_SIZEOF(float, 4)
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
978 AC_CHECK_SIZEOF(int, 4)
979 AC_CHECK_SIZEOF(long, 4)
ac30425 [project @ 2003-08-18 16:29:36 by panne]
panne authored
980 if test "$ac_cv_type_long_long" = yes; then
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
981 AC_CHECK_SIZEOF(long long, 8)
39adb26 [project @ 2000-01-26 10:44:07 by panne]
panne authored
982 fi
983 AC_CHECK_SIZEOF(short, 2)
984 AC_CHECK_SIZEOF(unsigned char, 1)
985 AC_CHECK_SIZEOF(unsigned int, 4)
986 AC_CHECK_SIZEOF(unsigned long, 4)
ac30425 [project @ 2003-08-18 16:29:36 by panne]
panne authored
987 if test "$ac_cv_type_long_long" = yes; then
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
988 AC_CHECK_SIZEOF(unsigned long long, 8)
989 fi
39adb26 [project @ 2000-01-26 10:44:07 by panne]
panne authored
990 AC_CHECK_SIZEOF(unsigned short, 2)
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
991 AC_CHECK_SIZEOF(void *, 4)
08c5cc0 [project @ 1998-03-03 19:04:47 by reid]
reid authored
992
993 dnl ** what are alignment constraints on various types
ac30425 [project @ 2003-08-18 16:29:36 by panne]
panne authored
994 FP_CHECK_ALIGNMENT(char)
995 FP_CHECK_ALIGNMENT(double)
996 FP_CHECK_ALIGNMENT(float)
997 FP_CHECK_ALIGNMENT(int)
998 FP_CHECK_ALIGNMENT(long)
999 if test "$ac_cv_type_long_long" = yes; then
1000 FP_CHECK_ALIGNMENT(long long)
39adb26 [project @ 2000-01-26 10:44:07 by panne]
panne authored
1001 fi
ac30425 [project @ 2003-08-18 16:29:36 by panne]
panne authored
1002 FP_CHECK_ALIGNMENT(short)
1003 FP_CHECK_ALIGNMENT(unsigned char)
1004 FP_CHECK_ALIGNMENT(unsigned int)
1005 FP_CHECK_ALIGNMENT(unsigned long)
1006 if test "$ac_cv_type_long_long" = yes; then
1007 FP_CHECK_ALIGNMENT(unsigned long long)
e648dc2 [project @ 2000-01-25 14:34:07 by panne]
panne authored
1008 fi
ac30425 [project @ 2003-08-18 16:29:36 by panne]
panne authored
1009 FP_CHECK_ALIGNMENT(unsigned short)
1010 FP_CHECK_ALIGNMENT(void *)
08c5cc0 [project @ 1998-03-03 19:04:47 by reid]
reid authored
1011
37fe797 [project @ 2004-01-06 17:20:51 by panne]
panne authored
1012 FP_CHECK_FUNC([WinExec],
1013 [@%:@include <windows.h>], [WinExec("",0)])
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1014
37fe797 [project @ 2004-01-06 17:20:51 by panne]
panne authored
1015 FP_CHECK_FUNC([GetModuleFileName],
1016 [@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)])
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1017
1018 dnl ** check return type of signal handlers
1019 dnl Foo: assumes we can use prototypes.
1020 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
1021 dnl AC_CACHE_CHECK([type of signal handlers], ac_cv_type_signal_handler,
907d2e9 [project @ 2004-09-22 08:36:58 by panne]
panne authored
1022 dnl [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1023 dnl #include <signal.h>
1024 dnl #ifdef signal
1025 dnl #undef signal
1026 dnl #endif
1027 dnl void (*signal (int, void (*)(int)))(int);
907d2e9 [project @ 2004-09-22 08:36:58 by panne]
panne authored
1028 dnl ]],
1029 dnl [[int i;]])],
1030 dnl [ac_cv_type_signal_handler=void_int],
1031 dnl [ac_cv_type_signal_handler=int_void])])
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1032 dnl if test "$ac_cv_type_signal_handler" = void_int; then
1033 dnl AC_DEFINE(VOID_INT_SIGNALS)
1034 dnl fi
1035
1036 dnl On BCC, signal handlers have type "int(void)", elsewhere its "void(int)".
1037 AC_TYPE_SIGNAL
1038 if test "$ac_cv_type_signal" = void; then
6b4abad [project @ 2003-08-19 14:22:14 by panne]
panne authored
1039 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).])
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1040 fi
1041
1042 dnl ** check for more functions
16ccba3 [project @ 2004-11-18 16:39:53 by stolz]
stolz authored
1043 dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too.
2673ec6 [project @ 2006-01-12 12:40:01 by simonmar]
simonmar authored
1044 AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r])
16ccba3 [project @ 2004-11-18 16:39:53 by stolz]
stolz authored
1045 dnl ** For ghc/rts/gmp:
1046 AC_CHECK_FUNCS([getpagesize])
95d0867 [project @ 2003-05-21 16:02:42 by stolz]
stolz authored
1047
51afadd [project @ 2000-09-05 09:04:59 by simonmar]
simonmar authored
1048 dnl ** check whether this machine has gmp3 installed
4e477c5 [project @ 2000-08-21 15:28:30 by simonmar]
simonmar authored
1049 AC_CHECK_LIB(gmp, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp,
1050 AC_CHECK_LIB(gmp3, __gmpz_fdiv_qr, HaveLibGmp=YES; LibGmp=gmp3,
de67a09 [project @ 2002-05-14 08:09:07 by matthewc]
matthewc authored
1051 HaveLibGmp=NO; LibGmp=not-installed))
81464dc [project @ 1998-03-17 15:38:37 by simonm]
simonm authored
1052 AC_SUBST(HaveLibGmp)
c650f28 [project @ 1998-08-10 14:19:23 by simonm]
simonm authored
1053 AC_SUBST(LibGmp)
81464dc [project @ 1998-03-17 15:38:37 by simonm]
simonm authored
1054
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored
1055 dnl ** (Mac OS X only: check for GMP.framework)
1056 HaveFrameworkGMP=NO
bfd03f0 Check for GMP.framework on all Darwin platforms, not just PPC
wolfgang.thaller@gmx.net authored
1057 case $HostPlatform in
1058 *-apple-darwin)
1059 AC_MSG_CHECKING([for GMP.framework])
1060 save_libs="$LIBS"
1061 LIBS="-framework GMP"
1062 AC_TRY_LINK_FUNC(__gmpz_fdiv_qr, HaveFrameworkGMP=YES,)
1063 if test $HaveFrameworkGMP = YES; then
1064 AC_DEFINE([HAVE_FRAMEWORK_GMP], [1], [Define to 1 if GMP.framework is installed (Mac OS X only).])
1065 fi;
1066 LIBS="$save_libs"
1067 AC_MSG_RESULT([$HaveFrameworkGMP])
1068 ;;
1069 esac
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored
1070 AC_SUBST(HaveFrameworkGMP)
3144260 [project @ 2002-10-12 23:12:08 by wolfgang]
wolfgang authored
1071
7ca3bb7 [project @ 2002-06-25 15:49:58 by mthomas]
mthomas authored
1072 dnl ** check for mingwex library
1073 AC_CHECK_LIB(mingwex, closedir, HaveLibMingwEx=YES, HaveLibMingwEx=NO)
1074 AC_SUBST(HaveLibMingwEx)
1075
1076 if test $HaveLibMingwEx = YES ; then
6b4abad [project @ 2003-08-19 14:22:14 by panne]
panne authored
1077 AC_DEFINE([HAVE_MINGWEX], [1], [Define to 1 if you have the mingwex library.])
7ca3bb7 [project @ 2002-06-25 15:49:58 by mthomas]
mthomas authored
1078 fi
1079
de67a09 [project @ 2002-05-14 08:09:07 by matthewc]
matthewc authored
1080 if test "$HaveLibGmp" = "NO"; then
7ff3d6a [project @ 2003-11-04 00:38:34 by dons]
dons authored
1081 if test "$HostArch_CPP" = "ia64" -o "$HostArch_CPP" = "mipseb" ; then
1082 AC_MSG_ERROR([You need to install libgmp (the in-tree version does not work on IA64 or mips64).])
de67a09 [project @ 2002-05-14 08:09:07 by matthewc]
matthewc authored
1083 fi;
1084 fi;
1085
3e6520c [project @ 1998-05-19 19:34:09 by reid]
reid authored
1086 dnl ** check whether this machine has BFD and liberty installed (used for debugging)
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
1087 dnl the order of these tests matters: bfd needs liberty
3e6520c [project @ 1998-05-19 19:34:09 by reid]
reid authored
1088 AC_CHECK_LIB(iberty, xmalloc)
1089 AC_CHECK_LIB(bfd, bfd_init)
7d49387 [project @ 1998-05-19 19:00:22 by reid]
reid authored
1090
51e17ea [project @ 2001-02-17 19:52:56 by sebc]
sebc authored
1091 dnl ** check for math library
f1000ee [project @ 2005-03-04 18:26:46 by sof]
sof authored
1092 AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
1093 if test x"$fp_libm_not_needed" = xdunno; then
1094 AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=])
1095 fi
b38fc90 [project @ 2003-12-06 18:24:05 by panne]
panne authored
1096 AC_SUBST([LIBM])
51e17ea [project @ 2001-02-17 19:52:56 by sebc]
sebc authored
1097
1e19a38 [project @ 1998-11-17 01:24:58 by reid]
reid authored
1098 dnl ################################################################
1099 dnl Check for libraries
1100 dnl ################################################################
1101
0e89dd4 [project @ 2005-09-20 16:35:26 by ross]
ross authored
1102 dnl ** check whether we need -ldl to get dlopen()
16fc5c3 [project @ 2002-03-26 16:36:09 by stolz]
stolz authored
1103
ede4c6f igfoo No functionality changes
igfoo authored
1104 AC_CHECK_LIB(dl, dlopen,
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored
1105 [HaveLibDL=YES
1106 AC_DEFINE([HAVE_LIBDL], [1], [Define to 1 if you need -ldl to get dlopen().])
ede4c6f igfoo No functionality changes
igfoo authored
1107 LIBS="$LIBS -ldl"],
f97dcf9 [project @ 2005-03-08 04:45:29 by wolfgang]
wolfgang authored
1108 [HaveLibDL=NO])
1109 AC_SUBST(HaveLibDL)
1110
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
1111 dnl --------------------------------------------------
1112 dnl * Miscellaneous feature tests
1113 dnl --------------------------------------------------
1114
cfce9df [project @ 1997-08-28 21:15:14 by sof]
sof authored
1115 dnl ** can we get alloca?
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
1116 AC_FUNC_ALLOCA
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
1117
e34efb9 [project @ 2003-07-02 13:57:10 by stolz]
stolz authored
1118 dnl ** Working vfork?
ced47f7 [project @ 2004-09-18 12:49:55 by panne]
panne authored
1119 AC_FUNC_FORK
e34efb9 [project @ 2003-07-02 13:57:10 by stolz]
stolz authored
1120
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
1121 dnl ** determine whether or not const works
1122 AC_C_CONST
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
1123
81464dc [project @ 1998-03-17 15:38:37 by simonm]
simonm authored
1124 dnl ** are we big endian?
1125 AC_C_BIGENDIAN
b15fe26 [project @ 1998-08-19 11:23:59 by sof]
sof authored
1126
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
1127 dnl ** check for leading underscores in symbol names
aca2e34 [project @ 2004-08-30 19:28:46 by panne]
panne authored
1128 FP_LEADING_UNDERSCORE
e7d21ee [project @ 1996-01-08 20:28:12 by partain]
partain authored
1129
7a8bd24 [project @ 2005-01-10 19:01:27 by panne]
panne authored
1130 dnl ** check for ld, whether it has an -x option, and if it is GNU ld
1131 FP_PROG_LD_X
1132 FP_PROG_LD_IS_GNU
d2f7d10 [project @ 2001-06-26 23:12:19 by sof]
sof authored
1133
6f985ae [project @ 2005-01-23 06:10:15 by wolfgang]
wolfgang authored
1134 dnl ** check for Apple-style dead-stripping support
1135 dnl (.subsections-via-symbols assembler directive)
1136
1137
1138 AC_MSG_CHECKING(for .subsections_via_symbols)
1139 AC_TRY_COMPILE(,[__asm__ (".subsections_via_symbols");],
1140 [
1141 AC_MSG_RESULT(yes)
1142 AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
1143 [Define to 1 if Apple-style dead-stripping is supported.])
1144 ],
1145 [
f1000ee [project @ 2005-03-04 18:26:46 by sof]
sof authored
1146 AC_MSG_RESULT(no)
6f985ae [project @ 2005-01-23 06:10:15 by wolfgang]
wolfgang authored
1147 AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[0],
1148 [Define to 1 if Apple-style dead-stripping is supported.])
1149 ])
1150
c4597df Duncan Coutts Support the GNU non-exec stack annotation system
dcoutts authored
1151 dnl *** check for GNU non-executable stack note support (ELF only)
1152 dnl (.section .note.GNU-stack,"",@progbits)
1153
1154 AC_MSG_CHECKING(for GNU non-executable stack support)
1155 AC_COMPILE_IFELSE(
1156 [AC_LANG_PROGRAM([__asm__ (".section .note.GNU-stack,\"\",@progbits");], [0])],
1157 [AC_MSG_RESULT(yes)
1158 AC_DEFINE([HAVE_GNU_NONEXEC_STACK],[1],
1159 [Define to 1 if GNU non-executable stack notes are supported.])
1160 ],
1161 [AC_MSG_RESULT(no)])
1162
35a09de [project @ 2005-11-03 11:00:40 by simonmar]
simonmar authored
1163 dnl ** check for librt
1164 AC_CHECK_LIB(rt, clock_gettime)
1165 AC_CHECK_FUNCS(clock_gettime)
1166
de6f23d [project @ 2005-07-15 02:00:15 by wolfgang]
wolfgang authored
1167 dnl ** check for Apple's "interesting" long double compatibility scheme
1168 AC_MSG_CHECKING(for printf$LDBLStub)
1169 AC_TRY_LINK_FUNC(printf$LSBLStub,
1170 [
1171 AC_MSG_RESULT(yes)
1172 AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[1],
1173 [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
1174 ],
1175 [
1176 AC_MSG_RESULT(no)
1177 AC_DEFINE([HAVE_PRINTF_LDBLSTUB],[0],
1178 [Define to 1 if we have printf$LDBLStub (Apple Mac OS >= 10.4, PPC).])
1179 ])
1180
0065d5a Reorganisation of the source tree
Simon Marlow authored
1181 # test for GTK+
1182 AC_PATH_PROGS([GTK_CONFIG], [pkg-config])
1183 if test -n "$GTK_CONFIG"; then
1184 if $GTK_CONFIG gtk+-2.0 --atleast-version=2.0; then
1185 GTK_CONFIG="$GTK_CONFIG gtk+-2.0"
1186 else
1187 AC_MSG_WARN([GTK+ not usable, need at least version 2.0])
1188 GTK_CONFIG=
1189 fi
1190 fi
1191 AC_SUBST([GTK_CONFIG])
de6f23d [project @ 2005-07-15 02:00:15 by wolfgang]
wolfgang authored
1192
0065d5a Reorganisation of the source tree
Simon Marlow authored
1193 AC_CONFIG_FILES([mk/config.mk ghc.spec docs/users_guide/ug-book.xml])
ced47f7 [project @ 2004-09-18 12:49:55 by panne]
panne authored
1194 AC_CONFIG_COMMANDS([mk/stamp-h],[echo timestamp > mk/stamp-h])
1195 AC_OUTPUT
Something went wrong with that request. Please try again.