1 XCOMM platform: $TOG: sun.cf /main/163 1997/06/08 20:08:23 kaleb $
6 XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.31.2.7 1997/12/01 13:31:17 dawes Exp $
9 # define OSName DefaultOSName
11 #ifndef OSMajorVersion
12 # define OSMajorVersion DefaultOSMajorVersion
14 #ifndef OSMinorVersion
15 # define OSMinorVersion DefaultOSMinorVersion
17 #ifndef OSTeenyVersion
18 # define OSTeenyVersion DefaultOSTeenyVersion
20 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
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++.
28 * === C Compiler Setup ==========================================
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.
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
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
45 * === C++ Compiler Setup ==========================================
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.
54 * In any case, you may also need to set CplusplusDependIncludes.
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.
66 #define HasGcc HasGcc2
70 # if (HasCenterLineC || HasGcc || HasGcc2 || OSMajorVersion < 5)
78 # ifndef CCompilerMajorVersion
79 # define CCompilerMajorVersion 3
80 # define DefaultCDebugFlags -xO3
81 # define OptimizedCDebugFlags -xO3
87 # define HasCplusplus YES
88 # define OptimizedCplusplusDebugFlags -xO3
90 # ifndef CplusplusCompilerMajorVersion
91 # define CplusplusCompilerMajorVersion 4
101 #if HasCenterLineCplusplus
102 # ifndef HasCplusplus
103 # define HasCplusplus YES
105 # ifndef DefaultCplusplusOptions
106 # define DefaultCplusplusOptions -Xa
108 # ifndef CplusplusOptions
109 # define CplusplusOptions -Xa
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
121 #if OSMajorVersion == 4
122 # if OSMinorVersion == 1
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
131 #ifdef i386Architecture
132 # if OSMajorVersion > 4
133 # define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines -D__EXTENSIONS__
134 # define ServerOSDefines XFree86ServerOSDefines
136 # define ServerExtraDefines AllocateLocalDefines
137 # define ServerOSDefines -DDDXOSINIT
140 # define ServerExtraDefines AllocateLocalDefines
141 # define ServerOSDefines -DDDXOSINIT
144 #define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
146 #if OSMajorVersion > 4
149 * Assume /opt/SUNWspro/bin/ contains symlinks to the appropriate tools
152 # define CcCmd /opt/SUNWspro/bin/cc
155 # define CplusplusCmd /opt/SUNWspro/bin/CC
157 #ifndef CplusplusFilt
158 # define CplusplusFilt /opt/SUNWspro/bin/c++filt
160 #ifndef CplusplusDependIncludes
161 # define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
165 # if HasSunC && (CCompilerMajorVersion < 3)
166 # define BootstrapCFlags -DSVR4
168 # define BootstrapCFlags /* none needed */
170 # ifndef XawI18nDefines
171 # if OSMinorVersion < 4
172 # define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
174 # define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
177 # if OSMinorVersion > 3
178 # define InstallCmd /usr/ucb/install
180 # ifdef i386Architecture
181 # define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
182 # define ToolkitStringsABIOptions -intelabi
184 # define StandardDefines -Dsun -DSVR4
185 # define ToolkitStringsABIOptions -sparcabi
186 # define HasPlugin YES
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
195 # define SystemMTDefines -D_REENTRANT
196 # define ThreadsLibraries -lthread
198 # if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
199 # define ThreadsCplusplusCompileFlags -mt
201 # define CplusplusSystemMTDefines -D_REENTRANT
202 # define ThreadsCplusplusLibraries -lthread
204 # endif /* OSMinorVersion > 1 */
205 # ifndef UseExportLists
206 # if OSMinorVersion > 4
207 # define UseExportLists YES
209 # define UseExportLists NO
213 # define InstKmemFlags -g sys -m 2711
214 # define ShLibIncludeFile <sunLib.tmpl>
216 * Set flags for position independent code before including sv4Lib.rules
217 * if the compiler in use doesn't use standard SVR4 flags
219 # if HasSunC || HasCenterLineC
220 # define PositionIndependentCFlags -Kpic
221 # define LargePositionIndependentCFlags -KPIC
223 # if HasSunCplusplus || HasCenterLineCplusplus
224 # define PositionIndependentCplusplusFlags -pic
225 # define LargePositionIndependentCplusplusFlags -PIC
227 #else /* not OSMajorVersion > 4 */
228 #define InstKmemFlags -g kmem -m 2711
229 #include <sunLib.rules>
230 #endif /* OSMajorVersion > 4 (else) */
232 #define BuildLibPathVar LD_LIBRARY_PATH
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 */
243 # define XsunServer YES /* color and mono, 8 bit only */
245 # ifndef XsunMonoServer
246 # define XsunMonoServer NO /* monochrome only */
249 # define BuildPexExt (XsunServer || Xsun24Server)
251 #endif /* not i386Architecture */
253 #if (OSMajorVersion > 4) && defined(i386Architecture)
254 #ifndef HasSolx86ApertureDriver
255 #define HasSolx86ApertureDriver YES
260 # if OSMajorVersion > 4 && defined(i386Architecture)
261 # ifndef DefaultCCOptions
263 # define DefaultCCOptions -DNO_ASM
265 # if OSMinorVersion > 3
266 # define DefaultCCOptions -ansi -pedantic -DNO_ASM
268 # define DefaultCCOptions -DNO_ASM
274 # ifndef OptimizedCDebugFlags
275 # ifdef i386Architecture
276 # define OptimizedCDebugFlags DefaultGcc2i386Opt
278 # define OptimizedCDebugFlags -O2
282 # define SharedLibraryCcCmd cc
283 # define ExtraLoadFlags -B/usr/bin/
284 # define AllocateLocalDefines /**/
287 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
289 # endif /* HasGcc2 (else) */
291 #else /* not HasGcc */
293 # define AllocateLocalDefines -DINCLUDE_ALLOCA_H
295 /* Set up compiler-dependent options for Sun C */
298 # ifdef Sun3Architecture
299 # ifndef DefaultCCOptions
300 # define DefaultCCOptions -f68881 -pipe
302 # else /* not defined(Sun3Architecture) */
303 # if OSMajorVersion < 5
304 # ifndef DefaultCCOptions
305 # define DefaultCCOptions -pipe
307 # else /* OSMajorVersion >= 5*/
308 # ifndef DefaultCCOptions
309 # define DefaultCCOptions -Xa
315 /* Set compiler-dependent options for CenterLine C */
318 # ifndef DefaultCCOptions
319 # define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
321 # ifndef NeedConstPrototypes
322 # define NeedConstPrototypes YES
324 # ifndef NeedNestedPrototypes
325 # define NeedNestedPrototypes YES
327 # ifndef NeedVarargsPrototypes
328 # define NeedVarargsPrototypes YES
333 # define PexCCOptions DefaultCCOptions
335 #endif /* HasGcc (else) */
337 #if OSMajorVersion < 5
338 # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
339 # define LibraryCCOptions /* don't want special floating point */
340 #endif /* OSMajorVersion < 5 */
342 #if OSMajorVersion > 4
346 #ifndef ManKeywordsTarget
347 # define ManKeywordsTarget(manpath) @@\
349 catman -M $(DESTDIR)manpath -w
352 #if !defined(UsePamLibrary)
353 # if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
354 # define UsePamLibrary YES
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
367 #define baseDtMailDefines \
368 -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
369 #ifndef i386Architecture
370 # define DtMailDefines baseDtMailDefines
372 # define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
375 #define ArchitectureDefines -DSUN_ARCHITECTURE
377 #define TtClientExtraLibs ExtraLibraries -ldl -lintl
379 #define ExportListGenSource elistgen.sun
380 #define ShlibExportListOpt(filename) -M filename
382 #define CdeProjectDefines \
383 -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
384 -D_XOPEN_SOURCE -D__EXTENSIONS__ \
385 -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion