/* redeclare 'vax', 'sgi', 'sun', etc., 
   to help minimize name space collisions */

#ifdef vax
#define VaxArch 1
#undef vax
#endif

#ifdef sun
#define SunArch 1
#undef sun
#endif

#ifdef sparc
#define SparcArch 1
#undef sparc
#endif

#ifdef sgi
#define SgiArch 1
#undef sgi
#endif

#ifdef linux
#define LinuxArch 1
#undef linux
#endif

/* XXX XXX XXX the ibm cpp for imake does not define _AIX */
#if !defined(SunArch) && !defined(VaxArch) && !defined(SgiArch) && !defined(LinuxArch)
#define AixArch 1
#endif

/* Definitions for the target system:
 */

#ifdef uVaxConfig
#define TargetSystem "uVAX_CFG"
#endif
#ifdef Sun4Config
#define TargetSystem "SUN4_CFG"
#endif
#ifdef SgiConfig
#define TargetSystem "SGI_CFG"
#endif
#ifdef LinuxConfig
#define TargetSystem "LINUX_CFG"
#endif
#ifdef SimonlyConfig
#define TargetSystem "SIMONLY_CFG"
#endif
#ifndef TargetSystem
#define SimonlyConfig YES
#define TargetSystem "SIMONLY_CFG"
#endif

/* Don't build moper code unless told to: some sites might not use
   the moper code, and others might not have a Xcompiler. */
#ifndef BuildMoperCode
#define BuildMoperCode NO
#endif

/* Assume no auxiliary CPUs. */
#ifndef NumberOfAuxCpus
#define NumberOfAuxCpus	0
#endif

/* Many vendors don't believe in supplying Fortran by default :-( */
#ifndef HasFortran
#define HasFortran NO
#endif

#if HasFortran
#ifndef FortranCmd
#define FortranCmd f77
#endif
#ifndef FortranLibs
#define FortranLibs -lF77
#endif
#endif

/* Assume we have a fair amount of memory on the host, unless this
   is a VAX system. */
#ifndef HostExportSize
#ifdef VaxArch
#define HostExportSize 0x40000
#else
#define HostExportSize 0x80000
#endif
#endif
#ifndef AuxExportSize
#define AuxExportSize 0x40000
#endif

/* These things are used only by SGI systems, at the moment. We
   really should do this using the CPU include file, but the
   information in these doesn't appear to be correct. */

#ifndef HostIOPageBase
#ifdef SgiArch
#define HostIOPageBase 0xbd000000	/* Take a WAG */
#else
#define HostIOPageBase 0
#endif
#endif

#ifndef HostBusBase
#ifdef SgiArch
#define HostBusBase 0xbc000000		/* Take another WAG */
#else
#define HostBusBase 0
#endif
#endif

#ifndef CcCmd
#define CcCmd cc
#endif

#ifndef FpuOption
#if (defined(SunArch) && !defined(SparcArch))
#define FpuOption -f68881
#else
#define FpuOption
#endif
#endif

#ifndef StripInstalledPrograms
#define StripInstalledPrograms YES
#endif

#ifndef CcOptions
#ifdef SgiArch
#define CcOptions -signed -float -prototypes -O0
#endif
#ifdef AixArch
#define CcOptions -qchars=signed
#endif
#ifdef SunArch
#define CcOptions -fsingle
#endif
#ifdef VaxArch
#define CcOptions -fsingle
#endif
#ifdef LinuxArch
#define CcOptions 
#endif
#ifndef CcOptions
#define CcOptions
#endif
#endif

#ifndef CcDefines
#ifdef SgiArch
#define CcDefines -D_BSD_COMPAT
#endif
#ifdef AixArch
#define CcDefines -DNO_PROTOTYPES -Dconst=
#endif
#ifdef LinuxArch
#define CcDefines 
#endif
#ifdef SunArch
#define CcDefines -DNO_PROTOTYPES -Dconst=
#endif
#ifdef VaxArch
#define CcDefines -Dvoid=int -DNO_PROTOTYPES -Dconst=
#endif
#ifndef CcDefines
#define CcDefines
#endif
#endif

#ifndef CcInclude
#define CcInclude
#endif

#ifndef UnixSystemDir
#ifdef uVaxConfig
#define UnixSystemDir "sys.uVAX"
#endif
#ifdef Sun4Config
#define UnixSystemDir "sys.Sun4"
#endif
#ifdef SgiConfig
#define UnixSystemDir "sys.SGI"
#endif
#ifndef UnixSystemDir
#define UnixSystemDir "/sys"
#endif
#endif

#ifndef XcompileDir
#ifdef VaxArch
#define XcompileDir "Xcompile.uVAX"
#endif
#ifdef SparcArch
#define XcompileDir "Xcompile.Sun4"
#endif
#if (defined(SunArch) && !defined(SparcArch))
#define XcompileDir "Xcompile.Sun3"
#endif
#ifdef SgiArch
#define XcompileDir "Xcompile.SGI"
#endif
#ifdef AixArch
#define XcompileDir "Xcompile.AIX"
#endif
#ifndef XcompileDir
#define XcompileDir "undefined"
#endif
#endif

#ifndef DefaultRobotName
#define DefaultRobotName "puma560"
#endif

#ifdef HasX11Lib
#ifndef X11LibSpec
#define X11LibSpec -lX11
#endif
#endif

#ifdef HasGLGraphics
#ifndef GLLibSpec
#define GLLibSpec -lgl
#endif
#endif

#ifndef HasSunView
#if SunArch
#define HasSunView YES
#else
#define HasSunView NO
#endif
#endif

#if VxWorksConfig
#undef MakeDependCmd
#define MakeDependCmd $(CC) -M
#else
#ifndef MakeDependCmd 
#if AixArch
#define MakeDependCmd $(BDIR)/makedepend -I$$RCCL/h
#else
#define MakeDependCmd $(CC) -M -I$$RCCL/h 
#endif
#endif
#endif

#if LinuxArch
#undef MakeDependCmd
#define MakeDependCmd $(CC) -MM -I$$RCCL/h
#endif

#ifndef PackDependCmd
/* XXXX fix later !!! XXX */
#if VxWorksConfig
#define PackDependCmd cat
#else
#define PackDependCmd $(BDIR)/packdeps
#endif
#endif

#define RanlibCmd ranlib

#if SgiArch
#undef RanlibCmd
#endif

#if SgiConfig
#define SetUidOnRciBins YES
#endif

#ifndef HasNroff
#if SgiArch
#define HasNroff NO
#else
#define HasNroff YES
#endif
#endif

/* Defaults for vxWorks systems: */

#if VxWorksSupport

#ifndef VxWorksVersion
#define VxWorksVersion VXWORKS_V5
#endif

#ifndef VxwHostExportSize
#define VxwHostExportSize 0x20000
#endif

#ifndef VxwCcCmd
#define VxwCcCmd cc
#endif

#ifndef VxwLdCmd
#define VxwLdCmd ld
#endif

#ifndef VxwCcInclude
#define VxwCcInclude -I/local/vw/h
#endif

#ifndef VxwCcOptions
#define VxwCcOptions -f68881 -fsingle
#endif

#ifndef VxwCcDefines
#define VxwCcDefines -DNO_PROTOTYPES -Dconst=
#endif

#ifndef VxwHostIOPageBase
#define VxwHostIOPageBase 0xffff0000
#endif

#ifndef VxwHostBusBase
#define VxwHostBusBase	  0xfe000000
#endif

#endif /* VxWorksSupport */
