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