Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code
[oweals/cde.git] / cde / config / cf / Imake.cf
1 XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
2 /*
3  * To add support for another platform:
4  * 
5  *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
6  *         does not have any built in, you will need to add the symbol to the
7  *         cpp_argv table in config/imake/imakemdep.h and rebuild imake with
8  *         the BOOTSTRAPCFLAGS variable set (see the macII for an example).
9  *
10  *     2.  Add all machine-specific cpp symbols (either defined by you or by
11  *         the preprocessor or compiler) to the predefs table in 
12  *         config/imake/imakemdep.h.
13  *
14  *     3.  But a new #ifdef block below that defines MacroIncludeFile and
15  *         MacroFile for your new platform and then #undefs the machine-
16  *         specific preprocessor symbols (to avoid problems with file names).
17  *
18  *     4.  Create a .cf file with the name given by MacroFile.
19  */
20
21 #ifdef ultrix
22 # define MacroIncludeFile <ultrix.cf>
23 # define MacroFile ultrix.cf
24 # ifdef vax
25 #  undef vax
26 #  define VaxArchitecture
27 # endif
28 # ifdef mips
29 #  undef mips
30 #  define MipsArchitecture
31 # endif
32 # undef ultrix
33 # define UltrixArchitecture
34 #endif /* ultrix */
35
36 #if defined(vax) && !defined(UltrixArchitecture)
37 # define MacroIncludeFile <bsd.cf>
38 # define MacroFile bsd.cf
39 # undef vax
40 # define BSDArchitecture
41 # define VaxArchitecture
42 #endif /* vax */
43
44 #ifdef bsdi
45 # define MacroIncludeFile <bsdi.cf>
46 # define MacroFile bsdi.cf
47 # undef bsdi
48 # define BSD386Architecture
49 # define i386BsdArchitecture
50 # define i386Architecture
51 # undef i386
52 #endif /* bsdi */
53
54 #ifdef __OpenBSD__
55 # undef __OpenBSD__
56 # undef __NetBSD__
57 # define OpenBSDArchitecture
58 # define KOpenBSDArchitecture
59 # define MacroIncludeFile <OpenBSD.cf>
60 # define MacroFile OpenBSD.cf
61 # ifdef __i386__
62 #  define i386BsdArchitecture
63 #  define i386Architecture
64 #  undef i386
65 # endif
66 # if defined(__sparc__) || defined(sparc)
67 #  if !defined(__arch64__)
68 #   define SparcArchitecture
69 #  else
70 #   define Sparc64Architecture
71 #  endif
72 #  undef sparc
73 #  undef sparc64
74 # endif
75 # if defined(__mips__) || defined(mips)
76 #   define MipsArchitecture
77 #   ifdef __LP64__
78 #     define Mips64Architecture
79 #   endif
80 #   ifdef arc
81 #     define ArcArchitecture
82 #     undef arc
83 #   endif
84 #   ifdef sgi
85 #     define SGIArchitecture
86 #     undef sgi
87 #   endif
88 #   ifdef pmax
89 #     define PmaxArchitecture
90 #     undef pmax
91 #   endif
92 #   undef mips
93 #   undef __mips__
94 # endif
95 # if defined(__alpha__) || defined(alpha)
96 #   define AlphaArchitecture
97 #   undef __alpha__
98 #   undef alpha
99 # endif
100 # if defined(__amd64__) || defined(__x86_64__)
101 #   define AMD64Architecture
102 #   undef __amd64__
103 #   undef __x86_64__
104 #   undef amd64
105 # endif
106 # if defined(__arm__)
107 #   define Arm32Architecture
108 #   undef __arm__
109 #   if defined(zaurus)
110 #     undef zaurus
111 #     define ZaurusArchitecture
112 #   endif
113 # endif
114 # if defined(__mc68020__) || defined(mc68020)
115 #  define Mc68020Architecture
116 #  if defined(amiga)
117 #   define AmigaArchitecture
118 #   undef amiga
119 #  endif
120 #  if defined(hp300)
121 #   define Hp300Architecture
122 #   undef hp300
123 #  endif
124 #  if defined(mac68k)
125 #    define Mac68kArchitecture
126 #    undef mac68k
127 #  endif
128 #  if defined(mvme68k)
129 #   define Mvme68kArchitecture
130 #   undef mvme68k
131 #  endif
132 #  if defined(sun3) 
133 #   define Sun3Architecture
134 #   undef sun3
135 #  endif
136 #  undef mc68000
137 # endif
138 # if defined(__m88k__) || defined(m88k)
139 #  define Mc88000Architecture
140 #  undef m88k
141 # endif
142 # ifdef __powerpc__
143 #  define PpcArchitecture
144 #  undef __powerpc__
145 #  undef __macppc__
146 #  undef macppc
147 # endif
148 # ifdef __sh__
149 #  undef __sh__
150 #  define SuperHArchitecture
151 # endif
152 # ifdef __vax__
153 #  undef vax
154 #  undef __vax__
155 #  define VaxArchitecture
156 # endif
157 # ifdef __hppa__
158 #  ifndef HPArchitecture
159 #   define HPArchitecture
160 #  endif
161 #  undef __hppa__
162 # endif /* __hppa__ */
163 #endif /* OpenBSD */
164
165 /* Systems based on kernel of OpenBSD */
166 #if defined(__OpenBSD_kernel__)
167 #define KOpenBSDArchitecture
168 #endif
169
170 #ifdef __NetBSD__
171 # define MacroIncludeFile <NetBSD.cf>
172 # define MacroFile NetBSD.cf
173 # undef __NetBSD__
174 # define NetBSDArchitecture
175 # ifdef __i386__
176 #  define i386BsdArchitecture
177 #  define i386Architecture
178 #  undef i386
179 # endif
180 # if defined(__sparc__) || defined(sparc)
181 #  define SparcArchitecture
182 #  undef sparc
183 # endif
184 #endif /* NetBSD */
185
186 #ifdef __FreeBSD__
187 # define MacroIncludeFile <FreeBSD.cf>
188 # define MacroFile FreeBSD.cf
189 # undef __FreeBSD__
190 # define FreeBSDArchitecture
191 # ifdef __i386__
192 #  define i386BsdArchitecture
193 #  define i386Architecture
194 #  undef i386
195 # endif
196 #endif /* __FreeBSD__ */
197
198 #ifdef AMOEBA
199  /* Should be before the 'sun' entry because we may be cross-compiling */
200 # define MacroIncludeFile <Amoeba.cf>
201 # define MacroFile Amoeba.cf
202 # if defined(i80386) || defined(__i80386__)
203 #  undef i80386
204 #  define i386Architecture
205 # else
206 #  if defined(mc68000) || defined(__mc68000__)
207 #   undef mc68000
208 #   define Sun3Architecture
209 #   define SunArchitecture
210 #  else
211 #   if defined(sparc) || defined(__sparc__)
212 #    undef sparc
213 #    define SparcArchitecture
214 #    define SunArchitecture
215 #   endif
216 #  endif
217 #  undef sun
218 # endif
219 #endif /* AMOEBA */
220
221 #ifdef sun
222 # define MacroIncludeFile <sun.cf>
223 # define MacroFile sun.cf
224 # ifdef SVR4
225 #  undef SVR4
226 #  define SVR4Architecture
227 # endif
228 # ifdef sparc
229 #  undef sparc
230 # define SparcArchitecture
231 # endif
232 # ifdef __sparcv9
233 #  undef __sparcv9
234 # define SparcV9Architecture
235 # endif
236 # ifdef mc68000
237 #  undef mc68000
238 # define Sun3Architecture
239 # endif
240 # ifdef i386
241 #  undef i386
242 #  define i386Architecture
243 # endif
244 # if defined(__amd64__) || defined (__x86_64__)
245 #  undef __amd64__
246 #  undef __x86_64__
247 #  define AMD64Architecture
248 # endif
249 # undef sun
250 # define SunArchitecture
251 #endif /* sun */
252
253 #ifdef hpux
254 # define MacroIncludeFile <hp.cf>
255 # define MacroFile hp.cf
256 # undef hpux
257 # define HPArchitecture
258 #endif /* hpux */
259
260 #ifdef sco
261 # define MacroIncludeFile <sco.cf>
262 # define MacroFile sco.cf
263 # undef sco
264 # undef USL
265 # undef SYSV
266 # undef i386
267 /* # define i386Architecture */
268 # define SCOArchitecture
269 #endif /* sco */
270
271 #ifdef USL
272 # define MacroIncludeFile <usl.cf>
273 # define MacroFile usl.cf
274 # undef USL
275 # undef SVR4
276 # undef i386
277 # define SVR4Architecture
278 # define i386Architecture
279 # define USLArchitecture
280 #endif /* USL */
281
282 #ifdef NCR
283 # define MacroIncludeFile <ncr.cf>
284 # define MacroFile ncr.cf
285 # undef NCR
286 # undef SVR4
287 # undef i386
288 # define SVR4Architecture
289 # define i386Architecture
290 # define NCRArchitecture
291 #endif /* NCR */
292
293 #ifdef apollo
294 # define MacroIncludeFile <apollo.cf>
295 # define MacroFile apollo.cf
296 # undef apollo
297 # define ApolloArchitecture
298 #endif /* apollo */
299
300 #ifdef sony
301 # define MacroIncludeFile <sony.cf>
302 # define MacroFile sony.cf
303 # undef sony
304 # undef sony_news
305 # define SonyArchitecture
306 # ifdef mc68020
307 #  undef mc68020
308 #  undef mc68030
309 #  define Mc68020Architecture
310 # endif
311 # ifdef mips
312 #  undef mips
313 #  define MipsArchitecture
314 # endif
315 # ifdef __svr4
316 #  define SVR4Architecture
317 # else
318 #  if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
319 #   define SonySysvArchitecture
320 #  else
321 #   define SonyBsdArchitecture
322 #  endif
323 # endif
324 #endif /* sony */
325
326 #ifdef M4310
327 # define MacroIncludeFile <pegasus.cf>
328 # define MacroFile pegasus.cf
329 # undef M4310
330 # define PegasusArchitecture
331 #endif /* M4310 */
332
333 #ifdef M4330
334 # define MacroIncludeFile <m4330.cf>
335 # define MacroFile m4330.cf
336 # undef  M4330
337 # define M4330Architecture
338 #endif /* M4330 */
339
340 #ifdef macII
341 # define MacroIncludeFile <macII.cf>
342 # define MacroFile macII.cf
343 # undef  macII
344 # define MacIIArchitecture
345 #endif /* macII */
346
347 #ifdef _CRAY
348 # define MacroIncludeFile <cray.cf>
349 # define MacroFile cray.cf
350 # undef cray
351 # undef CRAY
352 # undef CRAY1
353 # undef CRAY2
354 # undef YMP
355 # define CrayArchitecture
356 #endif /* _CRAY */
357
358 #ifdef sgi
359 # define MacroIncludeFile <sgi.cf>
360 # define MacroFile sgi.cf
361 # undef sgi
362 # define SGIArchitecture
363 # undef mips
364 # define MipsArchitecture
365 # ifdef _SVR4
366 #  undef _SVR4
367 #  define SVR4Architecture
368 # endif
369 # ifdef _SYSTYPE_SVR4
370 #  undef _SYSTYPE_SVR4
371 #  define SVR4Architecture
372 # endif
373 #endif /* sgi */
374
375 #ifdef stellar
376 # define MacroIncludeFile <stellar.cf>
377 # define MacroFile stellar.cf
378 # undef stellar
379 # define StellarArchitecture
380 #endif /* stellar */
381
382 #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
383 # define MacroIncludeFile <ibm.cf>
384 # define MacroFile ibm.cf
385 # ifdef ibm
386 #  undef ibm
387 # endif
388 # define IBMArchitecture
389 # ifdef i386
390 #  undef i386
391 #  define PS2Architecture
392 # endif
393 # ifdef ibm032
394 #  undef ibm032
395 #  define RtArchitecture
396 # endif
397 # ifdef aix
398 #  undef aix
399 #  define AIXArchitecture
400 # endif
401 # ifdef _IBMR2
402 #  undef _IBMR2
403 #  define RsArchitecture
404 # endif
405 #endif /* ibm */
406
407 #ifdef luna
408 # undef luna
409 # define MacroIncludeFile <luna.cf>
410 # define MacroFile luna.cf
411 # define LunaArchitecture
412 # ifdef mc68000
413 #  undef mc68000
414 #  define Mc68000Architecture
415 # else
416 #  undef mc88000
417 #  define Mc88000Architecture
418 # endif
419 #endif /* luna */
420
421 #ifdef Mips
422 #  define MacroIncludeFile <Mips.cf>
423 #  define MacroFile Mips.cf
424 #  undef Mips
425 #  undef mips
426 #  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
427 #    define MipsBsdArchitecture
428 #  else /* BSD */
429 #    define MipsSysvArchitecture
430 #  endif /* BSD */
431 #endif /* Mips */
432
433 #ifdef MOTOROLA
434 # define MacroIncludeFile <moto.cf>
435 # define MacroFile moto.cf
436 # undef MOTOROLA        
437 # ifdef SYSV
438 #  define MotoR3Architecture
439 # endif
440 # ifdef SVR4
441 #  define MotoR4Architecture
442 # endif
443 #endif /* MOTOROLA */
444
445 #ifdef SVR4
446 # ifdef i386
447 #  define i386Architecture
448 #  undef i386
449 # endif
450 # define SVR4Architecture
451 # define MacroIncludeFile <svr4.cf>
452 # define MacroFile svr4.cf
453 # undef SVR4
454 #endif /* SVR4 */
455
456 #ifdef SYSV
457 # ifdef i386
458 #  define MacroIncludeFile <x386.cf>
459 #  define MacroFile x386.cf
460 #  define i386SVR3Architecture
461 #  undef i386
462 # endif
463 #endif /* SYSV */
464
465 #ifdef SYSV386
466 # undef i386
467 # ifdef SVR4
468 #  define i386Architecture
469 #  define SVR4Architecture
470 #  define i386SVR4Architecture
471 #  define MacroIncludeFile <svr4.cf>
472 #  define MacroFile svr4.cf
473 #  undef SVR4
474 # else
475 #  define MacroIncludeFile <x386.cf>
476 #  define MacroFile x386.cf
477 #  define i386SVR3Architecture
478 # endif
479 #endif /* SYSV386 */
480
481 #ifdef DGUX
482 # define MacroIncludeFile <DGUX.cf>
483 # define MacroFile DGUX.cf
484 # undef DGUX
485 # define DguxArchitecture
486 #endif /* DGUX */
487
488 #ifdef __convex__
489 # define MacroIncludeFile <convex.cf>
490 # define MacroFile convex.cf
491 # ifdef convex
492 #  undef convex
493 # endif
494 # define ConvexArchitecture
495 #endif /* _convex_ */
496
497 #ifdef __osf__
498 # define MacroIncludeFile <osf1.cf>
499 # define MacroFile osf1.cf
500 # define OSF1Architecture
501 # undef __osf__
502 # ifdef __mips__
503 #  undef __mips__
504 #  define MipsArchitecture
505 # endif
506 # ifdef __alpha
507 #  undef __alpha
508 #  define AlphaArchitecture
509 # endif
510 #endif /* __osf__ */
511
512 #ifdef Oki
513 # define MacroIncludeFile <Oki.cf>
514 # define MacroFile Oki.cf
515 # undef Oki
516 # define i860SVR4Architecture
517 # define SVR4Architecture
518 # undef SVR4
519 #endif /* Oki */
520
521 #ifdef WIN32
522 # define MacroIncludeFile <Win32.cf>
523 # define MacroFile Win32.cf
524 # define Win32Architecture
525 #endif /* WIN32 */
526
527 #ifdef linux 
528 # define MacroIncludeFile <linux.cf>
529 # define MacroFile linux.cf
530 # undef linux
531 # define LinuxArchitecture
532 # ifdef i386
533 #  undef pentium
534 #  undef pentiumpro
535 #  define i386Architecture
536 #  undef i386
537 # endif
538 # ifdef __i386__
539 #  ifndef i386Architecture
540 #   define i386Architecture
541 #  endif
542 #  undef __i386__
543 # endif /* i386 */
544 # ifdef __alpha
545 #  define AlphaArchitecture
546 #  undef __alpha
547 # endif /* __alpha */
548 # ifdef powerpc
549 #  define PpcArchitecture
550 #  undef powerpc
551 # endif
552 # ifdef __powerpc__
553 #  ifndef PpcArchitecture
554 #   define PpcArchitecture
555 #  endif
556 #  undef __powerpc__
557 # endif
558 # if defined(__amd64__) || defined (__x86_64__)
559 #  undef __amd64__
560 #  undef __x86_64__
561 #  define AMD64Architecture
562 # endif
563 # if defined(amd64__) || defined (x86_64__)
564 #  undef amd64__
565 #  undef x86_64__
566 #  ifndef AMD64Architecture
567 #   define AMD64Architecture
568 #  endif
569 # endif
570 # if defined(__arm__)
571 # undef __arm__
572 # define ARMArchitecture
573 # endif
574 #endif /* linux */
575
576 #ifdef __uxp__
577 # define MacroIncludeFile <fujitsu.cf>
578 # define MacroFile fujitsu.cf
579 # define FujitsuArchitecture
580 # undef __uxp__
581 # define UXPArchitecture
582 # define SVR4Architecture
583 # ifdef sparc
584 #  undef sparc
585 #  define SparcArchitecture
586 # endif
587 #endif /* __uxp__ */
588
589 #ifdef __sxg__
590 # define MacroIncludeFile <fujitsu.cf>
591 # define MacroFile fujitsu.cf
592 # define FujitsuArchitecture
593 # undef __sxg__
594 # define mc68000Architecture
595 #endif /* __sxg__ */
596
597 #if defined(sequent) || defined(_SEQUENT_)
598 # define MacroIncludeFile <sequent.cf>
599 # define MacroFile sequent.cf
600 # ifdef sequent
601 #  undef sequent
602 #  define Dynix3Architecture
603 # endif
604 # ifdef _SEQUENT_
605 #  undef _SEQUENT_
606 #  define DynixPtxArchitecture
607 # endif
608 # define SequentArchitecture
609 #endif
610
611 #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
612 # ifdef nec
613 #  undef nec
614 # endif
615 # define MacroIncludeFile <nec.cf>
616 # define MacroFile nec.cf
617 # define NecArchitecture
618 #endif
619
620 #ifndef MacroIncludeFile
621 XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
622 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
623 #define MacroIncludeFile <generic.cf>
624 #define MacroFile generic.cf
625 #endif