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 /* For DtHelp TIFF processing routines. */
77 #ifdef AMD64Architecture
78 #define LSBBitOrder YES
81 #ifdef ARMArchitecture
82 #define LSBBitOrder YES
85 #ifdef i386Architecture
86 #define LSBBitOrder YES
89 #define MkdirHierCmd mkdir -p
92 #if OSMajorVersion >= 10
94 # define CcCmd /usr/local/bin/gcc$(USE_GCC)
95 # define CplusplusCmd /usr/local/bin/g++$(USE_GCC)
98 # define CplusplusCmd c++
102 # define CplusplusCmd g++
106 #ifndef DefaultCCOptions
107 #define DefaultCCOptions -pipe
110 #ifndef CplusplusLibC
111 #define CplusplusLibC -lstdc++
114 #if OSMajorVersion > 1
115 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
116 #define XawI18nDefines -DUSE_XWCHAR_STRING
117 #define HasMakefileSafeInclude YES
118 #define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
119 #define DependFileName .depend
120 #define DependDefines -D__cplusplus
121 #if OSMajorVersion < 3
122 #if OSMinorVersion < 2
123 #ifndef ExtraLibraries
124 #define ExtraLibraries -lgnumalloc
127 #if OSTeenyVersion == 2
128 #define HasSetUserContext YES
131 #ifndef ExtraLoadFlags
133 * This doesn't work the way it does on every other system. On FreeBSD it's
134 * only a "hint, not a demand", whatever that means. Note that this is not
135 * what it says in the ld and ld.so man pages, which are rather vague on the
138 * But we do know that if a) you do what the X Project team does and set your
139 * ProjectRoot to something like "/X11", and b) you have other X libraries,
140 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
141 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
142 * find that ld.so ignores the "hint" at runtime and loads the libraries in
143 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
144 * the run-path is only used as a last resort to find the libraries, after
145 * the LD_LIBRARY_PATH and ld.so.cache.
147 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
148 * path on other systems. The run-path is akin to a per-program ld.so.cache.
149 * If a program is linked with a run-path, that run-path should take
150 * precedence over _everything_ else! In my opinion ldconfig and the
151 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
152 * paths. Any program that needs libraries that are outside the "well known"
153 * locations should be linked with a run-path.
155 * All of which begs the question: If this option doesn't work in any useful
156 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
157 * would fix ld.so so that run-paths are truly useful.
159 * Using run-paths is added with the intent that vendors who ship X for
160 * FreeBSD should use it too. Once everyone uses it then there will be no
161 * reason for FreeBSD to assume that it knows where X libraries are installed
162 * and they can remove it from the list of directories they add to ld.so.cache
163 * in their /etc/rc file.
165 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
169 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
170 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
171 #ifndef ExtraLibraries
172 #define ExtraLibraries /* -lmalloc */
176 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
177 #ifndef DefaultGcc2i386Opt
178 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
179 #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
183 #ifndef OptimizedCDebugFlags
184 # if defined(i386Architecture) || defined(AMD64Architecture)
185 # define OptimizedCDebugFlags DefaultGcc2i386Opt
187 # define OptimizedCDebugFlags -O2 -fno-strict-aliasing
192 CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
193 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
194 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
197 /* beginning with svn version 254273 iconv functions are moved to libc */
198 #if (OSMajorVersion >= 10)
199 ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
202 #define ServerExtraDefines GccGasOption XFree86ServerDefines
204 #define StandardDefines -DCSRG_BASED
205 #define StandardIncludes -I/usr/local/include
206 #define BuildLibPathVar LD_LIBRARY_PATH
208 #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
209 #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
211 #define TroffCmd groff -Tps
212 #define SetTtyGroup YES
215 #define HasWChar32 YES
217 #define HasLibCrypt YES
219 #define AvoidNullMakeCommand YES
221 #define HasPlugin YES
222 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
224 #define CDESharedRev 2
226 #include <bsdLib.rules>