1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
|
XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess
XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.129 2000/06/24 17:43:44 dawes Exp $
#ifndef LinuxElfDefault
#define LinuxElfDefault YES
#endif
#ifndef UseElfFormat
#define UseElfFormat LinuxElfDefault
#endif
#ifndef OSBinaryType
#if UseElfFormat
#define OSBinaryType [ELF]
#else
#ifdef AlphaArchitecture
#define OSBinaryType [ECOFF]
#else
#define OSBinaryType [a.out]
#endif
#endif
#endif
#ifndef OSName
#define OSName DefaultOSName OSBinaryType
#endif
#ifndef OSVendor
#define OSVendor /**/
#endif
#ifndef OSMajorVersion
#define OSMajorVersion DefaultOSMajorVersion
#endif
#ifndef OSMinorVersion
#define OSMinorVersion DefaultOSMinorVersion
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion DefaultOSTeenyVersion
#endif
#ifndef LinuxDistribution
#define LinuxDistribution DefaultLinuxDistribution
/*
Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
Currently only LinuxSuSE, LinuxRedHat and LinuxDebian will be figured out
automatically.
Valid values are (from the list at www.linux.org in Oct. '97):
LinuxUnknown (0)
LinuxSuSE (1)
LinuxCaldera (2)
LinuxCraftworks (3)
LinuxDebian (4)
LinuxInfoMagic (5)
LinuxKheops (6)
LinuxPro (7)
LinuxRedHat (8)
LinuxSlackware (9)
LinuxTurbo (10)
LinuxWare (11)
LinuxYggdrasil (12)
*/
#endif
#ifndef LinuxDistName
#define LinuxDistName DefaultLinuxDistName
#endif
#ifndef LinuxCLibMajorVersion
#define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
#endif
#ifndef LinuxCLibMinorVersion
#define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
#endif
#ifndef LinuxCLibTeenyVersion
#define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
#endif
#ifndef LinuxBinUtilsMajorVersion
#define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
#endif
XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
XCOMM binutils: (LinuxBinUtilsMajorVersion)
/*
* The Linux BinUtils major version. 25 => 2.5.x, which is what is included
* with Slackware 3.0
*
* This remains for compatibility only.
*
*/
#ifndef BinUtilsMajorVersion
#define BinUtilsMajorVersion LinuxBinUtilsMajorVersion
#endif
#if (LinuxCLibMajorVersion >= 6 || LinuxDistribution == LinuxSuSE)
#define LinuxLocaleDefines /**/
#else
#define LinuxLocaleDefines -DX_LOCALE
#endif
#if LinuxDistribution == LinuxDebian
#define LinuxAdditionalIncludes -I/usr/src/linux/include
#else
#define LinuxAdditionalIncludes /**/
#endif
#ifndef LinuxGnuSourceDefines
#ifdef UseInstalled
#define LinuxGnuSourceDefines /**/
#else
#define LinuxGnuSourceDefines -D_GNU_SOURCE
#endif
#endif
#if LinuxCLibMajorVersion >= 6
#define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
-D_POSIX_SOURCE -D_XOPEN_SOURCE \
-D_BSD_SOURCE -D_SVID_SOURCE \
LinuxAdditionalIncludes LinuxGnuSourceDefines \
LinuxLocaleDefines
#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
#ifndef ia64Architecture
#define HasPosixThreads YES
#define ThreadedX YES
#define HasThreadSafeAPI YES
#define ThreadsLibraries -lpthread
#define SystemMTDefines -D_REENTRANT
#endif /* ia64Architecture */
#ifndef HasLibCrypt
#define HasLibCrypt YES
#endif
/* netscape wraps select but not poll as of communicator 4.72 */
#ifndef HasPoll
#define HasPoll NO
#endif
#else
#define LinuxSourceDefines -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 \
-D_BSD_SOURCE -D_SVID_SOURCE \
LinuxGnuSourceDefines LinuxLocaleDefines
#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#ifndef HasLibCrypt
#define HasLibCrypt NO
#endif
#endif
/* On x86, determine whether to build with MTRR support */
#ifndef HasMTRRSupport
#ifdef i386Architecture
/* There is no certain way to know if <asm/mtrr.h> is available,
but it made it into kernel 2.2, so... */
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
#define HasMTRRSupport YES
#else
#define HasMTRRSupport NO
#endif
#else
#define HasMTRRSupport NO /* no for non-ix86 */
#endif
#endif
#ifndef XF86INT10_BUILD
# ifdef i386Architecture
# define XF86INT10_BUILD X86VM
# elif defined(ia64Architecture)
# define UseX86Emu NO
# define XF86INT10_BUILD XF86INT10_STUB
# elif defined(X86EMU_LIBPATH)
# define XF86INT10_BUILD X86EMU_GENERIC
# endif
#endif
/* The DRM module requires kernel services that appeared in late 2.1.x
kernels and are known to be present in 2.2.x kernels. */
#ifndef BuildXF86DRI
# if defined(i386Architecture)
# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
# define BuildXF86DRI YES
# else
# define BuildXF86DRI NO
# endif
# elif defined(SparcArchitecture)
# define BuildXF86DRI YES
# else
# define BuildXF86DRI NO
# endif
#endif
/* The DRM module requires kernel services that appeared in late 2.1.x
kernels and are known to be present in 2.2.x kernels. Unfortunately,
the kernel API is a moving target and the module may break with new
kernel revisions. So, we'll only build the module for kernels that are
known to be supported by the module. */
#ifndef BuildXF86DRM
# ifdef i386Architecture
# if OSMajorVersion == 2
/* Only tested for Linux 2.2.0 through 2.2.12 */
# if OSMinorVersion == 2 && OSTeenyVersion <= 12
# define BuildXF86DRM YES
# else
/* Only tested for Linux 2.3.0 through 2.3.18 */
# if OSMinorVersion == 3 && OSTeenyVersion <= 18
# define BuildXF86DRM YES
# else
/* Note: add more conditions when 2.4.x and 2.5.x are released */
# define BuildXF86DRM NO
# endif
# endif
# else
/* Note: add more conditions when 3.0.x and 3.1.x are released */
# define BuildXF86DRM NO
# endif
# else
# define BuildXF86DRM NO
# endif
#endif
#ifndef HasAgpGart
# ifdef i386Architecture
/* The AGPGART header file is included in os-support/linux, which
allows all drivers that depend on AGP to build properly. */
# define HasAgpGart YES
# else
# define HasAgpGart NO
# endif
#endif
/*
* The Rush extension support.
*/
#ifndef BuildXF86RushExt
#define BuildXF86RushExt YES
#endif
#ifndef LinuxFBDevSupport
#define LinuxFBDevSupport YES
#endif
/* For compatibility */
#define SourceDefines LinuxSourceDefines
#define BuildLibPathVar LD_LIBRARY_PATH
#define HasGcc YES
#define HasGcc2 YES
#ifndef HasGcc2ForCplusplus
# define HasGcc2ForCplusplus YES
#endif
#define GccUsesGas YES
#define UseGas YES
#define GnuCpp YES
#if UseElfFormat
# define HasDlopen YES
#endif
#ifndef HasShadowPasswd
# if UseElfFormat
# define HasShadowPasswd YES
# else
# define HasShadowPasswd NO
# endif
#endif
#define HasPutenv YES
#define HasShm YES
#define HasSockets YES
#if UseElfFormat || defined(AlphaArchitecture)
#define HasSnprintf YES
#define HasMkstemp YES
#endif
#if OSMajorVersion >= 2
#define HasUsableFileMmap YES
#endif
#ifndef HasNCurses
#define HasNCurses YES
#endif
#define AvoidNullMakeCommand YES
#ifndef DebuggableLibraries
#define DebuggableLibraries NO
#endif
#define CompressAllFonts YES
#define Malloc0ReturnsNull YES
#define NeedConstPrototypes YES
#define NeedFunctionPrototypes YES
#define NeedNestedPrototypes YES
#define NeedVarargsPrototypes YES
#ifndef NeedWidePrototypes
#define NeedWidePrototypes NO
#endif
#define SetTtyGroup YES
#ifndef UseStaticTermcapLib
#define UseStaticTermcapLib NO
#endif
#define MkdirHierCmd mkdir -p
#if LinuxElfDefault
#if UseElfFormat
# ifdef MipsArchitecture
# ifndef AsCmd
# define AsCmd gcc -c -x assembler-with-cpp
# endif
# ifndef DoLoadableServer
# define DoLoadableServer NO
# endif
# endif /* MipsArchitecure */
#ifndef CcCmd
#define CcCmd gcc
#endif
#ifndef AsCmd
#define AsCmd as
#endif
#ifndef LdCmd
#define LdCmd ld
#endif
#define AsmDefines -D__ELF__
#define CplusplusCmd c++
#ifndef LinuxUsesNcurses
#if LinuxCLibMajorVersion >= 6 || (LinuxDistribution == LinuxSuSE)
#define LinuxUsesNcurses YES
#else
#define LinuxUsesNcurses NO
#endif
#endif
#ifndef TermcapLibrary
#if UseStaticTermcapLib
#if LinuxUsesNcurses
#define TermcapLibrary StaticLibrary(/usr/lib,ncurses)
#else
#define TermcapLibrary StaticLibrary(/usr/lib/termcap,termcap)
#endif
#else
#if LinuxUsesNcurses
#define TermcapLibrary -lncurses
#else
#define TermcapLibrary -ltermcap
#endif
#endif
#endif
#else
#ifdef AlphaArchitecture
#define CcCmd gcc -b alpha-linuxecoff
#define CplusplusCmd g++ -b alpha-linuxecoff
#define AsCmd /usr/alpha-linuxecoff/bin/as
#define LdCmd /usr/alpha-linuxecoff/bin/ld -m alpha
#define AsmDefines -DUSE_GAS -U__ELF__
#endif /* AlphaArchitecture */
#ifdef ia64Architecture
#define CcCmd gcc
#define CplusplusCmd g++
#define AsCmd as
#define LdCmd ld
#define AsmDefines -DUSE_GAS -U__ELF__
#endif /* ia64Architecture */
#ifdef i386Architecture
#define CcCmd gcc -b i486-linuxaout
#define CplusplusCmd g++ -b i486-linuxaout
#define AsCmd /usr/i486-linuxaout/bin/as
#define LdCmd /usr/i486-linuxaout/bin/ld -m i386linux
#define AsmDefines -DUSE_GAS -U__ELF__
#endif /* i386Architecture */
#ifdef Mc68020Architecture
#define CcCmd gcc -b m68k-linuxaout
#define CplusplusCmd g++ -b m68k-linuxaout
#define AsCmd /usr/m68k-linuxaout/bin/as
#define LdCmd /usr/m68k-linuxaout/bin/ld -m m68klinux
#define AsmDefines -DUSE_GAS -U__ELF__
#endif /* Mc68020Architecture */
#endif
#else
#if UseElfFormat
#ifdef AlphaArchitecture
#define CcCmd gcc -b alpha-linux
#define AsCmd /usr/alpha-linux/bin/as
#define LdCmd ld -m elf64alpha
#define AsmDefines -D__ELF__
#define CplusplusCmd c++ -b alpha-linux
#endif /* AlphaArchitecture */
#ifdef ia64Architecture
#define CcCmd gcc
#define CplusplusCmd g++
#define AsCmd as
#define LdCmd ld
#define AsmDefines -D__ELF__
#endif /* ia64Architecture */
#ifdef i386Architecture
#define CcCmd gcc -b i486-linux
#define AsCmd /usr/i486-linux/bin/as
#define LdCmd ld -m elf_i386
#define AsmDefines -D__ELF__
#define CplusplusCmd c++ -b i486-linux
#endif /* i386Architecture */
#ifdef Mc68020Architecture
#define CcCmd gcc -b m68k-linux
#define AsCmd /usr/m68k-linux/bin/as
#define LdCmd ld -m m68kelf
#define AsmDefines -D__ELF__
#define CplusplusCmd c++ -b m68k-linux
#endif /* Mc68020Architecture */
#else
#define CcCmd gcc
#define AsCmd as
#define LdCmd ld
#define AsmDefines -DUSE_GAS
#endif
#endif
#if UseElfFormat
#ifndef DoLoadableServer
#define DoLoadableServer YES
#endif
#endif
#ifndef CppCmd
#define CppCmd /lib/cpp
#endif
/* Some Linux distributions have yacc, some don't. All have bison. */
#define YaccCmd bison -y
#define LexCmd flex -l
#define LexLib -lfl
#define PreProcessCmd CcCmd -E
#define PostIncDir DefaultGccIncludeDir
#define LdCombineFlags -r
#ifndef LdPostLib
#define LdPostLib /* Never needed */
#endif
#define HasWChar32 YES
#define StandardCppOptions -traditional
#define StandardCppDefines StandardDefines
#define HasVarRun YES
#define VarDbDirectory /var/state
#ifndef XF86OSCardDrivers
#define XF86OSCardDrivers v4l
#endif
#ifdef i386Architecture
#define OptimizedCDebugFlags DefaultGcc2i386Opt
#define LinuxMachineDefines -D__i386__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#if UseElfFormat
#define HasPlugin YES
#define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */
#endif
#endif /* i386Architecture */
#ifdef AlphaArchitecture
#define OptimizedCDebugFlags DefaultGcc2AxpOpt
#define LinuxMachineDefines -D__alpha__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#endif /* AlphaArchitecture */
#ifdef ia64Architecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__ia64__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
#define DoLoadableServer NO
#endif /* ia64Architecture */
#ifdef Mc68020Architecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__mc68000__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#define PositionIndependentCFlags -fpic
#define PositionIndependentCplusplusFlags -fpic
#endif /* Mc68020Architecture */
#ifdef PpcArchitecture
#define DefaultCCOptions -fsigned-char
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__powerpc__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif /* PpcArchitecture */
#ifdef SparcArchitecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__sparc__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#define AsVISOption -Av9a
#ifdef Sparc64Architecture
#define AsOutputArchSize 64
#else
#define AsOutputArchSize 32
#endif
#endif
#ifdef MipsArchitecture
#define OptimizedCDebugFlags -O2
#define LinuxMachineDefines -D__mips__
#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
#endif
#ifndef StandardDefines
#define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
#endif
#if UseElfFormat
#define DlLibrary -rdynamic -ldl
#else
#define DlLibrary /**/
#endif
#define ServerExtraSysLibs /**/
#if HasDECnet
#define ConnectionFlags -DUNIXCONN -DTCPCONN -DDNETCONN
#define ExtraLibraries -ldnet
#else
#define ConnectionFlags -DUNIXCONN -DTCPCONN
#endif
/* Some of these man page defaults are overriden in the above OS sections */
#ifndef ManSuffix
# define ManSuffix 1x
#endif
#ifndef ManDir
# define ManDir $(MANSOURCEPATH)1
#endif
#ifndef LibManSuffix
# define LibManSuffix 3x
#endif
#ifndef LibmanDir
# define LibmanDir $(MANSOURCEPATH)3
#endif
#ifndef FileManSuffix
# define FileManSuffix 5x
#endif
#ifndef FileManDir
# define FileManDir $(MANSOURCEPATH)5
#endif
#ifndef StaticLibrary
#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
#endif
#ifndef LinkGLToUsrLib
#define LinkGLToUsrLib YES
#endif
#ifndef LinkGLToUsrInclude
#define LinkGLToUsrInclude YES
#endif
#define HasGnuMake YES
#define MakeNamedTargetSubdir(dir,flags,subname)\
$(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
#define ArchitectureDefines -DLINUX_ARCHITECTURE
#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
#include <lnxLib.rules>
#ifdef KDriveXServer
#include <kdrive.cf>
#else
#include <xfree86.cf>
#endif
#ifndef XFree86ServerOSDefines
#define XFree86ServerOSDefines
#endif
|