cdesktopenv/cde/config/cf/sun.cf

420 lines
12 KiB
CFEngine3

XCOMM platform: $TOG: sun.cf /main/176 1997/12/09 17:27:51 kaleb $
#ifndef OSName
# define OSName DefaultOSName
#endif
#ifndef OSMajorVersion
# define OSMajorVersion DefaultOSMajorVersion
#endif
#ifndef OSMinorVersion
# define OSMinorVersion DefaultOSMinorVersion
#endif
#ifndef OSTeenyVersion
# define OSTeenyVersion DefaultOSTeenyVersion
#endif
XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
/*
* Compiler setup. This sun.cf file knows what options to use with
* certain compilers, including Sun C and gcc. It also understands
* how to set some of the options for various C++ compilers, including
* Sun C++ and g++.
*
* === C Compiler Setup ==========================================
*
* For SunPro C, define HasSunC to YES in host.def.
* For Gnu gcc, define HasGcc2 to YES in host.def
* For other compilers, define HasSunC to NO in host.def, then
* provide appropriate values for the various compiler related
* configuration varibles used here.
*
* If you don't tell us which C compiler you have, we assume you have
* the Gcc C compiler under Solaris 2.x.
*
* === C++ Compiler Setup ==========================================
*
* For SunPro C++, define HasSunCplusplus to YES in host.def
* For Gnu g++ 4.x, define HasGcc2ForCplusplus to YES in host.def
* For other compilers, define HasCplusplus to YES in host.def, and
* check to see if you need to provide values for CplusplusOptions
* and/or DefaultCplusplusOptions.
*
* In any case, you may also need to set CplusplusDependIncludes.
*
* If you say you have the SunPro C++ compiler, we assume you have
* version 5.0.x of the compiler. If you have an earlier version
* instead, define CplusplusCompilerMajorVersion in host.def.
*
*/
#ifndef HasSunC
# if (HasGcc || HasGcc2 || OSMajorVersion < 5)
# define HasSunC NO
# else
# define HasSunC YES
# endif
#endif
#if HasSunC
# ifndef CCompilerMajorVersion
# define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
# endif
# ifndef CCompilerMinorVersion
# define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
# endif
XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
#endif
#if HasSunCplusplus
# ifndef HasCplusplus
# define HasCplusplus YES
# endif
# ifndef CplusplusCompilerMajorVersion
# ifdef DefaultSunProCplusplusCompilerMajorVersion
# define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
# else
# define CplusplusCompilerMajorVersion 3
# endif
# endif
# ifndef CplusplusCompilerMinorVersion
# ifdef DefaultSunProCplusplusCompilerMinorVersion
# define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
# else
# define CplusplusCompilerMinorVersion 0
# endif
# endif
XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
#endif
#if HasGcc2
# ifndef CCompilerMajorVersion
# define CCompilerMajorVersion DefaultGnuCCompilerMajorVersion
# endif
# ifndef CCompilerMinorVersion
# define CCompilerMinorVersion DefaultGnuCCompilerMinorVersion
# endif
XCOMM Gnu C CCompilerMajorVersion./**/CCompilerMinorVersion
#endif
#if HasGcc2ForCplusplus
# ifndef HasCplusplus
# define HasCplusplus YES
# endif
# ifndef CplusplusCompilerMajorVersion
# ifdef DefaultGnuCplusplusCompilerMajorVersion
# define CplusplusCompilerMajorVersion DefaultGnuCplusplusCompilerMajorVersion
# else
# define CplusplusCompilerMajorVersion 4
# endif
# endif
# ifndef CplusplusCompilerMinorVersion
# ifdef DefaultGnuCplusplusCompilerMinorVersion
# define CplusplusCompilerMinorVersion DefaultGnuCplusplusCompilerMinorVersion
# else
# define CplusplusCompilerMinorVersion 6
# endif
# endif
XCOMM Gnu C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
#endif
#if OSMajorVersion > 4
#define MkdirHierCmd mkdir -p
#endif
#ifndef OptimizedCDebugFlags
# define OptimizedCDebugFlags -O2
#endif
#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
/* We do not guarantee this will work */
# define BootstrapCFlags -DNOSTDHDRS
# define StandardDefines -DNOSTDHDRS
# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#endif
#if OSMajorVersion == 4
# if OSMinorVersion == 1
# define HasPoll YES
# endif
# if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
# define SunPost411FCSLd YES
# endif
#endif
#ifdef i386Architecture
# if OSMajorVersion > 4
# define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines
# define ServerOSDefines XFree86ServerOSDefines
# else
# define ServerExtraDefines AllocateLocalDefines
# define ServerOSDefines -DDDXOSINIT
# endif
#else
# define ServerExtraDefines AllocateLocalDefines
# define ServerOSDefines -DDDXOSINIT
# define HasPlugin YES
#endif
#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
#if OSMajorVersion > 4
#define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
#if HasSunC
/*
* Assume /opt/solarisstudio/bin/ contains symlinks to the appropriate tools
*/
#ifndef CcCmd
# define CcCmd /opt/solarisstudio/bin/cc
#endif
#ifndef CplusplusCmd
# define CplusplusCmd /opt/solarisstudio/bin/CC
#endif
#ifndef CplusplusFilt
# define CplusplusFilt /opt/solarisstudio/bin/c++filt
#endif
#ifndef CplusplusLibC
#define CplusplusLibC -L/opt/solarisstudio/lib -lCrun
#endif
#ifndef OptimizedCplusplusDebugFlags
# define OptimizedCplusplusDebugFlags -O2 -erroff=attrskipunsup
#endif
#ifndef CplusplusDependIncludes
#if CplusplusCompilerMajorVersion > 4
# define CplusplusDependIncludes -I/opt/solarisstudio/prod/include/CC -I/opt/solarisstudio/prod/include/CC/Cstd -I/opt/solarisstudio/prod/include/CC/std
#elif CplusplusCompilerMajorVersion > 3
# define CplusplusDependIncludes -I/opt/SUNWspro/SC4.0/include/CC
#elif CplusplusCompilerMajorVersion > 2
# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
#else
# define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
#endif
#endif
#endif
# if HasSunC && (CCompilerMajorVersion < 3)
# define BootstrapCFlags -DSVR4
# else
# define BootstrapCFlags /* none needed */
# endif
# ifndef XawI18nDefines
# if OSMinorVersion < 4
# define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
# else
# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
# endif
# endif
# if OSMinorVersion > 10
# define InstallCmd /usr/bin/ginstall
# elif OSMinorVersion > 3
# define InstallCmd /usr/ucb/install
# endif
# if defined(i386Architecture)
# define StandardDefines -Dsun -Di386 -DSVR4 -D__i386
# define ToolkitStringsABIOptions -intelabi
# elif defined(SparcArchitecture)
# define StandardDefines -Dsun -Dsparc -DSVR4 -D__sparc
# define ToolkitStringsABIOptions -sparcabi
# else
# define StandardDefines -Dsun -DSVR4
# define ToolkitStringsABIOptions -sparcabi
# endif
# define ExtraLibraries -lsocket -lnsl
# if OSMinorVersion > 1
# define ThreadedX YES
# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
# if HasSunC && CCompilerMajorVersion > 2
# define ThreadsCompileFlags -mt
# else
# define SystemMTDefines -D_REENTRANT
# define ThreadsLibraries -lthread
# endif
# if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
# define ThreadsCplusplusCompileFlags -mt
# else
# define CplusplusSystemMTDefines -D_REENTRANT
# define ThreadsCplusplusLibraries -lthread
# endif
# endif /* OSMinorVersion > 1 */
# ifndef UseExportLists
# define UseExportLists NO
# endif
# define HasVFork NO
# define InstKmemFlags -g sys -m 2711
# define ShLibIncludeFile <sunLib.tmpl>
/*
* Set flags for position independent code before including sv4Lib.rules
* if the compiler in use doesn't use standard SVR4 flags
*/
# if HasSunC
# define PositionIndependentCFlags -Kpic
# define LargePositionIndependentCFlags -KPIC
# endif
# if HasSunCplusplus
# define PositionIndependentCplusplusFlags -pic
# define LargePositionIndependentCplusplusFlags -PIC
# endif
#else /* not OSMajorVersion > 4 */
#define InstKmemFlags -g kmem -m 2711
#include <sunLib.rules>
#endif /* OSMajorVersion > 4 (else) */
#define BuildLibPathVar LD_LIBRARY_PATH
#define HasNdbm YES
#define HasShm YES
#define HasSecureRPC YES
#define SetTtyGroup YES
#define HasPutenv YES
#ifndef i386Architecture
# ifndef Xsun24Server
# define Xsun24Server NO /* color, mono, multiple depths */
# endif
# ifndef XsunServer
# define XsunServer YES /* color and mono, 8 bit only */
# endif
# ifndef XsunMonoServer
# define XsunMonoServer NO /* monochrome only */
# endif
#endif /* not i386Architecture */
#if HasGcc || HasGcc2
# if OSMajorVersion > 4 && defined(i386Architecture)
# ifndef DefaultCCOptions
# define DefaultCCOptions -DNO_ASM
# endif
# endif
# if HasGcc2
# define SharedLibraryLoadFlags -shared
# define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
# if defined(i386Architecture) || defined(SparcArchitecture)
# define CcCmd gcc
# endif
# else
# define SharedLibraryCcCmd cc
# define ExtraLoadFlags -B/usr/bin/
# define AllocateLocalDefines /**/
.c.o:
ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
# endif /* HasGcc2 (else) */
#else /* not HasGcc, not HasGcc2 */
# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
/* Set up compiler-dependent options for Sun C */
# if HasSunC
# ifdef Sun3Architecture
# ifndef DefaultCCOptions
# define DefaultCCOptions -f68881 -pipe
# endif
# else /* not defined(Sun3Architecture) */
# if OSMajorVersion < 5
# ifndef DefaultCCOptions
# define DefaultCCOptions -pipe
# endif
# else /* OSMajorVersion >= 5*/
# ifndef DefaultCCOptions
# define DefaultCCOptions -Xa
# endif
# endif
# endif
# endif
# define PexCCOptions DefaultCCOptions
#endif /* HasGcc || HasGcc2 (else) */
#if HasGcc2
CXXDEPENDINCLUDE :sh = CcCmd -v -x c++ /dev/null -fsyntax-only \
2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
#define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
#endif
#if HasGcc2ForCplusplus
#define CplusplusCmd g++
#ifndef CplusplusLibC
#define CplusplusLibC -L/usr/gnu/lib -lstdc++
#endif
#endif /* HasGcc2ForCplusplus */
#if OSMajorVersion < 5
# define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
# define LibraryCCOptions /* don't want special floating point */
#endif /* OSMajorVersion < 5 */
#if OSMajorVersion > 4
# include <svr4.cf>
#endif
#ifndef ManKeywordsTarget
# define ManKeywordsTarget(manpath) @@\
man_keywords:: @@\
catman -M $(DESTDIR)manpath -w
#endif
#if !defined(UsePamLibrary)
# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
# define UsePamLibrary NO
# endif
#endif
#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
#define SharedLibXau YES
#define SharedXauRev 6
#define SharedLibXdmcp YES
#define SharedXdmcpRev 6
#endif
#define HasMakefileSafeInclude YES
#define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
#define DependFileName .depend
#if HasSunC
#define DependDefines -D__BUILTIN_VA_ARG_INCR
#endif
#define LdPreLib -L$(BUILDLIBDIR)
#define PamUnixDefines -DPAM_NIS
#define TtLargePICTable YES
#define DtSvcDefines -DMULTIBYTE -DNO_REGCOMP
#define DtSearchDefines -DI18N_MSG DtSvcDefines
#define DtWidgetDefines DtSearchDefines
#define DtPrintDefines DtSearchDefines
#ifndef CompressAllFonts
#define CompressAllFonts YES
#endif
/* For DtHelp TIFF processing routines. */
#if defined(AMD64Architecture) || defined(i386Architecture)
#define LSBBitOrder YES
#endif
#define baseDtMailDefines \
-DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
#ifndef i386Architecture
# define DtMailDefines baseDtMailDefines
#else
# define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
#endif
#define ArchitectureDefines -DSUN_ARCHITECTURE
#define TtClientExtraLibs ExtraLibraries -ldl -lintl
#ifndef TopMotifInclude
# define TopMotifInclude $(MPROJECTROOT)/include
#endif
#define ShlibExportListOpt(filename) -M filename
#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
#define CdeProjectDefines \
-DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D__EXTENSIONS__ \
-DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion