1 XCOMM platform: $TOG: sun.cf /main/176 1997/12/09 17:27:51 kaleb $
4 # define OSName DefaultOSName
7 # define OSMajorVersion DefaultOSMajorVersion
10 # define OSMinorVersion DefaultOSMinorVersion
12 #ifndef OSTeenyVersion
13 # define OSTeenyVersion DefaultOSTeenyVersion
15 XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
18 * Compiler setup. This sun.cf file knows what options to use with
19 * certain compilers, including Sun C, CenterLine C, and gcc. It
20 * also understands how to set some of the options for various C++
21 * compilers, including Sun C++ and CenterLine C++.
23 * === C Compiler Setup ==========================================
25 * For SunPro C, define HasSunC to YES in site.def.
26 * For CenterLine C, define HasCenterLineC to YES in site.def
27 * For gcc or gcc2, define HasGcc or HasGcc2 to YES in site.def
28 * For other compilers, define HasSunC to NO in site.def, then
29 * provide appropriate values for the various compiler related
30 * configuration varibles used here.
32 * If you don't tell us which C compiler you have, we assume you have
33 * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc
36 * === C++ Compiler Setup ==========================================
38 * For SunPro C++, define HasSunCplusplus to YES in site.def
39 * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
40 * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
41 * For other compilers, define HasCplusplus to YES in site.def, and
42 * check to see if you need to provide values for CplusplusOptions
43 * and/or DefaultCplusplusOptions.
45 * In any case, you may also need to set CplusplusDependIncludes.
47 * If you say you have the SunPro C++ compiler, we assume you have
48 * version 3.0.x of the compiler. If you have version 4.0.x instead,
49 * define CplusplusCompilerMajorVersion as 4 in site.def.
54 # if (HasCenterLineC || HasGcc || HasGcc2 || OSMajorVersion < 5)
62 # ifndef CCompilerMajorVersion
63 # define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
65 # ifndef CCompilerMinorVersion
66 # define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
68 XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
73 # define HasCplusplus YES
75 # ifndef CplusplusCompilerMajorVersion
76 # ifdef DefaultSunProCplusplusCompilerMajorVersion
77 # define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
79 # define CplusplusCompilerMajorVersion 3
82 # ifndef CplusplusCompilerMinorVersion
83 # ifdef DefaultSunProCplusplusCompilerMinorVersion
84 # define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
86 # define CplusplusCompilerMinorVersion 0
89 XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
98 #if HasCenterLineCplusplus
100 # define HasCplusplus YES
102 # ifndef DefaultCplusplusOptions
103 # define DefaultCplusplusOptions -Xa
105 # ifndef CplusplusOptions
106 # define CplusplusOptions -Xa
110 #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
111 /* We do not guarantee this will work */
112 # define BootstrapCFlags -DNOSTDHDRS
113 # define StandardDefines -DNOSTDHDRS
114 # define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
117 #if OSMajorVersion == 4
118 # if OSMinorVersion == 1
121 # if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
122 /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
123 # define SunPost411FCSLd YES
127 #ifdef i386Architecture
128 # if OSMajorVersion > 4
129 # define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines
130 # define ServerOSDefines XFree86ServerOSDefines
132 # define ServerExtraDefines AllocateLocalDefines
133 # define ServerOSDefines -DDDXOSINIT
136 # define ServerExtraDefines AllocateLocalDefines
137 # define ServerOSDefines -DDDXOSINIT
138 # define HasPlugin YES
141 #define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
143 #if OSMajorVersion > 4
144 #define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
147 * Assume /opt/SUNWspro/bin/ contains symlinks to the appropriate tools
150 # define CcCmd /opt/SUNWspro/bin/cc
153 # define CplusplusCmd /opt/SUNWspro/bin/CC
155 #ifndef CplusplusFilt
156 # define CplusplusFilt /opt/SUNWspro/bin/c++filt
158 #ifndef CplusplusDependIncludes
159 #if CplusplusCompilerMajorVersion > 3
160 # define CplusplusDependIncludes -I/opt/SUNWspro/SC4.0/include/CC
161 #elif CplusplusCompilerMajorVersion > 2
162 # define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
164 # define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
169 # if HasSunC && (CCompilerMajorVersion < 3)
170 # define BootstrapCFlags -DSVR4
172 # define BootstrapCFlags /* none needed */
174 # ifndef XawI18nDefines
175 # if OSMinorVersion < 4
176 # define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
178 # define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
181 # if OSMinorVersion > 10
182 # define InstallCmd /usr/bin/ginstall
183 # elif OSMinorVersion > 3
184 # define InstallCmd /usr/ucb/install
186 # ifdef i386Architecture
187 # define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
188 # define ToolkitStringsABIOptions -intelabi
190 # define StandardDefines -Dsun -DSVR4
191 # define ToolkitStringsABIOptions -sparcabi
193 # define ExtraLibraries -lsocket -lnsl
194 # if OSMinorVersion > 1
195 # define ThreadedX YES
196 # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
197 # if HasSunC && CCompilerMajorVersion > 2
198 # define ThreadsCompileFlags -mt
200 # define SystemMTDefines -D_REENTRANT
201 # define ThreadsLibraries -lthread
203 # if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
204 # define ThreadsCplusplusCompileFlags -mt
206 # define CplusplusSystemMTDefines -D_REENTRANT
207 # define ThreadsCplusplusLibraries -lthread
209 # endif /* OSMinorVersion > 1 */
210 # ifndef UseExportLists
211 # define UseExportLists YES
214 # define InstKmemFlags -g sys -m 2711
215 # define ShLibIncludeFile <sunLib.tmpl>
217 * Set flags for position independent code before including sv4Lib.rules
218 * if the compiler in use doesn't use standard SVR4 flags
220 # if HasSunC || HasCenterLineC
221 # define PositionIndependentCFlags -Kpic
222 # define LargePositionIndependentCFlags -KPIC
224 # if HasSunCplusplus || HasCenterLineCplusplus
225 # define PositionIndependentCplusplusFlags -pic
226 # define LargePositionIndependentCplusplusFlags -PIC
228 #else /* not OSMajorVersion > 4 */
229 #define InstKmemFlags -g kmem -m 2711
230 #include <sunLib.rules>
231 #endif /* OSMajorVersion > 4 (else) */
233 #define BuildLibPathVar LD_LIBRARY_PATH
236 #define HasSecureRPC YES
237 #define SetTtyGroup YES
238 #define HasPutenv YES
239 #ifndef i386Architecture
240 # ifndef Xsun24Server
241 # define Xsun24Server NO /* color, mono, multiple depths */
244 # define XsunServer YES /* color and mono, 8 bit only */
246 # ifndef XsunMonoServer
247 # define XsunMonoServer NO /* monochrome only */
249 #endif /* not i386Architecture */
251 #if HasGcc || HasGcc2
252 # if OSMajorVersion > 4 && defined(i386Architecture)
253 # ifndef DefaultCCOptions
254 # define DefaultCCOptions -DNO_ASM
258 # ifndef OptimizedCDebugFlags
259 # ifdef i386Architecture
260 # define OptimizedCDebugFlags -m486 DefaultGcc2i386Opt
262 # define OptimizedCDebugFlags -O2
266 # define SharedLibraryCcCmd cc
267 # define ExtraLoadFlags -B/usr/bin/
268 # define AllocateLocalDefines /**/
271 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
273 # endif /* HasGcc2 (else) */
275 #else /* not HasGcc, not HasGcc2 */
277 # define AllocateLocalDefines -DINCLUDE_ALLOCA_H
279 /* Set up compiler-dependent options for Sun C */
282 # ifdef Sun3Architecture
283 # ifndef DefaultCCOptions
284 # define DefaultCCOptions -f68881 -pipe
286 # else /* not defined(Sun3Architecture) */
287 # if OSMajorVersion < 5
288 # ifndef DefaultCCOptions
289 # define DefaultCCOptions -pipe
291 # else /* OSMajorVersion >= 5*/
292 # ifndef DefaultCCOptions
293 # define DefaultCCOptions -Xa
299 /* Set compiler-dependent options for CenterLine C */
302 # ifndef DefaultCCOptions
303 # define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
305 # ifndef NeedConstPrototypes
306 # define NeedConstPrototypes YES
308 # ifndef NeedNestedPrototypes
309 # define NeedNestedPrototypes YES
311 # ifndef NeedVarargsPrototypes
312 # define NeedVarargsPrototypes YES
317 # define PexCCOptions DefaultCCOptions
319 #endif /* HasGcc || HasGcc2 (else) */
321 #if OSMajorVersion < 5
322 # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
323 # define LibraryCCOptions /* don't want special floating point */
324 #endif /* OSMajorVersion < 5 */
326 #if OSMajorVersion > 4
330 #ifndef ManKeywordsTarget
331 # define ManKeywordsTarget(manpath) @@\
333 catman -M $(DESTDIR)manpath -w
336 #if !defined(UsePamLibrary)
337 # if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
338 # define UsePamLibrary NO
342 #if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
343 #define SharedLibXau YES
344 #define SharedXauRev 6
345 #define SharedLibXdmcp YES
346 #define SharedXdmcpRev 6
349 #define MotifDefines \
350 -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
351 #define PamUnixDefines -DPAM_NIS
352 #define TtLargePICTable YES
353 #define DtSvcDefines -DMULTIBYTE -DNO_REGCOMP
354 #define DtSearchDefines -DI18N_MSG DtSvcDefines
355 #define DtWidgetDefines DtSearchDefines
356 #define DtPrintDefines DtSearchDefines
358 #define baseDtMailDefines \
359 -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
360 #ifndef i386Architecture
361 # define DtMailDefines baseDtMailDefines
363 # define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
366 #define ArchitectureDefines -DSUN_ARCHITECTURE
368 #define TtClientExtraLibs ExtraLibraries -ldl -lintl
370 #define ExportListGenSource elistgen.sun
371 #define ShlibExportListOpt(filename) -M filename
373 #define CdeProjectDefines \
374 -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
375 -D_XOPEN_SOURCE -D__EXTENSIONS__ \
376 -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion