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