[project @ 1996-01-08 20:28:12 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 #define GhcBuild_a NO /*@GhcBuild_a@*/          /* "user way" a */
205 #if GhcBuild_a == YES   
206 # define IfGhcBuild_a(x) x
207 GHC_BUILD_FLAG_a = -build-a-not-defined /* >>>change here<<< if required */
208 GHC_BUILD_OPTS_a = -build-a-not-defined-error
209 #else
210 # define IfGhcBuild_a(x) /**/
211 GHC_BUILD_FLAG_a = -build-a-not-defined
212 GHC_BUILD_OPTS_a = -build-a-not-defined-error
213 #endif
214
215 #define GhcBuild_b NO /*@GhcBuild_b@*/          /* "user way" b */
216 #if GhcBuild_b == YES
217 # define IfGhcBuild_b(x) x
218 GHC_BUILD_FLAG_b = -build-b-not-defined /* >>>change here<<< if required */
219 GHC_BUILD_OPTS_b = -build-b-not-defined-error
220 #else
221 # define IfGhcBuild_b(x) /**/
222 GHC_BUILD_FLAG_b = -build-b-not-defined
223 GHC_BUILD_OPTS_b = -build-b-not-defined-error
224 #endif
225
226 #define GhcBuild_c NO /*@GhcBuild_c@*/          /* "user way" c */
227 #if GhcBuild_c == YES
228 # define IfGhcBuild_c(x) x
229 GHC_BUILD_FLAG_c = -build-c-not-defined /* >>>change here<<< if required */
230 GHC_BUILD_OPTS_c = -build-c-not-defined-error
231 #else
232 # define IfGhcBuild_c(x) /**/
233 GHC_BUILD_FLAG_c = -build-c-not-defined
234 GHC_BUILD_OPTS_c = -build-c-not-defined-error
235 #endif
236
237 #define GhcBuild_d NO /*@GhcBuild_d@*/          /* "user way" d */
238 #if GhcBuild_d == YES
239 # define IfGhcBuild_d(x) x
240 GHC_BUILD_FLAG_d = -build-d-not-defined /* >>>change here<<< if required */
241 GHC_BUILD_OPTS_d = -build-d-not-defined-error
242 #else
243 # define IfGhcBuild_d(x) /**/
244 GHC_BUILD_FLAG_d = -build-d-not-defined
245 GHC_BUILD_OPTS_d = -build-d-not-defined-error
246 #endif
247
248 #define GhcBuild_e NO /*@GhcBuild_e@*/          /* "user way" e */
249 #if GhcBuild_e == YES
250 # define IfGhcBuild_e(x) x
251 GHC_BUILD_FLAG_e = -build-e-not-defined /* >>>change here<<< if required */
252 GHC_BUILD_OPTS_e = -build-e-not-defined-error
253 #else
254 # define IfGhcBuild_e(x) /**/
255 GHC_BUILD_FLAG_e = -build-e-not-defined
256 GHC_BUILD_OPTS_e = -build-e-not-defined-error
257 #endif
258
259 #define GhcBuild_f NO /*@GhcBuild_f@*/          /* "user way" f */
260 #if GhcBuild_f == YES
261 # define IfGhcBuild_f(x) x
262 GHC_BUILD_FLAG_f = -build-f-not-defined /* >>>change here<<< if required */
263 GHC_BUILD_OPTS_f = -build-f-not-defined-error
264 #else
265 # define IfGhcBuild_f(x) /**/
266 GHC_BUILD_FLAG_f = -build-f-not-defined
267 GHC_BUILD_OPTS_f = -build-f-not-defined-error
268 #endif
269
270 #define GhcBuild_g NO /*@GhcBuild_g@*/          /* "user way" g */
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 #define GhcBuild_h NO /*@GhcBuild_h@*/          /* "user way" h */
282 #if GhcBuild_h == YES
283 # define IfGhcBuild_h(x) x
284 GHC_BUILD_FLAG_h = -build-h-not-defined /* >>>change here<<< if required */
285 GHC_BUILD_OPTS_h = -build-h-not-defined-error
286 #else
287 # define IfGhcBuild_h(x) /**/
288 GHC_BUILD_FLAG_h = -build-h-not-defined
289 GHC_BUILD_OPTS_h = -build-h-not-defined-error
290 #endif
291
292 #define GhcBuild_i NO /*@GhcBuild_i@*/          /* "user way" i */
293 #if GhcBuild_i == YES
294 # define IfGhcBuild_i(x) x
295 GHC_BUILD_FLAG_i = -build-i-not-defined /* >>>change here<<< if required */
296 GHC_BUILD_OPTS_i = -build-i-not-defined-error
297 #else
298 # define IfGhcBuild_i(x) /**/
299 GHC_BUILD_FLAG_i = -build-i-not-defined
300 GHC_BUILD_OPTS_i = -build-i-not-defined-error
301 #endif
302
303 #define GhcBuild_j NO /*@GhcBuild_j@*/          /* "user way" j */
304 #if GhcBuild_j == YES
305 # define IfGhcBuild_j(x) x
306 GHC_BUILD_FLAG_j = -build-j-not-defined /* >>>change here<<< if required */
307 GHC_BUILD_OPTS_j = -build-j-not-defined-error
308 #else
309 # define IfGhcBuild_j(x) /**/
310 GHC_BUILD_FLAG_j = -build-j-not-defined
311 GHC_BUILD_OPTS_j = -build-j-not-defined-error
312 #endif
313
314 #define GhcBuild_k NO /*@GhcBuild_k@*/          /* "user way" k */
315 #if GhcBuild_k == YES
316 # define IfGhcBuild_k(x) x
317 GHC_BUILD_FLAG_k = -build-k-not-defined /* >>>change here<<< if required */
318 GHC_BUILD_OPTS_k = -build-k-not-defined-error
319 #else
320 # define IfGhcBuild_k(x) /**/
321 GHC_BUILD_FLAG_k = -build-k-not-defined
322 GHC_BUILD_OPTS_k = -build-k-not-defined-error
323 #endif
324
325 #define GhcBuild_l NO /*@GhcBuild_l@*/          /* "user way" l */
326 #if GhcBuild_l == YES
327 # define IfGhcBuild_l(x) x
328 GHC_BUILD_FLAG_l = -build-l-not-defined /* >>>change here<<< if required */
329 GHC_BUILD_OPTS_l = -build-l-not-defined-error
330 #else
331 # define IfGhcBuild_l(x) /**/
332 GHC_BUILD_FLAG_l = -build-l-not-defined
333 GHC_BUILD_OPTS_l = -build-l-not-defined-error
334 #endif
335
336 #define GhcBuild_m NO /*@GhcBuild_m@*/          /* "user way" m */
337 #if GhcBuild_m == YES
338 # define IfGhcBuild_m(x) x
339 GHC_BUILD_FLAG_m = -build-m-not-defined /* >>>change here<<< if required */
340 GHC_BUILD_OPTS_m = -build-m-not-defined-error
341 #else
342 # define IfGhcBuild_m(x) /**/
343 GHC_BUILD_FLAG_m = -build-m-not-defined
344 GHC_BUILD_OPTS_m = -build-m-not-defined-error
345 #endif
346
347 #define GhcBuild_n NO /*@GhcBuild_n@*/          /* "user way" n */
348 #if GhcBuild_n == YES
349 # define IfGhcBuild_n(x) x
350 GHC_BUILD_FLAG_n = -build-n-not-defined /* >>>change here<<< if required */
351 GHC_BUILD_OPTS_n = -build-n-not-defined-error
352 #else
353 # define IfGhcBuild_n(x) /**/
354 GHC_BUILD_FLAG_n = -build-n-not-defined
355 GHC_BUILD_OPTS_n = -build-n-not-defined-error
356 #endif
357
358 #define GhcBuild_o NO /*@GhcBuild_o@*/          /* "user way" o */
359 #if GhcBuild_o == YES
360 # define IfGhcBuild_o(x) x
361 GHC_BUILD_FLAG_o = -build-o-not-defined /* >>>change here<<< if required */
362 GHC_BUILD_OPTS_o = -build-o-not-defined-error
363 #else
364 # define IfGhcBuild_o(x) /**/
365 GHC_BUILD_FLAG_o = -build-o-not-defined
366 GHC_BUILD_OPTS_o = -build-o-not-defined-error
367 #endif
368
369 /* ======= END OF BUILD INFO ==================================== */
370
371
372 /* As of 0.19, our parser won't go through Sun's /usr/bin/yacc
373    (due to an utterly hardwired limit on the number of states [1000]).
374    You can use: (1) their unbundled /usr/lang/yacc; or (2) the GNU
375    "bison -y".  Do not try Berkeley yacc -- it willnae work.
376 */
377 #ifndef YaccCmd
378 #define YaccCmd @YaccCmd@
379 #endif
380
381 /* ================================================================
382    INSTALL stuff:
383 */
384
385 /* WHERE TO INSTALL IT:
386
387     By default, the root prefix for where everything is installed is
388     "/usr/local".  Assume you are installing for the <arch>
389     architecture...  Beneath that, things look like this:
390
391     bin/<arch>          for executables the user invokes, e.g., driver "ghc"
392                         [InstBinDir_GHC]
393     bin                 we might install some scripts (not platform-dependent)
394                         here... [InstScriptDir_GHC]
395     lib/ghc/<version>   for support-bits for "ghc" (architecture-independent),
396                         for a specific version. [InstDataDir_GHC]
397     lib/ghc/<version>/<arch>
398                         ditto, but the <arch>itecture-dependent bits
399                         [InstLibDir_GHC]
400     man/man<ext>/       man pages [InstManRoot]
401     info                Info files [InstInfoDir]
402
403     You may alter mkworld's ideas about GHC installation by changing
404     the above-mentioned settings, as shown below.
405
406     The default values are set in only4-ghc.ljm, if you are interested.
407
408     If you are going to install the utility bits (literate, mkworld,
409     glafp-utils) as well as the GHC system itself, you should do
410     similar installation fiddling in your "mkworld/site.jm" file,
411     setting the variables InstRootDir, InstBinDir, InstLibDir, etc.
412     (the non-project-specific ones).
413 */
414
415 /*
416     "AT_GLASGOW"  -- Are we installing at Glasgow?
417     (also set in site.jm.in, but we get here and try to use it first)
418  */
419 #ifndef AT_GLASGOW
420 #define AT_GLASGOW @AT_GLASGOW@
421 #endif
422
423 /* only the "prefix" things are set here */
424 #ifndef InstRootDir_GHC
425 #define InstRootDir_GHC @prefix@
426 #endif
427 #ifndef InstBinRootDir_GHC
428 #define InstBinRootDir_GHC @exec_prefix@
429 #endif
430
431 /* install the compilation system driver as "ghc-<version>" at Glasgow 
432    (default is: "ghc" elsewhere) 
433  */
434 #ifndef GhcDriverInstallName
435 #if AT_GLASGOW
436 #define GhcDriverInstallName ghc-$(PROJECTVERSION)
437 #else
438 #define GhcDriverInstallName ghc
439 #endif
440 #endif
441
442 /* At Glasgow, make sure things are installed for group "grasp".
443
444    If you do not care what group it is installed for, delete
445    this stuff altogether.  If you leave it in, be sure it is a
446    group that exists at your site!
447  */
448 #if AT_GLASGOW && !defined(InstGroup)
449 #define InstGroup -g grasp
450 #endif
451
452 /* At Glasgow, we would rather the installed binaries were stripped.
453    (Delete if you feel otherwise.)
454 */
455 #ifndef InstStrip
456 #define InstStrip -s
457 #endif
458