]> git.sesse.net Git - rdpsrv/blob - Xserver/config/cf/sun.cf
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / config / cf / sun.cf
1 XCOMM platform:  $TOG: sun.cf /main/163 1997/06/08 20:08:23 kaleb $
2
3
4
5
6 XCOMM platform:  $XFree86: xc/config/cf/sun.cf,v 3.31.2.7 1997/12/01 13:31:17 dawes Exp $
7
8 #ifndef OSName
9 # define OSName         DefaultOSName
10 #endif
11 #ifndef OSMajorVersion
12 # define OSMajorVersion DefaultOSMajorVersion
13 #endif
14 #ifndef OSMinorVersion
15 # define OSMinorVersion DefaultOSMinorVersion
16 #endif
17 #ifndef OSTeenyVersion
18 # define OSTeenyVersion DefaultOSTeenyVersion
19 #endif
20 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
21
22 /*
23  * Compiler setup.  This sun.cf file knows what options to use with 
24  * certain compilers, including Sun C, CenterLine C, and gcc.  It 
25  * also understands how to set some of the options for various C++
26  * compilers, including Sun C++ and CenterLine C++.
27  *
28  * === C Compiler Setup ==========================================
29  *
30  * For SunPro C, define HasSunC to YES in site.def.  
31  * For CenterLine C, define HasCenterLineC to YES in site.def
32  * For gcc or gcc2, define HasGcc or HasGcc2 to YES in site.def
33  * For other compilers, define HasSunC to NO in site.def, then 
34  *    provide appropriate values for the various compiler related
35  *    configuration varibles used here.
36  * 
37  * If you say you have the SunPro C compiler, we assume you have 
38  * version 2.0.x of the compiler.  If you have version 3.0.x instead, 
39  * define CCompilerMajorVersion as 3 in site.def
40  *
41  * If you don't tell us which C compiler you have, we assume you have 
42  * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc 
43  * under SunOS 4.1.x
44  *
45  * === C++ Compiler Setup ==========================================
46  *
47  * For SunPro C++, define HasSunCplusplus to YES in site.def
48  * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
49  * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
50  * For other compilers, define HasCplusplus to YES in site.def, and 
51  *    check to see if you need to provide values for CplusplusOptions
52  *    and/or DefaultCplusplusOptions.
53  *
54  * In any case, you may also need to set CplusplusDependIncludes.
55  *
56  * If you say you have the SunPro C++ compiler, we assume you have 
57  * version 3.0.x of the compiler.  If you have version 4.0.x instead, 
58  * define CplusplusCompilerMajorVersion as 4 in site.def.
59  *
60  */
61
62 #ifndef HasGcc2
63 #define HasGcc2 NO
64 #endif
65 #ifndef HasGcc
66 #define HasGcc HasGcc2
67 #endif
68
69 #ifndef HasSunC
70 # if (HasCenterLineC || HasGcc || HasGcc2 || OSMajorVersion < 5)
71 #  define HasSunC NO
72 # else
73 #  define HasSunC YES
74 # endif
75 #endif
76
77 #if HasSunC 
78 # ifndef CCompilerMajorVersion
79 #  define CCompilerMajorVersion 3
80 #  define DefaultCDebugFlags    -xO3
81 #  define OptimizedCDebugFlags  -xO3
82 # endif
83 #endif
84
85 #if HasSunCplusplus
86 # ifndef HasCplusplus
87 #  define HasCplusplus YES
88 #  define OptimizedCplusplusDebugFlags  -xO3
89 # endif
90 # ifndef CplusplusCompilerMajorVersion
91 #  define CplusplusCompilerMajorVersion 4
92 # endif
93 #endif
94
95 #if HasCenterLineC
96 # ifndef CcCmd
97 #  define CcCmd clcc
98 # endif
99 #endif
100
101 #if HasCenterLineCplusplus
102 # ifndef HasCplusplus
103 #  define HasCplusplus YES
104 # endif
105 # ifndef DefaultCplusplusOptions
106 #  define DefaultCplusplusOptions -Xa
107 # endif
108 # ifndef CplusplusOptions
109 #  define CplusplusOptions -Xa
110 # endif
111 #endif
112
113
114 #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
115 /* We do not guarantee this will work */
116 # define BootstrapCFlags        -DNOSTDHDRS
117 # define StandardDefines        -DNOSTDHDRS
118 # define XawI18nDefines         -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
119 #endif
120
121 #if OSMajorVersion == 4 
122 # if OSMinorVersion == 1
123 #  define HasPoll               YES
124 # endif
125 # if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
126 /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
127 #  define SunPost411FCSLd       YES
128 # endif
129 #endif
130
131 #ifdef i386Architecture
132 # if OSMajorVersion > 4
133 #  define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines -D__EXTENSIONS__
134 #  define ServerOSDefines    XFree86ServerOSDefines
135 # else
136 #  define ServerExtraDefines AllocateLocalDefines
137 #  define ServerOSDefines   -DDDXOSINIT
138 # endif
139 #else
140 # define ServerExtraDefines AllocateLocalDefines
141 # define ServerOSDefines   -DDDXOSINIT
142 #endif
143
144 #define XkbServerDefines  -DXKB_ALWAYS_USES_SOFT_REPEAT
145
146 #if OSMajorVersion > 4
147 #if HasSunC
148 /* 
149  * Assume /opt/SUNWspro/bin/ contains symlinks to the appropriate tools
150  */
151 #ifndef  CcCmd
152 # define CcCmd          /opt/SUNWspro/bin/cc
153 #endif
154 #ifndef  CplusplusCmd
155 # define CplusplusCmd   /opt/SUNWspro/bin/CC
156 #endif
157 #ifndef  CplusplusFilt
158 # define CplusplusFilt  /opt/SUNWspro/bin/c++filt
159 #endif
160 #ifndef  CplusplusDependIncludes
161 # define CplusplusDependIncludes        -I/opt/SUNWspro/SC3.0/include/CC
162 #endif
163 #endif
164
165 # if HasSunC && (CCompilerMajorVersion < 3)
166 #  define BootstrapCFlags       -DSVR4
167 # else
168 #  define BootstrapCFlags       /* none needed */
169 # endif
170 # ifndef XawI18nDefines
171 #  if OSMinorVersion < 4
172 #   define XawI18nDefines    -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
173 #  else
174 #   define XawI18nDefines    -DHAS_WCHAR_H -DHAS_ISW_FUNCS
175 #  endif
176 # endif
177 # if OSMinorVersion > 3
178 #  define InstallCmd        /usr/ucb/install
179 # endif
180 # ifdef i386Architecture
181 #  define StandardDefines         -Dsun -Di386 -DSVR4 -D__i386
182 #  define ToolkitStringsABIOptions      -intelabi
183 # else
184 #  define StandardDefines         -Dsun -DSVR4
185 #  define ToolkitStringsABIOptions      -sparcabi
186 #  define HasPlugin         YES
187 # endif
188 # define ExtraLibraries    -lsocket -lnsl
189 # if OSMinorVersion > 1
190 #  define ThreadedX       YES
191 #  define MTSafeAPIDefines      -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
192 #  if HasSunC && CCompilerMajorVersion > 2
193 #   define ThreadsCompileFlags -mt
194 #  else
195 #   define SystemMTDefines -D_REENTRANT
196 #   define ThreadsLibraries -lthread
197 #  endif
198 #  if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
199 #   define ThreadsCplusplusCompileFlags -mt
200 #  else
201 #   define CplusplusSystemMTDefines -D_REENTRANT
202 #   define ThreadsCplusplusLibraries -lthread
203 #  endif
204 # endif                 /* OSMinorVersion > 1 */
205 # ifndef UseExportLists
206 #  if OSMinorVersion > 4
207 #   define UseExportLists YES
208 #  else
209 #   define UseExportLists NO
210 #  endif
211 # endif
212 # define HasVFork          NO
213 # define InstKmemFlags    -g sys -m 2711
214 # define ShLibIncludeFile <sunLib.tmpl>
215 /*
216  * Set flags for position independent code before including sv4Lib.rules
217  * if the compiler in use doesn't use standard SVR4 flags
218  */
219 # if HasSunC || HasCenterLineC
220 #  define PositionIndependentCFlags -Kpic
221 #  define LargePositionIndependentCFlags -KPIC
222 # endif
223 # if HasSunCplusplus || HasCenterLineCplusplus
224 #  define PositionIndependentCplusplusFlags -pic
225 #  define LargePositionIndependentCplusplusFlags -PIC
226 # endif
227 #else /* not OSMajorVersion > 4 */
228 #define InstKmemFlags     -g kmem -m 2711
229 #include <sunLib.rules>
230 #endif /* OSMajorVersion > 4 (else) */
231
232 #define BuildLibPathVar   LD_LIBRARY_PATH
233 #define HasNdbm           YES
234 #define HasShm            YES
235 #define HasSecureRPC      YES
236 #define SetTtyGroup       YES
237 #define HasPutenv         YES
238 #ifndef i386Architecture
239 # ifndef Xsun24Server
240 #  define Xsun24Server    NO            /* color, mono, multiple depths */
241 # endif
242 # ifndef XsunServer
243 #  define XsunServer      YES           /* color and mono, 8 bit only */
244 # endif
245 # ifndef XsunMonoServer
246 #  define XsunMonoServer          NO            /* monochrome only */
247 # endif
248 # ifndef BuildPexExt
249 #  define BuildPexExt     (XsunServer || Xsun24Server)
250 # endif
251 #endif /* not i386Architecture */
252
253 #if (OSMajorVersion > 4) && defined(i386Architecture)
254 #ifndef HasSolx86ApertureDriver
255 #define HasSolx86ApertureDriver YES
256 #endif
257 #endif
258
259 #if HasGcc
260 # if OSMajorVersion > 4 && defined(i386Architecture)
261 #  ifndef DefaultCCOptions
262 #   if UseInstalled
263 #    define DefaultCCOptions -DNO_ASM
264 #   else
265 #    if OSMinorVersion > 3
266 #     define DefaultCCOptions -ansi -pedantic -DNO_ASM
267 #    else
268 #     define DefaultCCOptions -DNO_ASM
269 #    endif
270 #   endif
271 #  endif
272 # endif
273 # if HasGcc2
274 #  ifndef OptimizedCDebugFlags
275 #   ifdef i386Architecture
276 #    define OptimizedCDebugFlags DefaultGcc2i386Opt
277 #   else
278 #    define OptimizedCDebugFlags -O2
279 #   endif
280 #  endif
281 # else
282 #  define SharedLibraryCcCmd cc
283 #  define ExtraLoadFlags -B/usr/bin/
284 #  define AllocateLocalDefines /**/
285
286 .c.o:
287         ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
288
289 # endif /* HasGcc2 (else) */
290
291 #else /* not HasGcc */
292
293 # define AllocateLocalDefines -DINCLUDE_ALLOCA_H
294
295 /* Set up compiler-dependent options for Sun C */
296
297 # if HasSunC
298 #  ifdef Sun3Architecture
299 #   ifndef DefaultCCOptions
300 #    define DefaultCCOptions -f68881 -pipe
301 #   endif
302 #  else /* not defined(Sun3Architecture) */
303 #   if OSMajorVersion < 5
304 #    ifndef DefaultCCOptions
305 #     define DefaultCCOptions -pipe
306 #    endif
307 #   else /* OSMajorVersion >= 5*/
308 #    ifndef DefaultCCOptions
309 #     define DefaultCCOptions -Xa
310 #    endif
311 #   endif       
312 #  endif        
313 # endif
314
315 /* Set compiler-dependent options for CenterLine C */
316
317 # if HasCenterLineC
318 #  ifndef DefaultCCOptions
319 #   define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
320 #  endif
321 #  ifndef NeedConstPrototypes
322 #   define NeedConstPrototypes YES
323 #  endif
324 #  ifndef NeedNestedPrototypes
325 #   define NeedNestedPrototypes YES
326 #  endif
327 #  ifndef NeedVarargsPrototypes
328 #   define NeedVarargsPrototypes YES
329 #  endif
330 # endif
331
332
333 # define PexCCOptions DefaultCCOptions
334
335 #endif /* HasGcc (else) */
336
337 #if OSMajorVersion < 5
338 # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
339 # define LibraryCCOptions /* don't want special floating point */
340 #endif /* OSMajorVersion < 5 */
341
342 #if OSMajorVersion > 4
343 # include <svr4.cf>
344 #endif
345
346 #ifndef ManKeywordsTarget
347 # define ManKeywordsTarget(manpath)                                     @@\
348 man_keywords::                                                          @@\
349         catman -M $(DESTDIR)manpath -w
350 #endif
351
352 #if !defined(UsePamLibrary)
353 # if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
354 #  define UsePamLibrary         YES
355 # endif
356 #endif
357
358 #define MotifDefines                    \
359         -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
360 #define PamUnixDefines          -DPAM_NIS
361 #define TtLargePICTable         YES
362 #define DtSvcDefines            -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
363 #define DtSearchDefines         -DI18N_MSG DtSvcDefines
364 #define DtWidgetDefines         DtSearchDefines
365 #define DtPrintDefines          DtSearchDefines
366
367 #define baseDtMailDefines       \
368         -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
369 #ifndef i386Architecture
370 # define DtMailDefines          baseDtMailDefines
371 #else
372 # define DtMailDefines          -DBIG_ENDIAN baseDtMailDefines
373 #endif
374
375 #define ArchitectureDefines     -DSUN_ARCHITECTURE
376
377 #define TtClientExtraLibs       ExtraLibraries -ldl -lintl
378
379 #define ExportListGenSource     elistgen.sun
380 #define ShlibExportListOpt(filename)    -M filename
381
382 #define CdeProjectDefines \
383         -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
384         -D_XOPEN_SOURCE -D__EXTENSIONS__ \
385         -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion