Imake.cf revision e9698f98
1XCOMM $XdotOrg: xc/config/cf/Imake.cf,v 1.7 2005/03/02 11:20:29 gisburn Exp $
2XCOMM $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $
3/*
4 * To add support for another platform:
5 * 
6 *     1.  Identify a machine-specific cpp symbol.  If your preprocessor 
7 *         does not have any built in, you will need to add the symbol to the
8 *         cpp_argv table in config/imake/imakemdep.h and rebuild imake with
9 *         the BOOTSTRAPCFLAGS variable set (see the macII for an example).
10 *
11 *     2.  Add all machine-specific cpp symbols (either defined by you or by
12 *         the preprocessor or compiler) to the predefs table in 
13 *         config/imake/imakemdep.h.
14 *
15 *     3.  But a new #ifdef block below that defines MacroIncludeFile and
16 *         MacroFile for your new platform and then #undefs the machine-
17 *         specific preprocessor symbols (to avoid problems with file names).
18 *
19 *     4.  Create a .cf file with the name given by MacroFile.
20 */
21XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $
22
23#if defined(__APPLE__)
24# undef __APPLE__
25# define MacroIncludeFile <darwin.cf>
26# define MacroFile darwin.cf
27# define DarwinArchitecture
28# ifdef __ppc__
29#  define PpcDarwinArchitecture
30#  undef __ppc__
31# endif
32# ifdef __i386__
33#  define i386DarwinArchitecture
34#  undef __i386__
35# endif
36#endif
37
38#if defined(clipper) || defined(__clipper__)
39# undef clipper
40# define MacroIncludeFile <ingr.cf>
41# define MacroFile ingr.cf
42# define IngrArchitecture
43#endif /* clipper */
44
45#ifdef __CYGWIN__
46#define MacroIncludeFile <cygwin.cf>
47#define MacroFile cygwin.cf
48#define cygwinArchitecture
49#define i386Architecture
50#undef i386
51#undef i486
52#undef i586
53#undef i686
54#undef __i386__
55#undef _X86_
56#undef __CYGWIN__
57#endif /* CYGWIN */
58
59#ifdef ultrix
60# define MacroIncludeFile <ultrix.cf>
61# define MacroFile ultrix.cf
62# ifdef vax
63#  undef vax
64#  define VaxArchitecture
65# endif
66# ifdef mips
67#  undef mips
68#  define MipsArchitecture
69#  define MipselArchitecture
70# endif
71# undef ultrix
72# define UltrixArchitecture
73#endif /* ultrix */
74
75#if defined(vax) && !defined(UltrixArchitecture) && !defined(__OpenBSD__)
76# define MacroIncludeFile <bsd.cf>
77# define MacroFile bsd.cf
78# undef vax
79# define BSDArchitecture
80# define VaxArchitecture
81#endif /* vax */
82
83#ifdef __bsdi__
84# define MacroIncludeFile <bsdi.cf>
85# define MacroFile bsdi.cf
86# undef __bsdi__
87# ifdef bsdi
88#  undef bsdi
89# endif
90# define BSDOSArchitecture
91# if defined(__i386__) || defined(i386)
92#  define i386BsdArchitecture
93#  define i386Architecture
94#  undef i386
95#  undef __i386__
96# endif
97# if defined(__ppc__) || defined(ppc)
98#  define PpcBsdArchitecture
99#  define PpcArchitecture
100#  undef ppc
101#  undef __ppc__
102# endif
103# if defined(__sparc__) || defined(__sparc_v9__) || defined(sparc)
104#  define SparcBsdArchitecture
105#  define SparcArchitecture
106#  undef sparc
107#  undef __sparc__
108#  undef __sparc_v9__
109# endif
110#endif /* bsdi */
111
112#ifdef __OpenBSD__
113# undef __OpenBSD__
114# undef __NetBSD__
115# define OpenBSDArchitecture
116# define KOpenBSDArchitecture
117# define MacroIncludeFile <OpenBSD.cf>
118# define MacroFile OpenBSD.cf
119# ifdef __i386__
120#  define i386BsdArchitecture
121#  define i386Architecture
122#  undef i386
123# endif
124# if defined(__sparc__) || defined(sparc)
125#  if !defined(__arch64__)
126#   define SparcArchitecture
127#  else
128#   define Sparc64Architecture
129#  endif
130#  undef sparc
131# endif
132# if defined(__mips__) || defined(mips)
133#   define MipsArchitecture
134#   ifdef arc
135#     define ArcArchitecture
136#     undef arc
137#   endif
138#   ifdef pmax
139#     define PmaxArchitecture
140#     undef pmax
141#   endif
142#   undef mips
143# endif
144# if defined(__alpha__) || defined(alpha)
145#   define AlphaArchitecture
146#   undef __alpha__
147#   undef alpha
148# endif
149# if defined(__amd64__) || defined(__x86_64__)
150#   define AMD64Architecture
151#   undef __amd64__
152#   undef __x86_64__
153#   undef amd64
154# endif
155# if defined(__mc68020__) || defined(mc68020)
156#  define Mc68020Architecture
157#  if defined(amiga)
158#   define AmigaArchitecture
159#   undef amiga
160#  endif
161#  if defined(hp300)
162#   define Hp300Architecture
163#   undef hp300
164#  endif
165#  if defined(mac68k)
166#    define Mac68kArchitecture
167#    undef mac68k
168#  endif
169#  if defined(mvme68k)
170#   define Mvme68kArchitecture
171#   undef mvme68k
172#  endif
173#  if defined(sun3) 
174#   define Sun3Architecture
175#   undef sun3
176#  endif
177#  undef mc68000
178# endif
179# ifdef __powerpc__
180#  define PpcArchitecture
181#  undef __powerpc__
182#  undef __macppc__
183#  undef macppc
184# endif
185# ifdef __vax__
186#  undef vax
187#  undef __vax__
188#  define VaxArchitecture
189# endif
190# ifdef __hppa__
191#  ifndef HPArchitecture
192#   define HPArchitecture
193#  endif
194#  undef __hppa__
195# endif /* __hppa__ */
196#endif /* OpenBSD */
197
198/* Systems based on kernel of OpenBSD */
199#if defined(__OpenBSD_kernel__)
200#define KOpenBSDArchitecture
201#endif
202
203#ifdef __NetBSD__
204# define MacroIncludeFile <NetBSD.cf>
205# define MacroFile NetBSD.cf
206# undef __NetBSD__
207# define NetBSDArchitecture
208# define KNetBSDArchitecture
209# ifdef __i386__
210#  define i386BsdArchitecture
211#  define i386Architecture
212#  undef i386
213# endif
214# if defined(__sparc64__) || defined(__sparc_v9__) || defined(__arch64__)
215#  define Sparc64Architecture
216# endif
217# if defined(__sparc__) || defined(sparc)
218#  define SparcArchitecture
219#  undef sparc
220#  if defined(__sparc_v9__) || defined(__arch64__)
221#    define Sparc64Architecture
222#  endif
223# endif
224# ifdef mips
225#   define MipsArchitecture
226#   define ArcArchitecture
227#   undef mips
228# endif
229# ifdef __alpha__
230#   define AlphaArchitecture
231#   define AlphaBsdArchitecture
232#   undef __alpha__
233# endif
234# ifdef mc68000
235#   define Mc68020Architecture
236# endif
237# if defined(__arm__) || defined(__arm32__)
238#   define Arm32Architecture
239#   undef __arm__
240#   undef __arm32__
241# endif
242# ifdef __vax__
243#   define VaxArchitecture
244#   undef __vax__
245# endif
246# ifdef __powerpc__
247#   define PpcArchitecture
248#   undef __powerpc__
249# endif
250# ifdef __x86_64__
251#  define AMD64Architecture
252#  undef __x86_64__
253# endif
254#endif /* NetBSD */
255
256/* Systems based on kernel of NetBSD */
257#if defined(__NetBSD_kernel__)
258#define KNetBSDArchitecture
259#endif
260
261#ifdef __DragonFly__
262# define MacroIncludeFile <DragonFly.cf>
263# define MacroFile DragonFly.cf
264# undef __DragonFly__
265# undef __FreeBSD__
266# define DragonFlyArchitecture
267# define FreeBSDArchitecture
268# ifdef __i386__
269#  define i386BsdArchitecture
270#  define i386Architecture
271#  undef i386
272# endif
273# ifdef __sparc64__
274#  define Sparc64Architecture
275#  undef __sparc64__
276# endif
277# ifdef __ia64__
278#  define ia64Architecture
279#  undef __ia64__
280# endif
281# ifdef __amd64__
282#  define x86_64Architecture
283#  undef __amd64__
284#  undef __x86_64__
285# endif
286#endif /* __DragonFly__ */
287
288#ifdef __FreeBSD__
289# define MacroIncludeFile <FreeBSD.cf>
290# define MacroFile FreeBSD.cf
291# undef __FreeBSD__
292# define FreeBSDArchitecture
293# define KFreeBSDArchitecture
294# ifdef __i386__
295#  define i386BsdArchitecture
296#  define i386Architecture
297#  undef i386
298# endif
299# ifdef __alpha__
300#  define AlphaBsdArchitecture
301#  define AlphaArchitecture
302#  undef __alpha__
303# endif
304# ifdef __sparc64__
305#  define Sparc64Architecture
306#  undef __sparc64__
307# endif
308# ifdef __ia64__
309#  define ia64Architecture
310#  undef __ia64__
311# endif
312# ifdef __amd64__
313#  define AMD64Architecture
314#  undef __amd64__
315#  undef __x86_64__
316# endif
317# ifdef __powerpc__
318#  define PpcArchitecture
319#  undef __powerpc__
320# endif
321#endif /* __FreeBSD__ */
322
323/* Systems based on kernel of FreeBSD */
324#if defined(__FreeBSD_kernel__)
325#define KFreeBSDArchitecture
326#endif
327
328#ifdef AMOEBA
329 /* Should be before the 'sun' entry because we may be cross-compiling */
330# define MacroIncludeFile <Amoeba.cf>
331# define MacroFile Amoeba.cf
332# if defined(i80386) || defined(__i80386__)
333#  undef i80386
334#  define i386Architecture
335# else
336#  if defined(mc68000) || defined(__mc68000__)
337#   undef mc68000
338#   define Sun3Architecture
339#   define SunArchitecture
340#  else
341#   if defined(sparc) || defined(__sparc__)
342#    undef sparc
343#    define SparcArchitecture
344#    define SunArchitecture
345#   endif
346#  endif
347#  undef sun
348# endif
349#endif /* AMOEBA */
350
351#ifdef sun
352# define MacroIncludeFile <sun.cf>
353# define MacroFile sun.cf
354# ifdef SVR4
355#  undef SVR4
356#  define SVR4Architecture
357# endif
358# ifdef sparc
359#  undef sparc
360#  define SparcArchitecture
361# endif
362# ifdef __sparcv9
363#  undef __sparcv9
364#  define Sparc64Architecture
365# endif
366# ifdef mc68000
367#  undef mc68000
368#  define Sun3Architecture
369# endif
370# if defined(__amd64) || defined(__x86_64)
371#  undef __amd64
372#  undef __x86_64
373#  undef amd64
374#  undef i386
375#  define AMD64Architecture
376# endif
377# ifdef i386
378#  undef i386
379#  define i386Architecture
380# endif
381# undef sun
382# define SunArchitecture
383#endif /* sun */
384
385#ifdef hpux
386# define MacroIncludeFile <hp.cf>
387# define MacroFile hp.cf
388# undef hpux
389# define HPArchitecture
390#endif /* hpux */
391
392#ifdef __SCO__
393# define MacroIncludeFile <sco5.cf>
394# define MacroFile sco5.cf
395# undef __SCO__
396# undef sco
397# undef USL
398# undef SYSV
399# undef i386
400# undef SCO
401# undef SVR4
402# define i386Architecture
403# define SCOArchitecture
404# define i386SVR3Architecture
405# define SVR3Architecture
406# define i386ScoArchitecture
407# define i386Sco325Architecture
408# undef i386
409# undef i486
410# undef i586
411# undef i686
412# undef k6
413# undef __i386__
414# undef __i486__
415# undef __i586__
416# undef __i686__
417# undef __k6__
418# undef __i386
419# undef __i486
420# undef __i586
421# undef __i686
422# undef __k6
423# undef pentium
424# undef __pentium
425# undef pentiumpro
426# undef __pentiumpro
427#endif /* __SCO__ - SCO Open Server 5 */
428
429#ifdef __UNIXWARE__
430# define MacroIncludeFile <usl.cf>
431# define MacroFile usl.cf
432# undef __UNIXWARE__
433# undef USL
434# undef SVR4
435# undef i386
436# undef SVR5
437# undef SYSV5
438# define SVR4Architecture
439# define i386Architecture
440# define USLArchitecture
441# define UnixWareArchitecture
442# undef i386
443# undef i486
444# undef i586
445# undef i686
446# undef k6
447# undef __i386__
448# undef __i486__
449# undef __i586__
450# undef __i686__
451# undef __k6__
452# undef __i386
453# undef __i486
454# undef __i586
455# undef __i686
456# undef __k6
457# undef pentium
458# undef __pentium
459# undef pentiumpro
460# undef __pentiumpro
461#endif /* __UNIXWARE__ */
462
463#ifdef NCR
464# define MacroIncludeFile <ncr.cf>
465# define MacroFile ncr.cf
466# undef NCR
467# undef SVR4
468# undef i386
469# define SVR4Architecture
470# define i386Architecture
471# define NCRArchitecture
472#endif /* NCR */
473
474#ifdef apollo
475# define MacroIncludeFile <apollo.cf>
476# define MacroFile apollo.cf
477# undef apollo
478# define ApolloArchitecture
479#endif /* apollo */
480
481#ifdef sony
482# define MacroIncludeFile <sony.cf>
483# define MacroFile sony.cf
484# undef sony
485# undef sony_news
486# define SonyArchitecture
487# ifdef mc68020
488#  undef mc68020
489#  undef mc68030
490#  define Mc68020Architecture
491# endif
492# ifdef mips
493#  undef mips
494#  define MipsArchitecture
495# endif
496# ifdef __svr4
497#  define SVR4Architecture
498# else
499#  if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
500#   define SonySysvArchitecture
501#  else
502#   define SonyBsdArchitecture
503#  endif
504# endif
505#endif /* sony */
506
507#ifdef M4310
508# define MacroIncludeFile <pegasus.cf>
509# define MacroFile pegasus.cf
510# undef M4310
511# define PegasusArchitecture
512#endif /* M4310 */
513
514#ifdef M4330
515# define MacroIncludeFile <m4330.cf>
516# define MacroFile m4330.cf
517# undef  M4330
518# define M4330Architecture
519#endif /* M4330 */
520
521#ifdef macII
522# define MacroIncludeFile <macII.cf>
523# define MacroFile macII.cf
524# undef  macII
525# define MacIIArchitecture
526#endif /* macII */
527
528#ifdef _CRAY
529# define MacroIncludeFile <cray.cf>
530# define MacroFile cray.cf
531# undef cray
532# undef CRAY
533# undef CRAY1
534# undef CRAY2
535# undef YMP
536# define CrayArchitecture
537#endif /* _CRAY */
538
539#ifdef sgi
540# define MacroIncludeFile <sgi.cf>
541# define MacroFile sgi.cf
542# undef sgi
543# define SGIArchitecture
544# undef mips
545# undef __mips
546# define MipsArchitecture
547# ifdef _SVR4
548#  undef _SVR4
549#  define SVR4Architecture
550# endif
551# ifdef _SYSTYPE_SVR4
552#  undef _SYSTYPE_SVR4
553#  define SVR4Architecture
554# endif
555#endif /* sgi */
556
557#ifdef stellar
558# define MacroIncludeFile <stellar.cf>
559# define MacroFile stellar.cf
560# undef stellar
561# define StellarArchitecture
562#endif /* stellar */
563
564#if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
565# define MacroIncludeFile <ibm.cf>
566# define MacroFile ibm.cf
567# ifdef ibm
568#  undef ibm
569# endif
570# define IBMArchitecture
571# ifdef i386
572#  undef i386
573#  define PS2Architecture
574# endif
575# ifdef ibm032
576#  undef ibm032
577#  define RtArchitecture
578# endif
579# ifdef aix
580#  undef aix
581#  define AIXArchitecture
582# endif
583# ifdef _IBMR2
584#  undef _IBMR2
585#  if (DefaultOSMajorVersion < 5)
586#   define RsArchitecture
587#  else
588#   define PpcArchitecture
589#  endif
590# endif
591#endif /* ibm */
592
593#ifdef luna
594# undef luna
595# define MacroIncludeFile <luna.cf>
596# define MacroFile luna.cf
597# define LunaArchitecture
598# ifdef mc68000
599#  undef mc68000
600#  define Mc68000Architecture
601# else
602#  undef mc88000
603#  define Mc88000Architecture
604# endif
605#endif /* luna */
606
607#ifdef Mips
608#  define MacroIncludeFile <Mips.cf>
609#  define MacroFile Mips.cf
610#  undef Mips
611#  undef mips
612#  if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
613#    define MipsBsdArchitecture
614#  else /* BSD */
615#    define MipsSysvArchitecture
616#  endif /* BSD */
617#endif /* Mips */
618
619#ifdef MOTOROLA
620# define MacroIncludeFile <moto.cf>
621# define MacroFile moto.cf
622# undef MOTOROLA	
623# ifdef SYSV
624#  define MotoR3Architecture
625# endif
626# ifdef SVR4
627#  define MotoR4Architecture
628# endif
629#endif /* MOTOROLA */
630
631#if defined(SVR4) && !defined(DGUX)
632# ifdef i386
633#  define i386Architecture
634#  undef i386
635# endif
636# ifdef PC98
637#  define PANIX98Architecture
638#  undef PC98
639# endif
640# define SVR4Architecture
641# define MacroIncludeFile <svr4.cf>
642# define MacroFile svr4.cf
643# undef SVR4
644#endif /* SVR4 */
645
646#ifdef SYSV
647# ifdef i386
648# undef i386
649#  ifdef ISC
650#   define i386Architecture	
651#   define i386SVR3Architecture	
652#   define MacroIncludeFile <isc.cf>
653#   define MacroFile isc.cf
654#   define i386IscArchitecture
655#   undef ISC
656#   ifdef ISC202
657#    define IscVersion 202
658#    undef ISC202
659#   else
660#    ifdef ISC30
661#     define IscVersion 300
662#     undef ISC30
663#    else
664#     ifdef ISC40
665#      define IscVersion 400
666#      undef ISC40
667#     else
668#      define IscVersion 221
669#     endif /* ISC40 */
670#    endif /* ISC30 */
671#   endif /* ISC202 */
672#  endif /* ISC */
673#  ifndef MacroFile
674#   define i386SVR3Architecture
675#   define MacroIncludeFile <x386.cf>
676#   define MacroFile x386.cf
677#  endif /* MacroFile */
678# endif /* i386 */
679#endif /* SYSV */
680
681/* SYSV386 is here for backward compatibility only */
682#ifdef SYSV386
683# undef i386
684# ifdef SVR4
685#  define i386Architecture
686#  define SVR4Architecture
687#  define i386SVR4Architecture
688#  define MacroIncludeFile <svr4.cf>
689#  define MacroFile svr4.cf
690#  undef SVR4
691# else /* ! SVR4 */
692#  ifdef ISC
693#   define i386Architecture	
694#   define i386SVR3Architecture	
695#   define MacroIncludeFile <isc.cf>
696#   define MacroFile isc.cf
697#   define i386IscArchitecture
698#   undef ISC
699#   ifdef ISC202
700#    define IscVersion 202
701#    undef ISC202
702#   else
703#    ifdef ISC30
704#     define IscVersion 300
705#     undef ISC30
706#    else
707#     ifdef ISC40
708#      define IscVersion 400
709#      undef ISC40
710#     else
711#      define IscVersion 221
712#     endif /* ISC40 */
713#    endif /* ISC30 */
714#   endif /* ISC202 */
715#  endif /* ISC */
716#  ifndef MacroFile
717#   define i386SVR3Architecture
718#   define MacroIncludeFile <x386.cf>
719#   define MacroFile x386.cf
720#  endif /* MacroFile */
721# endif /* ! SVR4 */
722#endif /* SYSV386 */
723
724#ifdef DGUX
725# define i386Architecture
726# define SVR4Architecture
727# define MacroIncludeFile <DGUX.cf>
728# define MacroFile DGUX.cf
729# undef DGUX
730# define DguxArchitecture
731#endif /* DGUX */
732
733#ifdef __convex__
734# define MacroIncludeFile <convex.cf>
735# define MacroFile convex.cf
736# ifdef convex
737#  undef convex
738# endif
739# define ConvexArchitecture
740#endif /* _convex_ */
741
742#ifdef __osf__
743# define MacroIncludeFile <osf1.cf>
744# define MacroFile osf1.cf
745# define OSF1Architecture
746# undef __osf__
747# ifdef __mips__
748#  undef __mips__
749#  define MipsArchitecture
750#  define MipselArchitecture
751# endif
752# ifdef __alpha
753#  undef __alpha
754#  define AlphaArchitecture
755# endif
756#endif /* __osf__ */
757
758#ifdef Oki
759# define MacroIncludeFile <Oki.cf>
760# define MacroFile Oki.cf
761# undef Oki
762# define i860SVR4Architecture
763# define SVR4Architecture
764# undef SVR4
765#endif /* Oki */
766
767#if defined(WIN32) && !defined(__GNUC__)
768# define MacroIncludeFile <Win32.cf>
769# define MacroFile Win32.cf
770# define Win32Architecture
771#endif /* WIN32 */
772
773#if defined(WIN32) && defined(__GNUC__)
774#define MacroIncludeFile <mingw.cf>
775#define MacroFile mingw.cf
776#define Win32Architecture
777#define mingwArchitecture
778#define i386Architecture
779#undef i386
780#undef i486
781#undef i586
782#undef i686
783#undef __i386__
784#undef _X86_
785#undef __MINGW32__
786#endif /* CYGWIN */
787
788#if defined(linux) || defined(__GLIBC__)
789# define MacroIncludeFile <linux.cf>
790# define MacroFile linux.cf
791# undef linux
792# ifdef __linux__
793#  define LinuxArchitecture
794# endif
795# ifdef __GLIBC__
796#  define GNUArchitecture
797# endif
798# ifdef i386
799#  ifndef i386Architecture
800#   define i386Architecture
801#  endif
802#  undef i386
803XCOMM Keep cpp from replacing path elements containing i486/i586/i686
804#  ifdef i486
805#  ifndef i386Architecture
806#   define i386Architecture
807#  endif
808#   undef i486
809#  endif
810#  ifdef i586
811#  ifndef i386Architecture
812#   define i386Architecture
813#  endif
814#   undef i586
815#  endif
816#  ifdef i686
817#  ifndef i386Architecture
818#   define i386Architecture
819#  endif
820#   undef i686
821#  endif
822#  ifdef k6
823#  ifndef i386Architecture
824#   define i386Architecture
825#  endif
826#   undef k6
827#  endif
828# endif /* k6 */
829# ifdef __i386__
830#  ifndef i386Architecture
831#   define i386Architecture
832#  endif
833#  undef __i386__
834# endif /* __i386__ */
835# ifdef __i486__
836#  ifndef i386Architecture
837#   define i386Architecture
838#  endif
839#  undef __i486__
840# endif /* __i486__ */
841# ifdef __i586__
842#  ifndef i386Architecture
843#   define i386Architecture
844#  endif
845#  undef __i586__
846# endif /* __i586__ */
847# ifdef __i686__
848#  ifndef i386Architecture
849#   define i386Architecture
850#  endif
851#  undef __i686__
852# endif /* __i686__ */
853# ifdef __k6__
854#  ifndef i386Architecture
855#   define i386Architecture
856#  endif
857#  undef __k6__
858# endif /* __k6__ */
859# ifdef __i386
860#  ifndef i386Architecture
861#   define i386Architecture
862#  endif
863#  undef __i386
864# endif /* __i386 */
865# ifdef __i486
866#  ifndef i386Architecture
867#   define i386Architecture
868#  endif
869#  undef __i486
870# endif /* __i486 */
871# ifdef __i586
872#  ifndef i386Architecture
873#   define i386Architecture
874#  endif
875#  undef __i586
876# endif /* __i586 */
877# ifdef __i686
878#  ifndef i386Architecture
879#   define i386Architecture
880#  endif
881#  undef __i686
882# endif /* __i686 */
883# ifdef __k6
884#  ifndef i386Architecture
885#   define i386Architecture
886#  endif
887#  undef __k6
888# endif /* __k6 */
889/* Keep this order! s390x has also __s390__ defined */
890# if defined(__s390x__)
891#  define s390xArchitecture
892#  undef __s390x__
893#  undef __s390__
894# endif
895# ifdef __s390__
896#   define s390Architecture
897#  undef __s390__
898# endif /* s390 */
899# ifdef __alpha
900#  define AlphaArchitecture
901#  undef __alpha
902# endif /* __alpha */
903# ifdef __alpha__
904#  ifndef AlphaArchitecture
905#   define AlphaArchitecture
906#  endif
907#  undef __alpha__
908# endif /* __alpha__ */
909# ifdef __arm__
910#  define Arm32Architecture
911#  undef arm
912#  undef __arm
913#  undef __arm__
914#  if defined(__ARMEB__)
915#   define Arm32ebArchitecture
916#  endif
917#  undef __ARMEB__
918# endif
919# ifdef mc68000
920#  define Mc68020Architecture
921#  undef mc68000
922# endif /* mc68000 */
923# if defined (powerpc) && !defined(__powerpc64__) && !defined (powerpc64)
924#  define PpcArchitecture
925#  undef powerpc
926# endif
927# if defined (__powerpc__) && !defined(__powerpc64__) && !defined (powerpc64)
928#  ifndef PpcArchitecture
929#   define PpcArchitecture
930#  endif
931#  undef __powerpc__
932# endif
933# ifdef __powerpc64__
934#  ifndef Ppc64Architecture
935#   define Ppc64Architecture
936#  endif
937#  undef __powerpc64__
938# endif
939# ifdef sparc
940#  define SparcArchitecture
941#  undef sparc
942# endif
943# ifdef __sparc__
944#  ifndef SparcArchitecture
945#   define SparcArchitecture
946#  endif
947#  undef __sparc__
948# endif
949# ifdef ia64 
950#  define ia64Architecture
951#  undef ia64 
952# endif
953# ifdef __ia64__
954#  ifndef ia64Architecture
955#   define ia64Architecture
956#  endif
957#  undef __ia64__
958# endif
959# if defined(mips) || defined(__mips__)
960#  define MipsArchitecture
961#  undef mips
962#  undef __mips__
963#  if defined(MIPSEL) || defined(_MIPSEL)
964#   define MipselArchitecture
965#  endif
966#  undef MIPSEL
967#  undef _MIPSEL
968# endif
969# ifdef __hppa__
970#  ifndef HPArchitecture
971#   define HPArchitecture
972#  endif
973#  undef __hppa__
974# endif /* __hppa__ */
975# ifdef __sh__
976#  ifndef SuperHArchitecture
977#   define SuperHArchitecture
978#  endif
979#  ifdef __BIG_ENDIAN__
980#   ifndef SuperHebArchitecture
981#    define SuperHebArchitecture
982#   endif
983#  endif
984#  undef __sh__
985# endif /* __sh__ */
986# if defined(__SH3__) || defined(__sh3__)
987#  ifndef SuperH3Architecture
988#   define SuperH3Architecture
989#  endif
990#  undef __SH3__
991#  undef __sh3__
992# endif /* __SH3__ or __sh3__ */
993# ifdef __SH4__
994#  ifdef __SH4_NOFPU__
995#   ifndef SuperH4NOFPUArchitecture
996#    define SuperH4NOFPUArchitecture
997#   endif
998#   undef __SH4_NOFPU__
999#  else
1000#   ifndef SuperH4Architecture
1001#    define SuperH4Architecture
1002#   endif
1003#  endif
1004#  undef __SH4__
1005# endif /* __SH4__ */
1006/* for compatibility with 3.3.x */
1007# ifdef PpcArchitecture
1008#  define PowerPCArchitecture
1009# endif
1010# if defined(__s390x__)
1011#  define s390xArchitecture
1012#  undef __s390x__
1013# endif
1014# if defined(__amd64__) || defined (__x86_64__)
1015#  undef __amd64__
1016#  undef __x86_64__
1017#  define AMD64Architecture
1018# endif
1019# if defined(amd64__) || defined (x86_64__)
1020#  undef amd64__
1021#  undef x86_64__
1022#  ifndef AMD64Architecture
1023#   define AMD64Architecture
1024#  endif
1025# endif
1026#endif /* linux || __GLIBC__ */
1027
1028#if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc))
1029# define MacroIncludeFile <lynx.cf>
1030# define MacroFile lynx.cf
1031# define LynxOSArchitecture
1032# undef __Lynx__
1033# undef Lynx
1034# undef lynx
1035# if defined(i386) || defined(__i386__) || defined(__x86__)
1036#  define i386Architecture
1037#  undef i386
1038#  undef __i386__
1039#  undef __x86__
1040# endif
1041# ifdef __powerpc__
1042#  define PpcArchitecture
1043#  undef __powerpc__
1044# endif
1045# if defined(sparc) || defined(__sparc__)
1046#  define SparcArchitecture
1047#  undef sparc
1048#  undef __sparc__
1049# endif
1050/* for compatibility with 3.3.x */
1051# ifdef PpcArchitecture
1052#  define PowerPCArchitecture
1053# endif
1054#endif /* LynxOS AT/PPC/microSPARC */
1055
1056#ifdef __uxp__
1057# define MacroIncludeFile <fujitsu.cf>
1058# define MacroFile fujitsu.cf
1059# define FujitsuArchitecture
1060# undef __uxp__
1061# define UXPArchitecture
1062# define SVR4Architecture
1063# ifdef sparc
1064#  undef sparc
1065#  define SparcArchitecture
1066# endif
1067#endif /* __uxp__ */
1068
1069#ifdef __sxg__
1070# define MacroIncludeFile <fujitsu.cf>
1071# define MacroFile fujitsu.cf
1072# define FujitsuArchitecture
1073# undef __sxg__
1074# define mc68000Architecture
1075#endif /* __sxg__ */
1076
1077#ifdef _SEQUENT_
1078/* undefine assignments resulting from -DSVR4 */
1079# undef MacroIncludeFile
1080# define MacroIncludeFile <sequent.cf>
1081# undef MacroFile
1082# define MacroFile sequent.cf
1083# undef _SEQUENT_
1084# define DynixPtxArchitecture
1085# define SequentArchitecture
1086#endif
1087
1088#if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
1089# ifdef nec
1090#  undef nec
1091# endif
1092# define MacroIncludeFile <nec.cf>
1093# define MacroFile nec.cf
1094# define NecArchitecture
1095#endif
1096
1097#ifdef minix 
1098#define MacroIncludeFile <minix.cf>
1099#define MacroFile minix.cf
1100#undef minix
1101#define MinixArchitecture
1102#define i386Architecture
1103#endif /* minix */
1104
1105/* Systems with GNU libc and userland */
1106#if defined(__GNU__)
1107#define GNUArchitecture
1108#define MacroIncludeFile <gnu.cf>
1109#define MacroFile gnu.cf
1110#ifdef __i386__
1111#define i386Architecture
1112#endif
1113#endif
1114
1115#ifdef MACH
1116#ifdef __GNU__
1117/* Mach-based GNU system */
1118#define GNUMachArchitecture
1119#else
1120#define MacroIncludeFile <mach.cf>
1121#define MacroFile mach.cf
1122#endif
1123#undef MACH
1124#ifdef	i386
1125#define i386MachArchitecture
1126#define i386Architecture
1127#endif	/* i386 */
1128#undef i386
1129#endif /* MACH */
1130
1131/* On NetBSD, `unix' is not defined, and cpp emits a warning every time
1132 * it sees a test using the `unix' symbol */
1133#if !defined(NetBSDArchitecture) || (defined(NetBSDArchitecture) && DefaultOSMajorVersion == 1 && DefaultOSMinorVersion <= 3)
1134#ifdef unix
1135#undef unix
1136#endif
1137#endif
1138
1139#ifdef emxos2
1140#define MacroIncludeFile <os2.cf>
1141#define MacroFile os2.cf
1142#define OS2Architecture
1143#define i386Architecture
1144#endif /* emxos2 */
1145
1146#if defined(__QNX__) && !defined(__QNXNTO__)
1147#define MacroIncludeFile <QNX4.cf>
1148#define MacroFile QNX4.cf
1149#define QNX4Architecture
1150#define i386Architecture
1151#endif /* QNX4 */
1152
1153#ifdef __QNXNTO__
1154#define MacroIncludeFile <nto.cf>
1155#define MacroFile nto.cf
1156#define NTOArchitecture
1157# ifdef PPC
1158#  define PPCArchitecture
1159#  undef PPC
1160# endif
1161# ifdef MIPS
1162#  define mipsArchitecture
1163#  undef MIPS
1164# endif
1165# ifdef i386
1166#  define i386Architecture
1167#  undef i386
1168# endif /* i386 */
1169# ifdef __i386__
1170#  ifndef i386Architecture
1171#   define i386Architecture
1172#  endif
1173#  undef __i386__
1174# endif /* __i386__ */
1175#endif /* QNX/Neutrino */
1176
1177#ifdef SparcArchitecture
1178# if defined(__sparc_v9) || defined(__arch64__)
1179#  define Sparc64Architecture
1180# endif
1181#endif
1182
1183#ifndef MacroIncludeFile
1184XCOMM WARNING:  Imake.cf not configured; guessing at definitions!!!
1185XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
1186#define MacroIncludeFile <generic.cf>
1187#define MacroFile generic.cf
1188#endif
1189