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
23 #define HasXdmAuth YES
25 #if OSMajorVersion >= 10 && defined(UseGcc)
30 #if OSMajorVersion >= 10 && defined(UseGcc)
31 # define CppCmd /usr/local/bin/cpp$(USE_GCC)
33 # define CppCmd /usr/bin/cpp
36 #define PreProcessCmd CppCmd
38 #if OSMajorVersion >= 10
39 #define CppArgs -Wno-invalid-pp-token
40 #define DirFailPrefix -
45 #ifndef StandardCppDefines
46 #define StandardCppDefines -traditional CppArgs
50 #define PerlCmd /usr/local/bin/perl
53 #define InstallCmd /usr/bin/install
55 #define KornShell /usr/local/bin/ksh93
59 # define GccUsesGas YES
63 # define AsmDefines -DUSE_GAS
67 # define GccGasOption -DGCCUSESGAS
69 # define GccGasOption /**/
76 /* Use installed X11 includes/libs on FreeBSD 11+ */
77 #if (OSMajorVersion >= 11)
78 #define UseInstalledX11 YES
82 /* For DtHelp TIFF processing routines. */
83 #ifdef AMD64Architecture
84 #define LSBBitOrder YES
87 #ifdef ARMArchitecture
88 #define LSBBitOrder YES
91 #ifdef i386Architecture
92 #define LSBBitOrder YES
95 #define MkdirHierCmd mkdir -p
98 #if OSMajorVersion >= 10
100 # define CcCmd /usr/local/bin/gcc$(USE_GCC)
101 # define CplusplusCmd /usr/local/bin/g++$(USE_GCC)
104 # define CplusplusCmd c++
108 # define CplusplusCmd g++
112 #ifndef DefaultCCOptions
113 #define DefaultCCOptions -pipe
116 #ifndef CplusplusLibC
117 #define CplusplusLibC -lstdc++
120 #if OSMajorVersion > 1
121 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
122 #define XawI18nDefines -DUSE_XWCHAR_STRING
123 #define HasMakefileSafeInclude YES
124 #define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
125 #define DependFileName .depend
126 #define DependDefines -D__cplusplus
127 #if OSMajorVersion < 3
128 #if OSMinorVersion < 2
129 #ifndef ExtraLibraries
130 #define ExtraLibraries -lgnumalloc
133 #if OSTeenyVersion == 2
134 #define HasSetUserContext YES
137 #ifndef ExtraLoadFlags
139 * This doesn't work the way it does on every other system. On FreeBSD it's
140 * only a "hint, not a demand", whatever that means. Note that this is not
141 * what it says in the ld and ld.so man pages, which are rather vague on the
144 * But we do know that if a) you do what the X Project team does and set your
145 * ProjectRoot to something like "/X11", and b) you have other X libraries,
146 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
147 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
148 * find that ld.so ignores the "hint" at runtime and loads the libraries in
149 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
150 * the run-path is only used as a last resort to find the libraries, after
151 * the LD_LIBRARY_PATH and ld.so.cache.
153 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
154 * path on other systems. The run-path is akin to a per-program ld.so.cache.
155 * If a program is linked with a run-path, that run-path should take
156 * precedence over _everything_ else! In my opinion ldconfig and the
157 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
158 * paths. Any program that needs libraries that are outside the "well known"
159 * locations should be linked with a run-path.
161 * All of which begs the question: If this option doesn't work in any useful
162 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
163 * would fix ld.so so that run-paths are truly useful.
165 * Using run-paths is added with the intent that vendors who ship X for
166 * FreeBSD should use it too. Once everyone uses it then there will be no
167 * reason for FreeBSD to assume that it knows where X libraries are installed
168 * and they can remove it from the list of directories they add to ld.so.cache
169 * in their /etc/rc file.
171 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
175 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
176 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
177 #ifndef ExtraLibraries
178 #define ExtraLibraries /* -lmalloc */
182 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
183 #ifndef DefaultGcc2i386Opt
184 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
185 #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
190 #ifndef OptimizedCDebugFlags
191 # if defined(i386Architecture) || defined(AMD64Architecture)
192 # define OptimizedCDebugFlags DefaultGcc2i386Opt
194 # define OptimizedCDebugFlags -O2 -fno-strict-aliasing
199 CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
200 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
201 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
204 /* beginning with svn version 254273 iconv functions are moved to libc */
205 #if (OSMajorVersion >= 10)
206 ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
209 #define ServerExtraDefines GccGasOption XFree86ServerDefines
211 #define StandardDefines -DCSRG_BASED
212 #define StandardIncludes -I/usr/local/include
213 #define BuildLibPathVar LD_LIBRARY_PATH
215 #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
216 #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
218 #define TroffCmd groff -Tps
219 #define SetTtyGroup YES
222 #define HasWChar32 YES
224 #define HasLibCrypt YES
226 #define AvoidNullMakeCommand YES
228 #define HasPlugin YES
229 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
231 #define CDESharedRev 2
233 #include <bsdLib.rules>