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 and gcc. It also understands
20 * how to set some of the options for various C++ compilers, including
23 * === C Compiler Setup ==========================================
25 * For SunPro C, define HasSunC to YES in host.def.
26 * For Gnu gcc, define HasGcc2 to YES in host.def
27 * For other compilers, define HasSunC to NO in host.def, then
28 * provide appropriate values for the various compiler related
29 * configuration varibles used here.
31 * If you don't tell us which C compiler you have, we assume you have
32 * the Gcc C compiler under Solaris 5.x.
35 * === C++ Compiler Setup ==========================================
37 * For SunPro C++, define HasSunCplusplus to YES in host.def
38 * For Gnu g++ 4.x, define HasGcc2ForCplusplus to YES in host.def
39 * For other compilers, define HasCplusplus to YES in host.def, and
40 * check to see if you need to provide values for CplusplusOptions
41 * and/or DefaultCplusplusOptions.
43 * In any case, you may also need to set CplusplusDependIncludes.
45 * If you say you have the SunPro C++ compiler, we assume you have
46 * version 5.0.x of the compiler. If you have version 4.0.x instead,
47 * define CplusplusCompilerMajorVersion as 4 in host.def.
52 # if (HasGcc || HasGcc2 || OSMajorVersion < 5)
60 # ifndef CCompilerMajorVersion
61 # define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
63 # ifndef CCompilerMinorVersion
64 # define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
66 XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
71 # define HasCplusplus YES
73 # ifndef CplusplusCompilerMajorVersion
74 # ifdef DefaultSunProCplusplusCompilerMajorVersion
75 # define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
77 # define CplusplusCompilerMajorVersion 3
80 # ifndef CplusplusCompilerMinorVersion
81 # ifdef DefaultSunProCplusplusCompilerMinorVersion
82 # define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
84 # define CplusplusCompilerMinorVersion 0
87 XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
91 # ifndef CCompilerMajorVersion
92 # define CCompilerMajorVersion DefaultGnuCCompilerMajorVersion
94 # ifndef CCompilerMinorVersion
95 # define CCompilerMinorVersion DefaultGnuCCompilerMinorVersion
97 XCOMM Gnu C CCompilerMajorVersion./**/CCompilerMinorVersion
100 #if HasGcc2ForCplusplus
101 # ifndef HasCplusplus
102 # define HasCplusplus YES
104 # ifndef CplusplusCompilerMajorVersion
105 # ifdef DefaultGnuCplusplusCompilerMajorVersion
106 # define CplusplusCompilerMajorVersion DefaultGnuCplusplusCompilerMajorVersion
108 # define CplusplusCompilerMajorVersion 4
111 # ifndef CplusplusCompilerMinorVersion
112 # ifdef DefaultGnuCplusplusCompilerMinorVersion
113 # define CplusplusCompilerMinorVersion DefaultGnuCplusplusCompilerMinorVersion
115 # define CplusplusCompilerMinorVersion 6
118 XCOMM Gnu C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
122 #if OSMajorVersion > 4
123 #define MkdirHierCmd mkdir -p
126 #ifndef OptimizedCDebugFlags
127 # define OptimizedCDebugFlags -O2
130 #if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
131 /* We do not guarantee this will work */
132 # define BootstrapCFlags -DNOSTDHDRS
133 # define StandardDefines -DNOSTDHDRS
134 # define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
137 #if OSMajorVersion == 4
138 # if OSMinorVersion == 1
141 # if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
142 /* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
143 # define SunPost411FCSLd YES
147 #ifdef i386Architecture
148 # if OSMajorVersion > 4
149 # define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines
150 # define ServerOSDefines XFree86ServerOSDefines
152 # define ServerExtraDefines AllocateLocalDefines
153 # define ServerOSDefines -DDDXOSINIT
156 # define ServerExtraDefines AllocateLocalDefines
157 # define ServerOSDefines -DDDXOSINIT
158 # define HasPlugin YES
161 #define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
163 #if OSMajorVersion > 4
164 #define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
167 * Assume /opt/solarisstudio/bin/ contains symlinks to the appropriate tools
170 # define CcCmd /opt/solarisstudio/bin/cc
173 # define CplusplusCmd /opt/solarisstudio/bin/CC
175 #ifndef CplusplusFilt
176 # define CplusplusFilt /opt/solarisstudio/bin/c++filt
178 #ifndef CplusplusLibC
179 #define CplusplusLibC -L/opt/solarisstudio/lib -lCrun
181 #ifndef CplusplusDependIncludes
182 #if CplusplusCompilerMajorVersion > 3
183 # define CplusplusDependIncludes -I/opt/solarisstudio/prod/include/CC -I/opt/solarisstudio/prod/include/CC/Cstd
184 #elif CplusplusCompilerMajorVersion > 2
185 # define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
187 # define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
191 # if HasSunC && (CCompilerMajorVersion < 3)
192 # define BootstrapCFlags -DSVR4
194 # define BootstrapCFlags /* none needed */
196 # ifndef XawI18nDefines
197 # if OSMinorVersion < 4
198 # define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
200 # define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
203 # if OSMinorVersion > 10
204 # define InstallCmd /usr/bin/ginstall
205 # elif OSMinorVersion > 3
206 # define InstallCmd /usr/ucb/install
208 # if defined(i386Architecture)
209 # define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
210 # define ToolkitStringsABIOptions -intelabi
211 # elif defined(SparcArchitecture)
212 # define StandardDefines -Dsun -Dsparc -DSVR4 -D__sparc
213 # define ToolkitStringsABIOptions -sparcabi
215 # define StandardDefines -Dsun -DSVR4
216 # define ToolkitStringsABIOptions -sparcabi
218 # define ExtraLibraries -lsocket -lnsl
219 # if OSMinorVersion > 1
220 # define ThreadedX YES
221 # define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
222 # if HasSunC && CCompilerMajorVersion > 2
223 # define ThreadsCompileFlags -mt
225 # define SystemMTDefines -D_REENTRANT
226 # define ThreadsLibraries -lthread
228 # if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
229 # define ThreadsCplusplusCompileFlags -mt
231 # define CplusplusSystemMTDefines -D_REENTRANT
232 # define ThreadsCplusplusLibraries -lthread
234 # endif /* OSMinorVersion > 1 */
235 # ifndef UseExportLists
236 # define UseExportLists NO
239 # define InstKmemFlags -g sys -m 2711
240 # define ShLibIncludeFile <sunLib.tmpl>
242 * Set flags for position independent code before including sv4Lib.rules
243 * if the compiler in use doesn't use standard SVR4 flags
246 # define PositionIndependentCFlags -Kpic
247 # define LargePositionIndependentCFlags -KPIC
250 # define PositionIndependentCplusplusFlags -pic
251 # define LargePositionIndependentCplusplusFlags -PIC
253 #else /* not OSMajorVersion > 4 */
254 #define InstKmemFlags -g kmem -m 2711
255 #include <sunLib.rules>
256 #endif /* OSMajorVersion > 4 (else) */
258 #define BuildLibPathVar LD_LIBRARY_PATH
261 #define HasSecureRPC YES
262 #define SetTtyGroup YES
263 #define HasPutenv YES
264 #ifndef i386Architecture
265 # ifndef Xsun24Server
266 # define Xsun24Server NO /* color, mono, multiple depths */
269 # define XsunServer YES /* color and mono, 8 bit only */
271 # ifndef XsunMonoServer
272 # define XsunMonoServer NO /* monochrome only */
274 #endif /* not i386Architecture */
276 #if HasGcc || HasGcc2
277 # if OSMajorVersion > 4 && defined(i386Architecture)
278 # ifndef DefaultCCOptions
279 # define DefaultCCOptions -DNO_ASM
283 # define SharedLibraryLoadFlags -shared
284 # define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
285 # if defined(i386Architecture) || defined(SparcArchitecture)
289 # define SharedLibraryCcCmd cc
290 # define ExtraLoadFlags -B/usr/bin/
291 # define AllocateLocalDefines /**/
294 ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
296 # endif /* HasGcc2 (else) */
298 #else /* not HasGcc, not HasGcc2 */
300 # define AllocateLocalDefines -DINCLUDE_ALLOCA_H
302 /* Set up compiler-dependent options for Sun C */
305 # ifdef Sun3Architecture
306 # ifndef DefaultCCOptions
307 # define DefaultCCOptions -f68881 -pipe
309 # else /* not defined(Sun3Architecture) */
310 # if OSMajorVersion < 5
311 # ifndef DefaultCCOptions
312 # define DefaultCCOptions -pipe
314 # else /* OSMajorVersion >= 5*/
315 # ifndef DefaultCCOptions
316 # define DefaultCCOptions -Xa
322 # define PexCCOptions DefaultCCOptions
324 #endif /* HasGcc || HasGcc2 (else) */
327 CXXDEPENDINCLUDE :sh = CcCmd -v -x c++ /dev/null -fsyntax-only \
328 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
329 #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
332 #if HasGcc2ForCplusplus
333 #define CplusplusCmd g++
334 #ifndef CplusplusLibC
335 #define CplusplusLibC -L/usr/gnu/lib -lstdc++
337 #endif /* HasGcc2ForCplusplus */
340 #if OSMajorVersion < 5
341 # define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
342 # define LibraryCCOptions /* don't want special floating point */
343 #endif /* OSMajorVersion < 5 */
345 #if OSMajorVersion > 4
349 #ifndef ManKeywordsTarget
350 # define ManKeywordsTarget(manpath) @@\
352 catman -M $(DESTDIR)manpath -w
355 #if !defined(UsePamLibrary)
356 # if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
357 # define UsePamLibrary NO
361 #if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
362 #define SharedLibXau YES
363 #define SharedXauRev 6
364 #define SharedLibXdmcp YES
365 #define SharedXdmcpRev 6
368 #define DependFileName .depend
370 #define DependDefines -D__BUILTIN_VA_ARG_INCR
373 #define LdPreLib -L/usr/X11/lib -L$(BUILDLIBDIR)
374 #define PamUnixDefines -DPAM_NIS
375 #define TtLargePICTable YES
376 #define DtSvcDefines -DMULTIBYTE -DNO_REGCOMP
377 #define DtSearchDefines -DI18N_MSG DtSvcDefines
378 #define DtWidgetDefines DtSearchDefines
379 #define DtPrintDefines DtSearchDefines
381 #ifndef CompressAllFonts
382 #define CompressAllFonts YES
385 /* For DtHelp TIFF processing routines. */
386 #if defined(AMD64Architecture) || defined(i386Architecture)
387 #define LSBBitOrder YES
390 #define baseDtMailDefines \
391 -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
392 #ifndef i386Architecture
393 # define DtMailDefines baseDtMailDefines
395 # define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
398 #define ArchitectureDefines -DSUN_ARCHITECTURE
400 #define TtClientExtraLibs ExtraLibraries -ldl -lintl
402 #ifndef TopMotifInclude
403 # define TopMotifInclude /usr/X11/include
406 #define ShlibExportListOpt(filename) -M filename
408 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
409 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
411 #define CdeProjectDefines \
412 -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D__EXTENSIONS__ \
413 -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion