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