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