# @(#) $Id: template,v 1.20 1992/09/06 01:09:30 tron Exp $
#
# template - template for operating system configuration description
#
# NOTE: variables come in two basic types: lists and simple variables.
# Lists are : or white-space-separated lists of strings (ususally
# just names), though some lists have specific constraints on separation
# characters.  Simple variables have only one value.
#
# The EDITME file can be used to override any simple variable defined
# in this file.  The EDITME file can be used to add to list variables.

# OSNAMES(list) - names for this operating system
#
# This is a colon-separated list of names which generally, or specifically
# define the operating system that smail will be executed under.
#
# The following names should be used where applicable:
#
#	UNIX_BSD4_1	- the 4.1 release of Berkeley UNIX
#	UNIX_BSD4_2	- the 4.2 or 4.3 release of Berkeley UNIX
#	UNIX_BSD4_3	- the 4.3 release of Berkeley UNIX
#	UNIX_BSD	- any release of Berkeley UNIX after 4.1
#	UNIX_SYS5_2	- release two of AT&T System V
#	UNIX_SYS5_3	- release three of AT&T System V
#	UNIX_SYS5	- any release of AT&T System V
#	UNIX_SUN_OS_3	- SunOS 3.x, greater than 3.2 (also set 4.2BSD)
#	UNIX_SUN_OS_4	- SunOS 4.x (also set 4.2 and 4.3BSD)
#	UNIX_SUN_OS	- any release of SunOS
#	UNIX_UTS_1	- Amdahl UTS/580 1.x
#	UNIX_UTS_2	- Amdahl UTS/580 2.x
#	UNIX_UTS	- Any release of UTS/580
#	UNIX_V7		- Bell Labs UNIX Release 7
#	UNIX		- Any release of UNIX
#	POSIX_OS	- Any POSIX P1003.1-conformant UNIX system

OSNAMES="UNIX"


# LOCKING_PROTOCOL(variable) - macros for efficient file locking
#
# Define macros for performing high-performance locking on files
# These should include the following macros:
#
#	lock_fd		- given a file descriptor, either lock the
#			  file for exclusive access without blocking
#			  and return SUCCEED or fail to lock and
#			  return FAIL.  This is used for locking spool
#			  files.
#
#	lock_fd_wait	- given a file descriptor, lock it for
#			  exclusive access and return SUCCEED or
#			  return FAIL.  Blocking is permitted.  This
#			  may be used for locking mailbox files.
#
#	unlock_fd	- given the file descriptor of a file locked
#			  with the lock_fd macro, unlock that file.
#			  This can be an expression cast to void.
#
#	unlock_fd_wait	- given the file descriptor of a file locked
#			  with the lock_fd_wait macro, unlock that
#			  file.  This can be an expression cast to
#			  void.
#
#	lock_fd_rd_wait	- given a file descriptor, lock it for shared
#			  access.  Blocking is permitted.  This is
#			  used when reading forward files or mailing
#			  list files.  Closing the file shoud be
#			  sufficient for releasing the lock.  This
#			  should return SUCCEED or FAIL.
#
# If no reasonable high-efficiency locking method is available for
# your system, then do not define this macro, or set it to a null
# string.
#
# If the locking protocol requires that the file being locked be
# writable, define LOCK_REQUIRES_WRITE.
#
# To use the System V shared lock fcntl(), define USE_FCNTL_RD_LOCK,
# and define lock_fd_rd_wait() to be (fcntl_rd_lock(fd)), and declare
# fcntl_rd_lock() to be extern int.

LOCKING_PROTOCOL=


# LOCK_BY_NAME(variable) - should spool files use named lock-files for locking
#
# If no locking protocol is defined, or a site prefers to use named
# lock files for locking spool files, LOCK_BY_NAME should be defined
# to be "TRUE", otherwise it should not be defined.

LOCK_BY_NAME=TRUE


# FLOCK_MAILBOX(variable) - should mailbox files be locked with lock_fd_wait
#
# Set this to "TRUE" if the lock_fd_wait macro should be used to lock
# mailbox files.  This should be used only with cooperation from all
# mail user agents.  Otherwise, do not set this.

#FLOCK_MAILBOX=TRUE


# MAILBOX_DIR(variable) - in which directory are user mailbox files found
#
# Normally this is either /usr/spool/mail for a V7/BSD-derived system
# or /usr/mail for a System V derived system.  On many newer POSIX-type
# systems, mail is in /var/mail.

#MAILBOX_DIR=/var/mail				# POSIX
#MAILBOX_DIR=/usr/mail				# System V
MAILBOX_DIR=/usr/spool/mail			# Almost anything else


# CONSOLE(variable) - name of the console device file
#
# This pathname is used as a last resort in writing panic messages from
# smail.  Normally, it is /dev/console.  Some System V machines can also
# use /dev/sysmsg

#CONSOLE=/dev/sysmsg
CONSOLE=/dev/console


# DECLARE_STRINGS(variable) - declare string routines, using macros as needed
#
# The following function names are used by smail and should be
# declared using the C code below:
#
#	strcat(s1,s2)	- concatenate string s2 onto the end of s1
#	strncat(s1,s2,n)- concatenate s2 onto s1 with length constraint n
#	strcmp(s1,s2)	- compare strings s1 and s2
#	strncmp(s1,s2,n)- compare s1 and s2 with length constraint n
#	strcpy(s1,s2)	- copy string s2 to s1
#	strncpy(s1,s2,n)- copy string s2 to s1 for at most n bytes
#	strlen(s1)	- return the length of string s1
#	index(s,c)	- point to first occurance of c in string s
#	rindex(s,c)	- point to last occurance of c in string s
#	bzero(b,n)	- zero n bytes starting at location b
#	bcopy(b1,b2,n)	- copy b1 to b2 for n bytes
#	bcmp(b1,b2,n)	- compree n bytes of b1 and b2, returning 0 if equal
#	memcpy(b1,b2,n)	- copy b2 to b1 for n bytes
#	memcmp(b1,b2,n)	- compare n bytes of b1 and b2, returning 0 if equal
#
# Use of #include or #define is permitted.

DECLARE_STRINGS="\
extern char	*strcat();
extern char	*strncat();
extern int	strcmp();
extern int	strncmp();
extern char	*strcpy();
extern char	*strncpy();
extern int	strlen();
extern char	*index();
extern char	*rindex();
/* the following are defined by smail, if they are not in libc */
extern int	bzero();
extern int	bcopy();
extern int	bcmp();
extern char	*strpbrk();
extern int	strspn();
#define memcpy(b1,b2,n)	(bcopy(b2,b1,n))
#define memcmp(b1,b2,n)	(bcmp(b1,b2,n))
"


# OSLIBS(list) - name any object libraries containing routines we will need
#
# In particular, if networking routines and dbm routines are in libraries
# other than libc, these libraries should be named here.  Systems that
# can use shared libraries may specify a shared version of libc here.
#
# Object library names must be white-space separated.
#
# NOTE:	To compile arpatxt (in the pathalias sources), one of the listed
#	libraries must include regular expression functions.  However,
#	arpatxt is not compiled by default, so such functions are not
#	normally necessary.

#OSLIBS="-ldbm -lsocket"	# example
#OSLIBS="-lc_s"			# shared C library for System V.3
#[ "$FROM_ROOT" = src ] && OSLIBS="-lresolv" # resolv library for src directory


# LDFLAGS(list) - flags that must be passed to ld when creating an executable
#
# Some systems require that particular flags be passed to the loader
# such as for allocating extra stack space.
#
# Loader flags must be white-space separated.

#LDFLAGS="-F 2000"	# loader flags for XENIX/286


# CFLAGS(list) - flags that should be passed to the C compiler
#
# This is a white-space-separated list of arguments that are passed
# to the C compiler when compiling anything.  This can be used to
# set some very special case #defines, or to pass in compiler flags
# such as selection of large-model addressing for the Xenix/286.
#
# NOTE:  Use of -O or -g is normally selected from the EDITME file.

#CFLAGS="-Xt"		# select transitional ANSI C for SVR4.0 C compiler


# CPPFLAGS(list) - flags to pass into C preprocessor
#
# This list is appended to the CFLAGS list, it also passed to mkdepend,
# for building dependencies, which is not true of CFLAGS.  This is useful
# mostly for systems that require "-systype ..." as input the the C
# preprocessor to select default include file locations.

#CPPFLAGS="-systype bsd"
#CPPFLAGS="-systype sysv"


# DRIVER_CONFIGURATION(variable) - configuration file describing smail drivers
#
# Name the configuration file in the conf/driver directory which defines
# a suitable set of smail director, router and transport drivers for
# this operating system.

#DRIVER_CONFIGURATION=arpa-network		# includes BIND/DNS router
#DRIVER_CONFIGURATION=bsd-network
DRIVER_CONFIGURATION=unix-generic


# RANLIB(variable) - how do we organize an existing object archive library
#
# RANLIB should define the base for a shell command which, given an
# object file archive, will organize that library for the loader.
# If no such command is appropriate, set RANLIB to ":", to prevent
# it from doing anything interesting.

#RANLIB=ranlib				# Behavior compatible with BSD
RANLIB=:				# many other versions of UNIX


# CHOWN(variable) - command to use for accessing the chown program
#
# Under Berkeley UNIX, chown is under /etc.  On most other computer systems
# chown is in a normal PATH.  The CHOWN variable should be set appropriately
# for this operating system.

#CHOWN=/etc/chown			# Behavior compatible with BSD
CHOWN=chown				# Most other versions of UNIX


# SITENAME_FILE(variable) - file containing name of local host
#
# Some operating systems store the name of the local host in a file, such
# as /etc/sitename or /etc/whoami.  Define SITENAME_FILE if your site
# requires this.

#SITENAME_FILE=/etc/sitename		# correct for Fortune FOR:Pro system


# HAVE(list) - list of attributes identified for your operating system
#
# For any item that is supported by your operating system, add the
# item name to the HAVE list.  This list translates into #defines
# of the form HAVE_feature, which can be tested in C source files.
# The definitive list of possible HAVE attributes can be found by
# looking through the source code for references to these macros.
#
# Current list of defined names:
#
#	BIND		- system supports the DNS (Domain Name System)
#	BSD_NETWORKING	- system supports BSD-style socket/TCP/IP networking
#	BSTRING		- system has bstring or similar routines
#	COMSAT		- system has the comsat daemon
#	CHSIZE		- system has chsize system call
#	DBM		- system has the dbm(3x) library, *including* dbmclose
#	DUP2		- system has dup2 function
#	FSYNC		- system has fsync system call
#	FTRUNCATE	- system has ftruncate system call
#	GETHOSTNAME	- system has gethostname function, as in BSD
#	GETOPT		- system has getopt function
#	HASH_BANG	- system can use #!/bin/sh in bourne shell scripts
#	HDB_UUCP	- system uses HoneyDanBer UUCP--uux accepts -g and -a
#	MKDIR		- system has mkdir function
#	NDBM		- system has the newer ndbm(3) functions
#	READDIR		- system has opendir/readdir/closedir functions
#	RENAME		- system has rename system call
#	RLIMIT		- system has the setrlimit/getrlimit functions
#	SETEUID		- system has seteuid system call, as in BSD
#	SETGROUPS	- system has setgroups system call, as in BSD/Posix
#	SYS5_STRLIB	- system has strspn and strpbrk
#	SYSEXITS	- system has <sysexits.h>
#	ULIMIT		- system has ulimit system call, as in System V.3
#	UNAME		- system has uname system call, as in System V
#	VFORK		- system has vfork function
#	VFPRINTF	- system has vfprintf function
#	YP		- system has SunOS YP (NIS) service
#	MEMMOVE		- system has ANSI C memmove() function
#
# NOTE: if you don't define DBM or NDBM, then smail will use sdbm.
# If you don't have ndbm, and your dbm library doesn't have dbmclose(),
# then don't define DBM, because smail can't use your dbm, and will
# have to use sdbm instead.

#HAVE=BSTRING:GETOPT:UNAME:READDIR


# NO_HAVE(list) - define features that this system specifically does not have
#
# Occasionally, the source code will assume that some feature exists
# unless it is told that it does not exist.  The recommended method
# for indicating that a feature does not exist (for these circumstances)
# is to test for a NO_HAVE_* name.  The NO_HAVE variable is a list of
# features that should be named this way.  Note that the OS type is often
# used to indicate that a set of features exist.  If smail thinks that
# your OS has a particular feature, then you may have to use the NO_HAVE
# list to insist that the feature does not exist (or that the feature
# should not be used).
#
# Some possible feature names:
#
#	MEMMOVE		- the system uses ANSI C, but lacks memmove()

#NO_HAVE=MEMMOVE


# MISC_DEFINES(list) - miscellaneous definitions
#
# This is a list of names that will be defined for use by any C
# program or shell script that loads defs.sh files.  These generally
# define very system-specific items that are tested in the sources.
# A simple value can be given using the form NAME=value
#
# Some of the currently useful names are:
#
#	GETHOSTNAME_USE_PTR
#		The Genix4.1 gethostname() system call takes a pointer 
#		to a buffer size rather than the buffer size itself.
#		Define this for systems that have this behavior.
#
#	INET_ADDR_USE_STRUCT
#		There appear to be some systems where inet_addr()
#		returns a struct in_addr, rather than an unsigned
#		long.  We have been told that some versions of Ultrix
#		are inconsistent between what is in the man page and
#		the #include files and how the library routine is
#		actually defined.  Define this for systems that have
#		this non-BSD behavior.
#
#	INET_NTOA_USE_STRUCT
#		This causes smail to use a struct in_addr as the
#		argument to inet_ntoa(), rather than a long.
#
#	REQUIRE_TZ
#		It has been reported that the Xenix5.0 ctime() function
#		dumps core if the TZ environment variable is not set.
#		If your system has this rather buggy behavior, define
#		this.  If this is defined, smail will set the
#		environment variable TZ to GMT0 if it is not already
#		set.
#
#	DECLARE_UTIMBUF
#		Some versions of System V do not define the utimbuf
#		structure in <sys/time.h>, or in <utime.h>.  If your
#		system is one of these, then define DECLARE_UTIMBUF,
#		and smail will define the utimbuf structure itself.
#
#	INCLUDE_UTIME_H
#		Some systems appear to have a <utime.h> file, even though
#		they are not POSIX systems.  The <utime.h> file	is used
#		automatically for POSIX systems.  For other systems,
#		<utime.h> can be used by defining INCLUDE_UTIME_H.
#
#	DBM_INCLUDE='<dbm.h-include-path>'
#	NDBM_INCLUDE='<ndbm.h-include-path>'
#		Some systems support dbm functions (or ndbm functions)
#		but store there interface header files in unusual
#		places.  Such systems can set DBM_INCLUDE (NDBM_INCLUDE)
#		to point to the dbm (ndbm) include file.  For example,
#		the following is not unusual:
#
#			MISC_DEFINES=DBM_INCLUDE='<rpcsvc/dbm.h>'
#
#	void=int
#		This must be used for systems that do not support the
#		void type.  In particular, some older systems that
#		support void still require this for compiling smail.
#		To test for these systems, try the code fragment:
#
#			void f();
#			void (*avf[])() = { f };
#
#		If this yields an error then you will need to set
#		void=int.
#
#	private=smail_private_tag
#		Some C comilers, notably some releases of the Sequent
#		C comiler, recognize private as a keyword.  To avoid
#		uses of this name within smail causing problems for
#		these compilers, use private=smail_private_tag to remap
#		all uses of "private" to a safer name.

#MISC_DEFINES=REQUIRE_TZ:DECLARE_UTIMBUF:void=int


# MISC_C_DEFINES(list) - miscellaneous C defines
#
# More complex C defines can be specified using the MISC_C_DEFINES
# variable.  This is a list of lines that will be included in the
# defs.h file, included by smail source files.
#
# Items in this "list" must be newline separated.

: MISC_C_DEFINES='
#define DATA_RLIMIT	(8192 * 1024)	/* limit to 8Mb of data space */
#define STACK_RLIMIT	(1024 * 1024)	/* limit to 1Mb of stack space */
'


# SOCKET_INCLUDES(variable) - set of #includes to for use with sockets
#
# Some systems require a different set of includes files to get the
# various socket, networking, and DNS resolving header files used by
# the smail source code.  If your system is one of these, then you
# will need to define SOCKET_INCLUDES to match your system.  The
# includes given here are the set of files used of SOCKET_INCLUDES is
# not defined in your OS or EDITME file.

: SOCKET_INCLUDES='
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#ifdef HAVE_BIND
# undef NOERROR		/* remove conflict in SVR4 header files */
# include <arpa/nameser.h>
# include <resolv.h>
#endif
'


# NOBODY(variable) - username to use for anonymous situations
#
# In situations where smail does not trust a user ID, or where it
# does not have any other user ID to use when running a program,
# it will use this user ID for this login name.  Under SunOS and
# BSD systems (4.3 or later) this will normally be "nobody".  If
# undefined, a large ID will be used (32767).

#NOBODY=nobody		# BSD and SunOS-like systems
#NOBODY=unknown		# possiblity for some System V systems


# SECURE_PATH(variable) - a secure, :-separated list of exectuable directories
#
# Shell scripts used by smail will normally use this path, to ensure
# that they can access all normal executables, without the possibility
# of executing something that they shouldn't.

SECURE_PATH=/bin:/usr/bin


# COMPRESS(variable) - an executable that compresses files
# COMP_FLAG(variable) - flag to use to force compression
# DOT_Z(variable) - suffix generated by compression program
# UNCOMPRESS(variable) - program to uncompress files
# ZCAT(variable) - program to write contents of compressed files to stdout
#
# The savelog utility can save space by compressing old log files.
# Normally when a file is compressed, the suffix is added to the
# filename.
#
# The COMPRESS symbol is the name of a program such that:
#
#		$COMPRESS $COMP_FLAG filename ...
#
# the file: filename is replaced by: filename$DOT_Z
# regardless of the size of filename.  The command:
#
#		$UNCOMPRESS filename$DOT_Z
#
# will replace filename$DOT_Z with the original filename.
# The command:
#		$ZCAT filename$DOT_Z
#
# will read the compressed file: filename$DOT_Z and write the
# plain text to standard output while leaving the file compressed.

#COMPRESS=compress		# for compress
#COMP_FLAG=-f
#DOT_Z=.Z
#UNCOMPRESS=uncompress
#ZCAT=zcat

#COMPRESS=pack			# system V standard
#COMP_FLAG=-f
#UNCOMPRESS=unpack
#ZCAT=pcat
#DOT_Z=.z

COMPRESS=:			# if no compress is used
COMP_FLAG=""
UNCOMPRESS=true
ZCAT=cat
DOT_Z=""


# UUCP_SYSTEM_FILE - path to UUCP file containing remote systems
#
# The normal smail configuration defines a router that scans the
# output of the /usr/bin/uuname command for neighboring UUCP sites.
# When smail is running as a daemon, it can cache the output of uuname
# so that the uuname command need not be executed for each mail
# message.  In order to be able to detect when the output of uuname
# will change, smail daemons will stat the UUCP configuration file
# which contains the names of neighboring hosts.  This EDITME variable
# defines the full pathname to this file.  If this variable is not
# defined, then the output of the uuname will not be cached.

#UUCP_SYSTEM_FILE=/usr/lib/uucp/Systems	# use this for HoneyDanBer UUCP
#UUCP_SYSTEM_FILE=/usr/lib/uucp/L.sys	# use this for pre-HDB UUCP
