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