/**/#	$Source: /afs/sipb.mit.edu/project/sipb-athena/repository/src/moira/config/config.Imakefile,v $
/**/#

/* 
 * Configuration options.
 */

/* GLOBAL_CDEFS are passed to every C compile statement */
/* Here are some of the common definitions which you might add to GLOBAL_CDEFS:
 *	HESIOD - use hesiod lookup Moira server name
 *	ZEPHYR - report critical errors via Zephyr
 *	SYSLOG42 - report critical errors via 4.2BSD-style syslog routines
 *	ATHENA - Athena-local hacks other sites probably don't want
 *	GDSS - use the generic data signature service to verify user info
 *	DBMS=xxx - currently supported is INGRES, INFORMIX, ORACLE
 *	ULTRIX022 - if you are running on pre-3.0 Ultrix.
 *	SunOS=xx - if you are running SunOS.  Set xx to 10 times the release
 *		number (e.g. SunOS 3.5 => -DSunOS=35, SunOS 4.0 => -DSunOS=40)
 *	NO_GETUSERSHELL - if your system doesn't have getusershell() in libc
 *		(type 'nm /lib/libc.a | grep getusershell', if something
 *		 shows up, you should NOT turn this flag on)
 */

#if defined(linux) && defined(__ELF__)
#define USE_NCURSES
#endif

/* Curses library */
#ifdef SOLARIS
CURSES= -L/usr/css/lib -lcurses -ltermcap
#elif defined(USE_NCURSES)
CURSESINC= -I/usr/include/ncurses
CURSES= -lncurses -ltermcap
#else
CURSES= -lcurses -ltermcap
#endif

#ifdef _AIX
OSDEFS=-D_BSD -D_BSD_INCLUDES -DPOSIX
OSLIBS=-lbsd
CURSES=-lcurses
#endif

#if defined(SOLARIS)
OSDEFS= -DPOSIX -DSOLARIS -I/usr/openwin/include
OSLIBS= -L/usr/ccs/lib -lcurses -ltermcap -lresolv \
	-lsocket -lnsl -lc /usr/ucblib/libucb.a -lelf -ldl
CURSES= 
/* the curses and termcap libs are where they are on purpose. -vrt 4/28/93
 */
#endif

#if defined(linux)
OSDEFS= -DPOSIX
/* #define DONT_DO_LD */
#endif

#ifdef NeXT
OSLIBS= -lresolv
#endif


GLOBAL_CDEFS= -DHESIOD -DZEPHYR -DATHENA -DDBMS=INGRES $(OSDEFS)


/* SRCTOP is the root of the Moira source tree */
SRCTOP=/afs/sipb/project/sipb-athena/moira

/* DESTDIR is the root of the tree to install into.  
 * If null, install into the running system.
 *
 * DESTDIR='/' is guaranteed to cause trouble for systems which don't
 * like double slashes in pathnames.
 *
 * All the installed programs and files are put into ${DESTDIR}/wherever, e.g.
 * kinit would get installed into ${DESTDIR}${PROGDIR}/kuser
 */

DESTDIR= 

/*
 * These directories should be subdirectories of DESTDIR;
 * they show up as absolute pathnames here.
 */
/*
 * Note: USRDIR should be the parent of most of these directories.
 * If it is not, you may get errors when installing (the installation
 * process attempts to create USRDIR, in order to assure that all the
 * parents of these directories exist.
 */
USRDIR= /usr
ETCDIR= /usr/athena/etc
PROGDIR=/usr/athena/bin
LIBDIR= /usr/athena/lib
LINTLIBDIR = /usr/lib/lint
INCLDIR= /usr/athena/include
MANDIR= /usr/athena/man


/*
 * Define SVRBUILD if this machine has your DBMS installed on it so
 * that the server programs can be built which link against the DBMS
 * libraries.
 */
/* #define SVRBUILD */

/* Define USELOCALTOOLS if you already have built and installed in
 * your environment the following tools:
	imake
	makedepend
 */
#define USELOCALTOOLS

/* Define USELOCALLIBS if you already have built and installed in
 * your environment the following libraries and associated tools:
	ss
	com_err
 */
#define USELOCALLIBS

/*
 * Define HESIOD if you have hesiod installed on your system and want
 * to use it for the Moira clients to find the Moira server.
 */
#define HESIOD

/*
 * Define ZEPHYR if you have zephyr installed on your system and want
 * to use it to report Moira server errors.  Also define the library
 * to link against.
 */
#define ZEPHYR
LZEHPYR=-lzephyr

/*
 * Define GDSS if you use the Generic Data Signature Service to 
 * stamp user records to guarentee their authenticity.  Also define
 * location of library and includes.
 */
#ifdef GDSS
GDSSLIB= /mit/gdss/`machtype`/libgdss.a
GDSSINC= -I/mit/gdss/include -DGDSS
#endif

/*
 * Define your DBMS here.  Currently, the code will work with either
 * INGRES or INFORMIX.
 */
#define INGRES

/*
 * Define NEED_STRCASECMP if you don't have strcasecmp() in your libc.
 * (likely for older 4.3 systems and pre-4.3 systems)
 */
/* #define NEED_STRCASECMP */

/*
 * Define USELINT if you want to build lint libraries while building
 * Moira.
 */
#if !defined(NeXT) && !defined(_AIX) && !defined(SOLARIS) && !defined(linux) && !defined(__NetBSD__)
#define USELINT
#endif

/*
 * LINTLIBFLAG should be the flag used to tell lint to create a lint
 * library.  On most BSD systems, this is -C
 */
#if defined(ultrix) || defined(_AIX)
LINTLIBFLAG=-o
#else
LINTLIBFLAG=-C
#endif

MR_LIB=$(BUILDTOP)/lib/libmoira.a
MR_LIBDEP=$(MR_LIB)
MR_LINTLIB=$(BUILDTOP)/lib/llib-lmoira.ln
GDB_LIB=$(BUILDTOP)/gdb/libmrgdb.a
GDB_LIBDEP=$(GDB_LIB)
GDB_LINTLIB=$(BUILDTOP)/gdb/llib-lmrgdb.ln


/*
 * The name of a command which compiles error tables.
 */
#ifdef USELOCALLIBS
COMPILE_ET= compile_et
#else
COMPILE_ET= $(BUILDTOP)/util/et/compile_et
#endif
/*
 * Loader argument to get the com_err library
 */
#ifdef USELOCALLIBS
COM_ERR = -lcom_err
#else
COM_ERR = $(BUILDTOP)/util/et/libcom_err.a
#endif
/*
 * Dependency name for COM_ERR, if any
 */
#ifndef USELOCALLIBS
COM_ERR_DEP = $(COM_ERR)
#endif
/*
 * The name of a command which compiles command tables.
 */
#ifdef USELOCALLIBS
MAKE_COMMANDS= mk_cmds
#else
MAKE_COMMANDS= $(BUILDTOP)/util/ss/mk_cmds
#endif
/*
 * Loader argument to get the ss library
 */
#ifdef USELOCALLIBS
SS_LIB = -lss
#else
SS_LIB = $(BUILDTOP)/util/ss/libss.a
#endif
/*
 * Dependency name for SS_LIB, if any
 */
#ifndef USELOCALLIBS
SS_LIBDEP = $(SS_LIB)
#endif

LLIB = -L/usr/athena/lib

/* libraries most Moira programs use */
#ifdef HESIOD
CLIBS= $(MR_LIB) $(GDB_LIB) $(LLIB) $(LZEPHYR) $(COM_ERR) -lkrb -ldes -lhesiod
#else
CLIBS= $(MR_LIB) $(GDB_LIB) $(LLIB) $(LZEPHYR) $(COM_ERR) -lkrb -ldes
#endif

/* libraries SQL programs need */
#ifdef INGRES
SQL_LIB= /usr/ingres/lib/libingres.a -lm
#endif
#ifdef INFORMIX
SQL_LIB= /usr/informix/lib/libsql.a
#endif
#ifdef ORACLE
SQL_LIB= /usr/oracle/lib/#########
#endif


/* Define NEED_STRCASECMP if your C library doesn't have the BSD-style
 * case insensitive string compare strcasecmp().
 */
#ifdef _AIX
#define NEED_STRCASECMP
#endif

/* HAS_VSPRINTF should be defined if this function is in your C library */
#if defined(_AIX) || defined(sun) || defined(_AUX_SOURCE) || defined(linux) || defined(__NetBSD__)
#define HAS_VSPRINTF
#else
#undef HAS_VSPRINTF
#endif

/*
 * Define DEBUG_LIBS if you want to create versions of the libraries
 * that have useful debugging information (the default rules will strip
 * out extra symbols, including debugging symbols, from the symbol
 * table.)  NOTE:  This only works if you do NOT turn on PROFILED_LIBS
 * below.
 * NOTE:  this doesn't turn on the debugging flag for your compiler; do
 * that with the DBG make variable, below.
 */
/* #define DEBUG_LIBS */

/*
 * Define PROFILED_LIBS if you want to create profiled versions of the
 * libraries used in Kerberos
 */
/* #define PROFILED_LIBS */

/*
 * Define PROF_FLAG to be the flag to be passed to your C compiler to
 * turn on profiling.
 */
#ifdef vax
#define PROF_FLAG -pg
#else
#define PROF_FLAG -p
#endif 

/*
 * The name of a command which builds an object library.
 */
ARCHIVE= ar cru
/*
 * The name of another program needed to post-process the archive.
 */
#ifdef SOLARIS
RANLIB= /bin/true
#else
RANLIB= ranlib
#endif


/* 
 * Install commands:  installs a file into the destination tree.
 * These commands are called with two arguments: the source and the
 * destination of the install.
 */
/* install a file */
INSTALLFILE= install -c -m 444
/* install a library */ 
INSTALLLIB= install -c -m 444
/* install a program */
INSTALLPROG= install -c -s -m 555 
/* invoke raw install program */
INSTALLRAW= install

LD=ld			/* The name of the target's linker */

AS=as			/* The name of the target's assembler */

LINT=lint		/* The name of `lint' */

#ifdef SOLARIS
CC=gcc -traditional
#else
#ifdef _AIX
#ifdef i386
CC=cc -q -D_BSD -DBSD_INCLUDES
#else /* i386 */
CC=cc -D_BSD -D_BSD_INCLUDES	/* Use BSD style header files & be quiet */
#endif /* i386 */
#else /* _AIX */
CC=cc			/* The name of the C compiler for the target */
#endif /* _AIX */
#endif /* SOLARIS */

CCRO=$(CC) -R		/* Compile with initialized data read-only 
			   & shared (if possible) */

HCC=$(CC)		/* The name of the C compiler on _this_
			 * machine
			 */

CPP=$(CC) -E		/* A command which invokes the C preprocessor */

#ifndef _AIX		/* RS6K optomizer is buggy, we don't know if it wall affect moira */
DBG=-O			/* Debug or optimize? */
#endif /* _AIX */

HCFLAGS=$(CFLAGS)

TAGGER=etags		/* Program to index source files */

MAKE=make		/* name of make program */
RM=rm -f		/* delete one or more files/directories/links */
MV=mv			/* rename/move a file */
CP=cp			/* copy a file */
LN=ln -s		/* create a link */
LPR=lpr -p		/* print a file or files */
CHMOD=chmod		/* change mode of a file */
AWK=awk			/* used to filter embeded SQL files */
