XCOMM platform: $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $ #ifndef OSName #define OSName DefaultOSName #endif #ifndef OSVendor #define OSVendor FreeBSD Foundation #endif #ifndef OSMajorVersion #define OSMajorVersion DefaultOSMajorVersion #endif #ifndef OSMinorVersion #define OSMinorVersion DefaultOSMinorVersion #endif #ifndef OSTeenyVersion #define OSTeenyVersion DefaultOSTeenyVersion #endif XCOMM operating system: OSName (OSMajorVersion/**/./**/OSMinorVersion/**/./**/OSTeenyVersion) #define HasPutenv YES #define HasBSD44Sockets YES #define HasZlib YES #define HasXdmAuth YES #if OSMajorVersion >= 10 && defined(UseGcc) USE_GCC = UseGcc #endif #ifndef CppCmd #if OSMajorVersion >= 10 && defined(UseGcc) # define CppCmd /usr/local/bin/cpp$(USE_GCC) #else # define CppCmd /usr/bin/cpp #endif #endif #define PreProcessCmd CppCmd #if OSMajorVersion >= 10 #define CppArgs -Wno-invalid-pp-token #define DirFailPrefix - #else #define CppArgs /**/ #endif #ifndef StandardCppDefines #define StandardCppDefines -traditional CppArgs #endif #ifndef PerlCmd #define PerlCmd /usr/local/bin/perl #endif #undef InstallCmd #define InstallCmd /usr/bin/install #undef KornShell #define KornShell /usr/local/bin/ksh93 #define UseGas YES #ifndef GccUsesGas # define GccUsesGas YES #endif #ifndef AsmDefines # define AsmDefines -DUSE_GAS #endif #if GccUsesGas # define GccGasOption -DGCCUSESGAS #else # define GccGasOption /**/ #endif #ifndef HasGcc2 # define HasGcc2 YES #endif /* Use installed X11 includes/libs on FreeBSD 11+ */ #if (OSMajorVersion >= 11) #define UseInstalledX11 YES #endif /* For DtHelp TIFF processing routines. */ #ifdef AMD64Architecture #define LSBBitOrder YES #endif #ifdef ARMArchitecture #define LSBBitOrder YES #endif #ifdef i386Architecture #define LSBBitOrder YES #endif #define MkdirHierCmd mkdir -p #ifndef CcCmd #if OSMajorVersion >= 10 # if defined(UseGcc) # define CcCmd /usr/local/bin/gcc$(USE_GCC) # define CplusplusCmd /usr/local/bin/g++$(USE_GCC) # else # define CcCmd cc # define CplusplusCmd c++ # endif #else # define CcCmd gcc # define CplusplusCmd g++ #endif #endif #ifndef DefaultCCOptions #define DefaultCCOptions -pipe #endif #ifndef CplusplusLibC #define CplusplusLibC -lstdc++ #endif #if OSMajorVersion > 1 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME #define XawI18nDefines -DUSE_XWCHAR_STRING #define HasMakefileSafeInclude YES #define IncludeMakefile(file) HASH_SIGN dependencies are in .depend #define DependFileName .depend #define DependDefines -D__cplusplus #if OSMajorVersion < 3 #if OSMinorVersion < 2 #ifndef ExtraLibraries #define ExtraLibraries -lgnumalloc #endif #else #if OSTeenyVersion == 2 #define HasSetUserContext YES #endif #endif #ifndef ExtraLoadFlags /* * This doesn't work the way it does on every other system. On FreeBSD 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 FreeBSD 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 FreeBSD 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 (FreeBSD) bother to add it? It would be nice if FreeBSD * 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 * FreeBSD should use it too. Once everyone uses it then there will be no * reason for FreeBSD 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. */ #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH) #endif #endif #else #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC #ifndef ExtraLibraries #define ExtraLibraries /* -lmalloc */ #endif #endif /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */ #ifndef DefaultGcc2i386Opt #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5) #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \ -Wno-unused-result -Wno-deprecated-register #endif #endif #ifndef OptimizedCDebugFlags # if defined(i386Architecture) || defined(AMD64Architecture) # define OptimizedCDebugFlags DefaultGcc2i386Opt # else # define OptimizedCDebugFlags -O2 -fno-strict-aliasing # endif #endif #ifdef HasGcc2 CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \ 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p' #define CplusplusDependIncludes $(CXXDEPENDINCLUDE) #endif /* beginning with svn version 254273 iconv functions are moved to libc */ #if (OSMajorVersion >= 10) ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi #endif #define ServerExtraDefines GccGasOption XFree86ServerDefines #define StandardDefines -DCSRG_BASED #define StandardIncludes -I/usr/local/include #define BuildLibPathVar LD_LIBRARY_PATH #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR) #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR) #define TroffCmd groff -Tps #define SetTtyGroup YES #define HasNdbm YES #define HasShm YES #define HasWChar32 YES #define HasLibCrypt YES #define AvoidNullMakeCommand YES #define HasPlugin YES #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */ #define CDESharedRev 2 #include