site.def: Only build C/en_US locales by default for Linux
[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 UseInstalledX11         YES
76
77 #define BuildLibPathVar         LD_LIBRARY_PATH
78 #define HasGcc                  YES
79 #define HasGcc2                 YES
80 #define HasGcc2ForCplusplus     YES
81 #define GccUsesGas              YES
82 #define UseGas                  YES
83 #define GnuCpp                  YES
84 #define HasShadowPasswd         YES
85 #define HasPutenv               YES
86 #define HasShm                  YES
87 #define HasSockets              YES
88
89 #define HasMakefileSafeInclude  YES
90 #define DependFileName          .depend
91 #define DependCmd               $(CC) -E -MM -MG
92
93 #ifdef IncludeMakefile
94 # undef IncludeMakefile
95 #endif
96
97 #define IncludeMakefile(file)   -include file
98
99 #if (LinuxDistribution == LinuxRedHat)
100 # define HasZlib                YES
101 #endif
102
103 #define AvoidNullMakeCommand    YES
104 #define StripInstalledPrograms  NO
105 #define CompressAllFonts        YES
106 #define Malloc0ReturnsNull      YES
107 #define NeedConstPrototypes     YES
108 #define NeedFunctionPrototypes  YES
109 #define NeedNestedPrototypes    YES
110 #define NeedVarargsPrototypes   YES
111 #define NeedWidePrototypes      NO
112 #define SetTtyGroup             YES
113
114 #define CcCmd                   gcc -g -pipe
115 #define CplusplusCmd            g++ -g -pipe -fpermissive
116 #define AsCmd                   as
117 #define LdCmd                   ld
118
119 #define CplusplusLibC           -lstdc++
120 #define AsmDefines              -D__ELF__
121
122 #define MkdirHierCmd            mkdir -p
123 #define CppCmd                  /lib/cpp
124 #if OSMajorVersion >= 2
125 # define YaccCmd                yacc
126 #else
127 # define YaccCmd                bison -y
128 #endif
129 #define LexCmd                  flex -l
130 #define LexLib                  -lfl
131 #define PreProcessCmd           CcCmd -E
132 #define PostIncDir              DefaultGccIncludeDir
133 #define LdCombineFlags          -r
134 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
135 #define HasWChar32              YES
136 #define StandardCppDefines      -traditional -nostdinc StandardDefines
137 #define ExtensionOSDefines      -DXTESTEXT1
138
139 #define LinuxLocaleDefines      /**/
140
141 #define DefaultCCOptions        -ansi
142
143 XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
144 #define HasXdmAuth  YES
145
146 XCOMM TIRPC is enabled by default now on Linux.  The libtirpc-dev package is
147 XCOMM required for this support.  If you cannot use tirpc for some reason,
148 XCOMM can disable it by defining HasTIRPCLib to NO in either
149 XCOMM your host.def or site.def file.  Not using the TIRPC lib will require
150 XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
151 XCOMM The default is YES.
152
153 #ifndef HasTIRPCLib
154 # define HasTIRPCLib YES
155 #endif
156
157 #if HasTIRPCLib
158 TIRPCLIB = -ltirpc
159 TIRPCINC = -I/usr/include/tirpc
160 #else
161 TIRPCLIB =
162 TIRPCINC =
163 #endif
164
165 #if !defined(DefaultGcc2i386Opt)
166 # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
167         -Wno-unused-result
168 #endif
169
170 #if LinuxCLibMajorVersion < 6
171 # define LinuxSourceDefines     -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
172                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
173 # ifndef HasLibCrypt
174 #  define HasLibCrypt           NO
175 # endif
176
177 #else
178 # define LinuxSourceDefines     -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
179                                 -D_BSD_SOURCE -D_SVID_SOURCE \
180                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
181                                 LinuxLocaleDefines
182 # define HasPosixThreads        YES
183 # define ThreadedX              YES
184 # define HasThreadSafeAPI       YES
185 # define ThreadsLibraries       -lpthread
186 # define SystemMTDefines        -D_REENTRANT
187 # ifndef HasLibCrypt
188 #  define HasLibCrypt           YES
189 # endif
190 #endif
191
192 #ifdef SparcArchitecture
193 # define LinuxMachineDefines -Dsparc
194
195 # if UseElfFormat
196 #  define HasPlugin             YES
197 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
198 # endif
199 #endif /* SparcArchitecture */
200
201 #ifdef ARMArchitecture
202 # ifndef OptimizedCDebugFlags
203 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
204 # endif
205 # define LinuxMachineDefines -D__arm__
206 # define LSBBitOrder             YES
207
208 # if UseElfFormat
209 #  define HasPlugin              YES
210 #  define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
211 # endif 
212 #endif /* ARMArchitecture */
213
214 #ifdef i386Architecture
215 # ifndef OptimizedCDebugFlags
216 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
217 # endif
218 # define LinuxMachineDefines    -D__i386__
219 /* For DtHelp TIFF processing routines. */
220 # define LSBBitOrder             YES
221
222 # if UseElfFormat
223 #  define HasPlugin             YES
224 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
225 # endif
226 #endif /* i386Architecture */
227
228 #ifdef AMD64Architecture
229 # ifndef OptimizedCDebugFlags
230 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
231 # endif
232 # define LinuxMachineDefines    -D__x86_64__ 
233 /* For DtHelp TIFF processing routines. */
234 # define LSBBitOrder            YES
235
236 # if UseElfFormat
237 #  define HasPlugin             YES
238 #  define VendorHasX11R6_3libXext       YES     /* XC or XFree86 3.3.1 */
239 # endif
240 #endif /* AMD64Architecture */
241
242 #ifdef PpcArchitecture
243 # ifndef OptimizedCDebugFlags
244 #  define OptimizedCDebugFlags    DefaultGcc2i386Opt
245 # endif
246 # define LinuxMachineDefines     -D__powerpc__
247 #endif /* PpcArchitecture */
248
249 #ifdef AlphaArchitecture
250 # ifndef OptimizedCDebugFlags
251 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
252 # endif
253 # define LinuxMachineDefines    -D__alpha__
254 #endif /* AlphaArchitecture */
255
256 #ifdef Mc68020Architecture
257 # ifndef OptimizedCDebugFlags
258 #  define OptimizedCDebugFlags  DefaultGcc2i386Opt
259 # endif
260 # define LinuxMachineDefines    -D__mc68000__
261 # define StandardCppDefines      -traditional 
262 #endif /* Mc68020Architecture */
263
264 #define StandardDefines         -D__linux__ LinuxMachineDefines LinuxSourceDefines
265
266 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
267
268 XCOMM This is needed for CDE currently
269 #define CplusplusStandardDefines StandardDefines 
270
271 /* Some of these man page defaults are overriden in the above OS sections */
272 #ifndef ManSuffix
273 # define ManSuffix      1x
274 #endif
275 #ifndef ManDir
276 # define ManDir         $(MANSOURCEPATH)1
277 #endif
278 #ifndef LibManSuffix
279 # define LibManSuffix   3x
280 #endif
281 #ifndef LibmanDir
282 # define LibmanDir      $(MANSOURCEPATH)3
283 #endif
284 #ifndef FileManSuffix
285 # define FileManSuffix  5x
286 #endif
287 #ifndef FileManDir
288 # define FileManDir     $(MANSOURCEPATH)5
289 #endif
290
291 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
292
293 #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
294
295 #define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
296
297 #include <lnxDep.rules>
298 #include <lnxLib.rules>