[project @ 1996-01-18 16:33:17 by partain]
[ghc-hetmet.git] / ghc / mkworld / site-ghc.jm.in
1 /*
2     @configure_input@
3
4     TargetPlatform.
5     BuildPlatform, HostPlatform are in general site file
6     (e.g. <top>/mkworld/site.jm[.in])
7  */
8 #ifndef TargetPlatform
9 /* use Host* because of 99-cmd-limit brain-dead seds */
10 #define TargetPlatform @HostPlatform@
11 #endif
12
13 /* --------------- "standard" Haskell compiler --------------------------- */
14
15 #define WithHc @WithHc@
16 #define WithHcType @WithHcType@
17
18 #define WithGhcHc @WithGhcHc@
19 #define WithGhcHcType @WithGhcHcType@
20
21 #if ! (defined(HaskellCompilerCmd) && defined(HaskellCompilerType))
22 # if WithGhcHcType != HC_UNSPECIFIED
23 #  define HaskellCompilerCmd  WithGhcHc
24 #  define HaskellCompilerType WithGhcHcType
25 # else
26 #  if WithHcType != HC_UNSPECIFIED
27 #   define HaskellCompilerCmd  WithHc
28 #   define HaskellCompilerType WithHcType
29 #  else                           
30 #   define HaskellCompilerCmd  haskell-compiler-not-specified
31 #   define HaskellCompilerType HC_UNSPECIFIED
32 #  endif
33 # endif
34 #endif
35
36 /* ----------------------------------------------------------------------- */
37
38 /* Info for booting the Haskell compiler proper (written in Haskell):
39
40    If you're going to use a Haskell compiler for booting:
41     hbc -- set GhcWithHscBuiltViaC to NO
42     ghc -- ditto; and set WhatGhcForBootingIsCalled
43     [well, maybe...]
44
45    If you're going to boot from distributed .hc files (the *default*),
46    you needn't set anything here.
47 */
48 #ifndef GhcWithHscBuiltViaC
49 #define GhcWithHscBuiltViaC @GhcWithHscBuiltViaC@
50 #endif
51 #ifndef GhcWithHscOptimised
52 #define GhcWithHscOptimised @GhcWithHscOptimised@
53 #endif
54 #ifndef GhcWithHscDebug
55 #define GhcWithHscDebug @GhcWithHscDebug@
56 #endif
57 #ifndef GhcBuilderVersion
58 #define GhcBuilderVersion @GhcBuilderVersion@
59 #endif
60 #ifndef GhcWithRegisterised
61 #define GhcWithRegisterised @GhcWithRegisterised@
62 #endif
63 #ifndef GhcWithNativeCodeGen
64 #define GhcWithNativeCodeGen @GhcWithNativeCodeGen@
65 #endif
66 GHC_WITH_NATIVE_CODEGEN=GhcWithNativeCodeGen
67
68 #ifndef BuildGHCI
69 #define BuildGHCI @BuildGHCI@
70 #endif
71 #ifndef GhcWithDeforester
72 #define GhcWithDeforester @GhcWithDeforester@
73 #endif
74 #ifndef GhcWithReadline
75 #define GhcWithReadline @GhcWithReadline@
76 #endif
77 #ifndef GhcWithSockets
78 #define GhcWithSockets @GhcWithSockets@
79 #endif
80
81 /* ================================================================
82    BUILDS stuff: main sequential ones
83 */
84
85 #define GhcBuild_normal @GhcBuild_normal@ /* profiled sequential */
86 #if GhcBuild_normal == YES
87 # define IfGhcBuild_normal(x) x
88 GHC_BUILD_FLAG_normal = -build-normal-defined
89 #else
90 # define IfGhcBuild_normal(x) /**/
91 GHC_BUILD_FLAG_normal = -build-normal-not-defined
92 #endif
93
94 #define GhcBuild_p @GhcBuild_p@         /* profiled sequential */
95 #if GhcBuild_p == YES
96 # define IfGhcBuild_p(x) x
97 GHC_BUILD_FLAG_p = -build-p-defined
98 #else
99 # define IfGhcBuild_p(x) /**/
100 GHC_BUILD_FLAG_p = -build-p-not-defined
101 #endif
102
103 #define GhcBuild_t @GhcBuild_t@         /* ticky-ticky "profiling" */
104 #if GhcBuild_t == YES   
105 # define IfGhcBuild_t(x) x
106 GHC_BUILD_FLAG_t = -build-t-defined
107 #else
108 # define IfGhcBuild_t(x) /**/
109 GHC_BUILD_FLAG_t = -build-t-not-defined
110 #endif
111
112 #define GhcBuild_u @GhcBuild_u@         /* unregisterized (most basic boot) */
113 #if GhcBuild_u == YES   
114 # define IfGhcBuild_u(x) x
115 GHC_BUILD_FLAG_u = -build-u-defined
116 #else
117 # define IfGhcBuild_u(x) /**/
118 GHC_BUILD_FLAG_u = -build-u-not-defined
119 #endif
120
121 /* === builds: concurrent and parallel ============================ */
122
123 #define GhcBuild_mc @GhcBuild_mc@       /* concurrent */
124 #if GhcBuild_mc == YES
125 # define IfGhcBuild_mc(x) x
126 GHC_BUILD_FLAG_mc = -build-mc-defined
127 #else
128 # define IfGhcBuild_mc(x) /**/
129 GHC_BUILD_FLAG_mc = -build-mc-not-defined
130 #endif
131
132 #define GhcBuild_mr @GhcBuild_mr@       /* profiled concurrent */
133 #if GhcBuild_mr == YES
134 # define IfGhcBuild_mr(x) x
135 GHC_BUILD_FLAG_mr = -build-mr-defined
136 #else
137 # define IfGhcBuild_mr(x) /**/
138 GHC_BUILD_FLAG_mr = -build-mr-not-defined
139 #endif
140
141 #define GhcBuild_mt @GhcBuild_mt@       /* ticky concurrent */
142 #if GhcBuild_mt == YES
143 # define IfGhcBuild_mt(x) x
144 GHC_BUILD_FLAG_mt = -build-mt-defined
145 #else
146 # define IfGhcBuild_mt(x) /**/
147 GHC_BUILD_FLAG_mt = -build-mt-not-defined
148 #endif
149
150 #define GhcBuild_mp @GhcBuild_mp@       /* parallel (GUM, PVM-based) */
151 #if GhcBuild_mp == YES
152 # define IfGhcBuild_mp(x) x
153 GHC_BUILD_FLAG_mp = -build-mp-defined
154 #else
155 # define IfGhcBuild_mp(x) /**/
156 GHC_BUILD_FLAG_mp = -build-mp-not-defined
157 #endif
158
159 #define GhcBuild_mg @GhcBuild_mg@       /* GranSim */
160 #if GhcBuild_mg == YES
161 # define IfGhcBuild_mg(x) x
162 GHC_BUILD_FLAG_mg = -build-mg-defined
163 #else
164 # define IfGhcBuild_mg(x) /**/
165 GHC_BUILD_FLAG_mg = -build-mg-not-defined
166 #endif
167
168 /* === builds: non-std garbage collectors ==========================
169    These use the same mechanism as user ways
170    but do not have any "fed back" options.
171 */
172
173 #define GhcBuild_2s @GhcBuild_2s@       /* sequential -- 2-space collector */
174 #if GhcBuild_2s == YES
175 # define IfGhcBuild_2s(x) x
176 GHC_BUILD_FLAG_2s = -gc-2s
177 #else
178 # define IfGhcBuild_2s(x) /**/
179 GHC_BUILD_FLAG_2s = -build-2s-not-defined
180 #endif
181
182 #define GhcBuild_1s @GhcBuild_1s@       /* sequential -- 1-space collector */
183 #if GhcBuild_1s == YES
184 # define IfGhcBuild_1s(x) x
185 GHC_BUILD_FLAG_1s = -gc-1s
186 #else
187 # define IfGhcBuild_1s(x) /**/
188 GHC_BUILD_FLAG_1s = -build-1s-not-defined
189 #endif
190
191 #define GhcBuild_du @GhcBuild_du@       /* sequential -- dual-mode collector */
192 #if GhcBuild_du == YES
193 # define IfGhcBuild_du(x) x
194 GHC_BUILD_FLAG_du = -gc-du
195 #else
196 # define IfGhcBuild_du(x) /**/
197 GHC_BUILD_FLAG_du = -build-du-not-defined
198 #endif
199
200 /* === builds: "user ways" ======================================= */
201
202 /* these had to be de-configure-ified because of 99-cmd-limit brain-dead seds */
203
204 /* stuff for "update" paper; also use --enable-ticky */
205
206 #define GhcBuild_a YES /*@GhcBuild_a@*/         /* "user way" a */
207 #if GhcBuild_a == YES   
208 # define IfGhcBuild_a(x) x
209 GHC_BUILD_FLAG_a = -SA-noUpdA
210 GHC_BUILD_OPTS_a = -fticky-ticky -optcO-DTICKY_TICKY -debug \
211                       -Ofile /local/grasp/partain-other/performance/update/Ofile.SA-noUpdA
212 #else
213 # define IfGhcBuild_a(x) /**/
214 GHC_BUILD_FLAG_a = -build-a-not-defined
215 GHC_BUILD_OPTS_a = -build-a-not-defined-error
216 #endif
217
218 #define GhcBuild_b YES /*@GhcBuild_b@*/         /* "user way" b */
219 #if GhcBuild_b == YES
220 # define IfGhcBuild_b(x) x
221 GHC_BUILD_FLAG_b = -noSA-UpdA
222 GHC_BUILD_OPTS_b = -fticky-ticky -optcO-DTICKY_TICKY -debug \
223                       -Ofile /local/grasp/partain-other/performance/update/Ofile.noSA-UpdA
224 #else
225 # define IfGhcBuild_b(x) /**/
226 GHC_BUILD_FLAG_b = -build-b-not-defined
227 GHC_BUILD_OPTS_b = -build-b-not-defined-error
228 #endif
229
230 #define GhcBuild_c YES /*@GhcBuild_c@*/         /* "user way" c */
231 #if GhcBuild_c == YES
232 # define IfGhcBuild_c(x) x
233 GHC_BUILD_FLAG_c = -noSA-noUpdA
234 GHC_BUILD_OPTS_c = -fticky-ticky -optcO-DTICKY_TICKY -debug \
235                       -Ofile /local/grasp/partain-other/performance/update/Ofile.noSA-noUpdA
236 #else
237 # define IfGhcBuild_c(x) /**/
238 GHC_BUILD_FLAG_c = -build-c-not-defined
239 GHC_BUILD_OPTS_c = -build-c-not-defined-error
240 #endif
241
242 #define GhcBuild_d NO/*YES*/ /*@GhcBuild_d@*/           /* "user way" d */
243 #if GhcBuild_d == YES
244 # define IfGhcBuild_d(x) x
245 GHC_BUILD_FLAG_d = -regs-avail-2
246 GHC_BUILD_OPTS_d = -fticky-ticky -optcO-DTICKY_TICKY -debug \
247                       -O -freturn-in-regs-threshold2
248 #else
249 # define IfGhcBuild_d(x) /**/
250 GHC_BUILD_FLAG_d = -build-d-not-defined
251 GHC_BUILD_OPTS_d = -build-d-not-defined-error
252 #endif
253
254 #define GhcBuild_e NO/*YES*/ /*@GhcBuild_e@*/           /* "user way" e */
255 #if GhcBuild_e == YES
256 # define IfGhcBuild_e(x) x
257 GHC_BUILD_FLAG_e = -regs-avail-3
258 GHC_BUILD_OPTS_e = -fticky-ticky -optcO-DTICKY_TICKY -debug \
259                       -O -freturn-in-regs-threshold3
260 #else
261 # define IfGhcBuild_e(x) /**/
262 GHC_BUILD_FLAG_e = -build-e-not-defined
263 GHC_BUILD_OPTS_e = -build-e-not-defined-error
264 #endif
265
266 #define GhcBuild_f NO/*YES*/ /*@GhcBuild_f@*/           /* "user way" f */
267 #if GhcBuild_f == YES
268 # define IfGhcBuild_f(x) x
269 GHC_BUILD_FLAG_f = -regs-avail-4
270 GHC_BUILD_OPTS_f = -fticky-ticky -optcO-DTICKY_TICKY -debug \
271                       -O -freturn-in-regs-threshold4
272 #else
273 # define IfGhcBuild_f(x) /**/
274 GHC_BUILD_FLAG_f = -build-f-not-defined
275 GHC_BUILD_OPTS_f = -build-f-not-defined-error
276 #endif
277
278 #define GhcBuild_g NO/*YES*/ /*@GhcBuild_g@*/           /* "user way" g */
279 #if GhcBuild_g == YES
280 # define IfGhcBuild_g(x) x
281 GHC_BUILD_FLAG_g = -regs-avail-5
282 GHC_BUILD_OPTS_g = -fticky-ticky -optcO-DTICKY_TICKY -debug \
283                       -O -freturn-in-regs-threshold5
284 #else
285 # define IfGhcBuild_g(x) /**/
286 GHC_BUILD_FLAG_g = -build-g-not-defined
287 GHC_BUILD_OPTS_g = -build-g-not-defined-error
288 #endif
289
290 #define GhcBuild_h YES /*@GhcBuild_h@*/         /* "user way" a */
291 #if GhcBuild_h == YES   
292 # define IfGhcBuild_h(x) x
293 GHC_BUILD_FLAG_h = -semi-tagged
294 GHC_BUILD_OPTS_h = -fticky-ticky -optcO-DTICKY_TICKY -debug \
295                       -O -fsemi-tagging
296 #else
297 # define IfGhcBuild_h(x) /**/
298 GHC_BUILD_FLAG_h = -build-h-not-defined
299 GHC_BUILD_OPTS_h = -build-h-not-defined-error
300 #endif
301
302 /* _b minus ticky */
303 #define GhcBuild_i NO/*YES*/ /*@GhcBuild_i@*/           /* "user way" b */
304 #if GhcBuild_i == YES
305 # define IfGhcBuild_i(x) x
306 GHC_BUILD_FLAG_i = -noSA-noFI2
307 GHC_BUILD_OPTS_i = -Ofile /local/grasp/partain-other/performance/update/Ofile.noSA-noFI
308 #else
309 # define IfGhcBuild_i(x) /**/
310 GHC_BUILD_FLAG_i = -build-i-not-defined
311 GHC_BUILD_OPTS_i = -build-i-not-defined-error
312 #endif
313
314 #define GhcBuild_j NO/*YES*/ /*@GhcBuild_j@*/           /* "user way" c */
315 #if GhcBuild_j == YES
316 # define IfGhcBuild_j(x) x
317 GHC_BUILD_FLAG_j = -SA-noFI2
318 GHC_BUILD_OPTS_j = -Ofile /local/grasp/partain-other/performance/update/Ofile.SA-noFI
319 #else
320 # define IfGhcBuild_j(x) /**/
321 GHC_BUILD_FLAG_j = -build-j-not-defined
322 GHC_BUILD_OPTS_j = -build-j-not-defined-error
323 #endif
324
325 #define GhcBuild_k NO/*YES*/ /*@GhcBuild_k@*/           /* "user way" d */
326 #if GhcBuild_k == YES
327 # define IfGhcBuild_k(x) x
328 GHC_BUILD_FLAG_k = -SA-noFL2
329 GHC_BUILD_OPTS_k = -Ofile /local/grasp/partain-other/performance/update/Ofile.SA-noFL
330 #else
331 # define IfGhcBuild_k(x) /**/
332 GHC_BUILD_FLAG_k = -build-k-not-defined
333 GHC_BUILD_OPTS_k = -build-k-not-defined-error
334 #endif
335
336 #define GhcBuild_l NO/*YES*/ /*@GhcBuild_l@*/           /* "user way" e */
337 #if GhcBuild_l == YES
338 # define IfGhcBuild_l(x) x
339 GHC_BUILD_FLAG_l = -float-strict2
340 GHC_BUILD_OPTS_l = -Ofile /local/grasp/partain-other/performance/update/Ofile.float-strict
341 #else
342 # define IfGhcBuild_l(x) /**/
343 GHC_BUILD_FLAG_l = -build-l-not-defined
344 GHC_BUILD_OPTS_l = -build-l-not-defined-error
345 #endif
346
347 #define GhcBuild_m NO/*YES*/ /*@GhcBuild_m@*/           /* "user way" f */
348 #if GhcBuild_m == YES
349 # define IfGhcBuild_m(x) x
350 GHC_BUILD_FLAG_m = -float-always2
351 GHC_BUILD_OPTS_m = -Ofile /local/grasp/partain-other/performance/update/Ofile.float-always
352 #else
353 # define IfGhcBuild_m(x) /**/
354 GHC_BUILD_FLAG_m = -build-m-not-defined
355 GHC_BUILD_OPTS_m = -build-m-not-defined-error
356 #endif
357
358 #define GhcBuild_n NO/*YES*/ /*@GhcBuild_n@*/           /* "user way" g */
359 #if GhcBuild_n == YES
360 # define IfGhcBuild_n(x) x
361 GHC_BUILD_FLAG_n = -no-float2
362 GHC_BUILD_OPTS_n = -Ofile /local/grasp/partain-other/performance/update/Ofile.no-float
363 #else
364 # define IfGhcBuild_n(x) /**/
365 GHC_BUILD_FLAG_n = -build-n-not-defined
366 GHC_BUILD_OPTS_n = -build-n-not-defined-error
367 #endif
368
369 #define GhcBuild_A NO/*YES*/ /*@GhcBuild_A@*/           /* "user way" A */
370 #if GhcBuild_A == YES
371 # define IfGhcBuild_A(x) x
372 GHC_BUILD_FLAG_A = -no-local-float
373 GHC_BUILD_OPTS_A = -fticky-ticky -optcO-DTICKY_TICKY -debug \
374                 -Ofile /local/grasp/partain-other/performance/update/Ofile.no-local-float
375 #else
376 # define IfGhcBuild_A(x) /**/
377 GHC_BUILD_FLAG_A = -build-A-not-defined
378 GHC_BUILD_OPTS_A = -build-A-not-defined-error
379 #endif
380
381 #define GhcBuild_B NO/*YES*/ /*@GhcBuild_B@*/           /* "user way" B */
382 #if GhcBuild_B == YES
383 # define IfGhcBuild_B(x) x
384 GHC_BUILD_FLAG_B = -no-local-float2
385 GHC_BUILD_OPTS_B = -Ofile /local/grasp/partain-other/performance/update/Ofile.no-local-float
386 #else
387 # define IfGhcBuild_B(x) /**/
388 GHC_BUILD_FLAG_B = -build-B-not-defined
389 GHC_BUILD_OPTS_B = -build-B-not-defined-error
390 #endif
391
392
393 /* end of "floating" stuff */
394
395 #define GhcBuild_o NO /*@GhcBuild_o@*/          /* "user way" o */
396 #if GhcBuild_o == YES
397 # define IfGhcBuild_o(x) x
398 GHC_BUILD_FLAG_o = -build-o-not-defined /* >>>change here<<< if required */
399 GHC_BUILD_OPTS_o = -build-o-not-defined-error
400 #else
401 # define IfGhcBuild_o(x) /**/
402 GHC_BUILD_FLAG_o = -build-o-not-defined
403 GHC_BUILD_OPTS_o = -build-o-not-defined-error
404 #endif
405
406 /* ======= END OF BUILD INFO ==================================== */
407
408
409 /* As of 0.19, our parser won't go through Sun's /usr/bin/yacc
410    (due to an utterly hardwired limit on the number of states [1000]).
411    You can use: (1) their unbundled /usr/lang/yacc; or (2) the GNU
412    "bison -y".  Do not try Berkeley yacc -- it willnae work.
413 */
414 #ifndef YaccCmd
415 #define YaccCmd @YaccCmd@
416 #endif
417
418 /* ================================================================
419    INSTALL stuff:
420 */
421
422 /* WHERE TO INSTALL IT:
423
424     By default, the root prefix for where everything is installed is
425     "/usr/local".  Assume you are installing for the <arch>
426     architecture...  Beneath that, things look like this:
427
428     bin/<arch>          for executables the user invokes, e.g., driver "ghc"
429                         [InstBinDir_GHC]
430     bin                 we might install some scripts (not platform-dependent)
431                         here... [InstScriptDir_GHC]
432     lib/ghc/<version>   for support-bits for "ghc" (architecture-independent),
433                         for a specific version. [InstDataDir_GHC]
434     lib/ghc/<version>/<arch>
435                         ditto, but the <arch>itecture-dependent bits
436                         [InstLibDir_GHC]
437     man/man<ext>/       man pages [InstManRoot]
438     info                Info files [InstInfoDir]
439
440     You may alter mkworld's ideas about GHC installation by changing
441     the above-mentioned settings, as shown below.
442
443     The default values are set in only4-ghc.ljm, if you are interested.
444
445     If you are going to install the utility bits (literate, mkworld,
446     glafp-utils) as well as the GHC system itself, you should do
447     similar installation fiddling in your "mkworld/site.jm" file,
448     setting the variables InstRootDir, InstBinDir, InstLibDir, etc.
449     (the non-project-specific ones).
450 */
451
452 /*
453     "AT_GLASGOW"  -- Are we installing at Glasgow?
454     (also set in site.jm.in, but we get here and try to use it first)
455  */
456 #ifndef AT_GLASGOW
457 #define AT_GLASGOW @AT_GLASGOW@
458 #endif
459
460 /* only the "prefix" things are set here */
461 #ifndef InstRootDir_GHC
462 #define InstRootDir_GHC @prefix@
463 #endif
464 #ifndef InstBinRootDir_GHC
465 #define InstBinRootDir_GHC @exec_prefix@
466 #endif
467
468 /* install the compilation system driver as "ghc-<version>" at Glasgow 
469    (default is: "ghc" elsewhere) 
470  */
471 #ifndef GhcDriverInstallName
472 #if AT_GLASGOW
473 #define GhcDriverInstallName ghc-$(PROJECTVERSION)
474 #else
475 #define GhcDriverInstallName ghc
476 #endif
477 #endif
478
479 /* At Glasgow, make sure things are installed for group "grasp".
480
481    If you do not care what group it is installed for, delete
482    this stuff altogether.  If you leave it in, be sure it is a
483    group that exists at your site!
484  */
485 #if AT_GLASGOW && !defined(InstGroup)
486 #define InstGroup -g grasp
487 #endif
488
489 /* At Glasgow, we would rather the installed binaries were stripped.
490    (Delete if you feel otherwise.)
491 */
492 #ifndef InstStrip
493 #define InstStrip -s
494 #endif
495