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