summaryrefslogtreecommitdiff
path: root/ghc/mkworld/site-ghc.jm.in
blob: ac0109618f2ac0582eb368a71bfd0cd95c29111a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
/*
    @configure_input@

    TargetPlatform.
    BuildPlatform, HostPlatform are in general site file
    (e.g. <top>/mkworld/site.jm[.in])
 */
#ifndef TargetPlatform
/* use Host* because of 99-cmd-limit brain-dead seds */
#define TargetPlatform @HostPlatform@
#endif

/* --------------- "standard" Haskell compiler --------------------------- */

#define WithHc @WithHc@
#define WithHcType @WithHcType@

#define WithGhcHc @WithGhcHc@
#define WithGhcHcType @WithGhcHcType@

#if ! (defined(HaskellCompilerCmd) && defined(HaskellCompilerType))
# if WithGhcHcType != HC_UNSPECIFIED
#  define HaskellCompilerCmd  WithGhcHc
#  define HaskellCompilerType WithGhcHcType
# else
#  if WithHcType != HC_UNSPECIFIED
#   define HaskellCompilerCmd  WithHc
#   define HaskellCompilerType WithHcType
#  else				  
#   define HaskellCompilerCmd  haskell-compiler-not-specified
#   define HaskellCompilerType HC_UNSPECIFIED
#  endif
# endif
#endif

/* ----------------------------------------------------------------------- */

/* Info for booting the Haskell compiler proper (written in Haskell):

   If you're going to use a Haskell compiler for booting:
    hbc -- set GhcWithHscBuiltViaC to NO
    ghc -- ditto; and set WhatGhcForBootingIsCalled
    [well, maybe...]

   If you're going to boot from distributed .hc files (the *default*),
   you needn't set anything here.
*/
#ifndef GhcWithHscBuiltViaC
#define GhcWithHscBuiltViaC @GhcWithHscBuiltViaC@
#endif
#ifndef GhcWithHscOptimised
#define GhcWithHscOptimised @GhcWithHscOptimised@
#endif
#ifndef GhcWithHscDebug
#define GhcWithHscDebug @GhcWithHscDebug@
#endif
#ifndef GhcBuilderVersion
#define GhcBuilderVersion @GhcBuilderVersion@
#endif
#ifndef GhcWithRegisterised
#define GhcWithRegisterised @GhcWithRegisterised@
#endif
#ifndef GhcWithNativeCodeGen
#define GhcWithNativeCodeGen @GhcWithNativeCodeGen@
#endif
GHC_WITH_NATIVE_CODEGEN=GhcWithNativeCodeGen

#ifndef BuildGHCI
#define BuildGHCI @BuildGHCI@
#endif
#ifndef GhcWithDeforester
#define GhcWithDeforester @GhcWithDeforester@
#endif
#ifndef GhcWithReadline
#define GhcWithReadline @GhcWithReadline@
#endif
#ifndef GhcWithSockets
#define GhcWithSockets @GhcWithSockets@
#endif

/* ================================================================
   BUILDS stuff: main sequential ones
*/

#define GhcBuild_normal @GhcBuild_normal@ /* profiled sequential */
#if GhcBuild_normal == YES
# define IfGhcBuild_normal(x) x
GHC_BUILD_FLAG_normal = -build-normal-defined
#else
# define IfGhcBuild_normal(x) /**/
GHC_BUILD_FLAG_normal = -build-normal-not-defined
#endif

#define GhcBuild_p @GhcBuild_p@		/* profiled sequential */
#if GhcBuild_p == YES
# define IfGhcBuild_p(x) x
GHC_BUILD_FLAG_p = -build-p-defined
#else
# define IfGhcBuild_p(x) /**/
GHC_BUILD_FLAG_p = -build-p-not-defined
#endif

#define GhcBuild_t @GhcBuild_t@		/* ticky-ticky "profiling" */
#if GhcBuild_t == YES	
# define IfGhcBuild_t(x) x
GHC_BUILD_FLAG_t = -build-t-defined
#else
# define IfGhcBuild_t(x) /**/
GHC_BUILD_FLAG_t = -build-t-not-defined
#endif

#define GhcBuild_u @GhcBuild_u@		/* unregisterized (most basic boot) */
#if GhcBuild_u == YES	
# define IfGhcBuild_u(x) x
GHC_BUILD_FLAG_u = -build-u-defined
#else
# define IfGhcBuild_u(x) /**/
GHC_BUILD_FLAG_u = -build-u-not-defined
#endif

/* === builds: concurrent and parallel ============================ */

#define GhcBuild_mc @GhcBuild_mc@	/* concurrent */
#if GhcBuild_mc == YES
# define IfGhcBuild_mc(x) x
GHC_BUILD_FLAG_mc = -build-mc-defined
#else
# define IfGhcBuild_mc(x) /**/
GHC_BUILD_FLAG_mc = -build-mc-not-defined
#endif

#define GhcBuild_mr @GhcBuild_mr@	/* profiled concurrent */
#if GhcBuild_mr == YES
# define IfGhcBuild_mr(x) x
GHC_BUILD_FLAG_mr = -build-mr-defined
#else
# define IfGhcBuild_mr(x) /**/
GHC_BUILD_FLAG_mr = -build-mr-not-defined
#endif

#define GhcBuild_mt @GhcBuild_mt@	/* ticky concurrent */
#if GhcBuild_mt == YES
# define IfGhcBuild_mt(x) x
GHC_BUILD_FLAG_mt = -build-mt-defined
#else
# define IfGhcBuild_mt(x) /**/
GHC_BUILD_FLAG_mt = -build-mt-not-defined
#endif

#define GhcBuild_mp @GhcBuild_mp@	/* parallel (GUM, PVM-based) */
#if GhcBuild_mp == YES
# define IfGhcBuild_mp(x) x
GHC_BUILD_FLAG_mp = -build-mp-defined
#else
# define IfGhcBuild_mp(x) /**/
GHC_BUILD_FLAG_mp = -build-mp-not-defined
#endif

#define GhcBuild_mg @GhcBuild_mg@	/* GranSim */
#if GhcBuild_mg == YES
# define IfGhcBuild_mg(x) x
GHC_BUILD_FLAG_mg = -build-mg-defined
#else
# define IfGhcBuild_mg(x) /**/
GHC_BUILD_FLAG_mg = -build-mg-not-defined
#endif

/* === builds: non-std garbage collectors ==========================
   These use the same mechanism as user ways
   but do not have any "fed back" options.
*/

#define GhcBuild_2s @GhcBuild_2s@	/* sequential -- 2-space collector */
#if GhcBuild_2s == YES
# define IfGhcBuild_2s(x) x
GHC_BUILD_FLAG_2s = -gc-2s
#else
# define IfGhcBuild_2s(x) /**/
GHC_BUILD_FLAG_2s = -build-2s-not-defined
#endif

#define GhcBuild_1s @GhcBuild_1s@	/* sequential -- 1-space collector */
#if GhcBuild_1s == YES
# define IfGhcBuild_1s(x) x
GHC_BUILD_FLAG_1s = -gc-1s
#else
# define IfGhcBuild_1s(x) /**/
GHC_BUILD_FLAG_1s = -build-1s-not-defined
#endif

#define GhcBuild_du @GhcBuild_du@	/* sequential -- dual-mode collector */
#if GhcBuild_du == YES
# define IfGhcBuild_du(x) x
GHC_BUILD_FLAG_du = -gc-du
#else
# define IfGhcBuild_du(x) /**/
GHC_BUILD_FLAG_du = -build-du-not-defined
#endif

/* === builds: "user ways" ======================================= */

/* these had to be de-configure-ified because of 99-cmd-limit brain-dead seds */

#define GhcBuild_a NO /*@GhcBuild_a@*/		/* "user way" a */
#if GhcBuild_a == YES	
# define IfGhcBuild_a(x) x
GHC_BUILD_FLAG_a = -build-a-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_a = -build-a-not-defined-error
#else
# define IfGhcBuild_a(x) /**/
GHC_BUILD_FLAG_a = -build-a-not-defined
GHC_BUILD_OPTS_a = -build-a-not-defined-error
#endif

#define GhcBuild_b NO /*@GhcBuild_b@*/		/* "user way" b */
#if GhcBuild_b == YES
# define IfGhcBuild_b(x) x
GHC_BUILD_FLAG_b = -build-b-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_b = -build-b-not-defined-error
#else
# define IfGhcBuild_b(x) /**/
GHC_BUILD_FLAG_b = -build-b-not-defined
GHC_BUILD_OPTS_b = -build-b-not-defined-error
#endif

#define GhcBuild_c NO /*@GhcBuild_c@*/		/* "user way" c */
#if GhcBuild_c == YES
# define IfGhcBuild_c(x) x
GHC_BUILD_FLAG_c = -build-c-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_c = -build-c-not-defined-error
#else
# define IfGhcBuild_c(x) /**/
GHC_BUILD_FLAG_c = -build-c-not-defined
GHC_BUILD_OPTS_c = -build-c-not-defined-error
#endif

#define GhcBuild_d NO /*@GhcBuild_d@*/		/* "user way" d */
#if GhcBuild_d == YES
# define IfGhcBuild_d(x) x
GHC_BUILD_FLAG_d = -build-d-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_d = -build-d-not-defined-error
#else
# define IfGhcBuild_d(x) /**/
GHC_BUILD_FLAG_d = -build-d-not-defined
GHC_BUILD_OPTS_d = -build-d-not-defined-error
#endif

#define GhcBuild_e NO /*@GhcBuild_e@*/		/* "user way" e */
#if GhcBuild_e == YES
# define IfGhcBuild_e(x) x
GHC_BUILD_FLAG_e = -build-e-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_e = -build-e-not-defined-error
#else
# define IfGhcBuild_e(x) /**/
GHC_BUILD_FLAG_e = -build-e-not-defined
GHC_BUILD_OPTS_e = -build-e-not-defined-error
#endif

#define GhcBuild_f NO /*@GhcBuild_f@*/		/* "user way" f */
#if GhcBuild_f == YES
# define IfGhcBuild_f(x) x
GHC_BUILD_FLAG_f = -build-f-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_f = -build-f-not-defined-error
#else
# define IfGhcBuild_f(x) /**/
GHC_BUILD_FLAG_f = -build-f-not-defined
GHC_BUILD_OPTS_f = -build-f-not-defined-error
#endif

#define GhcBuild_g NO /*@GhcBuild_g@*/		/* "user way" g */
#if GhcBuild_g == YES
# define IfGhcBuild_g(x) x
GHC_BUILD_FLAG_g = -build-g-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_g = -build-g-not-defined-error
#else
# define IfGhcBuild_g(x) /**/
GHC_BUILD_FLAG_g = -build-g-not-defined
GHC_BUILD_OPTS_g = -build-g-not-defined-error
#endif

#define GhcBuild_h NO /*@GhcBuild_h@*/		/* "user way" h */
#if GhcBuild_h == YES
# define IfGhcBuild_h(x) x
GHC_BUILD_FLAG_h = -build-h-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_h = -build-h-not-defined-error
#else
# define IfGhcBuild_h(x) /**/
GHC_BUILD_FLAG_h = -build-h-not-defined
GHC_BUILD_OPTS_h = -build-h-not-defined-error
#endif

#define GhcBuild_i NO /*@GhcBuild_i@*/		/* "user way" i */
#if GhcBuild_i == YES
# define IfGhcBuild_i(x) x
GHC_BUILD_FLAG_i = -build-i-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_i = -build-i-not-defined-error
#else
# define IfGhcBuild_i(x) /**/
GHC_BUILD_FLAG_i = -build-i-not-defined
GHC_BUILD_OPTS_i = -build-i-not-defined-error
#endif

#define GhcBuild_j NO /*@GhcBuild_j@*/		/* "user way" j */
#if GhcBuild_j == YES
# define IfGhcBuild_j(x) x
GHC_BUILD_FLAG_j = -build-j-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_j = -build-j-not-defined-error
#else
# define IfGhcBuild_j(x) /**/
GHC_BUILD_FLAG_j = -build-j-not-defined
GHC_BUILD_OPTS_j = -build-j-not-defined-error
#endif

#define GhcBuild_k NO /*@GhcBuild_k@*/		/* "user way" k */
#if GhcBuild_k == YES
# define IfGhcBuild_k(x) x
GHC_BUILD_FLAG_k = -build-k-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_k = -build-k-not-defined-error
#else
# define IfGhcBuild_k(x) /**/
GHC_BUILD_FLAG_k = -build-k-not-defined
GHC_BUILD_OPTS_k = -build-k-not-defined-error
#endif

#define GhcBuild_l NO /*@GhcBuild_l@*/		/* "user way" l */
#if GhcBuild_l == YES
# define IfGhcBuild_l(x) x
GHC_BUILD_FLAG_l = -build-l-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_l = -build-l-not-defined-error
#else
# define IfGhcBuild_l(x) /**/
GHC_BUILD_FLAG_l = -build-l-not-defined
GHC_BUILD_OPTS_l = -build-l-not-defined-error
#endif

#define GhcBuild_m NO /*@GhcBuild_m@*/		/* "user way" m */
#if GhcBuild_m == YES
# define IfGhcBuild_m(x) x
GHC_BUILD_FLAG_m = -build-m-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_m = -build-m-not-defined-error
#else
# define IfGhcBuild_m(x) /**/
GHC_BUILD_FLAG_m = -build-m-not-defined
GHC_BUILD_OPTS_m = -build-m-not-defined-error
#endif

#define GhcBuild_n NO /*@GhcBuild_n@*/		/* "user way" n */
#if GhcBuild_n == YES
# define IfGhcBuild_n(x) x
GHC_BUILD_FLAG_n = -build-n-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_n = -build-n-not-defined-error
#else
# define IfGhcBuild_n(x) /**/
GHC_BUILD_FLAG_n = -build-n-not-defined
GHC_BUILD_OPTS_n = -build-n-not-defined-error
#endif

#define GhcBuild_o NO /*@GhcBuild_o@*/		/* "user way" o */
#if GhcBuild_o == YES
# define IfGhcBuild_o(x) x
GHC_BUILD_FLAG_o = -build-o-not-defined /* >>>change here<<< if required */
GHC_BUILD_OPTS_o = -build-o-not-defined-error
#else
# define IfGhcBuild_o(x) /**/
GHC_BUILD_FLAG_o = -build-o-not-defined
GHC_BUILD_OPTS_o = -build-o-not-defined-error
#endif

/* ======= END OF BUILD INFO ==================================== */


/* As of 0.19, our parser won't go through Sun's /usr/bin/yacc
   (due to an utterly hardwired limit on the number of states [1000]).
   You can use: (1) their unbundled /usr/lang/yacc; or (2) the GNU
   "bison -y".  Do not try Berkeley yacc -- it willnae work.
*/
#ifndef YaccCmd
#define YaccCmd @YaccCmd@
#endif

/* ================================================================
   INSTALL stuff:
*/

/* WHERE TO INSTALL IT:

    By default, the root prefix for where everything is installed is
    "/usr/local".  Assume you are installing for the <arch>
    architecture...  Beneath that, things look like this:

    bin/<arch>          for executables the user invokes, e.g., driver "ghc"
			[InstBinDir_GHC]
    bin			we might install some scripts (not platform-dependent)
			here... [InstScriptDir_GHC]
    lib/ghc/<version>   for support-bits for "ghc" (architecture-independent),
			for a specific version. [InstDataDir_GHC]
    lib/ghc/<version>/<arch>
			ditto, but the <arch>itecture-dependent bits
			[InstLibDir_GHC]
    man/man<ext>/       man pages [InstManRoot]
    info		Info files [InstInfoDir]

    You may alter mkworld's ideas about GHC installation by changing
    the above-mentioned settings, as shown below.

    The default values are set in only4-ghc.ljm, if you are interested.

    If you are going to install the utility bits (literate, mkworld,
    glafp-utils) as well as the GHC system itself, you should do
    similar installation fiddling in your "mkworld/site.jm" file,
    setting the variables InstRootDir, InstBinDir, InstLibDir, etc.
    (the non-project-specific ones).
*/

/*
    "AT_GLASGOW"  -- Are we installing at Glasgow?
    (also set in site.jm.in, but we get here and try to use it first)
 */
#ifndef AT_GLASGOW
#define AT_GLASGOW @AT_GLASGOW@
#endif

/* only the "prefix" things are set here */
#ifndef InstRootDir_GHC
#define InstRootDir_GHC @prefix@
#endif
#ifndef InstBinRootDir_GHC
#define InstBinRootDir_GHC @exec_prefix@
#endif

/* install the compilation system driver as "ghc-<version>" at Glasgow 
   (default is: "ghc" elsewhere) 
 */
#ifndef GhcDriverInstallName
#if AT_GLASGOW
#define GhcDriverInstallName ghc-$(PROJECTVERSION)
#else
#define GhcDriverInstallName ghc
#endif
#endif

/* At Glasgow, make sure things are installed for group "grasp".

   If you do not care what group it is installed for, delete
   this stuff altogether.  If you leave it in, be sure it is a
   group that exists at your site!
 */
#if AT_GLASGOW && !defined(InstGroup)
#define InstGroup -g grasp
#endif

/* At Glasgow, we would rather the installed binaries were stripped.
   (Delete if you feel otherwise.)
*/
#ifndef InstStrip
#define InstStrip -s
#endif