# Compile-time configuration for ifmail FidoNet mailer and gateway
COPYRIGHT   = "Eugene G. Crosser, 1993-1995"
VERSION     = "2.8c"

# Main configuration file. This default may be overwritten by -I key.
CONFIGFILE  = "/etc/ifmail/config"

# Debug messages turned on by -x key are written here.
# Some error messages may occationally appear here too.
# This may be changed in the 'config' file.
DEBUGFILE   = "/var/log/ifmail/ifdebug"

# Procession log. Usually gets several lines for each invocation.
# Also look for error diagnostics here.  If HAS_SYSLOG defined,
# only stdout and stderr from the packers and unpackers go to this
# file, while actual logging is done via syslog() calls.
# This may be changed in the 'config' file.
LOGFILE     = "/var/log/ifmail/iflog"

# Use syslog() facility codes for mail gate, news gate and ifcico.
# Define -DHAS_SYSLOG (see below)
#MAILLOG    = LOG_MAIL
MAILLOG    = LOG_LOCAL0
#NEWSLOG    = LOG_NEWS
NEWSLOG    = LOG_LOCAL0
#CICOLOG    = LOG_UUCP
CICOLOG    = LOG_LOCAL0

# Directory where UUCP lock files reside.
#LOCKDIR     = "/var/lock"
LOCKDIR     = "/var/spool/uucp"

# Directory from which file requests are resolved.
# This may be changed from the 'config' file.
#PUBDIR      = "/home/ftp/pub"
PUBDIR      = "/var/spool/uucppublic"

# Compile-time system-dependant options. 

# If you specify "-DHAS_NDBM_H", ndbm calls will be used instead
# of dbm ones, and the feature will be activated of Cnews log processing
# to add entries to SEEN-BY if echo message is exported to several FTN
# nodes by Cnews mechanism. This works with INN too.

# If you specify "-DHAS_STATFS" or "-DHAS_STATVFS", statfs() (or statvfs()
# respectivly) call will be used to check available disk space. For statfs()
# call, you must also specify which .h file to use: "-DSTATFS_IN_VFS_H" or 
# "-DSTATFS_IN_STATFS_H" or "-DSTATFS_IN_STATVFS_H"  or "-DSTATFS_IN_MOUNT_H". 
# For statvfs() call, statvfs.h is included.

# define -DSCO_STYLE_STATFS if your statfs() call requires 4 arguments.

# If you specify "-DHAS_SETSID", setsid() call is used to detach from the
# control terminal. Otherwise setpgrp() call is used, and in this case you
# may specify "-DBSD_SETPGRP" to use BSD-style call.  Used in ifcico only.

# If you specify "-DDONT_HAVE_TM_GMTOFF", timezone offset will be calculated
# from the difference between the results of localtime() and gmtime() calls
# instead of using tm_gmtoff field of struct tm.

# If you specify "-DDONT_HAVE_GETOPT", local definitions for getopt will
# be used (but not the function itself)

# For ifcico, you must specify -DHAS_TERMIOS_H (preffered), -DHAS_TERMIO_H
# or -DHAS_SGTTY_H to use POSIX-y, SysV-ish of BSD-ish terminal control.

# in SVR4 you should specify -DHAS_DIAL (and maybe -DHAS_DIAL_H) to use
# dial() library function instead of regular open().  Lock files are
# not used in this case.

# for uucp lock files, you must specify either -DASCII_LOCKFILES or
# -DBINARY_LOCKFILES

# define -DHAS_FSYNC if there is a fsync() system call (to update .flo
# files)

# define -DPARANOID if you want iftoss to deny packets with wrong password.

# define -DRELAXED if you want iftoss to accept packets that are not
# addressed to your node.

# define -DFORCEINTL if you want ifmail to create ^aINTL even if this is
# not an inter-zone netmail.

# define -DNEED_UUCPFROM if your MTA needs a uucp "From" line in mail.

# define -DHAS_TCP if you want ifmail to be able to originate outgoing
# connections over TCP/IP (socket library needed)

# define -DHAS_TERM if you want ifmail to be able to originate outgoing
# connections over TERM (TCP "extention", client.a needed)

# define -DHAS_REGEX_H or -DHAS_LIBGEN_H if you have either of these
# header files for regular expression handlers.

# define -DHAS_SYSLOG to use syslog() instead of logging to files.
# Files are necessary anyway, external programs' stdout and stderr
# are redirected there.

# define -DNEED_BSY if you want ifpack and ifcico to create .bsy
# files preventing simultaneous processing of the same node.

# define -DNEED_FORK if your system is uncapable of getting rid of the
# control terminal unless you are running not as a group leader.

# define -DREGEX_NEED_CARET if your re_comp/re_exec require that the
# mask starts with a '^' to match the beginning of the string.

# as of June 1994, FreeBSD has a nasty bug in the kernel lseek() code:
# if you make lseek() to a point before the start of the file, it
# succeeds and the writing point becomes negative.  Fortunately, 
# subsequent write()s fail :-).  To overwork this, define 
# -DNEGATIVE_SEEK_BUG, this will add an extra fseek() to restore
# zero writing point where necessary.

# define -DNEED_TRAP if you want debugging information when the programs
# are aborted with segmentation fault etc.  Currently tested and works 
# only with Linux, and only with newer kernels (1.1.20+)

# define -DSLAVE_SENDS_NAK_TOO if you have problems answering incoming
# EMSI sessions originated by FrontDoor.  FrontDoor does not follow
# EMSI specifications when originating calls, this is a workaround.

# define -DDONT_HAVE_DIRENT if there is no working opendir()/readdir()
# etc. in your libc.  You will aso need to add "dirent.o" to the NEEDED
# (see below).

# Linux:
OPTS        = -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \
		-DDONT_HAVE_TM_GMTOFF -DHAS_TERMIOS_H -DASCII_LOCKFILES \
		-DHAS_FSYNC -DHAS_IOCTL_H -DHAS_REGEX_H -DHAS_TCP \
		-DFORCEINTL -DHAS_SYSLOG -DNEED_UUCPFROM -DNEED_BSY \
		-DREGEX_NEED_CARET -DNEED_TRAP -DSLAVE_SENDS_NAK_TOO \
		-DNEED_FORK
# 386BSD:
#OPTS        = -DHAS_STATFS -DSTATFS_IN_MOUNT_H -DHAS_SETSID -DHAS_NDBM_H \
		-DHAS_TERMIOS_H -DASCII_LOCKFILES -DHAS_FSYNC -DHAS_IOCTL_H \
		-DHAS_REGEX_H -DHAS_TCP -DHAS_SYSLOG -DNEED_UUCPFROM \
		-DNEED_BSY -DNEED_FORK -DNEGATIVE_SEEK_BUG \
		-DREGEX_NEED_CARET

# SVR4:
#OPTS        = -DHAS_STATVFS -DDONT_HAVE_TM_GMTOFF -DHAS_SETSID -DHAS_NDBM_H \
		-DHAS_TERMIOS_H -DHAS_DIAL -DHAS_DIAL_H -DASCII_LOCKFILES \
		-DHAS_FSYNC -DHAS_IOCTL_H -DHAS_LIBGEN_H -DHAS_TCP \
		-DHAS_SYSLOG -DREGEX_NEED_CARET
# SunOS:
#OPTS        = -DHAS_STATFS -DSTATFS_IN_VFS_H -DHAS_SETSID -DHAS_NDBM_H \
		-DDONT_HAVE_GETOPT -DHAS_TERMIOS_H -DASCII_LOCKFILES \
		-DHAS_FSYNC -DHAS_TCP -DHAS_SYSLOG \
		-DREGEX_NEED_CARET

# SCO Unix 3.2v4.2
#OPTS        = -DHAS_STATFS -DSTATFS_IN_STATFS_H -DSCO_STYLE_STATFS \
		-DHAS_TERMIOS_H -DDONT_HAVE_TM_GMTOFF -DDO_NEED_TIME \
		-DDONT_HAVE_GETOPT -DASCII_LOCKFILES -DHAS_IOCTL_H \
		-DHAS_TCP -DHAS_SYSLOG \
		-DREGEX_NEED_CARET

# ISC Unix 3.2 v3.0
#OPTS        = -DHAS_STATFS -DSTATFS_IN_STATFS_H -DHAS_TERMIO_H \
		-DDONT_HAVE_TM_GMTOFF -DDONT_HAVE_GETOPT \
		-DASCII_LOCKFILES -DHAS_IOCTL_H -DSCO_STYLE_STATFS \
		-DUSE_POLL -DHAS_NET_ERRNO_H -DSHORT_PID_T \
		-DHAS_TCP -DHAS_SYSLOG \
		-DREGEX_NEED_CARET
# On ISC, if you are suing gcc, you can run into a trouble with sscanf()
# function.  It appears that sscanf(string,"%d.%d",&int1,&int2) where
# string is a constant segfaults unless you specify "-fwritable-strings"
# to gcc.  I would say that this is a bug in ISC libc.  If nessecary,
# add this to the defines above.  If you have ISC version 4.0 or later,
# you can add "-posix", remove "-DSHORT_PID_T" and specify "-DHAS_TERMIOS"
# to get benefit of posix terminal control.

# for make install, where to put binaries and what owner to set
BINDIR = /usr/lib/ifmail
OWNER = fnet
GROUP = uucp
MODE = 0711
SMODE = 4711

INSTALL = install
RANLIB = ranlib
#RANLIB = touch
SHELL = /bin/sh
ECHO = echo -e
CC = gcc
#YACC = bison -y
YACC = yacc
#LEX = flex
LEX = lex
AWK = awk
TAR = tar

#CFLAGS = -g -Wall
# Linux, 386BSD, SunOS:
CFLAGS = -O2 -Wall
# SVR4:
#CFLAGS = -O -Xa

LDFLAGS =

# For LIBS, you may need to add "-lfl" if you are using flex 2.4.x
# If you need TERM also add e.g. "/usr/src/term112/client.a"

# Linux
LIBS = -ldbm
# SunOS:
#LIBS =
# 386BSD:
#LIBS = -lgdbm -lgnuregex
# SVR4
#LIBS = -ldbm -lform -lnsl -lsocket -lc -L/usr/ucblib -lucb
# SCO
#LIBS = -ldbm -lsocket -lintl
# ISC
#LIBS = -lcposix -lmalloc -ldbm -linet -lPW

INCLUDES = -I${INCDIR}
# ISC
#INCLUDES = -I/usr/include/rpcsvc -I${INCDIR}

# What programs are absent at your system?
#NEEDED = strcasestr.o strncasecmp.o strcasecmp.o rename.o mkdir.o usleep.o \
		regexpr.o
# Linux
NEEDED =
# SVR4
#NEEDED = regexpr.o
# SCO
#NEEDED = strcasestr.o strncasecmp.o strcasecmp.o usleep.o regexpr.o
# SunOS and 386BSD
#NEEDED = signal.o
# ISC
#NEEDED = usleep.o regexpr.o vsyslog.o
