XCOMM $XFree86: xc/config/cf/sco5.cf,v 3.20 2005/10/14 15:15:52 tsi Exp $

/*
 * Copyright (c) 1994-2004 by The XFree86 Project, Inc.
 * All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject
 * to the following conditions:
 *
 *   1.  Redistributions of source code must retain the above copyright
 *       notice, this list of conditions, and the following disclaimer.
 *
 *   2.  Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer
 *       in the documentation and/or other materials provided with the
 *       distribution, and in the same place and form as other copyright,
 *       license and disclaimer information.
 *
 *   3.  The end-user documentation included with the redistribution,
 *       if any, must include the following acknowledgment: "This product
 *       includes software developed by The XFree86 Project, Inc
 *       (http://www.xfree86.org/) and its contributors", in the same
 *       place and form as other third-party acknowledgments.  Alternately,
 *       this acknowledgment may appear in the software itself, in the
 *       same form and location as other such third-party acknowledgments.
 *
 *   4.  Except as contained in this notice, the name of The XFree86
 *       Project, Inc shall not be used in advertising or otherwise to
 *       promote the sale, use or other dealings in this Software without
 *       prior written authorization from The XFree86 Project, Inc.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

/*
 * This is for SCO Open Server 5.0.6A or later. You must have the
 * Execution Environment update (OSS646) installed on 5.0.6 (it
 * ships standard in 5.0.7 and later), as well as the Graphics,
 * Web and X11 (gwxlibs) package OSS631 installed, which also ships
 * standard with 5.0.7 and later.
 *
 * It is suggested that you use the GNU Development Tools for compiling
 * XFree86. Almost no testing has been done with the native development
 * system.
 */

#ifndef OSName
#define OSName                  UNIX System V/386 Open Server Release 5
#endif
#ifndef OSVendor
#define OSVendor                SCO-Group
#endif
#ifndef OSMajorVersion
#define OSMajorVersion          5
#endif
#ifndef OSMinorVersion
#define OSMinorVersion          0
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion          7
#endif

/*
 * Note: We define FD_SETSIZE here (as opposed to in ConnectionFlags) to
 * guarantee that the same FD_SETSIZE is used. Havoc abounds if we do not
 * do this, as some files which include sys/socket.h and sys/types.h will
 * have different values for FD_SETSIZE.
 *
 * Note 2: We also define _SVID3, as this seems to enable more Streams
 * based options which are closer to the "desired" state for X11. A by-
 * product of this is that we get better signals too.
 *
 * Note 3: We fool Xfree into thinking we have NCURSES. Thats becuase the
 * system curses is close enough for Xfree86's purposes. Actually xf86cfg
 * is poorly constructed, it should not depend on the NCURSES package but
 * rather on a "capable curses", of which NCURSES is just one.
 */

#if 1
#ifndef HasGcc2
# define HasGcc2		YES
#endif
#ifndef HasGcc2ForCplusplus
# define HasGcc2ForCplusplus	YES
#endif
#endif

/*
 * Although OpenServer does not currently have threads, there are plans
 * for it in the near future, and libc/libsocket are already thread
 * safe, so use -D_REENTRANT when compiling libraries so that if an
 * app that has either the new forthcoming threads, or one that uses
 * GNU PTH or FSU pthreads is linked against X, that the libraries are
 * safe at least with regards to things like errno and various _r functions.
 */
#ifndef LibraryCCOptions
# define LibraryCCOptions	-D_REENTRANT
#endif
	
#define StandardDefines		-DSYSV -Di386 -DSCO325 -D__SCO__ -DFD_SETSIZE=256 -D_NO_STATIC -DMAXPATHLEN=1024
#ifdef HasGcc2
# define DefaultCCOptions       GccWarningOptions
# define CcCmd			gcc
# define DefaultCDebugFlags	-O6 -fomit-frame-pointer -march=i586 -mcpu=i686
# define OptimizedCDebugFlags	-O6 -fomit-frame-pointer -march=i586 -mcpu=i686
#else
# define DefaultCCOptions	-dy
# define CcCmd			cc -belf
# define DefaultCDebugFlags	-O2
# define OptimizedCDebugFlags	-O2
#endif

#define	HasNCurses		YES
#define NCursesLibName		-lcurses

#define LogDirectory		/var/adm

#ifndef HasSymLinks
# define HasSymLinks            YES
#endif

#ifndef DoLoadableServer
# define DoLoadableServer	YES
#endif

#ifdef BuildDynamicLoading
# define SCODynamicFlags        -Wl,-Bexport
#else
# define SCODynamicFlags	/**/
#endif

#define AsmDefines		-D__ELF__ -D__PIC__
#define XawI18nDefines          -DHAS_WCHAR_H -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
#define ServerExtraSysLibs      $(CBRT) -lm -levent SCODynamicFlags
#define ExtraLibraries          -lsocket
#define NeedWidePrototypes      NO
#define ServerOSDefines         XFree86ServerOSDefines
#define ToolkitStringsABIOptions -intelabi
#define ThreadedX               NO
#define HasThreadSafeAPI        NO
#define HasNdbm                 YES
#define HasVFork                YES
#define HasPutenv               YES
#define HasSnprintf             YES
#define HasSetenv		NO
#define HasMkstemp		YES
#define ExecableScripts         YES
#define HasShadowPasswd         YES
#define ManSourcePath           $(MANPATH)/man
#define Malloc0ReturnsNull      YES
#define RemoveDSDENroffMacros   NO
#define CompressManPages        NO

#ifndef HasLibCrypt
# define HasLibCrypt            YES
# define SpecialLibCrypt        -lcrypt
#endif
#define PosixLibraries          /**/

#ifndef ForceNormalLib
# define ForceNormalLib         NO 
#endif

#define HasExpat		YES
#define HasFreetype2		YES
#define HasLibpng		YES
#define HasPerl			YES
#define HasPerl5		YES
#define HasDlopen		YES
#define HasShm			YES
#define HasStrcasecmp		YES
#define HasZlib			YES
#define HasFontconfig		YES

#define SharedLibXmu            YES
#define SystemV                 YES
#define LdCombineFlags          -r 

#define AvoidNullMakeCommand	YES
#define HasLdRunPath            YES
#define HasPoll                 YES
#define PatheticCpp		YES

#define HasGnuMake		YES

#define MesaUseX86Asm		NO

#define MakeNamedTargetSubdir(dir,flags,subname)\
	$(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname

#define ArCmdBase               ar
#define AsCmd                   CcCmd
#define CppCmd			/lib/cpp
#define PreProcessCmd		CppCmd
#define RawCppCmd		CppCmd

#ifdef HasGcc2
# define LdCmd                   CcCmd
# ifndef SharedLibraryLoadFlags
#  define SharedLibraryLoadFlags -shared
# endif
# undef LdCombineFlags
# define LdCombineFlags		-nostdlib -r
#else
# define LdCmd			/usr/ccs/bin/elf/ld
#endif

#define LexCmd                  /usr/gnu/bin/flex
#define MakeCmd	                /usr/gnu/bin/gmake
#define YaccCmd                 /usr/gnu/bin/bison -y
#define InstallCmd		/usr/gnu/bin/ginstall


#ifndef UseSeparateConfDir
#define UseSeparateConfDir	NO
#endif

#ifndef BuildHtmlManPages
#define BuildHtmlManPages	NO
#endif

#define DefaultUserPath         /bin:/usr/bin:$(BINDIR):/usr/bin/X11:/usr/gnu/bin:/usr/local/bin:/etc
#define DefaultSystemPath       /etc:/bin:/usr/bin:$(BINDIR):/usr/bin/X11

#define ConnectionFlags         -DLOCALCONN -DTCPCONN -DUNIXCONN 

/*
 * These settings control the interdependence of the shared libraries.
 * Mostly borrowed from darwinLib.tmpl.
 */
#ifndef FixupLibReferences
#define FixupLibReferences()						@@\
XMULIBONLY = -lXmu							@@\
XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
#endif

#ifndef XawClientLibs
#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(XLIB)
#endif

#define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)

#define SharedXfontReqs     $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB) $(XLIB)
#define SharedFontencReqs   $(LDPRELIB) GzipLibrary
#define SharedGLReqs        $(LDPRELIB) $(XLIB)
#define SharedGLUReqs       $(LDPRELIB) $(XLIB) $(GLXLIB)
#define SharedOSMesaReqs    $(LDPRELIB) $(XLIB) $(GLXLIB)
#define SharedSMReqs        $(LDPRELIB) $(ICELIB)
#define SharedX11Reqs       $(LDPRELIB) -lsocket
#define SharedXawReqs       $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
#define SharedXaw6Reqs      $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
#define SharedXcursorReqs   $(LDPRELIB) $(XRENDERLIB) $(XLIB)
#define SharedXextReqs      $(LDPRELIB) $(XONLYLIB)
#define SharedXiReqs        $(LDPRELIB) $(XLIB)
#define SharedXmuReqs       $(LDPRELIB) $(XTOOLLIB) $(XLIB)
#define SharedXmuuReqs      $(LDPRELIB) $(XONLYLIB)
#define SharedXpReqs        $(LDPRELIB) $(XLIB)
#define SharedXpmReqs       $(LDPRELIB) $(XLIB)
#define SharedXrandrReqs    $(LDPRELIB) $(XRENDERLIB) $(XLIB)
#define SharedXrenderReqs   $(LDPRELIB) $(XLIB)
#define SharedXtReqs        $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
#define SharedXtstReqs      $(LDPRELIB) $(XLIB)
#define SharedXvReqs        $(LDPRELIB) $(XLIB)
#define SharedDPSReqs       $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
#define SharedDPSTKReqs     $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
#define SharedOldXReqs      $(LDPRELIB) $(XONLYLIB)
#define SharedpsresReqs     $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
#define SharedXResReqs	    $(LDPRELIB) $(XLIB)
#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
#define SharedXineramaReqs  $(LDPRELIB) $(XLIB)
#define SharedXssReqs	    $(LDPRELIB) $(XLIB)
#define SharedXvMCReqs	    $(LDPRELIB) $(XLIB)
#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
#define SharedXxf86vmReqs   $(LDPRELIB) $(XLIB)
#define SharedxkbfileReqs   $(LDPRELIB) $(XONLYLIB)
#define SharedxkbuiReqs	    $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
#define SharedXReqs         $(XTOOLLIB) $(XPLIB) $(XLIB)
#define SharedXmReqs        $(LDPRELIB) SharedXReqs
#define SharedMrmReqs       $(LDPRELIB) $(XMLIB) SharedXReqs
#define SharedUilReqs       $(LDPRELIB) $(XMLIB) SharedXReqs

#define ObjectFromAsmSource(src,flags)					@@\
									@@\
src.o: src.S								@@\
	RemoveFile(src.o)						@@\
	$(CC) -c AsmDefines $(ALLDEFINES) flags src.S

#include <scoLib.rules>  /* minor changes to sv4Lib.rules */
#include <sv4Lib.rules>

#include <xfree86.cf>
