XCOMM site:  $XConsortium: site.sample /main/19 1995/12/14 13:03:29 matt $

/***************************************************************************
 *                                                                         *
 *			   SITE-SPECIFIC DEFINITIONS                       *
 *                                                                         *
 * This file contains two halves, one included before the vendor-specific  *
 * configuration file (.cf file), and one included after the .cf file.     *
 * The before-half should be protected by #ifdef BeforeVendorCF, and the   *
 * after-half should be protected by #ifdef AfterVendorCF.                 *
 *                                                                         *
 * The before-half should only set things that the .cf file depends on.    *
 * For the .cf files shipped in this release, the main variables in this   *
 * category are HasGcc, HasGcc2, and HasCplusplus 			   *
 *                                                                         *
 * The after-half should contain all other definitions.  For example,      *
 * place your ProjectRoot definition here.                                 *
 *                                                                         *
 * OS Major and Minor version numbers should be changed directly in the    *
 * .cf file, not overridden in site.def.                                   *
 *                                                                         *
 ***************************************************************************/

/* if you want host-specific customization, this is one way to do it */
/*
#ifndef SiteIConfigFiles
#define SiteIConfigFiles $(IRULESRC)/host.def
#define LocalConfigFiles host.def
#endif
*/


#ifdef BeforeVendorCF

/* #include <host.def> */

#ifndef HasGcc2
#define HasGcc2 YES
#endif

#endif /* BeforeVendorCF */


XCOMM platform:  $XConsortium: sun.cf /main/151 1996/02/02 18:59:56 gildea $

#ifdef SVR4Architecture
#ifdef i386Architecture
#ifndef OSName
#define OSName            SunOS 5.5 x86
#endif
XCOMM operating system:  OSName
#ifndef OSMajorVersion
#define OSMajorVersion    5
#endif
#ifndef OSMinorVersion
#define OSMinorVersion    4
#endif
#ifndef	OSTeenyVersion
#define OSTeenyVersion    0
#endif
#else
#ifndef OSName
#define OSName            SunOS 5.5
#endif
XCOMM operating system:  OSName
#ifndef OSMajorVersion
#define OSMajorVersion    5
#endif
#ifndef OSMinorVersion
#define OSMinorVersion    5
#endif
#ifndef	OSTeenyVersion
#define OSTeenyVersion    0
#endif
#endif
#else
#ifndef OSName
#define OSName            SunOS 4.1.3
#endif
XCOMM operating system:  OSName
#ifndef OSMajorVersion
#define OSMajorVersion    4
#endif
#ifndef OSMinorVersion
#define OSMinorVersion    1
#endif
#ifndef	OSTeenyVersion
#define OSTeenyVersion    3
#endif
#endif

/*
 * Compiler setup.  This sun.cf file knows what options to use with 
 * certain compilers, including Sun C, CenterLine C, and gcc.  It 
 * also understands how to set some of the options for various C++
 * compilers, including Sun C++ and CenterLine C++.
 *
 * === C Compiler Setup ==========================================
 *
 * For SunPro C, define HasSunC to YES in site.def.  
 * For CenterLine C, define HasCenterLineC to YES in site.def
 * For gcc or gcc2, define HasGcc or HasGcc2 to YES in site.def
 * For other compilers, define HasSunC to NO in site.def, then 
 *    provide appropriate values for the various compiler related
 *    configuration varibles used here.
 * 
 * If you say you have the SunPro C compiler, we assume you have 
 * version 2.0.x of the compiler.  If you have version 3.0.x instead, 
 * define CCompilerMajorVersion as 3 in site.def
 *
 * If you don't tell us which C compiler you have, we assume you have 
 * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc 
 * under SunOS 4.1.x
 *
 * === C++ Compiler Setup ==========================================
 *
 * For SunPro C++, define HasSunCplusplus to YES in site.def
 * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
 * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
 * For other compilers, define HasCplusplus to YES in site.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 3.0.x of the compiler.  If you have version 4.0.x instead, 
 * define CplusplusCompilerMajorVersion as 4 in site.def.
 *
 */

#define HasGcc2 YES

#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
#endif

#define XkbServerDefines  -DXKB_ALWAYS_USES_SOFT_REPEAT

#if OSMajorVersion > 4
#define BootstrapCFlags	  /* none needed */
#ifndef XawI18nDefines
#define XawI18nDefines    -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
#endif
#ifdef i386Architecture
#define StandardDefines	  -Dsun -Di386 -DSVR4 -D__i386
#define ToolkitStringsABIOptions	-intelabi
#else
#define StandardDefines	  -Dsun -DSVR4
#define ToolkitStringsABIOptions	-sparcabi
#endif
#define ExtraLibraries    -lsocket -lnsl
#if OSMinorVersion > 1
#define ThreadedX	  YES
#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 */
#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 || HasCenterLineC
#define PositionIndependentCFlags -Kpic
#endif
#if HasSunCplusplus || HasCenterLineCplusplus
#define PositionIndependentCplusplusFlags -pic
#endif
#else /* not OSMajorVersion > 4 */
#define InstKmemFlags	  -g kmem -m 2711
#include <sunLib.rules>
#endif /* OSMajorVersion > 4 (else) */

#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 */
#ifndef BuildPexExt
#define BuildPexExt	  (XsunServer || Xsun24Server)
#endif
#ifndef BuildXKB
#define	BuildXKB	  YES
#endif

#if HasGcc
# if OSMajorVersion > 4 && defined(i386Architecture)
#  ifndef DefaultCCOptions
#   if OSMinorVersion == 1
#    define DefaultCCOptions -DNO_ASM
#   else
#    define DefaultCCOptions -ansi -DNO_ASM
#   endif
#  endif
# endif
# if HasGcc2
#  ifdef i386Architecture
#   define OptimizedCDebugFlags -m486 -O2 -fno-strength-reduce
#  else
#   define OptimizedCDebugFlags -O2
#  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 */

#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

/* Set compiler-dependent options for CenterLine C */

#if HasCenterLineC
#ifndef	DefaultCCOptions
#define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
#endif
#ifndef NeedConstPrototypes
#define NeedConstPrototypes YES
#endif
#ifndef NeedNestedPrototypes
#define NeedNestedPrototypes YES
#endif
#ifndef NeedVarargsPrototypes
#define NeedVarargsPrototypes YES
#endif
#endif


#define PexCCOptions DefaultCCOptions

#endif /* HasGcc (else) */

#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
#ifdef AfterVendorCF

#define ProjectRoot /usr/local/X11R6.1

/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */
/* #define HasXdmAuth YES */

/* #define PreIncDir /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.3/2.6.0/include */

/*
#if defined(SunArchitecture) && defined(SparcArchitecture)
#define HasCodeCenter	YES
#ifndef SVR4Architecture
#define HasTestCenter	YES
#endif
#endif
*/

/*
#ifdef __hp9000s800
#define HasCodeCenter	YES
#endif
*/

/*
#if defined(SunArchitecture) && defined(SparcArchitecture) && !defined(SVR4Architecture)
#define HasPurify	YES
#endif
*/

/*
#define HasSentinel	YES
*/

/*
#undef DefaultUserPath
#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
*/


/* You do NOT need SetUID if you only run the server under xdm */
/* You MAY need SetUID if users run the server by hand or under xinit */
/* Consult your system administrator before making the X server setuid */
/*
#if defined(SunArchitecture) && OSMajorVersion > 4
#define InstallXserverSetUID YES
#endif
*/

/* You do NOT need SetUID if you only run the server under xdm */
/* You MAY need SetUID if users run the server by hand or under xinit */
/* Consult your system administrator before making the X server setuid */
/*
#ifdef XFree86Version
#define InstallXserverSetUID YES
#endif
*/

/* #include <host.def> */

#endif /* AfterVendorCF */
