--- BSDSUniX.cf.orig 2016-10-08 13:09:43 UTC +++ BSDSUniX.cf @@ -0,0 +1,467 @@ +XCOMM platform: $Xorg: BSDSUniX.cf,v 1.3 2000/08/17 19:41:45 cpqbld Exp $ +XCOMM platform: $XdotOrg: xc/config/cf/BSDSUniX.cf,v 1.10 2004/08/15 00:03:36 anholt Exp $ +XCOMM +XCOMM +XCOMM +XCOMM platform: $XFree86: xc/config/cf/BSDSUniX.cf,v 3.147 2004/01/28 01:46:21 dawes Exp $ + +#ifndef UseElfFormat +#define UseElfFormat DefaultToElfFormat +#endif + +#if UseElfFormat +#define OSBinaryFormat [ELF] +#else +#define OSBinaryFormat [a.out] +#endif + +#ifndef OSName +#define OSName DefaultOSName OSBinaryFormat +#endif +#ifndef OSVendor +#define OSVendor /**/ +#endif +#ifndef OSMajorVersion +#define OSMajorVersion DefaultOSMajorVersion +#endif +#ifndef OSMinorVersion +#define OSMinorVersion DefaultOSMinorVersion +#endif +#ifndef OSTeenyVersion +#define OSTeenyVersion DefaultOSTeenyVersion +#endif + +#ifndef OSRelVersion +/* Include this to get finer-grained information about the OS version */ +#include "/usr/include/osreldate.h" +#define OSRelVersion __BSDSUniX_version +#endif + +XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) (OSRelVersion) + + +#define HasCplusplus YES +#define GccUsesGas YES +#define UseGas YES +#define GnuCpp YES +#define HasNdbm YES +#define HasPutenv YES +#define HasSnprintf YES +# define HasStrlcat YES +# define HasBasename YES +#define HasBSD44Sockets YES +#define HasDlopen YES +#define HasSetProcTitle YES +#ifndef HasLibCrypt +# define HasLibCrypt YES +#endif +#ifndef HasShm +# define HasShm YES +#endif +#define HasWChar32 YES +#define HasUsableFileMmap YES +#define HasNCurses YES +#define HasVarRun YES +#define HasVarDb YES +#ifndef BuildPDFdocs +# define BuildPDFdocs NO +#endif +#define HasIssetugid YES +#define HasPoll YES +#define BuildHtmlManPages NO + +#define HasGetIfAddrs YES + +#define IPv6SocketsAlsoIPv4 NO + +#define InstallXloadSetGID NO + +#define HasWeakSymbols UseElfFormat + +/* + * Multi-thread safe libs + */ +#define HasPosixThreads YES +#define ThreadedX YES +#define HasThreadSafeAPI YES +#define MTSafeAPIDefines -DXUSE_MTSAFE_API +#define ThreadsLibraries -lpthread +#define SystemMTDefines + +#define AvoidNullMakeCommand YES +#define StripInstalledPrograms YES +#define CompressAllFonts YES +#define Malloc0ReturnsNull YES +#define NeedConstPrototypes YES +#define NeedFunctionPrototypes YES +#define NeedNestedPrototypes YES +#define NeedVarargsPrototypes YES +#define NeedWidePrototypes NO + +#define HasPlugin YES +#define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */ + +#define MkdirHierCmd mkdir -p + +#ifndef LexCmd +#define LexCmd flex -l +#endif +#ifndef HasFlex +#define HasFlex YES +#endif + +#ifndef HasMktemp +#define HasMktemp YES +#endif + +#ifndef CcCmd +#define CcCmd cc +#endif +#ifndef CplusplusCmd +#define CplusplusCmd c++ +#endif +#ifndef CppCmd +#define CppCmd /usr/bin/cpp +#endif +#define PreProcessCmd CppCmd +#define StandardCppOptions -traditional +#define StandardCppDefines /**/ +#ifndef DefaultCCOptions +#if defined(UseInstalled) +#define DefaultCCOptions /**/ +#else +#if defined(HasGcc3) && HasGcc3 +#define NoSystemWarn -Wno-system-headers +#else +#define NoSystemWarn +#endif +#define DefaultCCOptions -ansi -pedantic NoSystemWarn -Dasm=__asm \ + GccWarningOptions +#endif +#endif +#ifndef ExtraLibraries +#define ExtraLibraries /**/ +#endif +#ifndef UseGnuMalloc +#define UseGnuMalloc NO +#endif +#define HasSetUserContext YES + +#define HasGetpeereid YES + +#ifndef HasMTRRSupport +#define HasMTRRSupport YES +#endif + +/* + * Drivers that don't need AGP can work with 4.0, but we don't have a + * mechanism for specifying a subset of drivers in the OS.cf files yet. + */ +#ifndef BuildXF86DRI +#define BuildXF86DRI YES +#endif + +#ifndef HasAgpGart +#if defined(i386Architecture) || defined(AlphaArchitecture) || defined(ia64Architecture) || defined(AMD64Architecture) +#define HasAgpGart YES +#endif +#endif + +#if defined(AMD64Architecture) || defined(i386Architecture) +# define HasX86Support YES +# define HasMMXSupport YES +# define Has3DNowSupport YES +# define HasSSESupport YES +#else +# define HasX86Support NO +# define HasMMXSupport NO +# define Has3DNowSupport NO +# define HasSSESupport NO +#endif + +/* + * This doesn't work the way it does on every other system. On BSDSUnIX it's + * only a "hint, not a demand", whatever that means. Note that this is not + * what it says in the ld and ld.so man pages, which are rather vague on the + * matter. + * + * But we do know that if a) you do what the X Project team does and set your + * ProjectRoot to something like "/X11", and b) you have other X libraries, + * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your + * ld.so.cache with ldconfig, then any programs linked with this "hint" will + * find that ld.so ignores the "hint" at runtime and loads the libraries in + * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that + * the run-path is only used as a last resort to find the libraries, after + * the LD_LIBRARY_PATH and ld.so.cache. + * + * N. B. to BSDSuniX users who are not familiar with the semantics of the run- + * path on other systems. The run-path is akin to a per-program ld.so.cache. + * If a program is linked with a run-path, that run-path should take + * precedence over _everything_ else! In my opinion ldconfig and the + * ld.so.cache should be deprecated immediately now that BSDSuniX has run- + * paths. Any program that needs libraries that are outside the "well known" + * locations should be linked with a run-path. + * + * All of which begs the question: If this option doesn't work in any useful + * way, why did they (BSDSuniX) bother to add it? It would be nice if BSDSuniX + * would fix ld.so so that run-paths are truly useful. + * + * Using run-paths is added with the intent that vendors who ship X for + * BSDSuniX should use it too. Once everyone uses it then there will be no + * reason for BSDSuniX to assume that it knows where X libraries are installed + * and they can remove it from the list of directories they add to ld.so.cache + * in their /etc/rc file. + */ + +#ifndef UseRpath +# define UseRpath YES +#endif + +#ifndef RpathLoadFlags +# if UseRpath +# if UseElfFormat +# define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH) +# else +# define RpathLoadFlags -Wl,-R,$(USRLIBDIRPATH) +# endif +# else +# define RpathLoadFlags /**/ +# endif +#endif + +#ifndef ExtraLoadFlags +# if UseElfFormat && !defined(UseInstalled) +# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR) +# else +# define ExtraLoadFlags RpathLoadFlags +# endif +#endif + +#ifndef LibraryRpathLoadFlags +# if UseRpath +# if UseElfFormat +# define LibraryRpathLoadFlags -Wl,-rpath $(USRLIBDIRPATH) +# else +# define LibraryRpathLoadFlags -R $(USRLIBDIRPATH) +# endif +# else +# define LibraryRpathLoadFlags /**/ +# endif +#endif + +#ifndef SharedLibraryLoadFlags +# if UseElfFormat +# define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags +# else +# define SharedLibraryLoadFlags -Bshareable LibraryRpathLoadFlags +# endif +#endif + +#ifndef GnuMallocLibrary +#define GnuMallocLibrary -lgnumalloc +#endif + +#ifndef HasZlib +#define HasZlib YES +#endif + +#ifndef HasPam +#define HasPam YES +#endif + +/* There are two options for building. One is to assume that the system has + * many of the dependencies provided by the ports tree. The other is to just + * build everything from this tree. + */ + +#ifndef HasStandardPorts +#define HasStandardPorts YES +#endif + +#ifndef LocalBase +#define LocalBase /usr/local +#endif +#ifndef X11Base +#define X11Base /usr/X11R6 +#endif + +#if HasStandardPorts + +#ifndef HasExpat +# define HasExpat YES +# define ExpatDir LocalBase +#endif + +#ifndef HasFreetype2 +# define HasFreetype2 YES +# define Freetype2Dir LocalBase +#endif + +#ifndef HasFontconfig +# define HasFontconfig YES +# define FontconfigDir X11Base +#endif + +#ifndef HasLibpng +# define HasLibpng YES +# define LibpngDir LocalBase +#endif + +#endif /* HasStandardPorts */ + +#undef InstallCmd +#define InstallCmd /usr/bin/install + +#if UseElfFormat +# define AsmElfDefines -D__ELF__ +#else +# define AsmElfDefines /**/ +#endif + +#if GccUsesGas +# define GccGasOption -DGCCUSESGAS +# define AsmDefines -DUSE_GAS AsmElfDefines +#else +# define GccGasOption /**/ +# define AsmDefines AsmElfDefines +#endif + +#ifdef i386Architecture +#define ServerExtraDefines GccGasOption XFree86ServerDefines +#endif +#if defined(AlphaArchitecture) || defined(Sparc64Architecture) || \ + defined(ia64Architecture) || defined(AMD64Architecture) +#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64 +#endif +#ifdef Sparc64Architecture +#define AsVISOption -Av9a +#define AsOutputArchSize 64 +#endif + +#ifdef PpcArchitecture +#define XF86INT10_BUILD X86INT10_STUB +#endif + +#define StandardDefines -DCSRG_BASED + +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define XawI18nDefines -DUSE_XWCHAR_STRING +#define HasMakefileSafeInclude YES +#define IncludeMakefile(file) @@# dependencies are in .depend +#define DependFileName .depend +#ifndef DoLoadableServer +# define DoLoadableServer YES +#endif +#ifndef ForceNormalLib +# define ForceNormalLib YES +#endif +#define HasMkstemp YES + +/* The GCC strength-reduce bug is fixed */ +#ifndef DefaultGcc2i386Opt +#define DefaultGcc2i386Opt +#endif + +#ifdef i386Architecture +# define OptimizedCDebugFlags DefaultGcc2i386Opt +#else +# define OptimizedCDebugFlags +#endif + +#ifndef PreIncDir +# define PreIncDir /usr/include +#endif + +#define HasGroff YES +#define NroffCmd env GROFF_NO_SGR=y groff -Tascii +#define SetTtyGroup YES + +#ifndef ExtraFilesToClean +# define ExtraFilesToClean *.core +#endif + +#define DefaultUserPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/gnu/bin:/usr/local/bin +#define DefaultSystemPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR) +#ifndef SystemManDirectory +#define SystemManDirectory /usr/share/man +#endif + +#ifndef UseConfDirForAppDefaults +#define UseConfDirForAppDefaults NO +#endif + +#define InstKmemFlags -g kmem -m 2755 + +/* + * Compress manual pages + */ +#ifndef CompressManPages +# define CompressManPages YES +#endif + +#define HasBsdMake YES + +#ifndef StaticLibrary +#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic +#endif + +#if UseElfFormat +#define DlLibrary -rdynamic +#else +#define DlLibrary /**/ +#endif + +#ifdef AlphaArchitecture +#define IoLibrary -lio +#else +#define IoLibrary /**/ +#endif + +#define ServerExtraSysLibs IoLibrary + +#ifndef PamLibraries +#define PamLibraries -lpam DlLibrary +#endif + +#ifndef SharedLibXdmGreet +# define SharedLibXdmGreet NO +#endif + +/* + * On BSDSUniX, the run-time loader will use the built-in "rpath" before + * LD_LIBRARY_PATH. This means that utilities like mkfontdir will load + * installed libraries (if they exist) in preference to the ones in the + * build tree, even though LD_LIBRARY_PATH points to the build tree. + * This can result in the build failing. One way to avoid this is to + * pre-load the libraries from the build tree. + * + * There should be a better way than this hack... + */ +#if UseElfFormat +#ifndef PreloadFontSetup +#define PreloadFontSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(XFONTPRELOADPATTERN))`" +#endif +#ifndef PreloadFreetypeSetup +#define PreloadFreetypeSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN))`" +#endif +#ifndef PreloadXFTSetup +#define PreloadXFTSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN) $(XFTPRELOADPATTERN) $(XRENDERPRELOADPATTERN) $(FCPRELOADPATTERN))`" +#endif +#endif + +#ifndef HasCookieMaker +# define HasCookieMaker YES +# define MkCookieCmd \ + 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"' +#endif + +/* + * A hack to work around an optimization problem with gcc 2.95.2 - 2.95.4 + */ +#if (GccMajorVersion == 2 && GccMinorVersion == 95) +#define GccOptBug295 +#endif + +#include + +#include