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
24 #if OSMajorVersion >= 10 && defined(UseGcc)
29 #if OSMajorVersion >= 10 && defined(UseGcc)
30 # define CppCmd /usr/local/bin/cpp$(USE_GCC)
32 # define CppCmd /usr/bin/cpp
35 #define PreProcessCmd CppCmd
37 #if OSMajorVersion >= 10
38 #define CppArgs -Wno-invalid-pp-token
39 #define DirFailPrefix -
44 #ifndef StandardCppDefines
45 #define StandardCppDefines -traditional CppArgs
49 #define PerlCmd /usr/local/bin/perl
52 #define InstallCmd /usr/bin/install
54 #define KornShell /usr/local/bin/ksh93
58 # define GccUsesGas YES
62 # define AsmDefines -DUSE_GAS
66 # define GccGasOption -DGCCUSESGAS
68 # define GccGasOption /**/
75 /* For DtHelp TIFF processing routines. */
76 #ifdef AMD64Architecture
77 #define LSBBitOrder YES
80 #ifdef ARMArchitecture
81 #define LSBBitOrder YES
84 #ifdef i386Architecture
85 #define LSBBitOrder YES
88 #define MkdirHierCmd mkdir -p
91 #if OSMajorVersion >= 10
93 # define CcCmd /usr/local/bin/gcc$(USE_GCC)
94 # define CplusplusCmd /usr/local/bin/g++$(USE_GCC)
97 # define CplusplusCmd c++
101 # define CplusplusCmd g++
105 #ifndef DefaultCCOptions
106 #define DefaultCCOptions -pipe
109 #ifndef CplusplusLibC
110 #define CplusplusLibC -lstdc++
113 #if OSMajorVersion > 1
114 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
115 #define XawI18nDefines -DUSE_XWCHAR_STRING
116 #define HasMakefileSafeInclude YES
117 #define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
118 #define DependFileName .depend
119 #if OSMajorVersion < 3
120 #if OSMinorVersion < 2
121 #ifndef ExtraLibraries
122 #define ExtraLibraries -lgnumalloc
125 #if OSTeenyVersion == 2
126 #define HasSetUserContext YES
129 #ifndef ExtraLoadFlags
131 * This doesn't work the way it does on every other system. On FreeBSD it's
132 * only a "hint, not a demand", whatever that means. Note that this is not
133 * what it says in the ld and ld.so man pages, which are rather vague on the
136 * But we do know that if a) you do what the X Project team does and set your
137 * ProjectRoot to something like "/X11", and b) you have other X libraries,
138 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
139 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
140 * find that ld.so ignores the "hint" at runtime and loads the libraries in
141 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
142 * the run-path is only used as a last resort to find the libraries, after
143 * the LD_LIBRARY_PATH and ld.so.cache.
145 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
146 * path on other systems. The run-path is akin to a per-program ld.so.cache.
147 * If a program is linked with a run-path, that run-path should take
148 * precedence over _everything_ else! In my opinion ldconfig and the
149 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
150 * paths. Any program that needs libraries that are outside the "well known"
151 * locations should be linked with a run-path.
153 * All of which begs the question: If this option doesn't work in any useful
154 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
155 * would fix ld.so so that run-paths are truly useful.
157 * Using run-paths is added with the intent that vendors who ship X for
158 * FreeBSD should use it too. Once everyone uses it then there will be no
159 * reason for FreeBSD to assume that it knows where X libraries are installed
160 * and they can remove it from the list of directories they add to ld.so.cache
161 * in their /etc/rc file.
163 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
167 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
168 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
169 #ifndef ExtraLibraries
170 #define ExtraLibraries /* -lmalloc */
174 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
175 #ifndef DefaultGcc2i386Opt
176 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
177 #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
181 #ifndef OptimizedCDebugFlags
182 # if defined(i386Architecture) || defined(AMD64Architecture)
183 # define OptimizedCDebugFlags DefaultGcc2i386Opt
185 # define OptimizedCDebugFlags -O2 -fno-strict-aliasing
190 CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
191 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
192 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
195 /* beginning with svn version 254273 iconv functions are moved to libc */
196 #if (OSMajorVersion >= 10)
197 ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
200 #define ServerExtraDefines GccGasOption XFree86ServerDefines
202 #define StandardDefines -DCSRG_BASED
203 #define StandardIncludes -I/usr/local/include
204 #define BuildLibPathVar LD_LIBRARY_PATH
206 #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
207 #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
209 #define TroffCmd groff -Tps
210 #define SetTtyGroup YES
213 #define HasWChar32 YES
215 #define HasLibCrypt YES
217 #define AvoidNullMakeCommand YES
219 #define HasPlugin YES
220 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
222 #define CDESharedRev 2
224 #include <bsdLib.rules>