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 >= 5
25 #define CppCmd /usr/bin/cpp -traditional
26 #define PreProcessCmd /usr/bin/cpp -traditional
28 #define CppCmd /usr/libexec/cpp -traditional
29 #define PreProcessCmd /usr/libexec/cpp -traditional
32 #define InstallCmd /usr/bin/install
34 #define KornShell /usr/local/bin/ksh93
38 # define GccUsesGas YES
42 # define AsmDefines -DUSE_GAS
46 # define GccGasOption -DGCCUSESGAS
48 # define GccGasOption /**/
55 #define MkdirHierCmd mkdir -p
58 #ifndef DefaultCCOptions
59 #define DefaultCCOptions -pipe
62 #define CplusplusLibC -lstdc++
64 #if OSMajorVersion > 1
65 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
66 #define XawI18nDefines -DUSE_XWCHAR_STRING
67 #define HasMakefileSafeInclude YES
68 #define IncludeMakefile(file) @@# dependencies are in .depend
69 #define DependFileName .depend
70 #if OSMajorVersion < 3
71 #if OSMinorVersion < 2
72 #ifndef ExtraLibraries
73 #define ExtraLibraries -lgnumalloc
76 #if OSTeenyVersion == 2
77 #define HasSetUserContext YES
80 #ifndef ExtraLoadFlags
82 * This doesn't work the way it does on every other system. On FreeBSD it's
83 * only a "hint, not a demand", whatever that means. Note that this is not
84 * what it says in the ld and ld.so man pages, which are rather vague on the
87 * But we do know that if a) you do what the X Project team does and set your
88 * ProjectRoot to something like "/X11", and b) you have other X libraries,
89 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
90 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
91 * find that ld.so ignores the "hint" at runtime and loads the libraries in
92 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
93 * the run-path is only used as a last resort to find the libraries, after
94 * the LD_LIBRARY_PATH and ld.so.cache.
96 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
97 * path on other systems. The run-path is akin to a per-program ld.so.cache.
98 * If a program is linked with a run-path, that run-path should take
99 * precedence over _everything_ else! In my opinion ldconfig and the
100 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
101 * paths. Any program that needs libraries that are outside the "well known"
102 * locations should be linked with a run-path.
104 * All of which begs the question: If this option doesn't work in any useful
105 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
106 * would fix ld.so so that run-paths are truly useful.
108 * Using run-paths is added with the intent that vendors who ship X for
109 * FreeBSD should use it too. Once everyone uses it then there will be no
110 * reason for FreeBSD to assume that it knows where X libraries are installed
111 * and they can remove it from the list of directories they add to ld.so.cache
112 * in their /etc/rc file.
114 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
118 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
119 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
120 #ifndef ExtraLibraries
121 #define ExtraLibraries /* -lmalloc */
125 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
126 #ifndef DefaultGcc2i386Opt
127 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
128 #define DefaultGcc2i386Opt -O2
132 #ifdef i386Architecture
133 # define OptimizedCDebugFlags DefaultGcc2i386Opt
135 # define OptimizedCDebugFlags -O2
138 #define ServerExtraDefines GccGasOption XFree86ServerDefines
140 #define StandardDefines -DCSRG_BASED
141 #define StandardIncludes -I/usr/local/include
142 #define BuildLibPathVar LD_LIBRARY_PATH
144 #define TroffCmd groff -Tps
145 #define SetTtyGroup YES
148 #define HasWChar32 YES
150 #define HasLibCrypt YES
152 #define AvoidNullMakeCommand YES
154 #define HasPlugin YES
155 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
157 #include <bsdLib.rules>
159 #ifdef i386Architecture
160 #include <xfree86.cf>