1XCOMM $XdotOrg: xc/config/cf/DragonFly.cf,v 1.1 2005/02/19 02:02:31 marvis Exp $ 2 3#define UseElfFormat YES 4 5#define OSBinaryFormat [ELF] 6 7#ifndef OSName 8#define OSName DefaultOSName OSBinaryFormat 9#endif 10#ifndef OSVendor 11#define OSVendor /**/ 12#endif 13#ifndef OSMajorVersion 14#define OSMajorVersion DefaultOSMajorVersion 15#endif 16#ifndef OSMinorVersion 17#define OSMinorVersion DefaultOSMinorVersion 18#endif 19 20#ifndef OSRelVersion 21/* Include this to get finer-grained information about the OS version */ 22#include "/usr/include/osreldate.h" 23#define OSRelVersion __DragonFly_version 24#endif 25 26XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion) (OSRelVersion) 27 28/* 29 * Base OS setup 30 */ 31#define HasCplusplus YES 32#define GccUsesGas YES 33#define UseGas YES 34#define GnuCpp YES 35#define HasBasename YES 36#define HasBSD44Sockets YES 37#define HasDlopen YES 38#define HasGetIfAddrs YES 39#define HasIssetugid YES 40#define HasLibCrypt YES 41#define HasMktemp YES 42#define HasNCurses YES 43#define HasNdbm YES 44#define HasPlugin YES 45#define HasPoll YES 46#define HasPutenv YES 47#define HasUsableFileMmap YES 48#define HasSetProcTitle YES 49#define HasShm YES 50#define HasSnprintf YES 51#define HasStrlcat YES 52#define HasVarDb YES 53#define HasVarRun YES 54#define HasWChar32 YES 55#define HasWeakSymbols UseElfFormat 56#define BuildXaw6 NO /*depreciated*/ 57#define BuildXaw7 NO /*depreciated*/ 58#define BuildXaw YES /*needed*/ 59#ifndef BuildPDFdocs 60#define BuildPDFdocs NO 61#endif 62#define IPv6SocketsAlsoIPv4 NO 63#define InstallXloadSetGID NO 64 65/* 66 * Multi-thread safe libs 67 */ 68#ifndef HasLibPthread 69# define HasLibPthread NO 70#endif 71#define HasPosixThreads YES 72#define ThreadedX YES 73#define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE 74#define HasThreadSafeAPI YES 75#define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI 76#if HasLibPthread 77# define ThreadsLibraries -lpthread 78#else 79# define ThreadsLibraries -pthread 80#endif 81 82 83#define AvoidNullMakeCommand YES 84#define StripInstalledPrograms YES 85#define CompressAllFonts YES 86#define Malloc0ReturnsNull YES 87#define NeedConstPrototypes YES 88#define NeedFunctionPrototypes YES 89#define NeedNestedPrototypes YES 90#define NeedVarargsPrototypes YES 91#define NeedWidePrototypes NO 92 93#define MkdirHierCmd mkdir -p 94 95#define LexCmd flex -l 96#define HasFlex YES 97 98#ifndef CcCmd 99# define CcCmd cc 100#endif 101#ifndef CplusplusCmd 102# define CplusplusCmd c++ 103#endif 104#define CppCmd /usr/bin/cpp 105#define PreProcessCmd CppCmd 106#define StandardCppOptions -traditional 107#define StandardCppDefines /**/ 108#ifndef DefaultCCOptions 109# if defined(UseInstalled) 110# define DefaultCCOptions /**/ 111# else 112# if defined(HasGcc3) && HasGcc3 113# define NoSystemWarn -Wno-system-headers 114# else 115# define NoSystemWarn 116# endif 117# define DefaultCCOptions -ansi NoSystemWarn -Dasm=__asm GccWarningOptions 118#endif 119#ifndef ExtraLibraries 120/* support for multi-byte locales is in libxpg4 rather than libc */ 121#define ExtraLibraries -lxpg4 122#endif 123#define HasSetUserContext YES 124#define HasGetpeereid YES 125#define HasMTRRSupport YES 126 127#ifndef BuildXF86DRI 128# define BuildXF86DRI YES 129#endif 130 131#if defined(i386Architecture) 132#define HasAgpGart YES 133#endif 134 135/* 136 * SSE and 3DNow will be autodetected, so binutils is the only 137 * requirement for enabling this. 138 */ 139#if defined(i386Architecture) 140# define HasX86Support YES 141# define HasMMXSupport YES 142# define Has3DNowSupport YES 143# define HasSSESupport YES 144#else 145# define HasX86Support NO 146# define HasMMXSupport NO 147# define Has3DNowSupport NO 148# define HasSSESupport NO 149#endif 150 151#ifndef BuildDmx 152#define BuildDmx YES 153#endif 154 155#ifndef UseRpath 156# define UseRpath YES 157#endif 158 159#ifndef RpathLoadFlags 160# if UseRpath 161# define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) 162# else 163# define RpathLoadFlags /**/ 164# endif 165#endif 166 167#ifndef ExtraLoadFlags 168# if !defined(UseInstalled) 169# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR) 170# else 171# define ExtraLoadFlags RpathLoadFlags 172# endif 173#endif 174 175#endif 176 177#ifndef LibraryRpathLoadFlags 178# if UseRpath 179# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH) 180# else 181# define LibraryRpathLoadFlags /**/ 182# endif 183#endif 184 185#ifndef SharedLibraryLoadFlags 186# define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags 187#endif 188 189#ifndef HasZlib 190# define HasZlib YES 191#endif 192 193#ifndef HasPam 194# define HasPam YES 195#endif 196 197/* Take from FreeBSD */ 198/* There are two options for building. One is to assume that the system has 199 * many of the dependencies provided by the ports tree. The other is to just 200 * build everything from this tree. 201 */ 202 203#ifndef HasStandardPorts 204# define HasStandardPorts YES 205#endif 206 207#ifndef LocalBase 208# define LocalBase /usr/local 209#endif 210#ifndef X11Base 211# define X11Base /usr/X11R6 212#endif 213 214#if HasStandardPorts 215 216#ifndef HasExpat 217# define HasExpat YES 218# define ExpatDir LocalBase 219#endif 220 221#ifndef HasFreetype2 222# define HasFreetype2 NO /* set this to YES once DragonFly ships FT218 */ 223# define Freetype2Dir LocalBase 224#endif 225 226#ifndef HasFontconfig 227# define HasFontconfig YES 228# define FontconfigDir X11Base 229#endif 230 231#ifndef HasLibpng 232# define HasLibpng YES 233# define LibpngDir LocalBase 234#endif 235 236#endif /* HasStandardPorts */ 237 238#undef InstallCmd 239#define InstallCmd /usr/bin/install 240 241#define AsmElfDefines -D__ELF__ 242 243#if GccUsesGas 244# define GccGasOption -DGCCUSESGAS 245# define AsmDefines -DUSE_GAS AsmElfDefines 246#else 247# define GccGasOption /**/ 248# define AsmDefines AsmElfDefines 249#endif 250 251#ifdef i386Architecture 252#define ServerExtraDefines GccGasOption XFree86ServerDefines 253#endif 254#if defined(Sparc64Architecture) || defined(ia64Architecture) || \ 255 defined(AMD64Architecture) 256#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64 257#endif 258 259#define StandardDefines -DCSRG_BASED 260 261#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME 262#define XawI18nDefines -DUSE_XWCHAR_STRING 263#define HasMakefileSafeInclude YES 264#define IncludeMakefile(file) @@# dependencies are in .depend 265#define DependFileName .depend 266#ifndef DoLoadableServer 267# define DoLoadableServer YES 268#endif 269#ifndef ForceNormalLib 270# define ForceNormalLib YES 271#endif 272#define HasMkstemp YES 273 274#define OptimizedCDebugFlags -O 275 276#ifndef PreIncDir 277# define PreIncDir /usr/include 278#endif 279 280#define HasGroff YES 281#define NroffCmd env GROFF_NO_SGR=y groff -Tascii 282#define SetTtyGroup YES 283 284#ifndef ExtraFilesToClean 285# define ExtraFilesToClean *.core 286#endif 287 288#define DefaultUserPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/local/bin 289#define DefaultSystemPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR) 290#ifndef SystemManDirectory 291# define SystemManDirectory /usr/share/man 292#endif 293 294#define InstKmemFlags -g kmem -m 2755 295 296/* 297 * Compress manual pages 298 */ 299#ifndef CompressManPages 300# define CompressManPages NO 301#endif 302 303#define HasBsdMake YES 304 305#ifndef StaticLibrary 306# define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic 307#endif 308 309#define DlLibrary -Wl,--export-dynamic 310 311#ifndef PamLibraries 312# define PamLibraries -lpam DlLibrary 313#endif 314 315#ifndef SharedLibXdmGreet 316# define SharedLibXdmGreet NO 317#endif 318 319/* 320 * On FreeBSD, the run-time loader will use the built-in "rpath" before 321 * LD_LIBRARY_PATH. This means that utilities like mkfontdir will load 322 * installed libraries (if they exist) in preference to the ones in the 323 * build tree, even though LD_LIBRARY_PATH points to the build tree. 324 * This can result in the build failing. One way to avoid this is to 325 * pre-load the libraries from the build tree. 326 * 327 * There should be a better way than this hack... 328 */ 329#if UseElfFormat 330#ifndef PreloadFontSetup 331#define PreloadFontSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(XFONTPRELOADPATTERN))`" 332#endif 333#ifndef PreloadFreetypeSetup 334#define PreloadFreetypeSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN))`" 335#endif 336#ifndef PreloadXFTSetup 337#define PreloadXFTSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN) $(XFTPRELOADPATTERN) $(XRENDERPRELOADPATTERN) $(FCPRELOADPATTERN))`" 338#endif 339#endif 340 341#ifndef HasCookieMaker 342# define HasCookieMaker YES 343# define MkCookieCmd \ 344 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"' 345#endif 346 347/* 348 * A hack to work around an optimization problem with gcc 2.95.2 - 2.95.4 349 */ 350#if (GccMajorVersion == 2 && GccMinorVersion == 95) 351# define GccOptBug295 352#endif 353 354#include <bsdLib.rules> 355 356#include <xorg.cf> 357 358 359