$Id: 003_linux.cf_and_xfree86.cf.diff 1681 2004-07-21 19:20:49Z branden $ Various Debian changes to xfree86.cf and linux.cf, including better support for GCC flags, including tweakability of optimization level. Support building with fonts and specs docs turned off (for architecture-specific-only package builds). This patch mostly by Branden Robinson. FontLibSharedFreeType disabled by ISHIKAWA Mutsumi; this change should be dropped when we can build the module-loading XFree86 X server linked against an external FreeType2 library. External Xrender, Xft and Xcursor support by ISHIKAWA Mutsumi. Enhanced Glide3 support in part by Guillem Jover. Not submitted to XFree86. diff -ruN xc-old/config/cf/linux.cf xc/config/cf/linux.cf --- xc-old/config/cf/linux.cf 2004-11-02 10:13:35.446960000 +0000 +++ xc/config/cf/linux.cf 2004-11-02 10:14:47.911944400 +0000 @@ -101,10 +101,29 @@ #endif #if LinuxDistribution == LinuxDebian +# ifndef NothingOutsideProjectRoot +# define NothingOutsideProjectRoot NO +# endif # if !NothingOutsideProjectRoot # define SystemManDirectory /usr/share/man # endif +# ifndef DefaultGcc2OptimizeOpt +# define DefaultGcc2OptimizeOpt -O2 +# endif +# define DefaultGcc2AxpOpt DefaultGcc2OptimizeOpt GccAliasingArgs +# define DefaultGcc2i386Opt DefaultGcc2OptimizeOpt GccAliasingArgs +# define DefaultGcc2PpcOpt DefaultGcc2OptimizeOpt GccAliasingArgs # define HasPam YES +# define HasTk YES +# define TkLibDir /usr/lib +# define TkIncDir /usr/include +# define TkLibName tk8.4 +# define XF86SetupUsesStaticTk NO +# define HasTcl YES +# define TclLibDir /usr/lib +# define TclIncDir /usr/include +# define TclLibName tcl8.4 +# define XF86SetupUsesStaticTcl NO /* un-comment this when it is un-broken */ /* # define JoystickSupport YES */ # if !NothingOutsideProjectRoot @@ -149,43 +168,118 @@ # define BuilderEMailAddr "debian-x@lists.debian.org" # endif # define XFree86Devel YES -# define BuildAllSpecsDocs YES +# define BuildAllSpecsDocs NO # define InstallXinitConfig YES # define InstallXdmConfig YES # define InstallFSConfig YES # define DebuggableLibraries YES # define ForceNormalLib YES -# define BuildSpecsDocs YES -# define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm +# ifndef BuildSpecsDocs +# define BuildSpecsDocs YES +# endif +# define SpecsDocDirs BDF CTEXT FSProtocol GL ICCCM ICE PM Render SM X11 XDMCP XIM XLFD XProtocol Xaw Xext Xi Xmu Xserver Xt Xv XvMC i18n rstart xfs xterm xtrans # define BuildRman NO +# define RmanCmd /usr/bin/rman +# define RmanOptions /**/ +# define XkbServerDefines -DNOISY # define BuildHtmlManPages NO - -/* we build-depend on libfreetype6-dev (FreeType 2.x) */ -# define BuildFreetype2Library NO -# define HasFreetype2 YES -/* m68k has no 2.4 kernel yet */ -# ifndef Mc68020Architecture -# define HasLinuxInput YES -# endif +/* Force Manpage preprocessing when using -DUseInstalled */ +# define DontPreprocessManPages NO +/* + * The XFree86 Debian package uses a local patch that defines a + * PicLibraryTarget() Imake rule, instead of using upstream's method. + */ +# define StaticNeedsPicForShared NO +# define KernelVersionInBanner YES +/* The TT/Meltho fonts are all under non-free licenses. */ +# define BuildTrueTypeFonts NO +# define BuildBethMarduthoFonts NO +/* build speedofonts */ +# define BuildSpeedo YES +# define BuildSpeedoFonts YES +/* build FontCache extension */ +# define BuildFontCache YES +/* Xprint should be banned from earth because: + * - it uses its own site.def file. + * - it doesn't respect that this is debian even if told so. + * - it uses its set of Imake Defines. (like if there are not enough around). + * - it is shipped outside already. + * - people claims that it has GL support! how cool.. look here (from xprint_site.def): + * #define BuildGlxExt NO + * because the above isn't supported yet. + * - it builds (again???) BuildFreetype2Library and fonts??? + * - a part of its license is not clear. + * - AND EVEN DEFINING THE BELOW LINE IS NOT ENOUGH! since the documentation SUCKS. + * + * # define PrintOnlyServer YES + * this one will do + * # define BuildXprint NO +/* + * The XFree86 Debian package build-depends on external Expat, Fontconfig, + * Freetype, Render, Xcursor, and Xft libraries. + */ +# define BuildExpatLibrary NO +# define HasExpat YES +# define ExpatIncDirStandard YES +# define BuildFontconfigLibrary NO +# define HasFontconfig YES +# define UseFontconfig YES +# define FontconfigIncDir /usr/include/fontconfig +# define BuildFreetype2Library NO +# define HasFreetype2 YES +# define BuildRenderLibrary NO +# define HasRenderLibrary YES +# define BuildXcursorLibrary NO +# define HasXcursorLibrary YES +# define IconDir Concat(ProjectRoot,/lib/X11/icons) +# define BuildXftLibrary NO +# define HasXftLibrary YES + +# ifdef UseInstalled +# define RenderLibraryDir /usr +# define XftLibraryDir /usr +# define XcursorLibraryDir /usr +# else +/* The XFree86 Debian package uses a special hack to find these libraries. */ +# define RenderLibraryDir $(TOP)/../../imports +# define XftLibraryDir $(TOP)/../../imports +# define XcursorLibraryDir $(TOP)/../../imports +# endif +/* + * We want to be sure that the normal XFree86 X server and the debugging X + * server use the same FreeType2 library. We'd *like* it if we could + * achieve this by both packages dynamically linking against the system's + * FreeType2 library; however, the normal X server package + * (xserver-xorg) *cannot* be built dynamically linked against the + * FreeType2 library when the module loader is enabled because of + * code/design issues. Therefore, we encapsulate XFree86's internal "fork" + * of the FreeType2 library into *both* xserver-xorg and + * xserver-xorg-dbg. When it becomes possible to build the + * module-loading server against an external FreeType2 shared library, we + * can drop this define: + */ +/* XXX: FontLibSharedFreeType doesn't appear anywhere! */ +# define FontLibSharedFreeType NO # define HasXdmAuth YES # define HasLatex YES -/* at present, glide2 only works on i386 */ +/* Glide2 only works on i386. */ # ifdef i386Architecture # define HasGlide2 YES # define Glide2IncDir /usr/include/glide # endif /* i386Architecture */ -/* at present, glide3 only works on alpha and i386 */ -# if defined(i386Architecture) || defined(AlphaArchitecture) +/* Glide3 only works on alpha, amd64, ia64 and i386. */ +# if defined(i386Architecture) || defined(AlphaArchitecture) || \ + defined(ia64Architecture) || defined(AMD64Architecture) # define HasGlide3 YES # define Glide3IncDir /usr/include/glide3 -# endif /* i386Architecture || AlphaArchitecture */ -/* extended instruction set support */ +# endif /* defined(i386Architecture) || defined(AlphaArchitecture) || ... */ +/* Enable extended instruction set support. */ # ifdef i386Architecture -# define HasX86Support YES +# define HasX86Support YES # define HasMMXSupport YES # define Has3DNowSupport YES /* 2.4 is not yet the official (or predominant) kernel in unstable */ -# define HasSSESupport NO +# define HasSSESupport YES # endif /* i386Architecture */ # endif /* DebianMaintainer */ #endif /* LinuxDebian */ @@ -673,10 +767,10 @@ # if UseElfFormat # ifdef AlphaArchitecture # define CcCmd gcc -b alpha-linux +# define CplusplusCmd c++ -b alpha-linux # define AsCmd CcCmd -c -x assembler # define LdCmd CcCmd -nostdlib -Wl,"-m elf64alpha" # define AsmDefines -D__ELF__ -# define CplusplusCmd c++ -b alpha-linux # endif /* AlphaArchitecture */ # ifdef HPArchitecture # define CcCmd gcc @@ -688,10 +782,10 @@ # endif /* HPArchitecture */ # ifdef i386Architecture # define CcCmd gcc -b i486-linux +# define CplusplusCmd c++ -b i486-linux # define AsCmd CcCmd -c -x assembler # define LdCmd CcCmd -nosdlib -Wl,"-m elf_i386" # define AsmDefines -D__ELF__ -# define CplusplusCmd c++ -b i486-linux # endif /* i386Architecture */ # ifdef ia64Architecture # define CcCmd gcc @@ -702,29 +796,30 @@ # endif /* ia64Architecture */ # ifdef Mc68020Architecture # define CcCmd gcc -b m68k-linux +# define CplusplusCmd c++ -b m68k-linux # define AsCmd CcCmd -c -x assembler # define LdCmd CcCmd -nostdlib -W,l"-m m68kelf" # define AsmDefines -D__ELF__ -# define CplusplusCmd c++ -b m68k-linux # endif /* Mc68020Architecture */ # ifdef AMD64Architecture -# define CcCmd gcc -# define CplusplusCmd g++ -# define AsCmd CcCmd -c -x assembler -# define LdCmd CcCmd -nostdlib -# define AsmDefines -D__ELF__ +# define CcCmd gcc +# define CplusplusCmd g++ +# define AsCmd CcCmd -c -x assembler +# define LdCmd CcCmd -nostdlib +# define AsmDefines -D__ELF__ # endif /* AMD64Architecture */ # else # define CcCmd gcc +# define CplusplusCmd g++ # define AsCmd CcCmd -c -x assembler # define LdCmd CcCmd -nostdlib -# define AsmDefines -DUSE_GAS +# define AsmDefines -DUSE_GAS -D__ELF__ # endif #endif #if UseElfFormat # ifndef DoLoadableServer -# ifdef HPArchitecture +# ifdef HPArchitecture || defined(MipsArchitecture) || defined(SuperHArchitecture) # define DoLoadableServer NO # else # define DoLoadableServer YES @@ -791,7 +886,7 @@ #ifdef AlphaArchitecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags DefaultGcc2AxpOpt +# define OptimizedCDebugFlags DefaultGcc2AxpOpt DefaultGcc2AxpOpt # endif # define LinuxMachineDefines -D__alpha__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -804,7 +899,7 @@ #ifdef Arm32Architecture # define DefaultCCOptions -fsigned-char # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O3 +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -812,7 +907,9 @@ #endif /* Arm32Achitecture */ #ifdef HPArchitecture -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs +# endif # define LinuxMachineDefines -D__hppa__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines @@ -820,7 +917,7 @@ #ifdef i386Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags DefaultGcc2i386Opt +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2i386Opt # endif # define LinuxMachineDefines -D__i386__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -829,7 +926,7 @@ #ifdef ia64Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__ia64__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -838,7 +935,7 @@ #ifdef Mc68020Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__mc68000__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -847,7 +944,7 @@ #ifdef MipsArchitecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__mips__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -857,7 +954,7 @@ #ifdef Ppc64Architecture # define DefaultCCOptions -fsigned-char -mminimal-toc # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2PpcOpt # endif # define LinuxMachineDefines -D__powerpc64__ -D__powerpc__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET @@ -867,7 +964,7 @@ #ifdef PpcArchitecture # define DefaultCCOptions -fsigned-char # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags DefaultGcc2PpcOpt +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2PpcOpt # endif # define LinuxMachineDefines -D__powerpc__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -876,7 +973,7 @@ #ifdef s390Architecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__s390__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -884,16 +981,17 @@ #endif /* s390Architecture */ #ifdef s390xArchitecture -/*#define DefaultCCOptions -fsigned-char */ -#define OptimizedCDebugFlags -O3 -fomit-frame-pointer -#define LinuxMachineDefines -D__s390x__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +# ifndef OptimizedCDebugFlags +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs +# endif +# define LinuxMachineDefines -D__s390x__ +# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* s390xArchitecture */ #ifdef SparcArchitecture # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif # define LinuxMachineDefines -D__sparc__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME @@ -924,7 +1022,7 @@ # endif # endif # ifndef OptimizedCDebugFlags -# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs +# define OptimizedCDebugFlags DefaultGcc2DebugOpt DefaultGcc2OptimizeOpt GccAliasingArgs SuperHArchOptFlags SuperHEndianFlags # endif # define LinuxMachineDefines -D__sh__ # define ServerOSDefines XFree86ServerOSDefines -DDDXTIME diff -ruN xc-old/config/cf/xfree86.cf xc/config/cf/xfree86.cf --- xc-old/config/cf/xfree86.cf 2004-07-06 23:50:59.000000000 +0000 +++ xc/config/cf/xfree86.cf 2004-11-02 10:14:12.826278232 +0000 @@ -233,6 +233,11 @@ #define GlideDriver /**/ #endif +/* The 3Dfx DRI driver can only be built if the glide3 library is available. */ +#ifndef HasGlide3 +#define HasGlide3 NO +#endif + /* * There are three parameters that determine where and how the Matrox HAL * library is used: @@ -477,8 +482,11 @@ vga dummy fbdev vesa # endif -/* DRI tdfx driver needs Glide, which is not available for AMD64 */ -# define TdfxDriDriver /**/ +# if HasGlide3 +# define TdfxDriDriver tdfx +# else +# define TdfxDriDriver /**/ +# endif # define DevelDRIDrivers /**/ @@ -848,8 +856,13 @@ savage nv cirrus DevelDrivers siliconmotion \ vga XF86OSCardDrivers XF86ExtraCardDrivers # endif +# if HasGlide3 +# define TdfxDriDriver tdfx +# else +# define TdfxDriDriver /**/ +# endif # ifndef DriDrivers -# define DriDrivers gamma tdfx mga r128 radeon r200 /*sis*/ +# define DriDrivers gamma TdfxDriDriver mga r128 radeon r200 /*sis*/ # endif #endif @@ -940,8 +953,13 @@ DevelDrivers vga \ XF86OSCardDrivers XF86ExtraCardDrivers # endif +# if HasGlide3 +# define TdfxDriDriver tdfx +# else +# define TdfxDriDriver /**/ +# endif # ifndef DriDrivers -# define DriDrivers gamma tdfx mga r128 radeon r200 +# define DriDrivers gamma TdfxDriDriver mga r128 radeon r200 # endif #endif @@ -1034,7 +1052,7 @@ # define TdfxDriDriver /**/ # endif # ifndef DriDrivers -# define DriDrivers gamma tdfx mga r128 radeon r200 +# define DriDrivers gamma TdfxDriDriver mga r128 radeon r200 # endif #endif @@ -1891,27 +1909,33 @@ # define GccAliasingArgs /* */ #endif +#if HasGcc2 +# ifndef DefaultGcc2OptimizeOpt +# define DefaultGcc2OptimizeOpt -O2 +# endif +#endif + #if HasGcc2 && defined(i386Architecture) # ifndef DefaultGcc2i386Opt -# define DefaultGcc2i386Opt -O2 -fno-strength-reduce GccAliasingArgs +# define DefaultGcc2i386Opt DefaultGcc2OptimizeOpt GccAliasingArgs # endif #endif #if HasGcc2 && defined(AMD64Architecture) # ifndef DefaultGcc2AMD64Opt -# define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce GccAliasingArgs +# define DefaultGcc2AMD64Opt DefaultGcc2OptimizeOpt GccAliasingArgs # endif #endif #if HasGcc2 && defined(AlphaArchitecture) # ifndef DefaultGcc2AxpOpt -# define DefaultGcc2AxpOpt -O2 GccAliasingArgs +# define DefaultGcc2AxpOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif #endif #if HasGcc2 && defined(PpcArchitecture) # ifndef DefaultGcc2PpcOpt -# define DefaultGcc2PpcOpt -O2 GccAliasingArgs +# define DefaultGcc2PpcOpt DefaultGcc2OptimizeOpt GccAliasingArgs # endif #endif