14c61c93dSmrgXCOMM $XdotOrg: xc/config/cf/linux.cf,v 1.24 2005/03/06 01:05:00 branden Exp $ 211d341caSmrgXCOMM platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ 311d341caSmrg 411d341caSmrg 511d341caSmrg 611d341caSmrg 711d341caSmrg 811d341caSmrgXCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $ 911d341caSmrg 1011d341caSmrg#ifndef LinuxElfDefault 1111d341caSmrg# define LinuxElfDefault YES 1211d341caSmrg#endif 1311d341caSmrg 1411d341caSmrg#ifndef UseElfFormat 1511d341caSmrg# define UseElfFormat LinuxElfDefault 1611d341caSmrg#endif 1711d341caSmrg 1811d341caSmrg#ifndef OSBinaryType 1911d341caSmrg# if UseElfFormat 2011d341caSmrg# define OSBinaryType [ELF] 2111d341caSmrg# else 2211d341caSmrg# ifdef AlphaArchitecture 2311d341caSmrg# define OSBinaryType [ECOFF] 2411d341caSmrg# else 2511d341caSmrg# define OSBinaryType [a.out] 2611d341caSmrg# endif 2711d341caSmrg# endif 2811d341caSmrg#endif 2911d341caSmrg 3011d341caSmrg#ifndef OSName 3111d341caSmrg# define OSName DefaultOSName OSBinaryType 3211d341caSmrg#endif 3311d341caSmrg 3411d341caSmrg#ifndef OSVendor 3511d341caSmrg# define OSVendor /**/ 3611d341caSmrg#endif 3711d341caSmrg#ifndef OSMajorVersion 3811d341caSmrg# define OSMajorVersion DefaultOSMajorVersion 3911d341caSmrg#endif 4011d341caSmrg#ifndef OSMinorVersion 4111d341caSmrg# define OSMinorVersion DefaultOSMinorVersion 4211d341caSmrg#endif 4311d341caSmrg#ifndef OSTeenyVersion 4411d341caSmrg# define OSTeenyVersion DefaultOSTeenyVersion 4511d341caSmrg#endif 4611d341caSmrg 4711d341caSmrg#ifndef LinuxDistribution 4811d341caSmrg# define LinuxDistribution DefaultLinuxDistribution 4911d341caSmrg/* 5011d341caSmrg Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def. 5111d341caSmrg Currently only LinuxSuSE, LinuxRedHat and LinuxDebian will be figured out 5211d341caSmrg automatically. 5311d341caSmrg Valid values are (from the list at www.linux.org in Oct. '97): 5411d341caSmrg LinuxUnknown (0) 5511d341caSmrg LinuxSuSE (1) 5611d341caSmrg LinuxCaldera (2) 5711d341caSmrg LinuxCraftworks (3) 5811d341caSmrg LinuxDebian (4) 5911d341caSmrg LinuxInfoMagic (5) 6011d341caSmrg LinuxKheops (6) 6111d341caSmrg LinuxPro (7) 6211d341caSmrg LinuxRedHat (8) 6311d341caSmrg LinuxSlackware (9) 6411d341caSmrg LinuxTurbo (10) 6511d341caSmrg LinuxWare (11) 6611d341caSmrg LinuxYggdrasil (12) 6711d341caSmrg*/ 6811d341caSmrg#endif 6911d341caSmrg#ifndef LinuxDistName 7011d341caSmrg# define LinuxDistName DefaultLinuxDistName 7111d341caSmrg#endif 7211d341caSmrg#ifndef LinuxCLibMajorVersion 7311d341caSmrg# define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion 7411d341caSmrg#endif 7511d341caSmrg#ifndef LinuxCLibMinorVersion 7611d341caSmrg# define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion 7711d341caSmrg#endif 7811d341caSmrg#ifndef LinuxCLibTeenyVersion 7911d341caSmrg# define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion 8011d341caSmrg#endif 8111d341caSmrg 8211d341caSmrg#ifndef HasGhostScript 8311d341caSmrg# define HasGhostScript YES 8411d341caSmrg#endif 8511d341caSmrg#ifndef BuildPDFdocs 8611d341caSmrg# define BuildPDFdocs NO 8711d341caSmrg#endif 8811d341caSmrg 8911d341caSmrg#ifndef LinuxBinUtilsMajorVersion 9011d341caSmrg# define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion 9111d341caSmrg#endif 9211d341caSmrg 93624e3943Smrg#ifndef HasGnuAr 94880d0a0cSmrg#define HasGnuAr YES 95624e3943Smrg#endif 96624e3943Smrg 9711d341caSmrgXCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) 9811d341caSmrgXCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion) 9911d341caSmrgXCOMM binutils: (LinuxBinUtilsMajorVersion) 10011d341caSmrg 10111d341caSmrg#if LinuxDistribution == LinuxDebian 10211d341caSmrg# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot 10311d341caSmrg# define SystemManDirectory /usr/share/man 10411d341caSmrg# endif 10511d341caSmrg# define HasPam YES 10611d341caSmrg/* un-comment this when it is un-broken */ 10711d341caSmrg/* # define JoystickSupport YES */ 10811d341caSmrg# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot 10911d341caSmrg# define XAppLoadDir EtcX11Directory/app-defaults 11011d341caSmrg# define XFileSearchPathDefault Concat4(EtcX11Directory/%L/%T/%N%C,%S:EtcX11Directory/%l/%T/%N%C,%S:EtcX11Directory/%T/%N%C,%S:EtcX11Directory/%L/%T/%N%S:EtcX11Directory/%l/%T/%N%S:EtcX11Directory/%T/%N%S):Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S) 11111d341caSmrg/* the relative symlink created by this rule causes problems for us */ 11211d341caSmrg# if defined(InstallAppDefFiles) && InstallAppDefFiles 11311d341caSmrg# define InstallAppDefaultsLong(file,class) @@\ 11411d341caSmrgInstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class) 11511d341caSmrg# else 11611d341caSmrg# define InstallAppDefaultsLong(file,class) @@\ 11711d341caSmrgInstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class) 11811d341caSmrg# endif /* InstallAppDefFiles */ 11911d341caSmrg# endif /* !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot */ 12011d341caSmrg# define SharedLibXdmGreet NO 12111d341caSmrg# define LinkGLToUsrInclude NO 12211d341caSmrg# define LinkGLToUsrLib NO 12311d341caSmrg# define SharedLibFont NO 12411d341caSmrg# define SharedLibGlu YES 12511d341caSmrg# define NormalLibGlu YES 12611d341caSmrg# define FSUseSyslog YES 12711d341caSmrg 12811d341caSmrg# define BuildLibGlxWithoutPIC NO 12911d341caSmrg 13011d341caSmrg# define DriverManSuffix 4x 13111d341caSmrg# define DriverManDir $(MANSOURCEPATH)4 13211d341caSmrg 13311d341caSmrg# define MiscManSuffix 7x 13411d341caSmrg# define MiscManDir $(MANSOURCEPATH)7 13511d341caSmrg 13611d341caSmrg/* 13711d341caSmrg * 13811d341caSmrg * 13911d341caSmrg# define DebianMaintainer YES 14011d341caSmrg * 14111d341caSmrg * 14211d341caSmrg */ 14311d341caSmrg 14411d341caSmrg# ifdef DebianMaintainer 14511d341caSmrg# ifndef XorgCustomVersion 14611d341caSmrg# define XorgCustomVersion "Debian" 14711d341caSmrg# endif 14811d341caSmrg# ifndef BuilderEMailAddr 14911d341caSmrg# define BuilderEMailAddr "debian-x@lists.debian.org" 15011d341caSmrg# endif 15111d341caSmrg# define XFree86Devel YES 15211d341caSmrg# define BuildAllSpecsDocs YES 15311d341caSmrg# define InstallXinitConfig YES 15411d341caSmrg# define InstallXdmConfig YES 15511d341caSmrg# define InstallFSConfig YES 15611d341caSmrg# define DebuggableLibraries YES 15711d341caSmrg# define ForceNormalLib YES 15811d341caSmrg# define BuildSpecsDocs YES 15911d341caSmrg# define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm 16011d341caSmrg# define BuildRman NO 16111d341caSmrg# define BuildHtmlManPages NO 16211d341caSmrg 16311d341caSmrg/* we build-depend on libfreetype6-dev (FreeType 2.x) */ 16411d341caSmrg# define BuildFreetype2Library NO 16511d341caSmrg# define HasFreetype2 YES 16611d341caSmrg/* m68k has no 2.4 kernel yet */ 16711d341caSmrg# ifndef Mc68020Architecture 16811d341caSmrg# define HasLinuxInput YES 16911d341caSmrg# endif 17011d341caSmrg# define HasXdmAuth YES 17111d341caSmrg# define HasLatex YES 17211d341caSmrg/* at present, glide2 only works on i386 */ 17311d341caSmrg# if defined(__linux__) && defined(i386Architecture) 17411d341caSmrg# define HasGlide2 YES 17511d341caSmrg# define Glide2IncDir /usr/include/glide 17611d341caSmrg# endif /* __linux__ && i386Architecture */ 17711d341caSmrg/* at present, glide3 only works on alpha, amd64, i386 and ia64 */ 17811d341caSmrg# if defined(__linux__) && (defined(i386Architecture) || \ 17911d341caSmrg defined(AlphaArchitecture) || defined(ia64Architecture) || \ 18011d341caSmrg defined(AMD64Architecture)) 18111d341caSmrg# define HasGlide3 YES 18211d341caSmrg# define Glide3IncDir /usr/include/glide3 18311d341caSmrg# endif /* __linux__ && (i386Architecture || AlphaArchitecture || \ 18411d341caSmrg ia64Architecture || AMD64Architecture) */ 18511d341caSmrg/* extended instruction set support */ 18611d341caSmrg# ifdef i386Architecture 18711d341caSmrg# define HasX86Support YES 18811d341caSmrg# define HasMMXSupport YES 18911d341caSmrg# define Has3DNowSupport YES 19011d341caSmrg/* 2.4 is not yet the official (or predominant) kernel in unstable */ 19111d341caSmrg# define HasSSESupport NO 19211d341caSmrg# endif /* i386Architecture */ 19311d341caSmrg# endif /* DebianMaintainer */ 19411d341caSmrg#endif /* LinuxDebian */ 19511d341caSmrg 19611d341caSmrg#if LinuxDistribution == LinuxRedHat 197b8df70beSmrg# define FSUseSyslog YES 198b8df70beSmrg# define BuildRman NO 199b8df70beSmrg# define BuildHtmlManPages NO 200b8df70beSmrg# define ProjectRoot /usr 201b8df70beSmrg# define ManPath /usr/share/man 202b8df70beSmrg# define XAppLoadDir /usr/share/X11/app-defaults 203b8df70beSmrg# define ConfigDir /usr/share/X11/config 20411d341caSmrg#endif 20511d341caSmrg 20611d341caSmrg#ifndef HasDevRandom 20711d341caSmrg# define HasDevRandom YES 20811d341caSmrg# ifndef RandomDeviceName 20911d341caSmrg# define RandomDeviceName /dev/urandom 21011d341caSmrg# endif 21111d341caSmrg#endif 21211d341caSmrg 21311d341caSmrg/* 21411d341caSmrg * The Linux BinUtils major version. 25 => 2.5.x, which is what is included 21511d341caSmrg * with Slackware 3.0 21611d341caSmrg * 21711d341caSmrg * This remains for compatibility only. 21811d341caSmrg * 21911d341caSmrg */ 22011d341caSmrg#ifndef BinUtilsMajorVersion 22111d341caSmrg# define BinUtilsMajorVersion LinuxBinUtilsMajorVersion 22211d341caSmrg#endif 22311d341caSmrg 22411d341caSmrg#if (LinuxCLibMajorVersion >= 6 || LinuxDistribution == LinuxSuSE) 22511d341caSmrg# define LinuxLocaleDefines /**/ 22611d341caSmrg#else 22711d341caSmrg# define LinuxLocaleDefines -DX_LOCALE 22811d341caSmrg#endif 22911d341caSmrg 23011d341caSmrg#ifndef LinuxAdditionalIncludes 23111d341caSmrg# define LinuxAdditionalIncludes /**/ 23211d341caSmrg#endif 23311d341caSmrg 23411d341caSmrg#ifndef LinuxGnuSourceDefines 23511d341caSmrg# ifdef UseInstalled 23611d341caSmrg# define LinuxGnuSourceDefines /**/ 23711d341caSmrg# else 23811d341caSmrg# define LinuxGnuSourceDefines -D_GNU_SOURCE 23911d341caSmrg# endif 24011d341caSmrg#endif 24111d341caSmrg 24211d341caSmrg#if LinuxCLibMajorVersion >= 6 24311d341caSmrg# define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \ 24411d341caSmrg -D_POSIX_SOURCE -D_XOPEN_SOURCE \ 24511d341caSmrg -D_BSD_SOURCE -D_SVID_SOURCE \ 24611d341caSmrg -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ 24711d341caSmrg LinuxAdditionalIncludes LinuxGnuSourceDefines \ 24811d341caSmrg LinuxLocaleDefines 24911d341caSmrg# define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H 25011d341caSmrg# define HasPosixThreads YES 25111d341caSmrg# define ThreadedX YES 25211d341caSmrg# define HasThreadSafeAPI YES 25311d341caSmrg# define ThreadsLibraries -lpthread 25411d341caSmrg# define SystemMTDefines -D_REENTRANT 25511d341caSmrg# ifndef HasLibCrypt 25611d341caSmrg# define HasLibCrypt YES 25711d341caSmrg# endif 25811d341caSmrg/* netscape wraps select but not poll as of communicator 4.72 */ 25911d341caSmrg# ifndef HasPoll 26011d341caSmrg# define HasPoll NO 26111d341caSmrg# endif 26211d341caSmrg#else 26311d341caSmrg# define LinuxSourceDefines -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 \ 26411d341caSmrg -D_BSD_SOURCE -D_SVID_SOURCE \ 26511d341caSmrg LinuxGnuSourceDefines LinuxLocaleDefines 26611d341caSmrg# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC 26711d341caSmrg# ifndef HasLibCrypt 26811d341caSmrg# define HasLibCrypt NO 26911d341caSmrg# endif 27011d341caSmrg# ifndef HasBasename 27111d341caSmrg# define HasBasename NO 27211d341caSmrg# endif 27311d341caSmrg /* Proliferation of C99isms makes -ansi unpalatable... */ 27411d341caSmrg# if !defined(DefaultCCOptions) && !defined(UseInstalled) && HasGcc 27511d341caSmrg# define DefaultCCOptions GccWarningOptions 27611d341caSmrg# endif 27711d341caSmrg#endif 27811d341caSmrg 27911d341caSmrg#ifndef InstallXloadSetGID 28011d341caSmrg#define InstallXloadSetGID NO 28111d341caSmrg#endif 28211d341caSmrg 28311d341caSmrg/* 28411d341caSmrg * XXX Check which versions of Linux really have IPv6. glibc 2.0 on 28511d341caSmrg * Red Hat 5.2 doesn't. 28611d341caSmrg */ 28711d341caSmrg#if LinuxCLibMajorVersion < 6 || \ 28811d341caSmrg (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion == 0) 28911d341caSmrg#define BuildIPv6 NO 29011d341caSmrg#endif 29111d341caSmrg 29211d341caSmrg/* <linux/input.h> support mainly for USB support */ 29311d341caSmrg#ifndef HasLinuxInput 29411d341caSmrg# if defined(__linux__) && (OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4)) 29511d341caSmrg# define HasLinuxInput YES 29611d341caSmrg# else 29711d341caSmrg# define HasLinuxInput NO 29811d341caSmrg# endif 29911d341caSmrg#endif 30011d341caSmrg 30111d341caSmrg#ifndef JoystickSupport 30211d341caSmrg# define JoystickSupport NO /* joystick driver is broken */ 30311d341caSmrg#endif 30411d341caSmrg 30511d341caSmrg/* <linux/joystick.h> appeared in 2.1.45 (officially) */ 30611d341caSmrg#ifndef HasLinuxSupport 30711d341caSmrg# if defined(__linux__) && (JoystickSupport || \ 30811d341caSmrg (OSMajorVersion > 2) || \ 30911d341caSmrg ((OSMajorVersion == 2) && (OSMinorVersion > 1)) || \ 31011d341caSmrg ((OSMajorVersion == 2) && (OSMinorVersion == 1) && (OSTeenyVersion >= 45))) 31111d341caSmrg# define HasLinuxJoystick YES 31211d341caSmrg# else 31311d341caSmrg# define HasLinuxJoystick NO 31411d341caSmrg# endif 31511d341caSmrg#endif 31611d341caSmrg 31711d341caSmrg/* Libtool on linux always uses minor numbers */ 31811d341caSmrg#define LibtoolMinorVersions YES 31911d341caSmrg 32011d341caSmrg/* On x86, determine whether to build with MTRR support */ 32111d341caSmrg#ifndef HasMTRRSupport 32211d341caSmrg# if defined (i386Architecture) || defined (AMD64Architecture) 32311d341caSmrg# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || \ 32411d341caSmrg (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 99) 32511d341caSmrg# define HasMTRRSupport YES 32611d341caSmrg# else 32711d341caSmrg# define HasMTRRSupport NO 32811d341caSmrg# endif 32911d341caSmrg# else 33011d341caSmrg# define HasMTRRSupport NO /* no for non-ix86 */ 33111d341caSmrg# endif 33211d341caSmrg#endif 33311d341caSmrg 33411d341caSmrg#ifndef XF86INT10_BUILD 33511d341caSmrg# if defined(__linux__) && defined(i386Architecture) 33611d341caSmrg# define XF86INT10_BUILD X86VM 33711d341caSmrg# elif defined(__linux__) && defined(AMD64Architecture) 33811d341caSmrg# define XF86INT10_BUILD X86EMU_OS 33911d341caSmrg# else 34011d341caSmrg# define XF86INT10_BUILD X86EMU_GENERIC 34111d341caSmrg# endif 34211d341caSmrg#endif 34311d341caSmrg 3441c80d5b0Smrg/* 34511d341caSmrg * Let the OS restore console fonts instead of the generic VGA 34611d341caSmrg * layer. This exists for Linux only at the moment so put it 34711d341caSmrg * here. 34811d341caSmrg */ 34911d341caSmrg#ifndef DoOSFontRestore 35011d341caSmrg# define DoOSFontRestore YES 35111d341caSmrg#endif 35211d341caSmrg 35311d341caSmrg/* Should we check the OS version to determine if the kernel supports it? */ 35411d341caSmrg#if DoOSFontRestore 35511d341caSmrg# ifndef FontRestoreCheckOsVersion 35611d341caSmrg# define FontRestoreCheckOsVersion YES 35711d341caSmrg# endif 35811d341caSmrg#endif 35911d341caSmrg 36011d341caSmrg/* The DRM module requires kernel services that appeared in late 2.1.x 36111d341caSmrg kernels and are known to be present in 2.2.x kernels. */ 36211d341caSmrg#ifndef BuildXF86DRI 36311d341caSmrg# if defined(AlphaArchitecture) 36411d341caSmrg# define BuildXF86DRI YES 36511d341caSmrg# elif defined(Arm32Architecture) 36611d341caSmrg# define BuildXF86DRI NO 36711d341caSmrg# elif defined(HPArchitecture) 36811d341caSmrg# define BuildXF86DRI YES 36911d341caSmrg# elif defined(i386Architecture) 37011d341caSmrg# if (defined(__linux__) && (OSMajorVersion > 2 || (OSMajorVersion == 2 && \ 37111d341caSmrg OSMinorVersion >= 2))) || \ 37211d341caSmrg defined(__FreeBSD_kernel__) 37311d341caSmrg# define BuildXF86DRI YES 37411d341caSmrg# else 37511d341caSmrg# define BuildXF86DRI NO 37611d341caSmrg# endif 37711d341caSmrg# elif defined(ia64Architecture) 37811d341caSmrg# define BuildXF86DRI YES 37911d341caSmrg# elif defined(Mc68020Architecture) 38011d341caSmrg# define BuildXF86DRI NO 38111d341caSmrg# elif defined(MipsArchitecture) 38211d341caSmrg# define BuildXF86DRI NO 38311d341caSmrg# elif defined(PpcArchitecture) 38411d341caSmrg# define BuildXF86DRI YES 38511d341caSmrg# elif defined(Ppc64Architecture) 38611d341caSmrg# define BuildXF86DRI NO 38711d341caSmrg# elif defined(s390Architecture) || defined(s390xArchitecture) 38811d341caSmrg# define BuildXF86DRI NO 38911d341caSmrg# elif defined(SparcArchitecture) 39011d341caSmrg# define BuildXF86DRI YES 39111d341caSmrg# elif defined(SuperHArchitecture) 39211d341caSmrg# define BuildXF86DRI NO 39311d341caSmrg# elif defined(AMD64Architecture) 39411d341caSmrg# define BuildXF86DRI YES 39511d341caSmrg# else 39611d341caSmrg# define BuildXF86DRI NO 39711d341caSmrg# endif 39811d341caSmrg#endif 39911d341caSmrg 40011d341caSmrg/* 40111d341caSmrg * Build shared libGL and the DRI modules without -fPIC on some architectures. 40211d341caSmrg * This improves performance. 40311d341caSmrg */ 40411d341caSmrg#ifndef BuildLibGlxWithoutPIC 40511d341caSmrg# if BuildXF86DRI 40611d341caSmrg# if defined(i386Architecture) 40711d341caSmrg# define BuildLibGlxWithoutPIC YES 40811d341caSmrg# endif 40911d341caSmrg# endif 41011d341caSmrg#endif 41111d341caSmrg 41211d341caSmrg#ifndef HasAgpGart 41311d341caSmrg# if defined(i386Architecture) || defined(ia64Architecture) || defined(AMD64Architecture) 41411d341caSmrg /* The AGPGART header file is included in os-support/linux, which 41511d341caSmrg allows all drivers that depend on AGP to build properly. */ 41611d341caSmrg# define HasAgpGart YES 41711d341caSmrg# else 41811d341caSmrg# define HasAgpGart NO 41911d341caSmrg# endif 42011d341caSmrg#endif 42111d341caSmrg 42211d341caSmrg/* 42311d341caSmrg * Support for Intel's SSE Native Instructions, also known as the 42411d341caSmrg * Streaming SIMD Extensions, was introduced in the 2.4.x kernels. 42511d341caSmrg */ 42611d341caSmrg#ifndef HasSSESupport 42711d341caSmrg# if defined(i386Architecture) 42811d341caSmrg# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4) 42911d341caSmrg# define HasSSESupport YES 43011d341caSmrg# else 43111d341caSmrg# define HasSSESupport NO 43211d341caSmrg# endif 43311d341caSmrg# else 43411d341caSmrg# define HasSSESupport NO 43511d341caSmrg# endif 43611d341caSmrg#endif 43711d341caSmrg 43811d341caSmrg/* 43911d341caSmrg * Support for MMX isn't present in the Assembler used in Red Hat 4.2, so 44011d341caSmrg * don't enable it for libc5 as a reasonable default. 44111d341caSmrg */ 44211d341caSmrg#ifndef HasMMXSupport 44311d341caSmrg# if defined(i386Architecture) 44411d341caSmrg# if (LinuxCLibMajorVersion > 5) 44511d341caSmrg# define HasMMXSupport YES 44611d341caSmrg# else 44711d341caSmrg# define HasMMXSupport NO 44811d341caSmrg# endif 44911d341caSmrg# else 45011d341caSmrg# define HasMMXSupport NO 45111d341caSmrg# endif 45211d341caSmrg#endif 45311d341caSmrg 45411d341caSmrg/* 45511d341caSmrg * Support for 3DNow isn't present in the Assembler used in Red Hat 4.2, so 45611d341caSmrg * don't enable it for libc5 as a reasonable default. 45711d341caSmrg * 45811d341caSmrg * XXX This is preliminary. 45911d341caSmrg */ 46011d341caSmrg#ifndef Has3DNowSupport 46111d341caSmrg# if defined(i386Architecture) 46211d341caSmrg# if (LinuxCLibMajorVersion > 5) 46311d341caSmrg# define Has3DNowSupport YES 46411d341caSmrg# else 46511d341caSmrg# define Has3DNowSupport NO 46611d341caSmrg# endif 46711d341caSmrg# else 46811d341caSmrg# define Has3DNowSupport NO 46911d341caSmrg# endif 47011d341caSmrg#endif 47111d341caSmrg 47211d341caSmrg/* 47311d341caSmrg * The Rush extension support. 47411d341caSmrg */ 47511d341caSmrg#ifndef BuildXF86RushExt 47611d341caSmrg# define BuildXF86RushExt YES 47711d341caSmrg#endif 47811d341caSmrg 47911d341caSmrg#if defined(__linux__) && !defined(LinuxFBDevSupport) 48011d341caSmrg# define LinuxFBDevSupport YES 48111d341caSmrg#endif 48211d341caSmrg 48311d341caSmrg/* For compatibility */ 48411d341caSmrg#define SourceDefines LinuxSourceDefines 48511d341caSmrg 48611d341caSmrg#define BuildLibPathVar LD_LIBRARY_PATH 48711d341caSmrg#define GccUsesGas YES 48811d341caSmrg#define UseGas YES 48911d341caSmrg#define GnuCpp YES 49011d341caSmrg#if UseElfFormat 49111d341caSmrg# ifndef HasDlopen 49211d341caSmrg# define HasDlopen YES 49311d341caSmrg# endif 49411d341caSmrg#endif 49511d341caSmrg#define HasWeakSymbols UseElfFormat 49611d341caSmrg#ifndef HasShadowPasswd 49711d341caSmrg# if UseElfFormat 49811d341caSmrg# define HasShadowPasswd YES 49911d341caSmrg# else 50011d341caSmrg# define HasShadowPasswd NO 50111d341caSmrg# endif 50211d341caSmrg#endif 50311d341caSmrg#define HasPutenv YES 50411d341caSmrg#ifndef HasShm 50511d341caSmrg# define HasShm YES 50611d341caSmrg#endif 50711d341caSmrg 50811d341caSmrg/* Use SecureRPC (used for SUN-DES-1 auth. and other goodies) when 50911d341caSmrg * glibc has support for it */ 51011d341caSmrg#ifndef HasSecureRPC 51111d341caSmrg# if !(LinuxCLibMajorVersion < 6 || \ 51211d341caSmrg (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 3)) 51311d341caSmrg# define HasSecureRPC YES 51411d341caSmrg# endif 51511d341caSmrg#endif 51611d341caSmrg 51711d341caSmrg#define HasSockets YES 51811d341caSmrg#if UseElfFormat || defined(AlphaArchitecture) 51911d341caSmrg#ifndef HasSnprintf 52011d341caSmrg#define HasSnprintf YES 52111d341caSmrg#endif 52211d341caSmrg#define HasMkstemp YES 52311d341caSmrg#endif 52411d341caSmrg/* getresuid() appeared in 2.1.4, and getresgid in 2.1.44 */ 52511d341caSmrg#if !defined(HasGetresuid) && \ 52611d341caSmrg (((OSMajorVersion*100000) + (OSMinorVersion*1000) + OSTeenyVersion) >= 201044) 52711d341caSmrg#define HasGetresuid YES 52811d341caSmrg#endif 52911d341caSmrg#if OSMajorVersion >= 2 53011d341caSmrg#define HasUsableFileMmap YES 53111d341caSmrg#endif 53211d341caSmrg#ifndef HasNCurses 53311d341caSmrg#define HasNCurses YES 53411d341caSmrg#endif 53511d341caSmrg 53611d341caSmrg#ifndef HasGroff 53711d341caSmrg#define HasGroff YES 53811d341caSmrg#endif 53911d341caSmrg 54011d341caSmrg#ifndef HasZlib 54111d341caSmrg#define HasZlib YES 54211d341caSmrg#endif 54311d341caSmrg 54411d341caSmrg#ifndef HasLibpng 54511d341caSmrg#define HasLibpng YES 54611d341caSmrg#endif 54711d341caSmrg 54811d341caSmrg#ifndef HasExpat 54911d341caSmrg# define HasExpat YES 55011d341caSmrg#endif 55111d341caSmrg 55211d341caSmrg#ifndef HasFreetype2 55311d341caSmrg# define HasFreetype2 YES 55411d341caSmrg#endif 55511d341caSmrg 55611d341caSmrg#define AvoidNullMakeCommand YES 55711d341caSmrg#ifndef DebuggableLibraries 55811d341caSmrg#define DebuggableLibraries NO 55911d341caSmrg#endif 56011d341caSmrg#define CompressAllFonts YES 56111d341caSmrg#define Malloc0ReturnsNull YES 56211d341caSmrg#define NeedConstPrototypes YES 56311d341caSmrg#define NeedFunctionPrototypes YES 56411d341caSmrg#define NeedNestedPrototypes YES 56511d341caSmrg#define NeedVarargsPrototypes YES 56611d341caSmrg#ifndef NeedWidePrototypes 56711d341caSmrg#define NeedWidePrototypes NO 56811d341caSmrg#endif 56911d341caSmrg#define SetTtyGroup YES 57011d341caSmrg 57111d341caSmrg#ifndef UseStaticTermcapLib 57211d341caSmrg#define UseStaticTermcapLib NO 57311d341caSmrg#endif 57411d341caSmrg 57511d341caSmrg#ifndef HasCookieMaker 57611d341caSmrg#define HasCookieMaker YES 57711d341caSmrg#define MkCookieCmd mcookie 57811d341caSmrg#endif 57911d341caSmrg 58011d341caSmrg#ifndef BourneShell 58111d341caSmrg/* 58211d341caSmrg * This will cause builds/installs to terminate on errors, as on other 58311d341caSmrg * platforms. 58411d341caSmrg */ 58511d341caSmrg#define BourneShell /bin/sh -e 58611d341caSmrg#endif 58711d341caSmrg 58811d341caSmrg#define MkdirHierCmd mkdir -p 58911d341caSmrg 59011d341caSmrg#ifndef HaveLib64 591880d0a0cSmrg# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture) || defined (AArch64Architecture) || defined (RV64Architecture) 59211d341caSmrg# define HaveLib64 YES 59311d341caSmrg# else 59411d341caSmrg# define HaveLib64 NO 59511d341caSmrg# endif 59611d341caSmrg#endif 59711d341caSmrg 59811d341caSmrg#if UseElfFormat 59911d341caSmrg# ifndef DoLoadableServer 60011d341caSmrg# if defined(MipsArchitecture) || defined(SuperHArchitecture) 60111d341caSmrg# define DoLoadableServer NO 60211d341caSmrg# else 60311d341caSmrg# define DoLoadableServer YES 60411d341caSmrg# endif 60511d341caSmrg# endif 60611d341caSmrg#endif 60711d341caSmrg 60811d341caSmrg 60911d341caSmrg#if LinuxElfDefault 61011d341caSmrg# if UseElfFormat 61111d341caSmrg# ifdef MipsArchitecture 61211d341caSmrg# ifndef AsCmd 61311d341caSmrg# define AsCmd gcc -c -x assembler-with-cpp 61411d341caSmrg# endif 61511d341caSmrg# ifndef MakeDllModules 61611d341caSmrg# define MakeDllModules YES 61711d341caSmrg# endif 618880d0a0cSmrg# endif /* MipsArchitecture */ 61911d341caSmrg# if defined (i386Architecture) && ((GccMajorVersion >3) \ 62011d341caSmrg || ((GccMajorVersion == 3) && (GccMinorVersion >= 1))) 62111d341caSmrg# ifndef CcCmd 62211d341caSmrg# define CcCmd gcc -m32 62311d341caSmrg# endif 62411d341caSmrg# ifndef CplusplusCmd 62511d341caSmrg# define CplusplusCmd c++ -m32 62611d341caSmrg# endif 62711d341caSmrg# endif 62811d341caSmrg# if defined (Ppc64Architecture) 62911d341caSmrg# ifndef CcCmd 63011d341caSmrg# define CcCmd gcc -m64 63111d341caSmrg# endif 63211d341caSmrg# ifndef CplusplusCmd 63311d341caSmrg# define CplusplusCmd c++ -m64 63411d341caSmrg# endif 63511d341caSmrg# endif 63611d341caSmrg# ifndef CcCmd 63711d341caSmrg# define CcCmd gcc 63811d341caSmrg# define CplusplusCmd c++ 63911d341caSmrg# endif 64011d341caSmrg# ifndef AsCmd 64111d341caSmrg# define AsCmd CcCmd -c -x assembler 64211d341caSmrg# endif 64311d341caSmrg# define AsmDefines -D__ELF__ 64411d341caSmrg# ifndef LdCmd 64511d341caSmrg# define LdCmd CcCmd -nostdlib 64611d341caSmrg# endif 64711d341caSmrg# ifndef LinuxUsesNcurses 64811d341caSmrg# if LinuxCLibMajorVersion >= 6 || (LinuxDistribution == LinuxSuSE) 64911d341caSmrg# define LinuxUsesNcurses YES 65011d341caSmrg# else 65111d341caSmrg# define LinuxUsesNcurses NO 65211d341caSmrg# endif 65311d341caSmrg# endif 65411d341caSmrg# ifndef TermcapLibrary 65511d341caSmrg# if UseStaticTermcapLib 65611d341caSmrg# if LinuxUsesNcurses 65711d341caSmrg# if !HaveLib64 65811d341caSmrg# define TermcapLibrary StaticLibrary(/usr/lib,ncurses) 65911d341caSmrg# else 66011d341caSmrg# define TermcapLibrary StaticLibrary(/usr/lib64,ncurses) 66111d341caSmrg# endif 66211d341caSmrg# else 66311d341caSmrg# if !HaveLib64 66411d341caSmrg# define TermcapLibrary StaticLibrary(/usr/lib/termcap,termcap) 66511d341caSmrg# else 66611d341caSmrg# define TermcapLibrary StaticLibrary(/usr/lib64/termcap,termcap) 66711d341caSmrg# endif 66811d341caSmrg# endif 66911d341caSmrg# else 67011d341caSmrg# if LinuxUsesNcurses 67111d341caSmrg# define TermcapLibrary -lncurses 67211d341caSmrg# else 67311d341caSmrg# define TermcapLibrary -ltermcap 67411d341caSmrg# endif 67511d341caSmrg# endif 67611d341caSmrg# endif 67711d341caSmrg# else /* UseElfFormat */ 67811d341caSmrg# ifdef AlphaArchitecture 67911d341caSmrg# define CcCmd gcc -b alpha-linuxecoff 68011d341caSmrg# define CplusplusCmd g++ -b alpha-linuxecoff 68111d341caSmrg# define AsCmd CcCmd -c -x assembler 68211d341caSmrg# define LdCmd CcCmd -nostdlib -Wl,"-m alpha" 68311d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 68411d341caSmrg# endif /* AlphaArchitecture */ 68511d341caSmrg# ifdef HPArchitecture 68611d341caSmrg# define CcCmd gcc 68711d341caSmrg# define CplusplusCmd g++ 68811d341caSmrg# define AsCmd CcCmd -c -x assembler 68911d341caSmrg# define LdCmd CcCmd -nostdlib 69011d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 69111d341caSmrg# endif /* HPArchitecture */ 69211d341caSmrg# ifdef i386Architecture 69311d341caSmrg# define CcCmd gcc -b i486-linuxaout 69411d341caSmrg# define CplusplusCmd g++ -b i486-linuxaout 69511d341caSmrg# define AsCmd CcCmd -c -x assembler 69611d341caSmrg# define LdCmd CcCmd -nostdlib -Wl,"-m i386linux" 69711d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 69811d341caSmrg# endif /* i386Architecture */ 69911d341caSmrg# ifdef ia64Architecture 70011d341caSmrg# define CcCmd gcc 70111d341caSmrg# define CplusplusCmd g++ 70211d341caSmrg# define AsCmd CcCmd -c -x assembler 70311d341caSmrg# define LdCmd CcCmd -nostdlib 70411d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 70511d341caSmrg# endif /* ia64Architecture */ 70611d341caSmrg# ifdef Mc68020Architecture 70711d341caSmrg# define CcCmd gcc -b m68k-linuxaout 70811d341caSmrg# define CplusplusCmd g++ -b m68k-linuxaout 70911d341caSmrg# define AsCmd CcCmd -c -x assembler 71011d341caSmrg# define LdCmd CcCmd -nostdlib -Wl,"-m m68klinux" 71111d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 71211d341caSmrg# endif /* Mc68020Architecture */ 71311d341caSmrg# ifdef AMD64Architecture 71411d341caSmrg# define CcCmd gcc 71511d341caSmrg# define CplusplusCmd g++ 71611d341caSmrg# define AsCmd CcCmd -c -x assembler 71711d341caSmrg# define LdCmd CcCmd -nostdlib 71811d341caSmrg# define AsmDefines -DUSE_GAS -U__ELF__ 71911d341caSmrg# endif /* AMD64Architecture */ 72011d341caSmrg# endif /* UseElfFormat */ 72111d341caSmrg#else 72211d341caSmrg# if UseElfFormat 72311d341caSmrg# ifdef AlphaArchitecture 72411d341caSmrg# define CcCmd gcc -b alpha-linux 72511d341caSmrg# define AsCmd CcCmd -c -x assembler 72611d341caSmrg# define LdCmd CcCmd -nostdlib -Wl,"-m elf64alpha" 72711d341caSmrg# define AsmDefines -D__ELF__ 72811d341caSmrg# define CplusplusCmd c++ -b alpha-linux 72911d341caSmrg# endif /* AlphaArchitecture */ 73011d341caSmrg# ifdef HPArchitecture 73111d341caSmrg# define CcCmd gcc 73211d341caSmrg# define CplusplusCmd g++ 73311d341caSmrg# define AsCmd CcCmd -c -x assembler 73411d341caSmrg# define LdCmd CcCmd -nostdlib 73511d341caSmrg# define AsmDefines -D__ELF__ 73611d341caSmrg# define SharedLibXau YES 73711d341caSmrg# endif /* HPArchitecture */ 73811d341caSmrg# ifdef i386Architecture 73911d341caSmrg# define CcCmd gcc -b i486-linux 74011d341caSmrg# define AsCmd CcCmd -c -x assembler 741880d0a0cSmrg# define LdCmd CcCmd -nostdlib -Wl,"-m elf_i386" 74211d341caSmrg# define AsmDefines -D__ELF__ 74311d341caSmrg# define CplusplusCmd c++ -b i486-linux 74411d341caSmrg# endif /* i386Architecture */ 74511d341caSmrg# ifdef ia64Architecture 74611d341caSmrg# define CcCmd gcc 74711d341caSmrg# define CplusplusCmd g++ 74811d341caSmrg# define AsCmd CcCmd -c -x assembler 74911d341caSmrg# define LdCmd CcCmd -nostdlib 75011d341caSmrg# define AsmDefines -D__ELF__ 75111d341caSmrg# endif /* ia64Architecture */ 75211d341caSmrg# ifdef Mc68020Architecture 75311d341caSmrg# define CcCmd gcc -b m68k-linux 75411d341caSmrg# define AsCmd CcCmd -c -x assembler 75511d341caSmrg# define LdCmd CcCmd -nostdlib -W,l"-m m68kelf" 75611d341caSmrg# define AsmDefines -D__ELF__ 75711d341caSmrg# define CplusplusCmd c++ -b m68k-linux 75811d341caSmrg# endif /* Mc68020Architecture */ 75911d341caSmrg# ifdef AMD64Architecture 76011d341caSmrg# define CcCmd gcc 76111d341caSmrg# define CplusplusCmd g++ 76211d341caSmrg# define AsCmd CcCmd -c -x assembler 76311d341caSmrg# define LdCmd CcCmd -nostdlib 76411d341caSmrg# define AsmDefines -D__ELF__ 76511d341caSmrg# endif /* AMD64Architecture */ 76611d341caSmrg# else 76711d341caSmrg# define CcCmd gcc 76811d341caSmrg# define AsCmd CcCmd -c -x assembler 76911d341caSmrg# define LdCmd CcCmd -nostdlib 77011d341caSmrg# define AsmDefines -DUSE_GAS 77111d341caSmrg# endif 77211d341caSmrg#endif 77311d341caSmrg 77411d341caSmrg/* 77511d341caSmrg * Some older distros still need /lib/cpp. There's probably a better 77611d341caSmrg * test, but this handles the older Red Hat releases at least. 77711d341caSmrg */ 77811d341caSmrg#ifndef CppCmd 77911d341caSmrg# if (LinuxDistribution == LinuxRedHat) && \ 78011d341caSmrg ((LinuxCLibMajorVersion < 6) || \ 78111d341caSmrg (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 1)) 78211d341caSmrg# define CppCmd /lib/cpp 78311d341caSmrg# else 78411d341caSmrg# define CppCmd cpp 78511d341caSmrg# endif 78611d341caSmrg#endif 78711d341caSmrg 78811d341caSmrg/* Some Linux distributions have yacc, some don't. All have bison. */ 78911d341caSmrg#define YaccCmd bison -y 79011d341caSmrg#define LexCmd flex -l 79111d341caSmrg#define HasFlex YES 79211d341caSmrg#define LexLib -lfl 79311d341caSmrg#define PreProcessCmd CcCmd -E 79411d341caSmrg#define PostIncDir DefaultGccIncludeDir 79511d341caSmrg#define LdCombineFlags -r 79611d341caSmrg#ifndef LdPostLib 79711d341caSmrg# define LdPostLib /* Never needed */ 79811d341caSmrg#endif 79911d341caSmrg#define HasWChar32 YES 80011d341caSmrg#define StandardCppOptions -traditional 80111d341caSmrg#define StandardCppDefines StandardDefines 80211d341caSmrg 80311d341caSmrg#define HasVarRun YES 80411d341caSmrg#ifndef VarDbDirectory 80511d341caSmrg# define VarDbDirectory $(VARDIR)/lib 80611d341caSmrg#endif 80711d341caSmrg 80811d341caSmrg#ifndef XF86OSCardDrivers 80911d341caSmrg# ifdef __linux__ 81011d341caSmrg# define XF86OSCardDrivers fbdev v4l sisusb 81111d341caSmrg# else 81211d341caSmrg# define XF86OSCardDrivers /**/ 81311d341caSmrg# endif 81411d341caSmrg#endif 81511d341caSmrg 81611d341caSmrg#ifndef OSXInputDrivers 81711d341caSmrg# if HasLinuxJoystick 81811d341caSmrg# define OSXInputDrivers1 ur98 81911d341caSmrg# else 82011d341caSmrg# define OSXInputDrivers1 /**/ 82111d341caSmrg# endif 82211d341caSmrg# if HasLinuxInput 82311d341caSmrg# define OSXInputDrivers2 aiptek evdev 82411d341caSmrg# else 82511d341caSmrg# define OSXInputDrivers2 /**/ 82611d341caSmrg# endif 82711d341caSmrg# define OSXInputDrivers OSXInputDrivers1 OSXInputDrivers2 82811d341caSmrg#endif 82911d341caSmrg 83011d341caSmrg#if UseElfFormat 83111d341caSmrg# define HasPlugin YES 83211d341caSmrg# define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */ 83311d341caSmrg#endif 83411d341caSmrg 83511d341caSmrg#ifdef AlphaArchitecture 83611d341caSmrg# ifndef OptimizedCDebugFlags 83711d341caSmrg# define OptimizedCDebugFlags DefaultGcc2AxpOpt 83811d341caSmrg# endif 83911d341caSmrg# define LinuxMachineDefines -D__alpha__ 84011d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 84111d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT 84211d341caSmrg# ifdef UseCompaqMathLibrary 84311d341caSmrg# define MathLibrary -lcpml -lm 84411d341caSmrg# endif 84511d341caSmrg#endif /* AlphaArchitecture */ 84611d341caSmrg 84711d341caSmrg#ifdef Arm32Architecture 84811d341caSmrg# define DefaultCCOptions 84911d341caSmrg# ifndef OptimizedCDebugFlags 85011d341caSmrg# define OptimizedCDebugFlags -O3 85111d341caSmrg# endif 85211d341caSmrg# define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm 85311d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 85411d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 85511d341caSmrg#endif /* Arm32Achitecture */ 85611d341caSmrg 85711d341caSmrg#ifdef HPArchitecture 85811d341caSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 85911d341caSmrg# define LinuxMachineDefines -D__hppa__ 86011d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 86111d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 86211d341caSmrg#endif 86311d341caSmrg 86411d341caSmrg#ifdef i386Architecture 86511d341caSmrg# ifndef OptimizedCDebugFlags 86611d341caSmrg# define OptimizedCDebugFlags DefaultGcc2i386Opt 86711d341caSmrg# endif 86811d341caSmrg# define LinuxMachineDefines -D__i386__ 86911d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 87011d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 87111d341caSmrg#endif /* i386Architecture */ 87211d341caSmrg 87311d341caSmrg#ifdef ia64Architecture 87411d341caSmrg# ifndef OptimizedCDebugFlags 87511d341caSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 87611d341caSmrg# endif 87711d341caSmrg# define LinuxMachineDefines -D__ia64__ 87811d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 87911d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 88011d341caSmrg#endif /* ia64Architecture */ 88111d341caSmrg 88211d341caSmrg#ifdef Mc68020Architecture 88311d341caSmrg# ifndef OptimizedCDebugFlags 88411d341caSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 88511d341caSmrg# endif 88611d341caSmrg# define LinuxMachineDefines -D__mc68000__ 88711d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 88811d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 88911d341caSmrg#endif /* Mc68020Architecture */ 89011d341caSmrg 89111d341caSmrg#ifdef MipsArchitecture 89211d341caSmrg# ifndef OptimizedCDebugFlags 89311d341caSmrg# define OptimizedCDebugFlags DefaultGcc2MipsOpt 89411d341caSmrg# endif 89511d341caSmrg# define LinuxMachineDefines -D__mips__ 89611d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 89711d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 89811d341caSmrg#endif 89911d341caSmrg 90041fe0c2aSmrg#ifdef OpenRISC1000Architecture 90141fe0c2aSmrg# ifndef OptimizedCDebugFlags 90241fe0c2aSmrg# define OptimizedCDebugFlags DefaultGcc2OpenRISC1000Opt 90341fe0c2aSmrg# endif 90441fe0c2aSmrg# define LinuxMachineDefines -D__or1k__ 90541fe0c2aSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 90641fe0c2aSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 90741fe0c2aSmrg#endif 90841fe0c2aSmrg 90911d341caSmrg#ifdef Ppc64Architecture 91011d341caSmrg# define DefaultCCOptions -mminimal-toc 91111d341caSmrg# ifndef OptimizedCDebugFlags 91211d341caSmrg# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt 91311d341caSmrg# endif 91411d341caSmrg# define LinuxMachineDefines -D__powerpc64__ -D__powerpc__ 91511d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET 91611d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 91711d341caSmrg#endif /* Ppc64Architecture */ 91811d341caSmrg 91911d341caSmrg#ifdef PpcArchitecture 9201c80d5b0Smrg# define DefaultCCOptions 92111d341caSmrg# ifndef OptimizedCDebugFlags 92211d341caSmrg# define OptimizedCDebugFlags DefaultGcc2PpcOpt 92311d341caSmrg# endif 92411d341caSmrg# define LinuxMachineDefines -D__powerpc__ 92511d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 92611d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 92711d341caSmrg#endif /* PpcArchitecture */ 92811d341caSmrg 92911d341caSmrg#ifdef s390Architecture 93011d341caSmrg# ifndef OptimizedCDebugFlags 93111d341caSmrg# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs 93211d341caSmrg# endif 93311d341caSmrg# define LinuxMachineDefines -D__s390__ 93411d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 93511d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 93611d341caSmrg#endif /* s390Architecture */ 93711d341caSmrg 93811d341caSmrg#ifdef s390xArchitecture 93911d341caSmrg/*#define DefaultCCOptions -fsigned-char */ 94011d341caSmrg#define OptimizedCDebugFlags -O3 -fomit-frame-pointer 94111d341caSmrg#define LinuxMachineDefines -D__s390x__ 94211d341caSmrg#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 94311d341caSmrg#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 94411d341caSmrg#endif /* s390xArchitecture */ 94511d341caSmrg 94611d341caSmrg#ifdef SparcArchitecture 94711d341caSmrg# ifndef OptimizedCDebugFlags 94811d341caSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 94911d341caSmrg# endif 95011d341caSmrg# define LinuxMachineDefines -D__sparc__ 95111d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 95211d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 95311d341caSmrg# define AsVISOption -Av9a 95411d341caSmrg# ifdef Sparc64Architecture 95511d341caSmrg# define AsOutputArchSize 64 95611d341caSmrg# else 95711d341caSmrg# define AsOutputArchSize 32 95811d341caSmrg# endif 95911d341caSmrg#endif 96011d341caSmrg 96111d341caSmrg#ifdef SuperHArchitecture 96211d341caSmrg# ifndef SuperHArchOptFlags 96311d341caSmrg# ifdef SuperH4Architecture 96411d341caSmrg# define SuperHArchOptFlags -m4 96511d341caSmrg# elif defined(SuperH4NOFPUArchitecture) 96611d341caSmrg# define SuperHArchOptFlags -m4-nofpu 96711d341caSmrg# else 96811d341caSmrg# define SuperHArchOptFlags -m3 96911d341caSmrg# endif 9701c80d5b0Smrg# endif 97111d341caSmrg# ifndef SuperHebArchitecture 97211d341caSmrg# ifdef SuperHebArchitecture 97311d341caSmrg# define SuperHEndianFlags -mb 97411d341caSmrg# else 97511d341caSmrg# define SuperHEndianFlags -ml 97611d341caSmrg# endif 97711d341caSmrg# endif 97811d341caSmrg# ifndef OptimizedCDebugFlags 97911d341caSmrg# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs 98011d341caSmrg# endif 98111d341caSmrg# define LinuxMachineDefines -D__sh__ 98211d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 98311d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 98411d341caSmrg# ifndef DoLoadableServer 98511d341caSmrg# define DoLoadableServer NO 98611d341caSmrg# endif 98711d341caSmrg#endif 98811d341caSmrg 98911d341caSmrg#ifdef AMD64Architecture 99011d341caSmrg# ifndef OptimizedCDebugFlags 99111d341caSmrg# define OptimizedCDebugFlags DefaultGcc2AMD64Opt 99211d341caSmrg# endif 99311d341caSmrg# define LinuxMachineDefines -D__amd64__ 99411d341caSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 99511d341caSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 99611d341caSmrg#endif /* AMD64Architecture */ 99711d341caSmrg 9981c80d5b0Smrg#ifdef AArch64Architecture 9991c80d5b0Smrg# ifndef OptimizedCDebugFlags 10001c80d5b0Smrg# define OptimizedCDebugFlags DefaultGcc2AArch64Opt 10011c80d5b0Smrg# endif 10021c80d5b0Smrg# define LinuxMachineDefines -D__aarch64__ 10031c80d5b0Smrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 10041c80d5b0Smrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 10051c80d5b0Smrg#endif /* AArch64Architecture */ 10061c80d5b0Smrg 1007880d0a0cSmrg#ifdef LoongArch64Architecture 1008880d0a0cSmrg# ifndef OptimizedCDebugFlags 1009880d0a0cSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 1010880d0a0cSmrg# endif 1011880d0a0cSmrg# define LinuxMachineDefines -D__loongarch__ -D__loongarch_grlen=64 -D__loongarch_lp64 1012880d0a0cSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 1013880d0a0cSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 1014880d0a0cSmrg#endif /* LoongArch64Architecture */ 1015880d0a0cSmrg 1016880d0a0cSmrg#ifdef LoongArch32Architecture 1017880d0a0cSmrg# ifndef OptimizedCDebugFlags 1018880d0a0cSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 1019880d0a0cSmrg# endif 1020880d0a0cSmrg# define LinuxMachineDefines -D__loongarch__ -D__loongarch_grlen=32 1021880d0a0cSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 1022880d0a0cSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 1023880d0a0cSmrg#endif /* LoongArch32Architecture */ 1024880d0a0cSmrg 1025880d0a0cSmrg#ifdef RV64Architecture 1026880d0a0cSmrg# ifndef OptimizedCDebugFlags 1027880d0a0cSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 1028880d0a0cSmrg# endif 1029880d0a0cSmrg# define LinuxMachineDefines -D__riscv -D__riscv_xlen=64 1030880d0a0cSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 1031880d0a0cSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 1032880d0a0cSmrg#endif /* RV64Architecture */ 1033880d0a0cSmrg 1034880d0a0cSmrg#ifdef RV32Architecture 1035880d0a0cSmrg# ifndef OptimizedCDebugFlags 1036880d0a0cSmrg# define OptimizedCDebugFlags -O2 GccAliasingArgs 1037880d0a0cSmrg# endif 1038880d0a0cSmrg# define LinuxMachineDefines -D__riscv -D__riscv_xlen=32 1039880d0a0cSmrg# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 1040880d0a0cSmrg# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines 1041880d0a0cSmrg#endif /* RV32Architecture */ 1042880d0a0cSmrg 104311d341caSmrg#ifndef StandardDefines 104411d341caSmrg# ifdef __linux__ 104511d341caSmrg# define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines 104611d341caSmrg# else 104711d341caSmrg# define StandardDefines LinuxMachineDefines LinuxSourceDefines 104811d341caSmrg# endif 104911d341caSmrg#endif 105011d341caSmrg 105111d341caSmrg#if UseElfFormat 105211d341caSmrg# define DlLibrary -rdynamic -ldl 105311d341caSmrg#else 105411d341caSmrg# define DlLibrary /**/ 105511d341caSmrg#endif 105611d341caSmrg 105711d341caSmrg#define ServerExtraSysLibs /**/ 105811d341caSmrg 105911d341caSmrg#ifndef PamLibraries 106011d341caSmrg#define PamLibraries -lpam DlLibrary 106111d341caSmrg#endif 106211d341caSmrg 106311d341caSmrg#ifndef PamMiscLibraries 106411d341caSmrg#define PamMiscLibraries -lpam_misc 106511d341caSmrg#endif 106611d341caSmrg 106711d341caSmrg#ifndef HasDECnet 106811d341caSmrg#define HasDECnet NO 106911d341caSmrg#endif 107011d341caSmrg#if HasDECnet 107111d341caSmrg# define ConnectionFlags -DUNIXCONN -DTCPCONN -DDNETCONN 107211d341caSmrg# define ExtraLibraries -ldnet 107311d341caSmrg#else 107411d341caSmrg# define ConnectionFlags -DUNIXCONN -DTCPCONN 107511d341caSmrg#endif 107611d341caSmrg 1077880d0a0cSmrg/* Some of these man page defaults are overridden in the above OS sections */ 107811d341caSmrg#ifndef ManSuffix 107911d341caSmrg# define ManSuffix 1x 108011d341caSmrg#endif 108111d341caSmrg#ifndef ManDir 108211d341caSmrg# define ManDir $(MANSOURCEPATH)1 108311d341caSmrg#endif 108411d341caSmrg#ifndef LibManSuffix 108511d341caSmrg# define LibManSuffix 3x 108611d341caSmrg#endif 108711d341caSmrg#ifndef LibmanDir 108811d341caSmrg# define LibmanDir $(MANSOURCEPATH)3 108911d341caSmrg#endif 109011d341caSmrg#ifndef FileManSuffix 109111d341caSmrg# define FileManSuffix 5x 109211d341caSmrg#endif 109311d341caSmrg#ifndef FileManDir 109411d341caSmrg# define FileManDir $(MANSOURCEPATH)5 109511d341caSmrg#endif 109611d341caSmrg 109711d341caSmrg#ifndef StaticLibrary 109811d341caSmrg# define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic 109911d341caSmrg#endif 110011d341caSmrg 110111d341caSmrg#ifndef LinkGLToUsrLib 110211d341caSmrg# define LinkGLToUsrLib YES 110311d341caSmrg#endif 110411d341caSmrg# ifndef LinkGLToUsrInclude 110511d341caSmrg# define LinkGLToUsrInclude YES 110611d341caSmrg#endif 110711d341caSmrg 110811d341caSmrg 110911d341caSmrg#define HasGnuMake YES 111011d341caSmrg 111111d341caSmrg#define MakeNamedTargetSubdir(dir,flags,subname)\ 111211d341caSmrg $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname 111311d341caSmrg 111411d341caSmrg#define ArchitectureDefines -DLINUX_ARCHITECTURE 111511d341caSmrg 111611d341caSmrg#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB) 111711d341caSmrg#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) 111811d341caSmrg 111911d341caSmrg#if HaveLib64 112011d341caSmrg# ifndef LibDirName 112111d341caSmrg# define LibDirName lib64 112211d341caSmrg# endif 112311d341caSmrg# ifndef SystemUsrLibDir 112411d341caSmrg# define SystemUsrLibDir /usr/lib64 112511d341caSmrg# endif 112611d341caSmrg# ifndef TkLibDir 112711d341caSmrg# define TkLibDir /usr/lib64 112811d341caSmrg# endif 112911d341caSmrg#endif 113011d341caSmrg 113111d341caSmrg#ifndef BuildDmx 113211d341caSmrg#define BuildDmx YES 113311d341caSmrg#endif 113411d341caSmrg 113511d341caSmrg#include <lnxLib.rules> 113611d341caSmrg# include <xorg.cf> 113711d341caSmrg 113811d341caSmrg#ifndef XFree86ServerOSDefines 113911d341caSmrg# define XFree86ServerOSDefines 114011d341caSmrg#endif 1141