]> git.sesse.net Git - rdpsrv/blob - Xserver/config/cf/linux.cf
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / config / cf / linux.cf
1 XCOMM platform:  $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
2
3
4
5
6
7 XCOMM platform:  $XFree86: xc/config/cf/linux.cf,v 3.165 2001/04/19 19:54:43 dawes Exp $
8
9 #ifndef LinuxElfDefault
10 # define LinuxElfDefault        YES
11 #endif
12
13 #ifndef UseElfFormat
14 # define UseElfFormat           LinuxElfDefault
15 #endif
16
17 #ifndef OSBinaryType
18 # if UseElfFormat
19 #  define OSBinaryType          [ELF]
20 # else
21 #  ifdef AlphaArchitecture
22 #   define OSBinaryType         [ECOFF]
23 #  else
24 #   define OSBinaryType         [a.out]
25 #  endif
26 # endif
27 #endif
28
29 #ifndef OSName
30 # define OSName                 DefaultOSName OSBinaryType
31 #endif
32
33 #ifndef OSVendor
34 # define OSVendor               /**/
35 #endif
36 #ifndef OSMajorVersion
37 # define OSMajorVersion         DefaultOSMajorVersion
38 #endif
39 #ifndef OSMinorVersion
40 # define OSMinorVersion         DefaultOSMinorVersion
41 #endif
42 #ifndef OSTeenyVersion
43 # define OSTeenyVersion         DefaultOSTeenyVersion
44 #endif
45
46 #ifndef LinuxDistribution
47 # define LinuxDistribution      DefaultLinuxDistribution
48 /*
49   Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
50   Currently only LinuxSuSE, LinuxRedHat and LinuxDebian will be figured out
51   automatically.
52   Valid values are (from the list at www.linux.org in Oct. '97):
53     LinuxUnknown    (0)
54     LinuxSuSE       (1)
55     LinuxCaldera    (2)
56     LinuxCraftworks (3)
57     LinuxDebian     (4)
58     LinuxInfoMagic  (5)
59     LinuxKheops     (6)
60     LinuxPro        (7)
61     LinuxRedHat     (8)
62     LinuxSlackware  (9)
63     LinuxTurbo      (10)
64     LinuxWare       (11)
65     LinuxYggdrasil  (12)
66 */
67 #endif
68 #ifndef LinuxDistName
69 # define LinuxDistName          DefaultLinuxDistName
70 #endif
71 #ifndef LinuxCLibMajorVersion
72 # define LinuxCLibMajorVersion  DefaultLinuxCLibMajorVersion
73 #endif
74 #ifndef LinuxCLibMinorVersion
75 # define LinuxCLibMinorVersion  DefaultLinuxCLibMinorVersion
76 #endif
77 #ifndef LinuxCLibTeenyVersion
78 # define LinuxCLibTeenyVersion  DefaultLinuxCLibTeenyVersion
79 #endif
80
81 #ifndef LinuxBinUtilsMajorVersion
82 # define LinuxBinUtilsMajorVersion      DefaultLinuxBinUtilsMajorVersion
83 #endif
84
85 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
86 XCOMM libc:     (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
87 XCOMM binutils: (LinuxBinUtilsMajorVersion)
88
89 #if LinuxDistribution == LinuxDebian
90 # define SystemManDirectory     /usr/share/man
91 # define HasPam                 YES
92 # define HasTk                  YES
93 # define TkLibDir               /usr/lib
94 # define TkIncDir               /usr/include
95 # define TkLibName              tk8.3
96 # define XF86SetupUsesStaticTk  NO
97 # define HasTcl                 YES
98 # define TclLibDir              /usr/lib
99 # define TclIncDir              /usr/include
100 # define TclLibName             tcl8.3
101 # define XF86SetupUsesStaticTcl NO
102 /* un-comment this when it is un-broken */
103 /* # define JoystickSupport YES */
104 # define InstallXinitConfig     YES
105 # define InstallXdmConfig       YES
106 # define InstallFSConfig        YES
107 # define DebuggableLibraries    YES
108 # define ForceNormalLib         YES
109 # define BuildSpecsDocs         YES
110 # define SpecsDocDirs           CTEXT GL ICCCM X11 Xext Xv i18n xterm
111 # define XAppLoadDir            EtcX11Directory/app-defaults
112 # define XFileSearchPathDefault Concat4(EtcX11Directory/%L/%T/%N%C,%S:EtcX11Directory/%l/%T/%N%C,%S:EtcX11Directory/%T/%N%C,%S:EtcX11Directory/%L/%T/%N%S:EtcX11Directory/%l/%T/%N%S:EtcX11Directory/%T/%N%S):Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
113 /* the relative symlink created by this rule causes problems for us */
114 # if InstallAppDefFiles
115 #  define InstallAppDefaultsLong(file,class)                            @@\
116 InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
117 # else
118 #  define InstallAppDefaultsLong(file,class)                            @@\
119 InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
120 # endif /* InstallAppDefFiles */
121 # define SharedLibXdmGreet      NO
122 # define LinkGLToUsrInclude     NO
123 # define LinkGLToUsrLib         NO
124 # define SharedLibFont          NO
125 # define HasZlib                YES
126 # define BuildGLXLibrary        YES
127 # define BuildGLULibrary        YES
128 # define BuildRman              NO
129 # define BuildHtmlManPages      NO
130 # define FSUseSyslog            YES
131
132 /*
133  *
134  */
135 # define DebianMaintainer       "xfree86@packages.debian.org"
136 /*
137  *
138  */
139
140 # ifdef DebianMaintainer
141 #  define BuilderEMailAddr      "submit@bugs.debian.org"
142 #  define XFree86Devel          YES
143 #  define BuildAllSpecsDocs     YES
144 /* we build-depend on libfreetype6-dev (FreeType 2.x) */
145 #  define BuildFreetype2Library NO
146 #  define HasFreetype2          YES
147 /* m68k has no 2.4 kernel yet */
148 #  ifndef Mc68020Architecture
149 #   define HasLinuxInput                YES
150 #  endif
151 #  define HasXdmAuth            YES
152 #  define HasLatex              YES
153 /* at present, glide2 only works on i386 */
154 #  ifdef i386Architecture
155 #   define HasGlide2            YES
156 #   define Glide2IncDir         /usr/include/glide
157 #  endif /* i386Architecture */
158 /* at present, glide3 only works on alpha and i386 */
159 #  if defined(i386Architecture) || defined(AlphaArchitecture)
160 #   define HasGlide3            YES
161 #   define Glide3IncDir         /usr/include/glide3
162 #  endif /* i386Architecture || AlphaArchitecture */
163 /* extended instruction set support */
164 #  ifdef i386Architecture
165 #   define HasMMXSupport        YES
166 #   define Has3DNowSupport      YES
167 /* 2.4 is not yet the official (or predominant) kernel in unstable */
168 #   define HasKatmaiSupport     NO
169 #  endif /* i386Architecture */
170 # endif /* DebianMaintainer */
171 #endif /* LinuxDebian */
172
173 #if LinuxDistribution == LinuxRedHat
174 #define FSUseSyslog             YES
175 #endif
176
177 /*
178  * The Linux BinUtils major version.  25 => 2.5.x, which is what is included
179  * with Slackware 3.0
180  *
181  * This remains for compatibility only.
182  *
183  */
184 #ifndef BinUtilsMajorVersion
185 # define BinUtilsMajorVersion   LinuxBinUtilsMajorVersion
186 #endif
187
188 #if (LinuxCLibMajorVersion >= 6 || LinuxDistribution == LinuxSuSE)
189 # define LinuxLocaleDefines     /**/
190 #else
191 # define LinuxLocaleDefines     -DX_LOCALE
192 #endif
193
194 #ifndef  LinuxAdditionalIncludes
195 # define LinuxAdditionalIncludes        /**/
196 #endif
197
198 #ifndef LinuxGnuSourceDefines
199 # ifdef UseInstalled
200 #  define LinuxGnuSourceDefines /**/
201 # else
202 #  define LinuxGnuSourceDefines -D_GNU_SOURCE
203 # endif
204 #endif
205
206 #if LinuxCLibMajorVersion >= 6
207 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
208                                 -D_POSIX_SOURCE -D_XOPEN_SOURCE \
209                                 -D_BSD_SOURCE -D_SVID_SOURCE \
210                                 LinuxAdditionalIncludes LinuxGnuSourceDefines \
211                                 LinuxLocaleDefines
212 # define XawI18nDefines         -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
213 # define HasPosixThreads        YES
214 # define ThreadedX              YES
215 # define HasThreadSafeAPI       YES
216 # define ThreadsLibraries       -lpthread
217 # define SystemMTDefines        -D_REENTRANT
218 # ifndef HasLibCrypt
219 #  define HasLibCrypt           YES
220 # endif
221 /* netscape wraps select but not poll as of communicator 4.72 */
222 # ifndef HasPoll
223 #  define HasPoll               NO
224 # endif
225 #else
226 # define LinuxSourceDefines     -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 \
227                                 -D_BSD_SOURCE -D_SVID_SOURCE \
228                                 LinuxGnuSourceDefines LinuxLocaleDefines
229 # define XawI18nDefines         -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
230 # ifndef HasLibCrypt
231 #  define HasLibCrypt           NO
232 # endif
233 #endif
234
235 #ifndef InstallXloadSetGID
236 #define InstallXloadSetGID      NO
237 #endif
238
239 /* <linux/input.h> support mainly for USB support */
240 #ifndef HasLinuxInput
241 # if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4)
242 #  define HasLinuxInput YES
243 # endif
244 #endif
245
246 /* On x86, determine whether to build with MTRR support */
247 #ifndef HasMTRRSupport
248 # ifdef i386Architecture
249 /* There is no certain way to know if <asm/mtrr.h> is available,
250    but it made it into kernel 2.2, so... */
251 #  if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
252 #   define HasMTRRSupport       YES
253 #  else
254 #   define HasMTRRSupport       NO
255 #  endif
256 # else
257 #  define HasMTRRSupport        NO      /* no for non-ix86 */
258 # endif
259 #endif
260
261 #ifndef XF86INT10_BUILD
262 # ifdef i386Architecture
263 #  define XF86INT10_BUILD       X86VM
264 # else
265 #  define XF86INT10_BUILD       X86EMU_GENERIC
266 # endif
267 #endif
268
269 /* The DRM module requires kernel services that appeared in late 2.1.x
270    kernels and are known to be present in 2.2.x kernels. */
271 #ifndef BuildXF86DRI
272 #  if defined(i386Architecture)
273 #    if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
274 #      define BuildXF86DRI      YES
275 #    else
276 #      define BuildXF86DRI      NO
277 #    endif
278 #  elif defined(AlphaArchitecture)
279 #    define BuildXF86DRI        YES
280 #  elif defined(Arm32Architecture)
281 #    define BuildXF86DRI        NO
282 #  elif defined(HPArchitecture)
283 #    define BuildXF86DRI        NO
284 #  elif defined(x86_64Architecture)
285 #    define BuildXF86DRI        YES
286 #  elif defined(ia64Architecture)
287 #    define BuildXF86DRI        YES
288 #  elif defined(Mc68020Architecture)
289 #    define BuildXF86DRI        NO
290 #  elif defined(MipsArchitecture)
291 #    define BuildXF86DRI        NO
292 #  elif defined(PpcArchitecture)
293 #    define BuildXF86DRI        YES
294 #  elif defined(s390Architecture)
295 #    define BuildXF86DRI        NO
296 #  elif defined(SparcArchitecture)
297 #    define BuildXF86DRI        YES
298 #  else
299 #    define BuildXF86DRI        NO
300 #  endif
301 #endif
302
303 /*
304  * Build shared libGL and the DRI modules without -fPIC.  This improves
305  * performance.  Do this only on architectures that can handle missing PIC
306  * symbols in shared libraries.
307  */
308 #if BuildXF86DRI
309 #  if defined(AlphaArchitecture) || defined(Arm32Architecture) || defined(i386Architecture) || defined(SparcArchitecture)
310 #   define BuildLibGlxWithoutPIC        YES
311 #  endif
312 #endif
313
314 /* The DRM module requires kernel services that appeared in late 2.1.x
315    kernels and are known to be present in 2.2.x kernels.  Unfortunately,
316    the kernel API is a moving target and the module may break with new
317    kernel revisions.  So, we'll only build the module for kernels that are
318    known to be supported by the module. */
319 #ifndef BuildXF86DRM
320 #  if defined(i386Architecture) || defined(x86_64Architecture) || defined(ia64Architecture) || defined(SparcArchitecture) || defined(AlphaArchitecture)
321 #    if OSMajorVersion == 2
322        /* Only tested for Linux 2.2.0 through 2.2.12 */
323 #      if OSMinorVersion == 2 && OSTeenyVersion <= 12
324 #        define BuildXF86DRM    YES
325 #      else
326          /* Only tested for Linux 2.3.0 through 2.3.18 */
327 #        if OSMinorVersion == 3 && OSTeenyVersion <= 18
328 #          define BuildXF86DRM  YES
329 #        else
330            /* Note: add more conditions when 2.4.x and 2.5.x are released */
331 #          define BuildXF86DRM  NO
332 #        endif
333 #      endif
334 #    else
335        /* Note: add more conditions when 3.0.x and 3.1.x are released */
336 #      define BuildXF86DRM      NO
337 #    endif
338 #  else
339 #    define BuildXF86DRM        NO
340 #  endif
341 #endif
342
343 #ifndef HasAgpGart
344 #  if defined(i386Architecture) || defined(x86_64Architecture) || defined(ia64Architecture)
345      /* The AGPGART header file is included in os-support/linux, which
346         allows all drivers that depend on AGP to build properly. */
347 #    define HasAgpGart  YES
348 #  else
349 #    define HasAgpGart  NO
350 #  endif
351 #endif
352
353 /* Support for Intel's Katmai Native Instructions, also known as the
354  * Streaming SIMD Extensions, was introduced in the 2.4.x kernels.
355  */
356 #ifndef HasKatmaiSupport
357 #  ifdef i386Architecture
358 #    if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4)
359 #      define HasKatmaiSupport          YES
360 #    else
361 #      define HasKatmaiSupport          NO
362 #    endif
363 #  else
364 #    define HasKatmaiSupport            NO
365 #  endif
366 #endif
367
368 /*
369  * Support for MMX isn't present in the Assembler used in Red Hat 4.2, so
370  * don't enable it for libc5 as a reasonable default.
371  */
372 #ifndef HasMMXSupport
373 #  ifdef i386Architecture
374 #    if (LinuxCLibMajorVersion > 5)
375 #      define HasMMXSupport             YES
376 #    else
377 #      define HasMMXSupport             NO
378 #    endif
379 #  else
380 #    define HasMMXSupport               NO
381 #  endif
382 #endif
383
384 /*
385  * Support for 3DNow isn't present in the Assembler used in Red Hat 4.2, so
386  * don't enable it for libc5 as a reasonable default.
387  *
388  * XXX This is preliminary.
389  */
390 #ifndef Has3DNowSupport
391 #  ifdef i386Architecture
392 #    if (LinuxCLibMajorVersion > 5)
393 #      define Has3DNowSupport           YES
394 #    else
395 #      define Has3DNowSupport           NO
396 #    endif
397 #  else
398 #    define Has3DNowSupport             NO
399 #  endif
400 #endif
401
402 /*
403  * libGLU doesn't build correctly on a libc5 system.
404  */
405 #if !defined(BuildGLULibrary) && (LinuxCLibMajorVersion < 6)
406 # define BuildGLULibrary                NO
407 #endif
408
409 /*
410  * The Rush extension support.
411  */
412 #ifndef BuildXF86RushExt
413 # define BuildXF86RushExt       YES
414 #endif
415
416 #ifndef LinuxFBDevSupport
417 # define LinuxFBDevSupport      YES
418 #endif
419
420 /* For compatibility */
421 #define SourceDefines           LinuxSourceDefines
422
423 #define BuildLibPathVar         LD_LIBRARY_PATH
424 #define GccUsesGas              YES
425 #define UseGas                  YES
426 #define GnuCpp                  YES
427 #if UseElfFormat
428 # define HasDlopen              YES
429 #endif
430 #ifndef HasShadowPasswd
431 # if UseElfFormat
432 #  define HasShadowPasswd       YES
433 # else
434 #  define HasShadowPasswd       NO
435 # endif
436 #endif
437 #define HasPutenv               YES
438 #define HasShm                  YES
439 #define HasSockets              YES
440 #if UseElfFormat || defined(AlphaArchitecture)
441 #define HasSnprintf             YES
442 #define HasMkstemp              YES
443 #endif
444 #if OSMajorVersion >= 2
445 #define HasUsableFileMmap       YES
446 #endif
447 #ifndef HasNCurses
448 #define HasNCurses              YES
449 #endif
450
451 #ifndef HasGroff
452 #define HasGroff                YES
453 #endif
454
455 #define AvoidNullMakeCommand    YES
456 #ifndef DebuggableLibraries
457 #define DebuggableLibraries     NO
458 #endif
459 #define CompressAllFonts        YES
460 #define Malloc0ReturnsNull      YES
461 #define NeedConstPrototypes     YES
462 #define NeedFunctionPrototypes  YES
463 #define NeedNestedPrototypes    YES
464 #define NeedVarargsPrototypes   YES
465 #ifndef NeedWidePrototypes
466 #define NeedWidePrototypes      NO
467 #endif
468 #define SetTtyGroup             YES
469
470 #ifndef UseStaticTermcapLib
471 #define UseStaticTermcapLib     NO
472 #endif
473
474 #ifndef HasCookieMaker
475 #define HasCookieMaker          YES
476 #define MkCookieCmd             mcookie
477 #endif
478
479 #ifndef BourneShell
480 /*
481  * This will cause builds/installs to terminate on errors, as on other
482  * platforms.
483  */
484 #define BourneShell             /bin/sh -e
485 #endif
486
487 #define MkdirHierCmd            mkdir -p
488
489 #if LinuxElfDefault
490 # if UseElfFormat
491 #  ifdef MipsArchitecture
492 #   ifndef AsCmd
493 #     define AsCmd              gcc -c -x assembler-with-cpp
494 #   endif
495 #   ifndef DoLoadableServer
496 #     define DoLoadableServer   NO
497 #   endif
498 #  endif /* MipsArchitecure */
499 #  ifndef CcCmd
500 #   define CcCmd                gcc
501 #  endif
502 #  ifndef AsCmd
503 #   define AsCmd                as
504 #  endif
505 #  ifndef LdCmd
506 #   define LdCmd                ld
507 #  endif
508 #  define AsmDefines            -D__ELF__
509 #  define CplusplusCmd          c++
510 #  ifndef LinuxUsesNcurses
511 #   if LinuxCLibMajorVersion >= 6 || (LinuxDistribution == LinuxSuSE)
512 #    define LinuxUsesNcurses    YES
513 #   else
514 #    define LinuxUsesNcurses    NO
515 #   endif
516 #  endif
517 #  ifndef TermcapLibrary
518 #   if UseStaticTermcapLib
519 #    if LinuxUsesNcurses
520 #     define TermcapLibrary     StaticLibrary(/usr/lib,ncurses)
521 #    else
522 #     define TermcapLibrary     StaticLibrary(/usr/lib/termcap,termcap)
523 #    endif
524 #   else
525 #    if LinuxUsesNcurses
526 #     define TermcapLibrary     -lncurses
527 #    else
528 #     define TermcapLibrary     -ltermcap
529 #    endif
530 #   endif
531 #  endif
532 # else
533 #  ifdef AlphaArchitecture
534 #   define CcCmd                gcc -b alpha-linuxecoff
535 #   define CplusplusCmd         g++ -b alpha-linuxecoff
536 #   define AsCmd                /usr/alpha-linuxecoff/bin/as
537 #   define LdCmd                /usr/alpha-linuxecoff/bin/ld -m alpha
538 #   define AsmDefines           -DUSE_GAS -U__ELF__
539 #  endif /* AlphaArchitecture */
540 #  ifdef HPArchitecture
541 #   define CcCmd                gcc
542 #   define CplusplusCmd         g++
543 #   define AsCmd                as
544 #   define LdCmd                ld
545 #   define AsmDefines           -DUSE_GAS -U__ELF__
546 #  endif /* HPArchitecture */
547 #  ifdef x86_64Architecture
548 #   define CcCmd                gcc
549 #   define CplusplusCmd         g++
550 #   define AsCmd                as
551 #   define LdCmd                ld
552 #   define AsmDefines           -DUSE_GAS -U__ELF__
553 #  endif /* x86_64Architecture */
554 #  ifdef ia64Architecture
555 #   define CcCmd                gcc
556 #   define CplusplusCmd         g++
557 #   define AsCmd                as
558 #   define LdCmd                ld
559 #   define AsmDefines           -DUSE_GAS -U__ELF__
560 #  endif /* ia64Architecture */
561 #  ifdef i386Architecture
562 #   define CcCmd                gcc -b i486-linuxaout
563 #   define CplusplusCmd         g++ -b i486-linuxaout
564 #   define AsCmd                /usr/i486-linuxaout/bin/as
565 #   define LdCmd                /usr/i486-linuxaout/bin/ld -m i386linux
566 #   define AsmDefines           -DUSE_GAS -U__ELF__
567 #  endif /* i386Architecture */
568 #  ifdef Mc68020Architecture
569 #   define CcCmd                gcc -b m68k-linuxaout
570 #   define CplusplusCmd         g++ -b m68k-linuxaout
571 #   define AsCmd                /usr/m68k-linuxaout/bin/as
572 #   define LdCmd                /usr/m68k-linuxaout/bin/ld -m m68klinux
573 #   define AsmDefines           -DUSE_GAS -U__ELF__
574 #  endif /* Mc68020Architecture */
575 # endif
576 #else
577 # if UseElfFormat
578 #  ifdef AlphaArchitecture
579 #   define CcCmd                gcc -b alpha-linux
580 #   define AsCmd                /usr/alpha-linux/bin/as
581 #   define LdCmd                ld -m elf64alpha
582 #   define AsmDefines           -D__ELF__
583 #   define CplusplusCmd         c++ -b alpha-linux
584 #  endif /* AlphaArchitecture */
585 #  ifdef x86_64Architecture
586 #   define CcCmd                gcc
587 #   define CplusplusCmd         g++
588 #   define AsCmd                as
589 #   define LdCmd                ld
590 #   define AsmDefines           -D__ELF__
591 #  endif /* x86_64Architecture */
592 #  ifdef ia64Architecture
593 #   define CcCmd                gcc
594 #   define CplusplusCmd         g++
595 #   define AsCmd                as
596 #   define LdCmd                ld
597 #   define AsmDefines           -D__ELF__
598 #  endif /* ia64Architecture */
599 #  ifdef HPArchitecture
600 #   define CcCmd                gcc
601 #   define CplusplusCmd         g++
602 #   define AsCmd                as
603 #   define LdCmd                ld
604 #   define AsmDefines           -D__ELF__
605 #   define SharedLibXau         YES
606 #  endif /* HPArchitecture */
607 #  ifdef i386Architecture
608 #   define CcCmd                gcc -b i486-linux
609 #   define AsCmd                /usr/i486-linux/bin/as
610 #   define LdCmd                ld -m elf_i386
611 #   define AsmDefines           -D__ELF__
612 #   define CplusplusCmd         c++ -b i486-linux
613 #  endif /* i386Architecture */
614 #  ifdef Mc68020Architecture
615 #   define CcCmd                gcc -b m68k-linux
616 #   define AsCmd                /usr/m68k-linux/bin/as
617 #   define LdCmd                ld -m m68kelf
618 #   define AsmDefines           -D__ELF__
619 #   define CplusplusCmd         c++ -b m68k-linux
620 #  endif /* Mc68020Architecture */
621 # else
622 #  define CcCmd                 gcc
623 #  define AsCmd                 as
624 #  define LdCmd                 ld
625 #  define AsmDefines            -DUSE_GAS
626 # endif
627 #endif
628 #if UseElfFormat
629 # ifndef DoLoadableServer
630 # ifdef HPArchitecture
631 #  define DoLoadableServer      NO
632 # else
633 #  define DoLoadableServer      YES
634 # endif
635 # endif
636 #endif
637 #ifndef CppCmd
638 # define CppCmd                 /lib/cpp
639 #endif
640 /* Some Linux distributions have yacc, some don't. All have bison. */
641 #define YaccCmd                 bison -y
642 #define LexCmd                  flex -l
643 #define HasFlex                 YES
644 #define LexLib                  -lfl
645 #define PreProcessCmd           CcCmd -E
646 #define PostIncDir              DefaultGccIncludeDir
647 #define LdCombineFlags          -r
648 #ifndef LdPostLib
649 # define LdPostLib              /* Never needed */
650 #endif
651 #define HasWChar32              YES
652 #define StandardCppOptions      -traditional
653 #define StandardCppDefines      StandardDefines
654
655 #define HasVarRun               YES
656 #define VarDbDirectory          $(VARDIR)/lib
657
658 #ifndef XF86OSCardDrivers
659 # define XF86OSCardDrivers      v4l
660 #endif
661
662 #if UseElfFormat
663 # define HasPlugin                      YES
664 # define VendorHasX11R6_3libXext        YES     /* XC or XFree86 >= 3.3.1 */
665 #endif
666
667 #ifdef i386Architecture
668 # ifndef OptimizedCDebugFlags
669 #  define OptimizedCDebugFlags  -O
670 # endif
671 # define LinuxMachineDefines    -D__i386__
672 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
673 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
674 #endif /* i386Architecture */
675
676 #ifdef s390Architecture
677 # define DefaultCCOptions       -fsigned-char
678 # ifndef OptimizedCDebugFlags
679 #  define OptimizedCDebugFlags  -O2
680 # endif
681 # define LinuxMachineDefines    -D__s390__
682 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
683 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
684 #endif /* s390Architecture */
685
686 #ifdef AlphaArchitecture
687 # ifndef OptimizedCDebugFlags
688 #  define OptimizedCDebugFlags  -O
689 # endif
690 # define LinuxMachineDefines    -D__alpha__
691 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
692 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT
693 # ifdef UseCompaqMathLibrary
694 #  define MathLibrary           -lcpml -lm
695 # endif
696 #endif /* AlphaArchitecture */
697
698 #ifdef Arm32Architecture
699 # define DefaultCCOptions       -fsigned-char
700 # ifndef OptimizedCDebugFlags
701 #  define OptimizedCDebugFlags  -O3
702 # endif
703 # define LinuxMachineDefines    -D__arm__ -D__arm32__ -U__arm -Uarm
704 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
705 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
706 #endif /* Arm32Achitecture */
707
708 #ifdef x86_64Architecture
709 # ifndef OptimizedCDebugFlags
710 #  define OptimizedCDebugFlags  -O2
711 # endif
712 # define LinuxMachineDefines    -D__x86_64__
713 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
714 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
715 #endif /* x86_64Architecture */
716
717 #ifdef ia64Architecture
718 # ifndef OptimizedCDebugFlags
719 #  define OptimizedCDebugFlags  -O2
720 # endif
721 # define LinuxMachineDefines    -D__ia64__
722 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
723 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
724 #endif /* ia64Architecture */
725
726 #ifdef Mc68020Architecture
727 # ifndef OptimizedCDebugFlags
728 #  define OptimizedCDebugFlags  -O2
729 # endif
730 # define LinuxMachineDefines    -D__mc68000__
731 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
732 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
733 #endif /* Mc68020Architecture */
734
735 #ifdef PpcArchitecture
736 # define DefaultCCOptions       -fsigned-char
737 # ifndef OptimizedCDebugFlags
738 #  define OptimizedCDebugFlags  -O
739 # endif
740 # define LinuxMachineDefines    -D__powerpc__
741 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
742 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
743 #endif /* PpcArchitecture */
744
745 #ifdef SparcArchitecture
746 # ifndef OptimizedCDebugFlags
747 #  define OptimizedCDebugFlags  -O2
748 # endif
749 # define LinuxMachineDefines    -D__sparc__
750 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
751 # define ServerExtraDefines     -DHAVE_DOMAINS -DGCCUSESGAS XFree86ServerDefines
752 # define AsVISOption            -Av9a
753 # ifdef Sparc64Architecture
754 #  define AsOutputArchSize      64
755 # else
756 #  define AsOutputArchSize      32
757 # endif
758 #endif
759
760 #ifdef MipsArchitecture
761 # ifndef OptimizedCDebugFlags
762 #  define OptimizedCDebugFlags  -O2
763 # endif
764 # define LinuxMachineDefines    -D__mips__
765 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
766 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
767 #endif
768
769 #ifdef HPArchitecture
770 # define OptimizedCDebugFlags   -O2
771 # define LinuxMachineDefines    -D__hppa__
772 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
773 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
774 #endif
775
776 #ifdef SuperHArchitecture
777 # ifndef SuperHArchOptFlags
778 #  ifdef SuperH4Architecture
779 #   define SuperHArchOptFlags   -m4
780 #  elif defined(SuperH4NOFPUArchitecture)
781 #   define SuperHArchOptFlags   -m4-nofpu
782 #  else
783 #   define SuperHArchOptFlags   -m3
784 #  endif
785 # endif 
786 # ifndef SuperHebArchitecture
787 #  ifdef SuperHebArchitecture
788 #   define SuperHEndianFlags    -mb
789 #  else
790 #   define SuperHEndianFlags    -ml
791 #  endif
792 # endif
793 # ifndef OptimizedCDebugFlags
794 #  define OptimizedCDebugFlags  -O2 SuperHArchOptFlags SuperHEndianFlags
795 # endif
796 # define LinuxMachineDefines    -D__sh__
797 # define ServerOSDefines        XFree86ServerOSDefines -DDDXTIME -DPART_NET
798 # define ServerExtraDefines     -DGCCUSESGAS XFree86ServerDefines
799 #endif
800
801 #ifndef StandardDefines
802 # define StandardDefines        -Dlinux LinuxMachineDefines LinuxSourceDefines
803 #endif
804
805 #if UseElfFormat
806 # define DlLibrary              -rdynamic -ldl
807 #else
808 # define DlLibrary              /**/
809 #endif
810
811 #define ServerExtraSysLibs      /**/
812
813 #ifndef PamLibraries
814 #define PamLibraries            -lpam DlLibrary
815 #endif
816
817 #ifndef PamMiscLibraries
818 #define PamMiscLibraries        -lpam_misc
819 #endif
820
821 #if HasDECnet
822 # define ConnectionFlags        -DUNIXCONN -DTCPCONN -DDNETCONN
823 # define ExtraLibraries         -ldnet
824 #else
825 # define ConnectionFlags        -DUNIXCONN -DTCPCONN
826 #endif
827
828 /* Some of these man page defaults are overriden in the above OS sections */
829 #ifndef ManSuffix
830 # define ManSuffix      1x
831 #endif
832 #ifndef ManDir
833 # define ManDir         $(MANSOURCEPATH)1
834 #endif
835 #ifndef LibManSuffix
836 # define LibManSuffix   3x
837 #endif
838 #ifndef LibmanDir
839 # define LibmanDir      $(MANSOURCEPATH)3
840 #endif
841 #ifndef FileManSuffix
842 # define FileManSuffix  5x
843 #endif
844 #ifndef FileManDir
845 # define FileManDir     $(MANSOURCEPATH)5
846 #endif
847
848 #ifndef StaticLibrary
849 # define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
850 #endif
851
852 #ifndef LinkGLToUsrLib
853 # define LinkGLToUsrLib         YES
854 #endif
855 # ifndef LinkGLToUsrInclude
856 # define LinkGLToUsrInclude     YES
857 #endif
858
859
860 #define HasGnuMake              YES
861
862 #define MakeNamedTargetSubdir(dir,flags,subname)\
863         $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
864
865 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
866
867 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
868 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
869
870 #ifdef s390Architecture
871 # define HasXServer     NO
872 #endif
873
874 #include <lnxLib.rules>
875 #ifdef KDriveXServer
876 # include <kdrive.cf>
877 #else
878 # include <xfree86.cf>
879 #endif
880
881 #ifndef XFree86ServerOSDefines
882 # define XFree86ServerOSDefines
883 #endif