Fix dtinfo search engine
[oweals/cde.git] / cde / config / cf / FreeBSD.cf
1 XCOMM platform:  $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
2
3 #ifndef OSName
4 #define OSName                  DefaultOSName
5 #endif
6 #ifndef OSVendor
7 #define OSVendor                FreeBSD Foundation
8 #endif
9 #ifndef OSMajorVersion
10 #define OSMajorVersion          DefaultOSMajorVersion
11 #endif
12 #ifndef OSMinorVersion
13 #define OSMinorVersion          DefaultOSMinorVersion
14 #endif
15 #ifndef OSTeenyVersion
16 #define OSTeenyVersion          DefaultOSTeenyVersion
17 #endif
18 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
19
20 #define HasPutenv               YES
21 #define HasBSD44Sockets         YES
22 #define HasZlib                 YES
23
24 #ifndef CppCmd
25 #if OSMajorVersion >= 5
26 #define CppCmd                  /usr/bin/cpp -traditional
27 #define PreProcessCmd           /usr/bin/cpp -traditional
28 #else
29 #define CppCmd                  /usr/libexec/cpp -traditional
30 #define PreProcessCmd           /usr/libexec/cpp -traditional
31 #endif
32 #endif
33
34 #undef  InstallCmd
35 #define InstallCmd              /usr/bin/install
36 #undef  KornShell
37 #define KornShell               /usr/local/bin/ksh93
38
39 #define UseGas                  YES
40 #ifndef GccUsesGas
41 # define GccUsesGas             YES
42 #endif
43
44 #ifndef AsmDefines
45 #  define AsmDefines            -DUSE_GAS
46 #endif
47
48 #if GccUsesGas
49 # define GccGasOption           -DGCCUSESGAS
50 #else
51 # define GccGasOption           /**/
52 #endif
53
54 #ifndef HasGcc2
55 # define HasGcc2                YES
56 #endif
57
58 /* For DtHelp TIFF processing routines. */
59 #ifdef AMD64Architecture
60 #define LSBBitOrder             YES
61 #endif
62
63 #ifdef ARMArchitecture
64 #define LSBBitOrder             YES
65 #endif
66
67 #ifdef i386Architecture
68 #define LSBBitOrder             YES
69 #endif
70
71 #define MkdirHierCmd            mkdir -p
72
73 #ifndef CcCmd
74 #define CcCmd gcc
75 #ifndef DefaultCCOptions
76 #define DefaultCCOptions        -pipe
77 #endif
78 #endif
79
80 #define CplusplusLibC           -lstdc++
81
82 #if OSMajorVersion > 1
83 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME
84 #define XawI18nDefines          -DUSE_XWCHAR_STRING
85 #define HasMakefileSafeInclude  YES
86 #define IncludeMakefile(file)   @@# dependencies are in .depend
87 #define DependFileName          .depend
88 #if OSMajorVersion < 3
89 #if OSMinorVersion < 2
90 #ifndef ExtraLibraries
91 #define ExtraLibraries          -lgnumalloc
92 #endif
93 #else
94 #if OSTeenyVersion == 2
95 #define HasSetUserContext       YES
96 #endif
97 #endif
98 #ifndef ExtraLoadFlags
99 /* 
100  * This doesn't work the way it does on every other system. On FreeBSD it's
101  * only a "hint, not a demand", whatever that means. Note that this is not 
102  * what it says in the ld and ld.so man pages, which are rather vague on the
103  * matter.
104  *
105  * But we do know that if a) you do what the X Project team does and set your 
106  * ProjectRoot to something like "/X11", and b) you have other X libraries, 
107  * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your 
108  * ld.so.cache with ldconfig, then any programs linked with this "hint" will
109  * find that ld.so ignores the "hint" at runtime and loads the libraries in 
110  * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
111  * the run-path is only used as a last resort to find the libraries, after
112  * the LD_LIBRARY_PATH and ld.so.cache.
113  *
114  * N. B. to FreeBSD users who are not familiar with the semantics of the run-
115  * path on other systems. The run-path is akin to a per-program ld.so.cache. 
116  * If a program is linked with a run-path, that run-path should take 
117  * precedence over _everything_ else! In my opinion ldconfig and the 
118  * ld.so.cache should be deprecated immediately now that FreeBSD has run-
119  * paths. Any program that needs libraries that are outside the "well known" 
120  * locations should be linked with a run-path.
121  *
122  * All of which begs the question: If this option doesn't work in any useful
123  * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
124  * would fix ld.so so that run-paths are truly useful.
125  *
126  * Using run-paths is added with the intent that vendors who ship X for 
127  * FreeBSD should use it too. Once everyone uses it then there will be no 
128  * reason for FreeBSD to assume that it knows where X libraries are installed 
129  * and they can remove it from the list of directories they add to ld.so.cache 
130  * in their /etc/rc file.
131  */
132 #define ExtraLoadFlags          -Wl,-R,$(USRLIBDIRPATH)
133 #endif
134 #endif
135 #else
136 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
137 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
138 #ifndef ExtraLibraries
139 #define ExtraLibraries          /* -lmalloc */
140 #endif
141 #endif
142
143 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
144 #ifndef DefaultGcc2i386Opt
145 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
146 #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
147 #endif
148 #endif
149
150 #ifndef OptimizedCDebugFlags
151 # ifdef i386Architecture
152 #  define OptimizedCDebugFlags DefaultGcc2i386Opt
153 # else
154 #  define OptimizedCDebugFlags -O2 -fno-strict-aliasing
155 # endif
156 #endif
157
158 #ifdef HasGcc2
159 CXXDEPENDINCLUDE != CppCmd -x c++ -Wp,-v < /dev/null \
160                     2>&1 | sed -n 's/ \(.*[cg]++.*\)/-I\1/p'
161 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
162 #endif
163
164 #define ServerExtraDefines      GccGasOption XFree86ServerDefines
165
166 #define StandardDefines         -DCSRG_BASED
167 #define StandardIncludes        -I/usr/local/include
168 #define BuildLibPathVar         LD_LIBRARY_PATH
169
170 #define DefaultUserPath         /bin:/usr/bin:/usr/local/bin:$(BINDIR)
171 #define DefaultSystemPath       /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
172
173 #define TroffCmd                groff -Tps
174 #define SetTtyGroup             YES
175 #define HasNdbm                 YES
176 #define HasShm                  YES
177 #define HasWChar32              YES
178
179 #define HasLibCrypt             YES
180
181 #define AvoidNullMakeCommand    YES
182
183 #define HasPlugin               YES
184 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
185
186 #define CDESharedRev            2
187
188 #include <bsdLib.rules>