Initial import of the CDE 2.1.30 sources from the Open Group.
[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. '97):
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 #ifndef LinuxCLibMajorVersion
38 #define LinuxCLibMajorVersion   DefaultLinuxCLibMajorVersion
39 #endif
40 #ifndef LinuxCLibMinorVersion
41 #define LinuxCLibMinorVersion   DefaultLinuxCLibMinorVersion
42 #endif
43 #ifndef LinuxCLibTeenyVersion
44 #define LinuxCLibTeenyVersion   DefaultLinuxCLibTeenyVersion
45 #endif
46 #ifndef LinuxBinUtilsMajorVersion
47 #define LinuxBinUtilsMajorVersion       DefaultLinuxBinUtilsMajorVersion
48 #endif
49
50 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
51 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
52 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
53
54 #ifndef UseElfFormat
55 #if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
56 #define UseElfFormat            YES
57 #else
58 #define UseElfFormat            NO
59 #endif
60 #endif
61 #define BuildLibPathVar         LD_LIBRARY_PATH
62 #define HasGcc                  YES
63 #define HasGcc2                 YES
64 #define HasGcc2ForCplusplus     YES
65 #define GccUsesGas              YES
66 #define UseGas                  YES
67 #define GnuCpp                  YES
68 #define HasShadowPasswd         NO
69 #define HasPutenv               YES
70 #define HasShm                  YES
71 #define HasSockets              YES
72 #if (LinuxDistribution == LinuxRedHat)
73 #define HasZlib                 YES
74 #endif
75
76 #define AvoidNullMakeCommand    YES
77 #define StripInstalledPrograms  YES
78 #define CompressAllFonts        YES
79 #define Malloc0ReturnsNull      YES
80 #define NeedConstPrototypes     YES
81 #define NeedFunctionPrototypes  YES
82 #define NeedNestedPrototypes    YES
83 #define NeedVarargsPrototypes   YES
84 #define NeedWidePrototypes      NO
85 #define SetTtyGroup             YES
86
87 #if UseElfFormat
88 #if OSMajorVersion == 1 && OSMinorVersion < 2
89 #define CcCmd                   gcc -b i486-linuxelf
90 #define CplusplusCmd            g++ -b i486-linuxelf
91 #define AsCmd                   /usr/i486-linuxelf/bin/as
92 #define LdCmd                   ld -m elf_i386
93 #else
94 #define CcCmd                   gcc
95 #define CplusplusCmd            g++
96 #define AsCmd                   as
97 #define LdCmd                   ld
98 #endif
99 #define AsmDefines              -D__ELF__
100 #else
101 #define CcCmd                   gcc
102 #if OSMajorVersion == 1 && OSMinorVersion > 1
103 #define AsCmd                   /usr/i486-linuxaout/bin/as
104 #define LdCmd                   ld -m i386linux
105 #else
106 #define AsCmd                   as
107 #define LdCmd                   ld
108 #endif
109 #define AsmDefines              -DUSE_GAS -U__ELF__
110 #endif
111 #define MkdirHierCmd            mkdir -p
112 #define CppCmd                  /lib/cpp
113 #if OSMajorVersion >= 2
114 #define YaccCmd                 yacc
115 #else
116 #define YaccCmd                 bison -y
117 #endif
118 #define LexCmd                  flex -l
119 #define LexLib                  -lfl
120 #define PreProcessCmd           CcCmd -E
121 #define PostIncDir              DefaultGccIncludeDir
122 #define LdCombineFlags          -r
123 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
124 #define HasWChar32              YES
125 #define StandardCppDefines      -traditional StandardDefines
126 #define ExtensionOSDefines      -DXTESTEXT1
127
128 #if (LinuxDistribution == LinuxSuSE)
129 #define LinuxLocaleDefines      /**/
130 #else
131 #define LinuxLocaleDefines      -DX_LOCALE
132 #endif
133
134 #if LinuxCLibMajorVersion < 6
135 #define LinuxSourceDefines      -D_POSIX_SOURCE \
136                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
137 #ifndef HasLibCrypt
138 # define HasLibCrypt            NO
139 #endif
140 #else
141 #define LinuxSourceDefines      -D_POSIX_C_SOURCE=199309L \
142                                 -D_POSIX_SOURCE \
143                                 -D_BSD_SOURCE -D_SVID_SOURCE
144 #define HasPosixThreads         YES
145 #define ThreadedX               YES
146 #define HasThreadSafeAPI        YES
147 #define ThreadsLibraries        -lpthread
148 #define SystemMTDefines         -D_REENTRANT
149 #ifndef HasLibCrypt
150 # define HasLibCrypt            YES
151 #endif
152 #endif
153
154 #ifdef i386Architecture
155 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
156 #define LinuxMachineDefines     -D__i386__
157 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME
158 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines
159 #if UseElfFormat
160 #define HasPlugin               YES
161 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
162 #endif
163 #endif /* i386Architecture */
164
165 #ifdef AlphaArchitecture
166 #define OptimizedCDebugFlags    -O2
167 #define LinuxMachineDefines     -D__alpha__
168 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DPART_NET
169 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
170 #endif /* AlphaArchitecture */
171
172 #ifdef Mc68020Architecture
173 #define OptimizedCDebugFlags    -O2
174 #define LinuxMachineDefines     -D__mc68000__
175 #define StandardCppDefines      -traditional StandardDefines
176 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DPART_NET
177 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines
178 #endif /* Mc68020Architecture */
179
180 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
181
182 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
183
184 /* Some of these man page defaults are overriden in the above OS sections */
185 #ifndef ManSuffix
186 # define ManSuffix      1x
187 #endif
188 #ifndef ManDir
189 # define ManDir         $(MANSOURCEPATH)1
190 #endif
191 #ifndef LibManSuffix
192 # define LibManSuffix   3x
193 #endif
194 #ifndef LibmanDir
195 # define LibmanDir      $(MANSOURCEPATH)3
196 #endif
197 #ifndef FileManSuffix
198 # define FileManSuffix  5x
199 #endif
200 #ifndef FileManDir
201 # define FileManDir     $(MANSOURCEPATH)5
202 #endif
203
204 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
205
206 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
207 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
208
209 #include <lnxLib.rules>
210 #include <xfree86.cf>