Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / config / cf / linux.cf
1 XCOMM platform:  $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
2
3 #ifndef OSName
4 # define OSName                 DefaultOSName
5 #endif
6 #ifndef OSMajorVersion
7 # define OSMajorVersion         DefaultOSMajorVersion
8 #endif
9 #ifndef OSMinorVersion
10 # define OSMinorVersion         DefaultOSMinorVersion
11 #endif
12 #ifndef OSTeenyVersion
13 # define OSTeenyVersion         DefaultOSTeenyVersion
14 #endif
15
16 #ifndef LinuxDistribution 
17 #define LinuxDistribution       DefaultLinuxDistribution
18 /*
19   Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
20   Currently only LinuxSuSE will be figured out automatically.
21   Valid values are (from the list at www.linux.org in Oct. 1997):
22     LinuxUnknown    (0)
23     LinuxSuSE       (1)
24     LinuxCaldera    (2)
25     LinuxCraftworks (3)
26     LinuxDebian     (4)
27     LinuxInfoMagic  (5)
28     LinuxKheops     (6)
29     LinuxPro        (7)
30     LinuxRedHat     (8)
31     LinuxSlackware  (9)
32     LinuxTurbo      (10)
33     LinuxWare       (11)
34     LinuxYggdrasil  (12)
35 */
36 #endif
37
38 #ifndef DefaultLinuxCLibMajorVersion
39 # define DefaultLinuxCLibMajorVersion    6
40 #endif
41 #ifndef DefaultLinuxCLibMinorVersion
42 # define DefaultLinuxCLibMinorVersion    0
43 #endif
44 #ifndef DefaultLinuxCLibTeenyVersion
45 # define DefaultLinuxCLibTeenyVersion    0
46 #endif
47
48 #ifndef LinuxCLibMajorVersion
49 # define LinuxCLibMajorVersion           DefaultLinuxCLibMajorVersion
50 #endif
51 #ifndef LinuxCLibMinorVersion
52 # define LinuxCLibMinorVersion           DefaultLinuxCLibMinorVersion
53 #endif
54 #ifndef LinuxCLibTeenyVersion
55 # define LinuxCLibTeenyVersion           DefaultLinuxCLibTeenyVersion
56 #endif
57
58 #ifndef LinuxBinUtilsMajorVersion
59 # define LinuxBinUtilsMajorVersion       DefaultLinuxBinUtilsMajorVersion
60 #endif
61
62 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
63 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
64 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
65
66 #ifndef UseElfFormat
67 # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
68 #  define UseElfFormat          YES
69 # else
70 #  define UseElfFormat          NO
71 #  error "Only ELF format is supported on linux"
72 # endif
73 #endif
74
75 #define BuildLibPathVar         LD_LIBRARY_PATH
76 #define HasGcc                  YES
77 #define HasGcc2                 YES
78 #define HasGcc2ForCplusplus     YES
79 #define GccUsesGas              YES
80 #define UseGas                  YES
81 #define GnuCpp                  YES
82 #define HasShadowPasswd         YES
83 #define HasPutenv               YES
84 #define HasShm                  YES
85 #define HasSockets              YES
86
87 #define HasMakefileSafeInclude  YES
88 #define DependFileName          .depend
89 #define DependCmd               $(CC) -E -MM -MG
90 #define M4Cmd                   /usr/bin/m4
91
92 #ifdef IncludeMakefile
93 # undef IncludeMakefile
94 #endif
95
96 #define IncludeMakefile(file)   -include file
97
98 #if (LinuxDistribution == LinuxRedHat)
99 # define HasZlib                YES
100 #endif
101
102 #define AvoidNullMakeCommand    YES
103 #define StripInstalledPrograms  NO
104 #define CompressAllFonts        YES
105 #define Malloc0ReturnsNull      YES
106 #define NeedConstPrototypes     YES
107 #define NeedFunctionPrototypes  YES
108 #define NeedNestedPrototypes    YES
109 #define NeedVarargsPrototypes   YES
110 #define NeedWidePrototypes      NO
111 #define SetTtyGroup             YES
112
113 #define CcCmd                   gcc -g -pipe
114 #define CplusplusCmd            g++ -g -pipe
115 #define AsCmd                   as
116 #define LdCmd                   ld
117
118 #define CplusplusLibC           -lstdc++
119 #define AsmDefines              -D__ELF__
120
121 #define MkdirHierCmd            mkdir -p
122 #define CppCmd                  /lib/cpp
123 #define YaccCmd                bison -y
124 #define LexCmd                  flex -l
125 #define LexLib                  -lfl
126 #define PreProcessCmd           CcCmd -E
127 #define PostIncDir              DefaultGccIncludeDir
128 #define LdCombineFlags          -r
129 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
130 #define HasWChar32              YES
131 #define StandardCppDefines      -traditional -nostdinc StandardDefines
132 #define ExtensionOSDefines      -DXTESTEXT1
133
134 #define LinuxLocaleDefines      /**/
135
136 #define DefaultCCOptions        -ansi
137
138 XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
139 #define HasXdmAuth  YES
140
141 XCOMM TIRPC is enabled by default now on Linux.  The libtirpc-dev package is
142 XCOMM required for this support.  If you cannot use tirpc for some reason,
143 XCOMM can disable it by defining HasTIRPCLib to NO in either
144 XCOMM your host.def or site.def file.  Not using the TIRPC lib will require
145 XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
146 XCOMM The default is YES.
147
148 #ifndef HasTIRPCLib
149 # define HasTIRPCLib YES
150 #endif
151
152 #if HasTIRPCLib
153 TIRPCLIB = -ltirpc
154 TIRPCINC = -I/usr/include/tirpc
155 #else
156 TIRPCLIB =
157 TIRPCINC =
158 #endif
159
160 #if !defined(DefaultGcc2i386Opt)
161 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
162         -Wno-unused-result
163 #endif
164
165 #if LinuxCLibMajorVersion < 6
166 # define LinuxSourceDefines     -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
167                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
168 # ifndef HasLibCrypt
169 #  define HasLibCrypt           NO
170 # endif
171
172 #else
173 # define LinuxSourceDefines     -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
174                                 -D_BSD_SOURCE -D_SVID_SOURCE \
175                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
176                                 LinuxLocaleDefines
177 # define HasPosixThreads        YES
178 # define ThreadedX              YES
179 # define HasThreadSafeAPI       YES
180 # define ThreadsLibraries       -lpthread
181 # define SystemMTDefines        -D_REENTRANT
182 # ifndef HasLibCrypt
183 #  define HasLibCrypt           YES
184 # endif
185 #endif
186
187 #ifdef SparcArchitecture
188 # define LinuxMachineDefines -Dsparc
189
190 # if UseElfFormat
191 #  define HasPlugin             YES
192 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
193 # endif
194 #endif /* SparcArchitecture */
195
196 #ifdef ARMArchitecture
197 # ifndef OptimizedCDebugFlags
198 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
199 # endif
200 # define LinuxMachineDefines -D__arm__
201 # define LSBBitOrder             YES
202
203 # if UseElfFormat
204 #  define HasPlugin              YES
205 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
206 # endif 
207 #endif /* ARMArchitecture */
208
209 #ifdef i386Architecture
210 # ifndef OptimizedCDebugFlags
211 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
212 # endif
213 # define LinuxMachineDefines    -D__i386__
214 /* For DtHelp TIFF processing routines. */
215 # define LSBBitOrder             YES
216
217 # if UseElfFormat
218 #  define HasPlugin             YES
219 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
220 # endif
221 #endif /* i386Architecture */
222
223 #ifdef AMD64Architecture
224 # ifndef OptimizedCDebugFlags
225 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
226 # endif
227 # define LinuxMachineDefines    -D__x86_64__ 
228 /* For DtHelp TIFF processing routines. */
229 # define LSBBitOrder            YES
230
231 # if UseElfFormat
232 #  define HasPlugin             YES
233 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
234 # endif
235 #endif /* AMD64Architecture */
236
237 #ifdef AArch64Architecture
238 # ifndef OptimizedCDebugFlags
239 #  define OptimizedCDebugFlags -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -g -fno-strict-aliasing
240 # endif
241 # define LinuxMachineDefines   -D__aarch64__
242 # define ServerOSDefines   XFree86ServerOSDefines -DDDXTIME
243 # define ServerExtraDefines    -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
244 #endif /* AArch64Architecture */
245
246
247 #ifdef PpcArchitecture
248 # ifndef OptimizedCDebugFlags
249 #  define OptimizedCDebugFlags    DefaultGcc2i386Opt
250 # endif
251 # define LinuxMachineDefines     -D__powerpc__
252 #endif /* PpcArchitecture */
253
254 #ifdef AlphaArchitecture
255 # ifndef OptimizedCDebugFlags
256 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
257 # endif
258 # define LinuxMachineDefines    -D__alpha__
259 #endif /* AlphaArchitecture */
260
261 #ifdef Mc68020Architecture
262 # ifndef OptimizedCDebugFlags
263 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
264 # endif
265 # define LinuxMachineDefines    -D__mc68000__
266 # define StandardCppDefines      -traditional 
267 #endif /* Mc68020Architecture */
268
269 #define StandardDefines         -D__linux__ LinuxMachineDefines LinuxSourceDefines
270
271 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
272
273 XCOMM This is needed for CDE currently
274 #define CplusplusStandardDefines StandardDefines 
275
276 /* Some of these man page defaults are overriden in the above OS sections */
277 #ifndef ManSuffix
278 # define ManSuffix      1x
279 #endif
280 #ifndef ManDir
281 # define ManDir         $(MANSOURCEPATH)1
282 #endif
283 #ifndef LibManSuffix
284 # define LibManSuffix   3x
285 #endif
286 #ifndef LibmanDir
287 # define LibmanDir      $(MANSOURCEPATH)3
288 #endif
289 #ifndef FileManSuffix
290 # define FileManSuffix  5x
291 #endif
292 #ifndef FileManDir
293 # define FileManDir     $(MANSOURCEPATH)5
294 #endif
295
296 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
297
298 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
299
300 #define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
301
302 #include <lnxDep.rules>
303 #include <lnxLib.rules>