1 XCOMM platform: $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
4 #define OSName DefaultOSName
7 #define OSVendor FreeBSD Foundation
10 #define OSMajorVersion DefaultOSMajorVersion
12 #ifndef OSMinorVersion
13 #define OSMinorVersion DefaultOSMinorVersion
15 #ifndef OSTeenyVersion
16 #define OSTeenyVersion DefaultOSTeenyVersion
18 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
21 #define HasBSD44Sockets YES
25 #if OSMajorVersion >= 5
26 #define CppCmd /usr/bin/cpp -traditional
27 #define PreProcessCmd /usr/bin/cpp -traditional
29 #define CppCmd /usr/libexec/cpp -traditional
30 #define PreProcessCmd /usr/libexec/cpp -traditional
35 #define InstallCmd /usr/bin/install
37 #define KornShell /usr/local/bin/ksh93
41 # define GccUsesGas YES
45 # define AsmDefines -DUSE_GAS
49 # define GccGasOption -DGCCUSESGAS
51 # define GccGasOption /**/
58 /* For DtHelp TIFF processing routines. */
59 #ifdef AMD64Architecture
60 #define LSBBitOrder YES
63 #ifdef ARMArchitecture
64 #define LSBBitOrder YES
67 #ifdef i386Architecture
68 #define LSBBitOrder YES
71 #define MkdirHierCmd mkdir -p
75 #ifndef DefaultCCOptions
76 #define DefaultCCOptions -pipe
80 #define CplusplusLibC -lstdc++
82 #if OSMajorVersion > 1
83 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
84 #define XawI18nDefines -DUSE_XWCHAR_STRING
85 #define HasMakefileSafeInclude YES
86 #define IncludeMakefile(file) @@# dependencies are in .depend
87 #define DependFileName .depend
88 #if OSMajorVersion < 3
89 #if OSMinorVersion < 2
90 #ifndef ExtraLibraries
91 #define ExtraLibraries -lgnumalloc
94 #if OSTeenyVersion == 2
95 #define HasSetUserContext YES
98 #ifndef ExtraLoadFlags
100 * This doesn't work the way it does on every other system. On FreeBSD it's
101 * only a "hint, not a demand", whatever that means. Note that this is not
102 * what it says in the ld and ld.so man pages, which are rather vague on the
105 * But we do know that if a) you do what the X Project team does and set your
106 * ProjectRoot to something like "/X11", and b) you have other X libraries,
107 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
108 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
109 * find that ld.so ignores the "hint" at runtime and loads the libraries in
110 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
111 * the run-path is only used as a last resort to find the libraries, after
112 * the LD_LIBRARY_PATH and ld.so.cache.
114 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
115 * path on other systems. The run-path is akin to a per-program ld.so.cache.
116 * If a program is linked with a run-path, that run-path should take
117 * precedence over _everything_ else! In my opinion ldconfig and the
118 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
119 * paths. Any program that needs libraries that are outside the "well known"
120 * locations should be linked with a run-path.
122 * All of which begs the question: If this option doesn't work in any useful
123 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
124 * would fix ld.so so that run-paths are truly useful.
126 * Using run-paths is added with the intent that vendors who ship X for
127 * FreeBSD should use it too. Once everyone uses it then there will be no
128 * reason for FreeBSD to assume that it knows where X libraries are installed
129 * and they can remove it from the list of directories they add to ld.so.cache
130 * in their /etc/rc file.
132 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
136 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
137 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
138 #ifndef ExtraLibraries
139 #define ExtraLibraries /* -lmalloc */
143 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
144 #ifndef DefaultGcc2i386Opt
145 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
146 #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
150 #ifndef OptimizedCDebugFlags
151 # ifdef i386Architecture
152 # define OptimizedCDebugFlags DefaultGcc2i386Opt
154 # define OptimizedCDebugFlags -O2 -fno-strict-aliasing
159 CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
160 2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p'
161 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
164 #define ServerExtraDefines GccGasOption XFree86ServerDefines
166 #define StandardDefines -DCSRG_BASED
167 #define StandardIncludes -I/usr/local/include
168 #define BuildLibPathVar LD_LIBRARY_PATH
170 #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
171 #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
173 #define TroffCmd groff -Tps
174 #define SetTtyGroup YES
177 #define HasWChar32 YES
179 #define HasLibCrypt YES
181 #define AvoidNullMakeCommand YES
183 #define HasPlugin YES
184 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
186 #define CDESharedRev 2
188 #include <bsdLib.rules>