# undef sparc
# define SparcArchitecture
# endif
+# ifdef __sparcv9
+# undef __sparcv9
+# define SparcV9Architecture
+# endif
# ifdef mc68000
# undef mc68000
# define Sun3Architecture
# undef i386
# define i386Architecture
# endif
+# if defined(__amd64__) || defined (__x86_64__)
+# undef __amd64__
+# undef __x86_64__
+# define AMD64Architecture
+# endif
# undef sun
# define SunArchitecture
#endif /* sun */
# undef linux
# define LinuxArchitecture
# ifdef i386
+# undef pentium
+# undef pentiumpro
# define i386Architecture
# undef i386
+# endif
# ifdef __i386__
# ifndef i386Architecture
# define i386Architecture
# define AlphaArchitecture
# undef __alpha
# endif /* __alpha */
-#endif
+# ifdef powerpc
+# define PpcArchitecture
+# undef powerpc
+# endif
+# ifdef __powerpc__
+# ifndef PpcArchitecture
+# define PpcArchitecture
+# endif
+# undef __powerpc__
+# endif
+# if defined(__amd64__) || defined (__x86_64__)
+# undef __amd64__
+# undef __x86_64__
+# define AMD64Architecture
+# endif
+# if defined(amd64__) || defined (x86_64__)
+# undef amd64__
+# undef x86_64__
+# ifndef AMD64Architecture
+# define AMD64Architecture
+# endif
+# endif
#endif /* linux */
#ifdef __uxp__
#define UseElfFormat YES
#else
#define UseElfFormat NO
+#error "Only ELF format is supported on linux"
#endif
#endif
#define BuildLibPathVar LD_LIBRARY_PATH
#define NeedWidePrototypes NO
#define SetTtyGroup YES
-#if UseElfFormat
-#if OSMajorVersion == 1 && OSMinorVersion < 2
-#define CcCmd gcc -b i486-linuxelf
-#define CplusplusCmd g++ -b i486-linuxelf
-#define AsCmd /usr/i486-linuxelf/bin/as
-#define LdCmd ld -m elf_i386
-#else
-#define CcCmd gcc
-#define CplusplusCmd g++
+#define CcCmd gcc -pipe
+#define CplusplusCmd g++ -pipe -fpermissive
#define AsCmd as
#define LdCmd ld
-#endif
+
#define AsmDefines -D__ELF__
-#else
-#define CcCmd gcc
-#if OSMajorVersion == 1 && OSMinorVersion > 1
-#define AsCmd /usr/i486-linuxaout/bin/as
-#define LdCmd ld -m i386linux
-#else
-#define AsCmd as
-#define LdCmd ld
-#endif
-#define AsmDefines -DUSE_GAS -U__ELF__
-#endif
+
#define MkdirHierCmd mkdir -p
#define CppCmd /lib/cpp
#if OSMajorVersion >= 2
#endif
#if LinuxCLibMajorVersion < 6
-#define LinuxSourceDefines -D_POSIX_SOURCE \
+# define LinuxSourceDefines -D_POSIX_SOURCE \
-D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
-#ifndef HasLibCrypt
-# define HasLibCrypt NO
-#endif
+# ifndef HasLibCrypt
+# define HasLibCrypt NO
+# endif
+
#else
-#define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
+# define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
-D_POSIX_SOURCE \
- -D_BSD_SOURCE -D_SVID_SOURCE
-#define HasPosixThreads YES
-#define ThreadedX YES
-#define HasThreadSafeAPI YES
-#define ThreadsLibraries -lpthread
-#define SystemMTDefines -D_REENTRANT
-#ifndef HasLibCrypt
-# define HasLibCrypt YES
+ -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
+ -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
+ LinuxLocaleDefines
+# define HasPosixThreads YES
+# define ThreadedX YES
+# define HasThreadSafeAPI YES
+# define ThreadsLibraries -lpthread
+# define SystemMTDefines -D_REENTRANT
+# ifndef HasLibCrypt
+# define HasLibCrypt YES
+# endif
#endif
-#endif
-
-XCOMM This is needed for CDE currently
-#define CplusplusStandardDefines StandardDefines -fpermissive
#ifdef i386Architecture
#define OptimizedCDebugFlags DefaultGcc2i386Opt
#define LinuxMachineDefines -D__i386__
+/* For DtHelp TIFF processing routines. */
+#define LSBBitOrder YES
+
#if UseElfFormat
#define HasPlugin YES
#define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
#endif
#endif /* i386Architecture */
+#ifdef AMD64Architecture
+#define OptimizedCDebugFlags DefaultGcc2i386Opt
+#define LinuxMachineDefines -D__x86_64__
+/* For DtHelp TIFF processing routines. */
+#define LSBBitOrder YES
+
+#if UseElfFormat
+#define HasPlugin YES
+#define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
+#endif
+#endif /* AMD64Architecture */
+
#ifdef AlphaArchitecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__alpha__
#ifdef Mc68020Architecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__mc68000__
-#define StandardCppDefines -traditional StandardDefines
+#define StandardCppDefines -traditional
#endif /* Mc68020Architecture */
#define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
#define ConnectionFlags -DUNIXCONN -DTCPCONN
+XCOMM This is needed for CDE currently
+#define CplusplusStandardDefines StandardDefines
+
/* Some of these man page defaults are overriden in the above OS sections */
#ifndef ManSuffix
# define ManSuffix 1x
#ifdef unix
"-Uunix", /* remove unix symbol so that filename unix.c okay */
#endif
-#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH)
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__) || defined(MACH) || defined(USL) || defined(sco) || defined(ISC) || defined(__bsdi__) || defined(linux) || defined(__hpux__) || defined(__vxworks)
# ifdef __i386__
"-D__i386__",
# endif
+# ifdef __i486__
+ "-D__i486__",
+# endif
+# ifdef __i586__
+ "-D__i586__",
+# endif
+# ifdef __i686__
+ "-D__i686__",
+# endif
+# ifdef __k6__
+ "-D__k6__",
+# endif
+# ifdef __ia64__
+ "-D__ia64__",
+# endif
+# ifdef __amd64__
+ "-D__amd64__",
+# endif
+# ifdef __x86_64__
+ "-D__amd64__",
+# endif
# ifdef __GNUC__
"-traditional",
# endif
#endif
#ifdef __EMX__
{"__EMX__", "1"},
+#endif
+# ifdef ia64
+ {"ia64", "1"},
+# endif
+# ifdef __ia64__
+ {"__ia64__", "1"},
+# endif
+# if defined (amd64) || defined (x86_64)
+ {"amd64", "1"},
+ {"x86_64", "1"},
+# endif
+# if defined (__amd64__) || defined (__x86_64__)
+ {"__amd64__", "1"},
+ {"__x86_64__", "1"},
+# endif
+# ifdef __i386
+ {"__i386", "1"},
+# endif
+# ifdef __i386__
+ {"__i386__", "1"},
+# endif
+# ifdef __i486__
+ {"__i486__", "1"},
+# endif
+# ifdef __i586__
+ {"__i586__", "1"},
+# endif
+# ifdef __i686__
+ {"__i686__", "1"},
+# endif
+# ifdef __k6__
+ {"__k6__", "1"},
+# endif
+# ifdef i386
+ {"i386", "1"},
+# endif
+# ifdef i486
+ {"i486", "1"},
+# endif
+# ifdef i586
+ {"i586", "1"},
+# endif
+# ifdef i686
+ { "i686", "1"},
+# endif
+# ifdef k6
+ {"k6", "1"},
+# endif
+# ifdef sparc
+ {"sparc", "1"},
+# endif
+# ifdef __sparc__
+ {"__sparc__", "1"},
+# endif
+#if defined(__ppc__)
+ {"__ppc__", "1"},
+#endif
+#if defined(__ppc64__)
+ {"__ppc64__", "1"},
+#endif
+# ifdef __powerpc__
+ {"__powerpc__", "1"},
+# endif
+# ifdef __powerpc64__
+ {"__powerpc64__", "1"},
+# endif
+#if defined(__BIG_ENDIAN__)
+ {"__BIG_ENDIAN__", "1"},
+#endif
+#if defined(__LITTLE_ENDIAN__)
+ {"__LITTLE_ENDIAN__", "1"},
+#endif
+#if defined(__vxworks)
+ {"vxworks", "1"},
#endif
/* add any additional symbols before this line */
{NULL, NULL}