Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[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 #define HasXdmAuth              YES
24
25 #if OSMajorVersion >= 10 && defined(UseGcc)
26 USE_GCC = UseGcc
27 #endif
28
29 #ifndef CppCmd
30 #if OSMajorVersion >= 10 && defined(UseGcc)
31 # define CppCmd                 /usr/local/bin/cpp$(USE_GCC)
32 #else
33 # define CppCmd                 /usr/bin/cpp
34 #endif
35 #endif
36 #define PreProcessCmd           CppCmd
37
38 #if OSMajorVersion >= 10
39 #define CppArgs                 -Wno-invalid-pp-token
40 #define DirFailPrefix           -
41 #else
42 #define CppArgs                 /**/
43 #endif
44
45 #ifndef StandardCppDefines
46 #define StandardCppDefines      -traditional CppArgs
47 #endif
48
49 #ifndef PerlCmd
50 #define PerlCmd                 /usr/local/bin/perl
51 #endif
52 #undef  InstallCmd
53 #define InstallCmd              /usr/bin/install
54 #undef  KornShell
55 #define KornShell               /usr/local/bin/ksh93
56
57 #define UseGas                  YES
58 #ifndef GccUsesGas
59 # define GccUsesGas             YES
60 #endif
61
62 #ifndef AsmDefines
63 #  define AsmDefines            -DUSE_GAS
64 #endif
65
66 #if GccUsesGas
67 # define GccGasOption           -DGCCUSESGAS
68 #else
69 # define GccGasOption           /**/
70 #endif
71
72 #ifndef HasGcc2
73 # define HasGcc2                YES
74 #endif
75
76 /* For DtHelp TIFF processing routines. */
77 #ifdef AMD64Architecture
78 #define LSBBitOrder             YES
79 #endif
80
81 #ifdef ARMArchitecture
82 #define LSBBitOrder             YES
83 #endif
84
85 #ifdef i386Architecture
86 #define LSBBitOrder             YES
87 #endif
88
89 #define MkdirHierCmd            mkdir -p
90
91 #ifndef CcCmd
92 #if OSMajorVersion >= 10
93 # if defined(UseGcc)
94 #  define CcCmd                 /usr/local/bin/gcc$(USE_GCC)
95 #  define CplusplusCmd          /usr/local/bin/g++$(USE_GCC)
96 # else
97 #  define CcCmd                 cc
98 #  define CplusplusCmd          c++
99 # endif
100 #else
101 # define CcCmd                  gcc
102 # define CplusplusCmd           g++
103 #endif
104 #endif
105
106 #ifndef DefaultCCOptions
107 #define DefaultCCOptions        -pipe
108 #endif
109
110 #ifndef CplusplusLibC
111 #define CplusplusLibC           -lstdc++
112 #endif
113
114 #if OSMajorVersion > 1
115 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME
116 #define XawI18nDefines          -DUSE_XWCHAR_STRING
117 #define HasMakefileSafeInclude  YES
118 #define IncludeMakefile(file)   HASH_SIGN dependencies are in .depend
119 #define DependFileName          .depend
120 #define DependDefines           -D__cplusplus
121 #if OSMajorVersion < 3
122 #if OSMinorVersion < 2
123 #ifndef ExtraLibraries
124 #define ExtraLibraries          -lgnumalloc
125 #endif
126 #else
127 #if OSTeenyVersion == 2
128 #define HasSetUserContext       YES
129 #endif
130 #endif
131 #ifndef ExtraLoadFlags
132 /* 
133  * This doesn't work the way it does on every other system. On FreeBSD it's
134  * only a "hint, not a demand", whatever that means. Note that this is not 
135  * what it says in the ld and ld.so man pages, which are rather vague on the
136  * matter.
137  *
138  * But we do know that if a) you do what the X Project team does and set your 
139  * ProjectRoot to something like "/X11", and b) you have other X libraries, 
140  * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your 
141  * ld.so.cache with ldconfig, then any programs linked with this "hint" will
142  * find that ld.so ignores the "hint" at runtime and loads the libraries in 
143  * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
144  * the run-path is only used as a last resort to find the libraries, after
145  * the LD_LIBRARY_PATH and ld.so.cache.
146  *
147  * N. B. to FreeBSD users who are not familiar with the semantics of the run-
148  * path on other systems. The run-path is akin to a per-program ld.so.cache. 
149  * If a program is linked with a run-path, that run-path should take 
150  * precedence over _everything_ else! In my opinion ldconfig and the 
151  * ld.so.cache should be deprecated immediately now that FreeBSD has run-
152  * paths. Any program that needs libraries that are outside the "well known" 
153  * locations should be linked with a run-path.
154  *
155  * All of which begs the question: If this option doesn't work in any useful
156  * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
157  * would fix ld.so so that run-paths are truly useful.
158  *
159  * Using run-paths is added with the intent that vendors who ship X for 
160  * FreeBSD should use it too. Once everyone uses it then there will be no 
161  * reason for FreeBSD to assume that it knows where X libraries are installed 
162  * and they can remove it from the list of directories they add to ld.so.cache 
163  * in their /etc/rc file.
164  */
165 #define ExtraLoadFlags          -Wl,-R,$(USRLIBDIRPATH)
166 #endif
167 #endif
168 #else
169 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
170 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
171 #ifndef ExtraLibraries
172 #define ExtraLibraries          /* -lmalloc */
173 #endif
174 #endif
175
176 /* Suppress warnings dependant from compiler versions */
177 #ifndef DefaultGcc2i386Opt
178 # if defined(__clang__) && defined(__clang_major__) && defined(__clang_minor__)
179 #  if (__clang_major__ > 3) || \
180       (__clang_major__ == 3 && __clang_minor__ >= 4)
181 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
182            -Wno-unused-result 
183 #  else
184 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
185            -Wno-unused-result
186 #  endif
187 # elif defined(__GNUC__) && defined(__GNUC_MINOR__)
188 #  if (__GNUC__ > 4) || \
189       (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
190 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
191            -Wno-unused-result -Wno-deprecated
192 #  else
193 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings
194 #  endif
195 # else
196 #   define DefaultGcc2i386Opt -O2 -fno-strict-aliasing
197 # endif
198 #endif
199
200
201 #ifndef OptimizedCDebugFlags
202 # if defined(i386Architecture) || defined(AMD64Architecture)
203 #  define OptimizedCDebugFlags DefaultGcc2i386Opt
204 # else
205 #  define OptimizedCDebugFlags -O2 -fno-strict-aliasing
206 # endif
207 #endif
208
209 #ifdef HasGcc2
210 CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
211                     2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
212 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
213 #endif
214
215 /* beginning with svn version 254273 iconv functions are moved to libc */
216 #if (OSMajorVersion >= 10)
217 ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
218 #endif
219
220 #define ServerExtraDefines      GccGasOption XFree86ServerDefines
221
222 #define StandardDefines         -DCSRG_BASED
223 #define StandardIncludes        -I/usr/local/include
224
225 #ifndef TopMotifInclude
226 #define TopMotifInclude         /usr/local/include
227 #endif
228
229 #define BuildLibPathVar         LD_LIBRARY_PATH
230
231 #define DefaultUserPath         /bin:/usr/bin:/usr/local/bin:$(BINDIR)
232 #define DefaultSystemPath       /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
233
234 #define TroffCmd                groff -Tps
235 #define M4Cmd                   /usr/bin/m4
236 #define SetTtyGroup             YES
237 #define HasNdbm                 YES
238 #define HasShm                  YES
239 #define HasWChar32              YES
240
241 #define HasLibCrypt             YES
242
243 #define AvoidNullMakeCommand    YES
244
245 #define HasPlugin               YES
246 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
247
248 #define CDESharedRev            2
249
250 #include <bsdLib.rules>