XCOMM platform:  $XFree86: xc/config/cf/cygwin.cf,v 3.34 2001/12/10 16:22:37 alanh Exp $

#ifndef OSName
#define OSName                  Cygwin
#endif
#ifndef OSVendor
#define OSVendor                Red Hat Inc.
#endif
#ifndef OSMajorVersion
#define OSMajorVersion          1
#endif
#ifndef OSMinorVersion
#define OSMinorVersion          3
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion		6
#endif

#define ProjectRoot 		/usr/X11R6

#define BuildServer		YES

#ifndef UnixCpp
#define UnixCpp
#endif

#define HasGcc2ForCplusplus     YES
#define GccUsesGas              YES
#define UseGas                  YES
#define GnuCpp                  YES

#if !CrossCompiling
#define BootstrapCFlags		-L/lib/automode.o
#endif

#define ExtraLoadFlags		-Wl,--enable-auto-import

#define HasShadowPasswd         NO
#define HasLibCrypt             YES
#define HasPutenv               YES
#define HasPoll			NO
#if UseCygIPC
# define HasShm			YES
# define ServerExtraSysLibs	-lcygipc
#else
# define HasShm                 NO
# define ServerExtraSysLibs	/**/
#endif
#define HasSnprintf		YES

/*
 * Cygwin has Tcl/Tk, but you need to keep the version numbers
 * of the libs in sync.  These version numbers may change
 * occassionally.
 */
#define Hastcl                  YES
#define Hastk                   YES
#define TclLibName              tcl80
#define TkLibName               tk80

#define HasSockets              YES
#define GzipFontCompression	YES
#define HasZlib			YES
#define GzipLibrary             -lz.dll

/* We don't need -lm */
#define MathLibrary             /**/

/*
 * /lib/libtermcap.a doesn't have tgetent, which is needed for
 * xc/programs/xterm/resize.exe
 */
#define TermcapLibrary -lncurses.dll

#define AvoidNullMakeCommand    YES
#define StripInstalledPrograms  YES
#define CompressAllFonts        YES
#define Malloc0ReturnsNull      NO
#define NeedConstPrototypes     YES
#define NeedFunctionPrototypes  YES
#define NeedNestedPrototypes    YES
#define NeedVarargsPrototypes   YES
#define NeedWidePrototypes      NO
#define SetTtyGroup             YES
#define ExpandManNames          NO
#define HasDlopen	        NO
#define HasGnuMake		YES
#define UseGccMakeDepend	NO
#define ThreadedX               YES
#define HasThreadSafeAPI        YES
#define CaseSensitiveFileSystem NO

#define LnCmd                   ln -s
#ifndef CcCmd
#define CcCmd                   gcc
#endif /* CcCmd */
#ifndef CplusplusCmd
#define CplusplusCmd		g++
#endif /* CplusplusCmd */
#ifndef AsCmd
#define AsCmd                   as
#endif /* AsCmd */
#define GccGasOption	        -DGCCUSESGAS
#define AsmDefines	        -DUSE_GAS -DGCCUSESGAS
#ifndef LdCmd
#define LdCmd                   ld
#endif /* LdCmd */
#define MkdirHierCmd            mkdir -p
#ifndef CppCmd
#define CppCmd                  cpp
#endif /* CppCmd */
#ifndef YaccCmd
#define YaccCmd                 byacc
#endif /* YaccCmd */
#define LexCmd                  flex -l
#define LexLib                  -lfl
#define HasFlex			YES

#define PreProcessCmd           CcCmd -E

#ifndef PostIncDir
#define PostIncDir              `CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`
#endif
#ifndef ExtraIncDir
#define ExtraIncDir		/usr/include/w32api
#endif

#define LdCombineFlags          -r

/* We don't define -ansi yet as newlib (which is cygwin's library) doesn't
 * define some needed prototypes when -ansi is set, when that's fixed
 * we can remove these lines and use the default XFree86 options. */
#ifndef DefaultCCOptions
# define DefaultCCOptions /* -ansi -pedantic */ GccWarningOptions
#endif

# ifndef OptimizedCDebugFlags
#  define OptimizedCDebugFlags	DefaultGcc2i386Opt
# endif

#define StandardDefines         -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE -D_X86_ -D__STDC__ -DNO_TCP_H -D__CYGWIN__ -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE

#define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
#define HasWChar32              YES
#define StandardCppOptions	-traditional
#if UseCygIPC
# if ThreadedX
#  define StandardCppDefines      -DHAS_THREADS -DHAS_SHM StandardDefines
# else
#  define StandardCppDefines      -DHAS_SHM StandardDefines
# endif
#else
# if ThreadedX
#  define StandardCppDefines      -DHAS_THREADS StandardDefines
# else
#  define StandardCppDefines      StandardDefines
# endif
#endif
#define ServerOSDefines         XFree86ServerDefines -DDDXTIME -DFD_SETSIZE=256 -DDDXOSINIT -DDDXOSVERRORF -DDDXOSFATALERROR
#define XkbServerDefines        -DXKB_ALWAYS_USES_SOFT_REPEAT
#define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines
#define ConnectionFlags         -DTCPCONN -DUNIXCONN
#define ExtraLibraries          
#define InstUidFlags            -m 4711
#define UseRgbTxt               YES
#define ExtraFilesToClean	*.obj *.orig *.rej junk.c *.exe *.dll *.lib *~

/*
 * You'll probably want BuildDebug to be YES if you are debugging :)
 */
#define BuildDebug		NO
#define XFree86Devel		NO

/*
 * Xinerama is multiple monitor support and will require special code,
 * if it even makes sense to enable such a beast in Cygwin/XFree86.
 */
#define BuildXinerama		NO

/*
 * PEX and XIE were deprecated on 2001-05-29, as Keith Packard says,
 * "they are so broken as to be unusable in real applications," furthermore,
 * "neither PEX nor XIE have seen any development for almost a decade".
 * 
 * XIE is the X Image Extension Protocol, not to be confused with
 * XInputExt, which is the X Input Extension.
 */
#define BuildPexExt		NO
#define BuildXIE		NO

/*
 * Rush is a non standard extension for cooperation between the glide
 * library and the X server.  Cygwin/XFree86 will never need Rush,
 * as all graphics requests are processed through GDI or DirectDraw.
 */
#define BuildXF86RushExt	NO

/*
 * DPMS is the Display Power Management System.  Cygwin/XFree86 doesn't
 * own the display hardware, Windows does, so it doesn't make sense
 * for Cygwin/XFree86 to try to provide power management.
 */
#define BuildDPMS		NO
#define BuildDPMSExt		NO
#define DPMSDefines		/**/

#define BuildGlxExt             YES
#define BuildXInputExt		YES
#define BuildXF86VidModeExt     YES
#define BuildXF86DGA		NO	/* No direct access to hardware */
#define BuildXvExt		YES
#define BuildXF86MiscExt	NO
#define BuildRender		YES
#define BuildRandR		YES
#define BuildXF86DRI		NO	/* No direct access to hardware */
#define BuildXF86DRM		NO	/* No direct access to hardware */
#define BuildXKB		YES
#define BuildXCMiscExt		YES
#define BuildTestExt		YES
#define BuildMITMiscExt		YES
#define BuildSyncExt		YES
#define BuildBigReqsExt		YES
#define BuildEVI		YES
#define BuildXF86BigfontExt	YES
#define BuildRECORD		YES
#define BuildDBE		YES
#define BuildFontCache		YES
#define BuildLBX		YES
#define BuildCup		YES
#define BuildXCSecurity		YES
#define BuildAppgroup		YES
#define BuildShapeExt		YES
#define BuildScanpci		NO	/* No direct access to hardware */

#define BuildScreenSaverExt	NO

/*
 * What is Plugin?
 */
#define BuildPlugin		NO

/*
 * DPS is the Adobe Display Postscript (r) library.
 * It seems that we do not yet have a postscript client library
 * to work in conjunction with DPS; the remedy to this may be
 * as simple as flipping a build switch or instaling Ghostscript.
 * In any case, some work needs to be done before DPS will work. 
 */
#define BuildDPS		NO

/*
 * Doing a loadable server would probably take some extra work.
 */
#define DoLoadableServer	NO

/*
 * Don't build the XFree86 server
 */
#define XF86Server		NO

/*
 * Try to avoid building anything related to graphics cards
 */
#define XFShadowFB		NO
#define XF24_32Bpp		NO
#define XF8_16Bpp		NO
#define XF8_32Bpp		NO
#define XF4Bpp			NO
#define XF1Bpp			NO
#define XF86VgaHw		NO
#define XF86FBDevHw		NO
#define XF86XAA			NO
#define XF86Ramdac		NO
#define XF86I2C			NO
#define XF86DDC			NO
#define XF86RAC			NO
#define XF86Int10		NO

#define XF86AFB			NO

#define XF86CardDrivers		/**/


/*
 * These man rules were ganked from linux.cf, verbatim.
 * I am not convinced that we need them.
 */
#if 0
/* Some of these man page defaults are overriden in the above OS sections */
#ifndef ManSuffix
# define ManSuffix      1x
#endif
#ifndef ManDir
# define ManDir         $(MANSOURCEPATH)1
#endif
#ifndef LibManSuffix
# define LibManSuffix   3x
#endif
#ifndef LibmanDir
# define LibmanDir      $(MANSOURCEPATH)3
#endif
#ifndef FileManSuffix
# define FileManSuffix  5x
#endif
#ifndef FileManDir
# define FileManDir     $(MANSOURCEPATH)5
#endif
#endif

/* Server build rules */
#define XnestServer			YES
#define BuildXprint			YES
#define XprtServer			YES
#define XVirtualFramebufferServer	YES
#define XWinServer			YES

/*
 * 2001-06-19 - SmartScheduler is terribly slow on Cygwin.  It causes
 * visible delays in updating of windows, cursor position, etc.
 */
#define UseSmartScheduler		NO

/*
 * --unix option of Cygwin make fools the standard MakeFlagsToShellFlags macro
 */
#define MakeFlagsToShellFlags(makeflags,shellcmd) \
	for flag in ${MAKEFLAGS} ''; do \				@@\
	  case "$$flag" in *=*) ;;--*) ;; *[makeflags]*) shellcmd;; esac; done

#include <cygwin.rules>
#include <xfree86.cf>
