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
36 # define GccUsesGas YES
40 # define AsmDefines -DUSE_GAS
44 # define GccGasOption -DGCCUSESGAS
46 # define GccGasOption /**/
53 #define MkdirHierCmd mkdir -p
56 #ifndef DefaultCCOptions
57 #define DefaultCCOptions -pipe
60 #define CplusplusLibC -lstdc++
62 #if OSMajorVersion > 1
63 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
64 #define XawI18nDefines -DUSE_XWCHAR_STRING
65 #define HasMakefileSafeInclude YES
66 #define IncludeMakefile(file) @@# dependencies are in .depend
67 #define DependFileName .depend
68 #if OSMajorVersion < 3
69 #if OSMinorVersion < 2
70 #ifndef ExtraLibraries
71 #define ExtraLibraries -lgnumalloc
74 #if OSTeenyVersion == 2
75 #define HasSetUserContext YES
78 #ifndef ExtraLoadFlags
80 * This doesn't work the way it does on every other system. On FreeBSD it's
81 * only a "hint, not a demand", whatever that means. Note that this is not
82 * what it says in the ld and ld.so man pages, which are rather vague on the
85 * But we do know that if a) you do what the X Project team does and set your
86 * ProjectRoot to something like "/X11", and b) you have other X libraries,
87 * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
88 * ld.so.cache with ldconfig, then any programs linked with this "hint" will
89 * find that ld.so ignores the "hint" at runtime and loads the libraries in
90 * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
91 * the run-path is only used as a last resort to find the libraries, after
92 * the LD_LIBRARY_PATH and ld.so.cache.
94 * N. B. to FreeBSD users who are not familiar with the semantics of the run-
95 * path on other systems. The run-path is akin to a per-program ld.so.cache.
96 * If a program is linked with a run-path, that run-path should take
97 * precedence over _everything_ else! In my opinion ldconfig and the
98 * ld.so.cache should be deprecated immediately now that FreeBSD has run-
99 * paths. Any program that needs libraries that are outside the "well known"
100 * locations should be linked with a run-path.
102 * All of which begs the question: If this option doesn't work in any useful
103 * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
104 * would fix ld.so so that run-paths are truly useful.
106 * Using run-paths is added with the intent that vendors who ship X for
107 * FreeBSD should use it too. Once everyone uses it then there will be no
108 * reason for FreeBSD to assume that it knows where X libraries are installed
109 * and they can remove it from the list of directories they add to ld.so.cache
110 * in their /etc/rc file.
112 #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
116 #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
117 #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
118 #ifndef ExtraLibraries
119 #define ExtraLibraries /* -lmalloc */
123 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
124 #ifndef DefaultGcc2i386Opt
125 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
126 #define DefaultGcc2i386Opt -O2
130 #ifdef i386Architecture
131 # define OptimizedCDebugFlags DefaultGcc2i386Opt
133 # define OptimizedCDebugFlags -O2
136 #define ServerExtraDefines GccGasOption XFree86ServerDefines
138 #define StandardDefines -DCSRG_BASED
140 #define TroffCmd groff -Tps
141 #define SetTtyGroup YES
144 #define HasWChar32 YES
146 #define HasLibCrypt YES
148 #define AvoidNullMakeCommand YES
150 #define HasPlugin YES
151 #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
153 #include <bsdLib.rules>
155 #ifdef i386Architecture
156 #include <xfree86.cf>