[project @ 1996-06-27 16:13:29 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    The configure script dumps all the what-builds-to-do info
85    into a file called "buildinfo.jm", in this directory.  We
86    do it this way, rather than AC_SUBSTing the info into this file
87    because some sed's (notably OSF and maybe HP-UX) only allow
88    99 commands (!!!), which is way too few if we want to do the
89    GhcBuild_ stuff as well as everything else.  WDP 96/04
90 */
91
92 #include "buildinfo.jm"
93
94 /* normal sequential */
95 #if GhcBuild_normal == YES
96 # define IfGhcBuild_normal(x) x
97 GHC_BUILD_FLAG_normal = -build-normal-defined
98 #else
99 # define IfGhcBuild_normal(x) /**/
100 GHC_BUILD_FLAG_normal = -build-normal-not-defined
101 #endif
102
103 /* profiled sequential */
104 #if GhcBuild_p == YES
105 # define IfGhcBuild_p(x) x
106 GHC_BUILD_FLAG_p = -build-p-defined
107 #else
108 # define IfGhcBuild_p(x) /**/
109 GHC_BUILD_FLAG_p = -build-p-not-defined
110 #endif
111
112 /* ticky-ticky "profiling" (sequential) */
113 #if GhcBuild_t == YES   
114 # define IfGhcBuild_t(x) x
115 GHC_BUILD_FLAG_t = -build-t-defined
116 #else
117 # define IfGhcBuild_t(x) /**/
118 GHC_BUILD_FLAG_t = -build-t-not-defined
119 #endif
120
121 /* unregisterized (most basic boot) */
122 #if GhcBuild_u == YES   
123 # define IfGhcBuild_u(x) x
124 GHC_BUILD_FLAG_u = -build-u-defined
125 #else
126 # define IfGhcBuild_u(x) /**/
127 GHC_BUILD_FLAG_u = -build-u-not-defined
128 #endif
129
130 /* === builds: concurrent and parallel ============================ */
131
132 /* concurrent */
133 #if GhcBuild_mc == YES
134 # define IfGhcBuild_mc(x) x
135 GHC_BUILD_FLAG_mc = -build-mc-defined
136 #else
137 # define IfGhcBuild_mc(x) /**/
138 GHC_BUILD_FLAG_mc = -build-mc-not-defined
139 #endif
140
141 /* profiled concurrent */
142 #if GhcBuild_mr == YES
143 # define IfGhcBuild_mr(x) x
144 GHC_BUILD_FLAG_mr = -build-mr-defined
145 #else
146 # define IfGhcBuild_mr(x) /**/
147 GHC_BUILD_FLAG_mr = -build-mr-not-defined
148 #endif
149
150 /* ticky concurrent */
151 #if GhcBuild_mt == YES
152 # define IfGhcBuild_mt(x) x
153 GHC_BUILD_FLAG_mt = -build-mt-defined
154 #else
155 # define IfGhcBuild_mt(x) /**/
156 GHC_BUILD_FLAG_mt = -build-mt-not-defined
157 #endif
158
159 /* parallel (GUM, PVM-based) */
160 #if GhcBuild_mp == YES
161 # define IfGhcBuild_mp(x) x
162 GHC_BUILD_FLAG_mp = -build-mp-defined
163 #else
164 # define IfGhcBuild_mp(x) /**/
165 GHC_BUILD_FLAG_mp = -build-mp-not-defined
166 #endif
167
168 /* GranSim */
169 #if GhcBuild_mg == YES
170 # define IfGhcBuild_mg(x) x
171 GHC_BUILD_FLAG_mg = -build-mg-defined
172 #else
173 # define IfGhcBuild_mg(x) /**/
174 GHC_BUILD_FLAG_mg = -build-mg-not-defined
175 #endif
176
177 /* === builds: non-std garbage collectors ==========================
178    These use the same mechanism as user ways
179    but do not have any "fed back" options.
180 */
181
182 /* sequential -- 2-space collector */
183 #if GhcBuild_2s == YES
184 # define IfGhcBuild_2s(x) x
185 GHC_BUILD_FLAG_2s = -gc-2s
186 #else
187 # define IfGhcBuild_2s(x) /**/
188 GHC_BUILD_FLAG_2s = -build-2s-not-defined
189 #endif
190
191 /* sequential -- 1-space collector */
192 #if GhcBuild_1s == YES
193 # define IfGhcBuild_1s(x) x
194 GHC_BUILD_FLAG_1s = -gc-1s
195 #else
196 # define IfGhcBuild_1s(x) /**/
197 GHC_BUILD_FLAG_1s = -build-1s-not-defined
198 #endif
199
200 /* sequential -- dual-mode collector */
201 #if GhcBuild_du == YES
202 # define IfGhcBuild_du(x) x
203 GHC_BUILD_FLAG_du = -gc-du
204 #else
205 # define IfGhcBuild_du(x) /**/
206 GHC_BUILD_FLAG_du = -build-du-not-defined
207 #endif
208
209 /* === builds: "user ways" ======================================= */
210
211 #if GhcBuild_a == YES   
212 # define IfGhcBuild_a(x) x
213 GHC_BUILD_FLAG_a = -build-a-not-defined /* >>>change here<<< if required */
214 GHC_BUILD_OPTS_a = -build-a-not-defined-error
215 #else
216 # define IfGhcBuild_a(x) /**/
217 GHC_BUILD_FLAG_a = -build-a-not-defined
218 GHC_BUILD_OPTS_a = -build-a-not-defined-error
219 #endif
220
221 #if GhcBuild_b == YES
222 # define IfGhcBuild_b(x) x
223 GHC_BUILD_FLAG_b = -build-b-not-defined /* >>>change here<<< if required */
224 GHC_BUILD_OPTS_b = -build-b-not-defined-error
225 #else
226 # define IfGhcBuild_b(x) /**/
227 GHC_BUILD_FLAG_b = -build-b-not-defined
228 GHC_BUILD_OPTS_b = -build-b-not-defined-error
229 #endif
230
231 #if GhcBuild_c == YES
232 # define IfGhcBuild_c(x) x
233 GHC_BUILD_FLAG_c = -build-c-not-defined /* >>>change here<<< if required */
234 GHC_BUILD_OPTS_c = -build-c-not-defined-error
235 #else
236 # define IfGhcBuild_c(x) /**/
237 GHC_BUILD_FLAG_c = -build-c-not-defined
238 GHC_BUILD_OPTS_c = -build-c-not-defined-error
239 #endif
240
241 #if GhcBuild_d == YES
242 # define IfGhcBuild_d(x) x
243 GHC_BUILD_FLAG_d = -build-d-not-defined /* >>>change here<<< if required */
244 GHC_BUILD_OPTS_d = -build-d-not-defined-error
245 #else
246 # define IfGhcBuild_d(x) /**/
247 GHC_BUILD_FLAG_d = -build-d-not-defined
248 GHC_BUILD_OPTS_d = -build-d-not-defined-error
249 #endif
250
251 #if GhcBuild_e == YES
252 # define IfGhcBuild_e(x) x
253 GHC_BUILD_FLAG_e = -build-e-not-defined /* >>>change here<<< if required */
254 GHC_BUILD_OPTS_e = -build-e-not-defined-error
255 #else
256 # define IfGhcBuild_e(x) /**/
257 GHC_BUILD_FLAG_e = -build-e-not-defined
258 GHC_BUILD_OPTS_e = -build-e-not-defined-error
259 #endif
260
261 #if GhcBuild_f == YES
262 # define IfGhcBuild_f(x) x
263 GHC_BUILD_FLAG_f = -build-f-not-defined /* >>>change here<<< if required */
264 GHC_BUILD_OPTS_f = -build-f-not-defined-error
265 #else
266 # define IfGhcBuild_f(x) /**/
267 GHC_BUILD_FLAG_f = -build-f-not-defined
268 GHC_BUILD_OPTS_f = -build-f-not-defined-error
269 #endif
270
271 #if GhcBuild_g == YES
272 # define IfGhcBuild_g(x) x
273 GHC_BUILD_FLAG_g = -build-g-not-defined /* >>>change here<<< if required */
274 GHC_BUILD_OPTS_g = -build-g-not-defined-error
275 #else
276 # define IfGhcBuild_g(x) /**/
277 GHC_BUILD_FLAG_g = -build-g-not-defined
278 GHC_BUILD_OPTS_g = -build-g-not-defined-error
279 #endif
280
281 #if GhcBuild_h == YES   
282 # define IfGhcBuild_h(x) x
283 GHC_BUILD_FLAG_h = -build-h-not-defined /* >>>change here<<< if required */
284 GHC_BUILD_OPTS_h = -build-h-not-defined-error
285 #else
286 # define IfGhcBuild_h(x) /**/
287 GHC_BUILD_FLAG_h = -build-h-not-defined
288 GHC_BUILD_OPTS_h = -build-h-not-defined-error
289 #endif
290
291 #if GhcBuild_i == YES
292 # define IfGhcBuild_i(x) x
293 GHC_BUILD_FLAG_i = -build-i-not-defined /* >>>change here<<< if required */
294 GHC_BUILD_OPTS_i = -build-i-not-defined-error
295 #else
296 # define IfGhcBuild_i(x) /**/
297 GHC_BUILD_FLAG_i = -build-i-not-defined
298 GHC_BUILD_OPTS_i = -build-i-not-defined-error
299 #endif
300
301 #if GhcBuild_j == YES
302 # define IfGhcBuild_j(x) x
303 GHC_BUILD_FLAG_j = -build-j-not-defined /* >>>change here<<< if required */
304 GHC_BUILD_OPTS_j = -build-j-not-defined-error
305 #else
306 # define IfGhcBuild_j(x) /**/
307 GHC_BUILD_FLAG_j = -build-j-not-defined
308 GHC_BUILD_OPTS_j = -build-j-not-defined-error
309 #endif
310
311 #if GhcBuild_k == YES
312 # define IfGhcBuild_k(x) x
313 GHC_BUILD_FLAG_k = -build-k-not-defined /* >>>change here<<< if required */
314 GHC_BUILD_OPTS_k = -build-k-not-defined-error
315 #else
316 # define IfGhcBuild_k(x) /**/
317 GHC_BUILD_FLAG_k = -build-k-not-defined
318 GHC_BUILD_OPTS_k = -build-k-not-defined-error
319 #endif
320
321 #if GhcBuild_l == YES
322 # define IfGhcBuild_l(x) x
323 GHC_BUILD_FLAG_l = -build-l-not-defined /* >>>change here<<< if required */
324 GHC_BUILD_OPTS_l = -build-l-not-defined-error
325 #else
326 # define IfGhcBuild_l(x) /**/
327 GHC_BUILD_FLAG_l = -build-l-not-defined
328 GHC_BUILD_OPTS_l = -build-l-not-defined-error
329 #endif
330
331 #if GhcBuild_m == YES
332 # define IfGhcBuild_m(x) x
333 GHC_BUILD_FLAG_m = -build-m-not-defined /* >>>change here<<< if required */
334 GHC_BUILD_OPTS_m = -build-m-not-defined-error
335 #else
336 # define IfGhcBuild_m(x) /**/
337 GHC_BUILD_FLAG_m = -build-m-not-defined
338 GHC_BUILD_OPTS_m = -build-m-not-defined-error
339 #endif
340
341 #if GhcBuild_n == YES
342 # define IfGhcBuild_n(x) x
343 GHC_BUILD_FLAG_n = -build-n-not-defined /* >>>change here<<< if required */
344 GHC_BUILD_OPTS_n = -build-n-not-defined-error
345 #else
346 # define IfGhcBuild_n(x) /**/
347 GHC_BUILD_FLAG_n = -build-n-not-defined
348 GHC_BUILD_OPTS_n = -build-n-not-defined-error
349 #endif
350
351 #if GhcBuild_o == YES
352 # define IfGhcBuild_o(x) x
353 GHC_BUILD_FLAG_o = -build-o-not-defined /* >>>change here<<< if required */
354 GHC_BUILD_OPTS_o = -build-o-not-defined-error
355 #else
356 # define IfGhcBuild_o(x) /**/
357 GHC_BUILD_FLAG_o = -build-o-not-defined
358 GHC_BUILD_OPTS_o = -build-o-not-defined-error
359 #endif
360
361 #if GhcBuild_A == YES
362 # define IfGhcBuild_A(x) x
363 GHC_BUILD_FLAG_A = -build-A-not-defined /* >>>change here<<< if required */
364 GHC_BUILD_OPTS_A = -build-A-not-defined-error
365 #else
366 # define IfGhcBuild_A(x) /**/
367 GHC_BUILD_FLAG_A = -build-A-not-defined
368 GHC_BUILD_OPTS_A = -build-A-not-defined-error
369 #endif
370
371 #if GhcBuild_B == YES
372 # define IfGhcBuild_B(x) x
373 GHC_BUILD_FLAG_B = -build-B-not-defined /* >>>change here<<< if required */
374 GHC_BUILD_OPTS_B = -build-B-not-defined-error
375 #else
376 # define IfGhcBuild_B(x) /**/
377 GHC_BUILD_FLAG_B = -build-B-not-defined
378 GHC_BUILD_OPTS_B = -build-B-not-defined-error
379 #endif
380
381 /* ======= END OF BUILD INFO ==================================== */
382
383
384 /* As of 0.19, our parser won't go through Sun's /usr/bin/yacc
385    (due to an utterly hardwired limit on the number of states [1000]).
386    You can use: (1) their unbundled /usr/lang/yacc; or (2) the GNU
387    "bison -y".  Do not try Berkeley yacc -- it willnae work.
388 */
389 #ifndef YaccCmd
390 #define YaccCmd @YaccCmd@
391 #endif
392
393 /* ================================================================
394    INSTALL stuff:
395 */
396
397 /* WHERE TO INSTALL IT:
398
399     By default, the root prefix for where everything is installed is
400     "/usr/local".  Assume you are installing for the <arch>
401     architecture...  Beneath that, things look like this:
402
403     bin/<arch>          for executables the user invokes, e.g., driver "ghc"
404                         [InstBinDir_GHC]
405     bin                 we might install some scripts (not platform-dependent)
406                         here... [InstScriptDir_GHC]
407     lib/ghc/<version>   for support-bits for "ghc" (architecture-independent),
408                         for a specific version. [InstDataDir_GHC]
409     lib/ghc/<version>/<arch>
410                         ditto, but the <arch>itecture-dependent bits
411                         [InstLibDir_GHC]
412     man/man<ext>/       man pages [InstManRoot]
413     info                Info files [InstInfoDir]
414
415     You may alter mkworld's ideas about GHC installation by changing
416     the above-mentioned settings, as shown below.
417
418     The default values are set in only4-ghc.ljm, if you are interested.
419
420     If you are going to install the utility bits (literate, mkworld,
421     glafp-utils) as well as the GHC system itself, you should do
422     similar installation fiddling in your "mkworld/site.jm" file,
423     setting the variables InstRootDir, InstBinDir, InstLibDir, etc.
424     (the non-project-specific ones).
425 */
426
427 /*
428     "AT_GLASGOW"  -- Are we installing at Glasgow?
429     (also set in site.jm.in, but we get here and try to use it first)
430  */
431 #ifndef AT_GLASGOW
432 #define AT_GLASGOW @AT_GLASGOW@
433 #endif
434
435 /* only the "prefix" things are set here */
436 #ifndef InstRootDir_GHC
437 #define InstRootDir_GHC @prefix@
438 #endif
439 #ifndef InstBinRootDir_GHC
440 #define InstBinRootDir_GHC @exec_prefix@
441 #endif
442
443 /* install the compilation system driver as "ghc-<version>" at Glasgow 
444    (default is: "ghc" elsewhere) 
445  */
446 #ifndef GhcDriverInstallName
447 #if AT_GLASGOW
448 #define GhcDriverInstallName ghc-$(PROJECTVERSION)
449 #else
450 #define GhcDriverInstallName ghc
451 #endif
452 #endif
453
454 /* At Glasgow, make sure things are installed for group "grasp".
455
456    If you do not care what group it is installed for, delete
457    this stuff altogether.  If you leave it in, be sure it is a
458    group that exists at your site!
459  */
460 #if AT_GLASGOW && !defined(InstGroup)
461 #define InstGroup -g grasp
462 #endif
463
464 /* At Glasgow, we would rather the installed binaries were stripped.
465    (Delete if you feel otherwise.)
466 */
467 #ifndef InstStrip
468 #define InstStrip -s
469 #endif
470