/*
 * BSD 4.3
 */
#if (defined(vax) && !defined(ultrix)) || defined(ibm032)
#define LintCFlag -C
#define ProfCcFlags -pg
#endif

#if defined(vax) && !defined(ultrix)
#define AnsiCcCmd gcc -pipe
#define AnsiLdCmd gcc -pipe
#endif

#ifdef ibm032
#define AnsiCcCmd cc -Hon=read_only_strings
#endif


/*
 * DEC ULTRIX
 */
#if defined(ultrix) && defined(mips)
#define LintFlags -DPOSIX
#define CcFlags LintFlags
#endif


/*
 * IBM AIX
 */
#if defined(_AIX) && defined(_IBMR2)

#ifdef _AIX32
#define ARBinDir /usr/bin/athena
#endif

#define BsdLibs -lbsd
#define BsdFlags -D_BSD
#define LdLibs BsdLibs
#define LintFlags BsdFlags -DAIXV=AIXV -DPOSIX
#define NOLINT
#define CcFlags LintFlags
#define AnsiCcCmd	xlc -qro -D_ALL_SOURCE
#define CcCmd		xlc -qlanglvl=extended -D_ALL_SOURCE

#if !defined(UseInstalled) || defined(UseSharedLibs)
#define LdPath -L$(ATHLIBDIR)/shared -L$(ATHLIBDIR)

#define static_program(prog,objs,ldflags,libs)				@@\
all::	prog								@@\
prog::	objs								@@\
	$(LD) ldflags $(LDFLAGS) -o prog objs -L$(ATHLIBDIR) libs $(LDLIBS) @@\
clean::									@@\
	$(RM) prog
#endif

#endif	/* _AIX */

/* 
 * Alpha running OSF
 */
#if defined(__alpha)
#define RanlibCmd		ar -tsl
#define LintLibFlag    	        -o
#define LintOpts       	        -ax
#define LintFlags -DPOSIX -xv -std
#define CcFlags -DPOSIX -std1
/* Until I can install somewhere useful */
#define NOLINT
#endif

/*
 * MAC A/UX
 */
#ifdef _AUX_SOURCE
#define NOLINT
#define RanLibCmd \:

/* We do not use -ZP as this undefines all other symbols which can
 * cause the system header files to break.
 */
#define LintFlags -DPOSIX -D_POSIX_SOURCE -D_BSD_SOURCE
#define CcFlags LintFlags
#define LdLibs -lposix
#endif

/*
 * Sun Solaris
 */

#if defined(sun) && defined(sparc) && defined(__svr4__)
#define NOLINT
#define LintFlags  -DSOLARIS -DSYSV -DPOSIX 
#define ProfCcFlags -pg
#define CDebugFlags -O2
#define CcFlags LintFlags -I/usr/openwin/include
#define LdPath -L/usr/gcc/lib -L/usr/ccs/lib -L/usr/openwin/lib -L$(ATHLIBDIR)
#define LdLibs /usr/athena/lib/libresolv.a -lsocket -lnsl -lc /usr/ucblib/libucb.a -lelf -ldl
#define CcCmd cc
#define LdCmd cc
#define AnsiCcCmd cc
#define AnsiLdCmd cc
#define RanLibCmd \:
#define AfsDir /usr/transarc
#endif


/*
 *  i386 LINUX
 */
#ifdef linux
#define LintFlags -DPOSIX
#define CcFlags LintFlags
#define BsdFlags -I/usr/include/bsd -D_BSD_SOURCE
#define BsdLibs -lbsd
#define NOLINT
#define NoAFS
#endif

/*
 *  NetBSD
 */
#ifdef __NetBSD__
#define NOLINT
#define AfsDir /usr/athena
#endif

/*
 * AFS configuration
 */
#if !defined(AfsDir) && !defined(NoAFS)
#ifdef UseInstalled
#define AfsDir /mit/afsuser/@sys
#else
#define AfsDir $(TOP)/third/common/afs/@sys/dest
#endif
#endif
