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 > 3
182 # define InstallCmd /usr/ucb/install
184 # ifdef i386Architecture
185 # define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
186 # define ToolkitStringsABIOptions -intelabi
188 # define StandardDefines -Dsun -DSVR4
189 # define ToolkitStringsABIOptions -sparcabi
191 # define ExtraLibraries -lsocket -lnsl
192 # if OSMinorVersion > 1
193 # define ThreadedX YES
194 # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
195 # if HasSunC && CCompilerMajorVersion > 2
196 # define ThreadsCompileFlags -mt
198 # define SystemMTDefines -D_REENTRANT
199 # define ThreadsLibraries -lthread
201 # if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
202 # define ThreadsCplusplusCompileFlags -mt
204 # define CplusplusSystemMTDefines -D_REENTRANT
205 # define ThreadsCplusplusLibraries -lthread
207 # endif /* OSMinorVersion > 1 */
208 # ifndef UseExportLists
209 # define UseExportLists YES
212 # define InstKmemFlags -g sys -m 2711
213 # define ShLibIncludeFile <sunLib.tmpl>
215 * Set flags for position independent code before including sv4Lib.rules
216 * if the compiler in use doesn't use standard SVR4 flags
218 # if HasSunC || HasCenterLineC
219 # define PositionIndependentCFlags -Kpic
220 # define LargePositionIndependentCFlags -KPIC
222 # if HasSunCplusplus || HasCenterLineCplusplus
223 # define PositionIndependentCplusplusFlags -pic
224 # define LargePositionIndependentCplusplusFlags -PIC
226 #else /* not OSMajorVersion > 4 */
227 #define InstKmemFlags -g kmem -m 2711
228 #include <sunLib.rules>
229 #endif /* OSMajorVersion > 4 (else) */
231 #define BuildLibPathVar LD_LIBRARY_PATH
234 #define HasSecureRPC YES
235 #define SetTtyGroup YES
236 #define HasPutenv YES
237 #ifndef i386Architecture
238 # ifndef Xsun24Server
239 # define Xsun24Server NO /* color, mono, multiple depths */
242 # define XsunServer YES /* color and mono, 8 bit only */
244 # ifndef XsunMonoServer
245 # define XsunMonoServer NO /* monochrome only */
247 #endif /* not i386Architecture */
249 #if HasGcc || HasGcc2
250 # if OSMajorVersion > 4 && defined(i386Architecture)
251 # ifndef DefaultCCOptions
252 # define DefaultCCOptions -DNO_ASM
256 # ifndef OptimizedCDebugFlags
257 # ifdef i386Architecture
258 # define OptimizedCDebugFlags -m486 DefaultGcc2i386Opt
260 # define OptimizedCDebugFlags -O2
264 # define SharedLibraryCcCmd cc
265 # define ExtraLoadFlags -B/usr/bin/
266 # define AllocateLocalDefines /**/
269 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
271 # endif /* HasGcc2 (else) */
273 #else /* not HasGcc, not HasGcc2 */
275 # define AllocateLocalDefines -DINCLUDE_ALLOCA_H
277 /* Set up compiler-dependent options for Sun C */
280 # ifdef Sun3Architecture
281 # ifndef DefaultCCOptions
282 # define DefaultCCOptions -f68881 -pipe
284 # else /* not defined(Sun3Architecture) */
285 # if OSMajorVersion < 5
286 # ifndef DefaultCCOptions
287 # define DefaultCCOptions -pipe
289 # else /* OSMajorVersion >= 5*/
290 # ifndef DefaultCCOptions
291 # define DefaultCCOptions -Xa
297 /* Set compiler-dependent options for CenterLine C */
300 # ifndef DefaultCCOptions
301 # define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
303 # ifndef NeedConstPrototypes
304 # define NeedConstPrototypes YES
306 # ifndef NeedNestedPrototypes
307 # define NeedNestedPrototypes YES
309 # ifndef NeedVarargsPrototypes
310 # define NeedVarargsPrototypes YES
315 # define PexCCOptions DefaultCCOptions
317 #endif /* HasGcc || HasGcc2 (else) */
319 #if OSMajorVersion < 5
320 # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
321 # define LibraryCCOptions /* don't want special floating point */
322 #endif /* OSMajorVersion < 5 */
324 #if OSMajorVersion > 4
328 #ifndef ManKeywordsTarget
329 # define ManKeywordsTarget(manpath) @@\
331 catman -M $(DESTDIR)manpath -w
334 #if !defined(UsePamLibrary)
335 # if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
336 # define UsePamLibrary YES
340 #define MotifDefines \
341 -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
342 #define PamUnixDefines -DPAM_NIS
343 #define TtLargePICTable YES
344 #define DtSvcDefines -DMULTIBYTE -DNO_REGCOMP
345 #define DtSearchDefines -DI18N_MSG DtSvcDefines
346 #define DtWidgetDefines DtSearchDefines
347 #define DtPrintDefines DtSearchDefines
349 #define baseDtMailDefines \
350 -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
351 #ifndef i386Architecture
352 # define DtMailDefines baseDtMailDefines
354 # define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
357 #define ArchitectureDefines -DSUN_ARCHITECTURE
359 #define TtClientExtraLibs ExtraLibraries -ldl -lintl
361 #define ExportListGenSource elistgen.sun
362 #define ShlibExportListOpt(filename) -M filename
364 #define CdeProjectDefines \
365 -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
366 -D_XOPEN_SOURCE -D__EXTENSIONS__ \
367 -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion