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
|
XCOMM platform: $Xorg: sun.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $
XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.56 2001/05/11 09:03:05 alanh Exp $
#ifndef OSName
# define OSName DefaultOSName
#endif
#ifndef OSMajorVersion
# define OSMajorVersion DefaultOSMajorVersion
#endif
#ifndef OSMinorVersion
# define OSMinorVersion DefaultOSMinorVersion
#endif
#ifndef OSTeenyVersion
# define OSTeenyVersion DefaultOSTeenyVersion
#endif
XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
/*
* Compiler setup. This sun.cf file knows what options to use with
* certain compilers, including Sun C, CenterLine C, and gcc. It
* also understands how to set some of the options for various C++
* compilers, including Sun C++ and CenterLine C++.
*
* === C Compiler Setup ==========================================
*
* For SunPro C, define HasSunC to YES in site.def.
* For CenterLine C, define HasCenterLineC to YES in site.def
* For gcc or gcc2, define HasGcc or HasGcc2 to YES in site.def
* For other compilers, define HasSunC to NO in site.def, then
* provide appropriate values for the various compiler related
* configuration varibles used here.
*
* If you don't tell us which C compiler you have, we assume you have
* the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc
* under SunOS 4.1.x
*
* === C++ Compiler Setup ==========================================
*
* For SunPro C++, define HasSunCplusplus to YES in site.def
* For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
* For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
* For other compilers, define HasCplusplus to YES in site.def, and
* check to see if you need to provide values for CplusplusOptions
* and/or DefaultCplusplusOptions.
*
* In any case, you may also need to set CplusplusDependIncludes.
*
* If you say you have the SunPro C++ compiler, we assume you have
* version 3.0.x of the compiler. If you have version 4.0.x instead,
* define CplusplusCompilerMajorVersion as 4 in site.def.
*
*/
#ifndef HasGcc2
#define HasGcc2 NO
#endif
#ifndef HasGcc
#define HasGcc HasGcc2
#endif
#ifndef HasSunC
# if (HasCenterLineC || HasGcc || HasGcc2 || OSMajorVersion < 5)
# define HasSunC NO
# else
# define HasSunC YES
# endif
#endif
#if HasSunC
# ifndef CCompilerMajorVersion
# define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
# endif
# ifndef CCompilerMinorVersion
# define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
# endif
XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
#endif
/* we used to have this here :
*
* #if HasSunC
* # ifndef CCompilerMajorVersion
* # define CCompilerMajorVersion 3
* # define DefaultCDebugFlags -xO3
* # define OptimizedCDebugFlags -xO3
* # endif
* #endif
*/
#if HasSunCplusplus
# ifndef HasCplusplus
# define HasCplusplus YES
# define OptimizedCplusplusDebugFlags -xO3
# endif
# ifndef CplusplusCompilerMajorVersion
# ifdef DefaultSunProCplusplusCompilerMajorVersion
# define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
# else
# define CplusplusCompilerMajorVersion 3
# endif
# endif
# ifndef CplusplusCompilerMinorVersion
# ifdef DefaultSunProCplusplusCompilerMinorVersion
# define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
# else
# define CplusplusCompilerMinorVersion 0
# endif
# endif
XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
#endif
/* we used to have this here :
*
* # ifndef CplusplusCompilerMajorVersion
* # define CplusplusCompilerMajorVersion 4
* # endif
*/
#if HasCenterLineC
# ifndef CcCmd
# define CcCmd clcc
# endif
#endif
#if HasCenterLineCplusplus
# ifndef HasCplusplus
# define HasCplusplus YES
# endif
# ifndef DefaultCplusplusOptions
# define DefaultCplusplusOptions -Xa
# endif
# ifndef CplusplusOptions
# define CplusplusOptions -Xa
# endif
#endif
#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
/* We do not guarantee this will work */
# define BootstrapCFlags -DNOSTDHDRS
# define StandardDefines -DNOSTDHDRS
# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#endif
#if OSMajorVersion == 4
# if OSMinorVersion == 1
# define HasPoll YES
# endif
# if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
# define SunPost411FCSLd YES
# endif
#endif
/* The Xsun server was not building for SunOS 5.7 due to
includes of <sys/cg2reg.h>.
*/
#if OSMajorVersion < 5
# define IncludeCG2HeaderDefine -DINCLUDE_CG2_HEADER
#else
# define IncludeCG2HeaderDefine /**/
#endif
#ifdef i386Architecture
# if OSMajorVersion > 4
# if OSMinorVersion >= 8
# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \
-D__EXTENSIONS__ -D__SOL8__
# else
# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \
-D__EXTENSIONS__
# endif
# define ServerOSDefines XFree86ServerOSDefines IncludeCG2HeaderDefine
# else
# define ServerExtraDefines AllocateLocalDefines
# define ServerOSDefines -DDDXOSINIT IncludeCG2HeaderDefine
# endif
#else
# define ServerExtraDefines AllocateLocalDefines
# define ServerOSDefines -DDDXOSINIT IncludeCG2HeaderDefine
# define HasPlugin YES
#endif
#ifndef HasPerl
/* Solaris 8 comes with perl. Earlier versions don't. */
# if (OSMajorVersion == 5) && (OSMinorVersion >= 8)
# define HasPerl YES
# else
# define HasPerl NO
# endif
#endif
#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
#if OSMajorVersion > 4
#define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
#if HasSunC
/*
* Assume /opt/SUNWspro/bin/ contains symlinks to the appropriate tools
*/
#ifndef CcCmd
# define CcCmd /opt/SUNWspro/bin/cc
#endif
#ifndef CplusplusCmd
# define CplusplusCmd /opt/SUNWspro/bin/CC
#endif
#ifndef CplusplusFilt
# define CplusplusFilt /opt/SUNWspro/bin/c++filt
#endif
#ifndef CplusplusDependIncludes
#if CplusplusCompilerMajorVersion > 3
# define CplusplusDependIncludes -I/opt/SUNWspro/SC4.0/include/CC
#elif CplusplusCompilerMajorVersion > 2
# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
#else
# define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
#endif
#endif
#endif
# if HasSunC && (CCompilerMajorVersion < 3)
# define BootstrapCFlags -DSVR4
# else
# define BootstrapCFlags /* none needed */
# endif
# ifndef XawI18nDefines
# if OSMinorVersion < 4
# define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
# else
# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
# endif
# endif
# if OSMinorVersion > 3
# define InstallCmd /usr/ucb/install
# endif
# ifdef i386Architecture
# define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
# define ToolkitStringsABIOptions -intelabi
# else
# define StandardDefines -Dsun -DSVR4
# define ToolkitStringsABIOptions -sparcabi
# endif
# define ExtraLibraries -lsocket -lnsl
# if OSMinorVersion > 1
# define ThreadedX YES
# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
# if HasSunC && CCompilerMajorVersion > 2
# define ThreadsCompileFlags -mt
# else
# define SystemMTDefines -D_REENTRANT
# define ThreadsLibraries -lthread
# endif
# if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
# define ThreadsCplusplusCompileFlags -mt
# else
# define CplusplusSystemMTDefines -D_REENTRANT
# define ThreadsCplusplusLibraries -lthread
# endif
# endif /* OSMinorVersion > 1 */
# ifndef UseExportLists
# if (OSMinorVersion > 4) && !HasGcc2
# define UseExportLists YES
# else
# define UseExportLists NO
# endif
# endif
# if OSMinorVersion > 5
# define HasSnprintf YES
# endif
# define HasVFork NO
# define HasDlopen YES
# define InstKmemFlags -g sys -m 2711
# define ShLibIncludeFile <sunLib.tmpl>
/*
* Set flags for position independent code before including sv4Lib.rules
* if the compiler in use doesn't use standard SVR4 flags
*/
# if HasSunC || HasCenterLineC
# define PositionIndependentCFlags -Kpic
# define LargePositionIndependentCFlags -KPIC
# endif
# if HasSunCplusplus || HasCenterLineCplusplus
# define PositionIndependentCplusplusFlags -pic
# define LargePositionIndependentCplusplusFlags -PIC
# endif
#else /* not OSMajorVersion > 4 */
#define InstKmemFlags -g kmem -m 2711
#include <sunLib.rules>
#endif /* OSMajorVersion > 4 (else) */
#define BuildLibPathVar LD_LIBRARY_PATH
#define HasNdbm YES
#define HasShm YES
#define HasSecureRPC YES
#define SetTtyGroup YES
#define HasPutenv YES
#ifndef i386Architecture
# ifndef Xsun24Server
# define Xsun24Server NO /* color, mono, multiple depths */
# endif
# ifndef XsunServer
# define XsunServer YES /* color and mono, 8 bit only */
# endif
# ifndef XsunMonoServer
# define XsunMonoServer NO /* monochrome only */
# endif
# ifndef BuildPexExt
# define BuildPexExt (XsunServer || Xsun24Server)
# endif
#if (OSMajorVersion > 4)
# ifdef UseGas
# define AsVISOption -Av9a
# else
# define AsVISOption -xarch=v8plus
#endif
# define AsOutputArchSize 32
#endif
#endif /* not i386Architecture */
#if OSMajorVersion >= 4
#define HasUsableFileMap YES
#endif
#if HasGcc
# if OSMajorVersion > 4 && defined(i386Architecture)
# ifndef DefaultCCOptions
# if UseInstalled
# define DefaultCCOptions -DNO_ASM
# else
# if OSMinorVersion > 6
# define DefaultCCOptions -DNO_ASM -D__EXTENSIONS__ GccWarningOptions
# elif OSMinorVersion > 3
# define DefaultCCOptions -ansi -pedantic -DNO_ASM \
-D__EXTENSIONS__ GccWarningOptions
# else
# define DefaultCCOptions -DNO_ASM
# endif
# endif
# endif
# endif
# if HasGcc2
# ifndef CcCmd
# define CcCmd gcc
# endif
# ifndef OptimizedCDebugFlags
# ifdef i386Architecture
# define OptimizedCDebugFlags DefaultGcc2i386Opt
# else
# define OptimizedCDebugFlags -O2
# endif
# endif
# else
# define SharedLibraryCcCmd cc
# define ExtraLoadFlags -B/usr/bin/
# define AllocateLocalDefines /**/
.c.o:
ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
# endif /* HasGcc2 (else) */
#else /* not HasGcc */
# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
/* Set up compiler-dependent options for Sun C */
# if HasSunC
# ifdef Sun3Architecture
# ifndef DefaultCCOptions
# define DefaultCCOptions -f68881 -pipe
# endif
# else /* not defined(Sun3Architecture) */
# if OSMajorVersion < 5
# ifndef DefaultCCOptions
# define DefaultCCOptions -pipe
# endif
# else /* OSMajorVersion >= 5*/
# ifndef DefaultCCOptions
# define DefaultCCOptions -Xa
# endif
# endif
# endif
# endif
/* Set compiler-dependent options for CenterLine C */
# if HasCenterLineC
# ifndef DefaultCCOptions
# define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
# endif
# ifndef NeedConstPrototypes
# define NeedConstPrototypes YES
# endif
# ifndef NeedNestedPrototypes
# define NeedNestedPrototypes YES
# endif
# ifndef NeedVarargsPrototypes
# define NeedVarargsPrototypes YES
# endif
# endif
# define PexCCOptions DefaultCCOptions
#endif /* HasGcc (else) */
#if OSMajorVersion < 5
# define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
# define LibraryCCOptions /* don't want special floating point */
#endif /* OSMajorVersion < 5 */
/*
* This is to work around what appears to be a PIC bug in some gcc/egcs
* versions that shows up with the Solaris 7/x86 <ctype.h>.
*/
#if OSMajorVersion == 5 && OSMinorVersion > 6 && defined(i386Architecture) && HasGcc
# define SharedLibraryLoadFlags -G -z textwarn
#endif
#if OSMajorVersion > 4
# include <svr4.cf>
#endif
#ifndef ManKeywordsTarget
# define ManKeywordsTarget(manpath) @@\
man_keywords:: @@\
catman -M $(DESTDIR)manpath -w
#endif
#if !defined(UsePamLibrary)
# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
# define UsePamLibrary YES
# endif
#endif
/* PAM appeared in SunOS 5.6 */
#if !defined(HasPam)
# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
# define HasPam YES
# endif
#endif
#ifndef PamLibraries
#define PamLibraries -lpam
#endif
#define MotifDefines \
-DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
#define PamUnixDefines -DPAM_NIS
#define TtLargePICTable YES
#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
#define DtSearchDefines -DI18N_MSG DtSvcDefines
#define DtWidgetDefines DtSearchDefines
#define DtPrintDefines DtSearchDefines
#define baseDtMailDefines \
-DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
#ifndef i386Architecture
# define DtMailDefines baseDtMailDefines
#else
# define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
#endif
#define ArchitectureDefines -DSUN_ARCHITECTURE
#define TtClientExtraLibs ExtraLibraries -ldl -lintl
#define ExportListGenSource elistgen.sun
#define ShlibExportListOpt(filename) -M filename
#define CdeProjectDefines \
-DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
-D_XOPEN_SOURCE -D__EXTENSIONS__ \
-DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
|