Allow building on FreeBSD
[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 # ifdef __amd64__
197 #  define AMD64BsdArchitecture
198 #  define AMD64Architecture
199 #  undef amd64
200 # endif
201 #endif /* __FreeBSD__ */
202
203 #ifdef AMOEBA
204  /* Should be before the 'sun' entry because we may be cross-compiling */
205 # define MacroIncludeFile <Amoeba.cf>
206 # define MacroFile Amoeba.cf
207 # if defined(i80386) || defined(__i80386__)
208 #  undef i80386
209 #  define i386Architecture
210 # else
211 #  if defined(mc68000) || defined(__mc68000__)
212 #   undef mc68000
213 #   define Sun3Architecture
214 #   define SunArchitecture
215 #  else
216 #   if defined(sparc) || defined(__sparc__)
217 #    undef sparc
218 #    define SparcArchitecture
219 #    define SunArchitecture
220 #   endif
221 #  endif
222 #  undef sun
223 # endif
224 #endif /* AMOEBA */
225
226 #ifdef sun
227 # define MacroIncludeFile <sun.cf>
228 # define MacroFile sun.cf
229 # ifdef SVR4
230 #  undef SVR4
231 #  define SVR4Architecture
232 # endif
233 # ifdef sparc
234 #  undef sparc
235 # define SparcArchitecture
236 # endif
237 # ifdef __sparcv9
238 #  undef __sparcv9
239 # define SparcV9Architecture
240 # endif
241 # ifdef mc68000
242 #  undef mc68000
243 # define Sun3Architecture
244 # endif
245 # ifdef i386
246 #  undef i386
247 #  define i386Architecture
248 # endif
249 # if defined(__amd64__) || defined (__x86_64__)
250 #  undef __amd64__
251 #  undef __x86_64__
252 #  define AMD64Architecture
253 # endif
254 # undef sun
255 # define SunArchitecture
256 #endif /* sun */
257
258 #ifdef hpux
259 # define MacroIncludeFile <hp.cf>
260 # define MacroFile hp.cf
261 # undef hpux
262 # define HPArchitecture
263 #endif /* hpux */
264
265 #ifdef sco
266 # define MacroIncludeFile <sco.cf>
267 # define MacroFile sco.cf
268 # undef sco
269 # undef USL
270 # undef SYSV
271 # undef i386
272 /* # define i386Architecture */
273 # define SCOArchitecture
274 #endif /* sco */
275
276 #ifdef USL
277 # define MacroIncludeFile <usl.cf>
278 # define MacroFile usl.cf
279 # undef USL
280 # undef SVR4
281 # undef i386
282 # define SVR4Architecture
283 # define i386Architecture
284 # define USLArchitecture
285 #endif /* USL */
286
287 #ifdef NCR
288 # define MacroIncludeFile <ncr.cf>
289 # define MacroFile ncr.cf
290 # undef NCR
291 # undef SVR4
292 # undef i386
293 # define SVR4Architecture
294 # define i386Architecture
295 # define NCRArchitecture
296 #endif /* NCR */
297
298 #ifdef apollo
299 # define MacroIncludeFile <apollo.cf>
300 # define MacroFile apollo.cf
301 # undef apollo
302 # define ApolloArchitecture
303 #endif /* apollo */
304
305 #ifdef sony
306 # define MacroIncludeFile <sony.cf>
307 # define MacroFile sony.cf
308 # undef sony
309 # undef sony_news
310 # define SonyArchitecture
311 # ifdef mc68020
312 #  undef mc68020
313 #  undef mc68030
314 #  define Mc68020Architecture
315 # endif
316 # ifdef mips
317 #  undef mips
318 #  define MipsArchitecture
319 # endif
320 # ifdef __svr4
321 #  define SVR4Architecture
322 # else
323 #  if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
324 #   define SonySysvArchitecture
325 #  else
326 #   define SonyBsdArchitecture
327 #  endif
328 # endif
329 #endif /* sony */
330
331 #ifdef M4310
332 # define MacroIncludeFile <pegasus.cf>
333 # define MacroFile pegasus.cf
334 # undef M4310
335 # define PegasusArchitecture
336 #endif /* M4310 */
337
338 #ifdef M4330
339 # define MacroIncludeFile <m4330.cf>
340 # define MacroFile m4330.cf
341 # undef  M4330
342 # define M4330Architecture
343 #endif /* M4330 */
344
345 #ifdef macII
346 # define MacroIncludeFile <macII.cf>
347 # define MacroFile macII.cf
348 # undef  macII
349 # define MacIIArchitecture
350 #endif /* macII */
351
352 #ifdef _CRAY
353 # define MacroIncludeFile <cray.cf>
354 # define MacroFile cray.cf
355 # undef cray
356 # undef CRAY
357 # undef CRAY1
358 # undef CRAY2
359 # undef YMP
360 # define CrayArchitecture
361 #endif /* _CRAY */
362
363 #ifdef sgi
364 # define MacroIncludeFile <sgi.cf>
365 # define MacroFile sgi.cf
366 # undef sgi
367 # define SGIArchitecture
368 # undef mips
369 # define MipsArchitecture
370 # ifdef _SVR4
371 #  undef _SVR4
372 #  define SVR4Architecture
373 # endif
374 # ifdef _SYSTYPE_SVR4
375 #  undef _SYSTYPE_SVR4
376 #  define SVR4Architecture
377 # endif
378 #endif /* sgi */
379
380 #ifdef stellar
381 # define MacroIncludeFile <stellar.cf>
382 # define MacroFile stellar.cf
383 # undef stellar
384 # define StellarArchitecture
385 #endif /* stellar */
386
387 #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
388 # define MacroIncludeFile <ibm.cf>
389 # define MacroFile ibm.cf
390 # ifdef ibm
391 #  undef ibm
392 # endif
393 # define IBMArchitecture
394 # ifdef i386
395 #  undef i386
396 #  define PS2Architecture
397 # endif
398 # ifdef ibm032
399 #  undef ibm032
400 #  define RtArchitecture
401 # endif
402 # ifdef aix
403 #  undef aix
404 #  define AIXArchitecture
405 # endif
406 # ifdef _IBMR2
407 #  undef _IBMR2
408 #  define RsArchitecture
409 # endif
410 #endif /* ibm */
411
412 #ifdef luna
413 # undef luna
414 # define MacroIncludeFile <luna.cf>
415 # define MacroFile luna.cf
416 # define LunaArchitecture
417 # ifdef mc68000
418 #  undef mc68000
419 #  define Mc68000Architecture
420 # else
421 #  undef mc88000
422 #  define Mc88000Architecture
423 # endif
424 #endif /* luna */
425
426 #ifdef Mips
427 #  define MacroIncludeFile <Mips.cf>
428 #  define MacroFile Mips.cf
429 #  undef Mips
430 #  undef mips
431 #  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
432 #    define MipsBsdArchitecture
433 #  else /* BSD */
434 #    define MipsSysvArchitecture
435 #  endif /* BSD */
436 #endif /* Mips */
437
438 #ifdef MOTOROLA
439 # define MacroIncludeFile <moto.cf>
440 # define MacroFile moto.cf
441 # undef MOTOROLA        
442 # ifdef SYSV
443 #  define MotoR3Architecture
444 # endif
445 # ifdef SVR4
446 #  define MotoR4Architecture
447 # endif
448 #endif /* MOTOROLA */
449
450 #ifdef SVR4
451 # ifdef i386
452 #  define i386Architecture
453 #  undef i386
454 # endif
455 # define SVR4Architecture
456 # define MacroIncludeFile <svr4.cf>
457 # define MacroFile svr4.cf
458 # undef SVR4
459 #endif /* SVR4 */
460
461 #ifdef SYSV
462 # ifdef i386
463 #  define MacroIncludeFile <x386.cf>
464 #  define MacroFile x386.cf
465 #  define i386SVR3Architecture
466 #  undef i386
467 # endif
468 #endif /* SYSV */
469
470 #ifdef SYSV386
471 # undef i386
472 # ifdef SVR4
473 #  define i386Architecture
474 #  define SVR4Architecture
475 #  define i386SVR4Architecture
476 #  define MacroIncludeFile <svr4.cf>
477 #  define MacroFile svr4.cf
478 #  undef SVR4
479 # else
480 #  define MacroIncludeFile <x386.cf>
481 #  define MacroFile x386.cf
482 #  define i386SVR3Architecture
483 # endif
484 #endif /* SYSV386 */
485
486 #ifdef DGUX
487 # define MacroIncludeFile <DGUX.cf>
488 # define MacroFile DGUX.cf
489 # undef DGUX
490 # define DguxArchitecture
491 #endif /* DGUX */
492
493 #ifdef __convex__
494 # define MacroIncludeFile <convex.cf>
495 # define MacroFile convex.cf
496 # ifdef convex
497 #  undef convex
498 # endif
499 # define ConvexArchitecture
500 #endif /* _convex_ */
501
502 #ifdef __osf__
503 # define MacroIncludeFile <osf1.cf>
504 # define MacroFile osf1.cf
505 # define OSF1Architecture
506 # undef __osf__
507 # ifdef __mips__
508 #  undef __mips__
509 #  define MipsArchitecture
510 # endif
511 # ifdef __alpha
512 #  undef __alpha
513 #  define AlphaArchitecture
514 # endif
515 #endif /* __osf__ */
516
517 #ifdef Oki
518 # define MacroIncludeFile <Oki.cf>
519 # define MacroFile Oki.cf
520 # undef Oki
521 # define i860SVR4Architecture
522 # define SVR4Architecture
523 # undef SVR4
524 #endif /* Oki */
525
526 #ifdef WIN32
527 # define MacroIncludeFile <Win32.cf>
528 # define MacroFile Win32.cf
529 # define Win32Architecture
530 #endif /* WIN32 */
531
532 #ifdef linux 
533 # define MacroIncludeFile <linux.cf>
534 # define MacroFile linux.cf
535 # undef linux
536 # define LinuxArchitecture
537 # ifdef i386
538 #  undef pentium
539 #  undef pentiumpro
540 #  define i386Architecture
541 #  undef i386
542 # endif
543 # ifdef __i386__
544 #  ifndef i386Architecture
545 #   define i386Architecture
546 #  endif
547 #  undef __i386__
548 # endif /* i386 */
549 # ifdef __alpha
550 #  define AlphaArchitecture
551 #  undef __alpha
552 # endif /* __alpha */
553 # ifdef powerpc
554 #  define PpcArchitecture
555 #  undef powerpc
556 # endif
557 # ifdef __powerpc__
558 #  ifndef PpcArchitecture
559 #   define PpcArchitecture
560 #  endif
561 #  undef __powerpc__
562 # endif
563 # if defined(__amd64__) || defined (__x86_64__)
564 #  undef __amd64__
565 #  undef __x86_64__
566 #  define AMD64Architecture
567 # endif
568 # if defined(amd64__) || defined (x86_64__)
569 #  undef amd64__
570 #  undef x86_64__
571 #  ifndef AMD64Architecture
572 #   define AMD64Architecture
573 #  endif
574 # endif
575 # if defined(__arm__)
576 # undef __arm__
577 # define ARMArchitecture
578 # endif
579 # if defined(__sparc__) || defined(sparc)
580 # define SparcArchitecture
581 # undef sparc
582 # endif
583 #endif /* linux */
584
585 #ifdef __uxp__
586 # define MacroIncludeFile <fujitsu.cf>
587 # define MacroFile fujitsu.cf
588 # define FujitsuArchitecture
589 # undef __uxp__
590 # define UXPArchitecture
591 # define SVR4Architecture
592 # ifdef sparc
593 #  undef sparc
594 #  define SparcArchitecture
595 # endif
596 #endif /* __uxp__ */
597
598 #ifdef __sxg__
599 # define MacroIncludeFile <fujitsu.cf>
600 # define MacroFile fujitsu.cf
601 # define FujitsuArchitecture
602 # undef __sxg__
603 # define mc68000Architecture
604 #endif /* __sxg__ */
605
606 #if defined(sequent) || defined(_SEQUENT_)
607 # define MacroIncludeFile <sequent.cf>
608 # define MacroFile sequent.cf
609 # ifdef sequent
610 #  undef sequent
611 #  define Dynix3Architecture
612 # endif
613 # ifdef _SEQUENT_
614 #  undef _SEQUENT_
615 #  define DynixPtxArchitecture
616 # endif
617 # define SequentArchitecture
618 #endif
619
620 #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
621 # ifdef nec
622 #  undef nec
623 # endif
624 # define MacroIncludeFile <nec.cf>
625 # define MacroFile nec.cf
626 # define NecArchitecture
627 #endif
628
629 #ifndef MacroIncludeFile
630 XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
631 XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
632 #define MacroIncludeFile <generic.cf>
633 #define MacroFile generic.cf
634 #endif