#
# This warning gets printed at the top of each Makefile
#

$DontEditMake = <<"END";
# This Makefile is automatically generated.  Do NOT edit it here.
END

#
# Which source subdirectories you want
#

@WantDirs=("include","lib","qi","util","ph","whoi");

#
# Where the source directory lives
#

$_ = `pwd`; chop;
$SrcDir = $_;

#
# Features you want enabled
#
# FCRYPT	Use the fcrypt() function for faster logins if !KERBEROS .
# PRE_ENCRYPT	Passwords kept encrypted.  This allows a user to use his
#		cleartext password elsewhere safely should the database
#		be compromised, but provides no added security to qi.
# ID_FALLBACK	If no password, use last 8 chars of id field
# DO_TILDE	field~value means field is empty or contains value
# KERBEROS	Use Kerberos authentication.
# EMAIL_AUTH	Allow authorization by email field
# RESTRICTED	Depreciated.  Make @OkAddrs non-empty for same function.
# SORTED	Sort entries before printing.
# NO_READ_LOCK	Do not lock for reading; helps on loaded systems, but
#		may give wrong results every once in a blue moon.
#
# eg: @Features = ("ID_FALLBACK","EMAIL_AUTH");

@Features = ();

#
# Domains and IP addresses of hosts permitted to make queries.  Domain names
# match the last part of the remote hostname, eg, "ux1.cso.uiuc.edu" matches
# an @OkAddrs(".uiuc.edu").  IP addresses match the first part of the remote
# address, eg, "128.174.5.59" matches an @OkAddrs("128.174.").  Leave this
# empty to permit all hosts to make queries.  I recommend leaving this
# empty and protecting individual fields with the "LocalPub" (see next item)
# keyword.
#
# eg: @OkAddrs = (".uiuc.edu", "128.174.");

@OkAddrs = ();

# Domains that are considered "local" enough to see fields keyed as
# "LocalPub" rather than "Public", e.g., home addresses, home phones, etc.
# An empty set makes LocalPub == Public in prod.cnf.
#
# eg: @LocalAddrs = ("128.174.", ".uiuc.edu");

@LocalAddrs = ();

#
# The set of targets you want in the toplevel makefile
#

@TopTargets=("all","install","depend","clean","tape","rcs");

#
# The directory containing the nameserver's libraries.
#

$LibDir = "$SrcDir/lib";

#
# compilers, et al.
#
# Add to Cflags as needed
# -DFCNTL_FLOCK	use fcntl() calls for locking if flock() not available.
# -DLOCKF_FLOCK	use lockf() calls for locking if flock() and fcntl() not
#		available.
# -DNO_STRERROR no system-supplied strerror()
# -DNO_VFPRINTF no system-supplied vfprintf()
# -DWAIT_INT	wait() returns int instead of struct wait
# -DSYSV	#include <sys/fcntl.h> instead of <sys/file.h>

$Cflags = "-I$SrcDir/include ";
$Lflags = "";
$Para = "";		# Set this to "&" for sequent's parallel make
$CC = "cc";		# ANSI or not, doesn't matter
$Depend = "-M";		# get .h file dependencies
			# Ultrix -Em
			# Convex -k
			# Normal -M
			# gcc living dangerously -MM
$Ci = "ci";		# for rcs
$Perl = "perl";		# what perl to use
$Lex = "lex";		# what lex to use
$Ranlib = "ranlib";	# ranlib for BSD, echo for SYSV
$Install = "install -c";	# if only there were an alternative...
$Mode = "0755";			# mode for binaries
$Owner = "nameserv";		# owner for binaries
$Group = "nameserv";		# group for binaries

$NsLib = "$LibDir/libu.a";	# library routines
$QiLib = "$LibDir/libqi.a";	# qi as a library; used by some utils
$MoreLib = "-ll";		# need the lex library
$DbmLib = "";			# need the dbm library if not in libc.a

#
# Directory for executables
#

$QiExecDir = "$SrcDir/../bin";
$PhExecDir = "/usr/local/bin";

#
# Make these links to ph (for easy lookup by type)
#
@PhLinks = ("timetable", "food", "phone", "unit", "areacode", "person",
           "weather", "spring", "summer", "fall");

#
# Items for conf.h and conf.c
#

# These string-valued things are overridable at runtime, by specifying
# (eg) qi -DATABASE=/some/dir/data
%DefineStrings=(
  "DATABASE",	"$SrcDir/../db/prod",	# Where the database lives, by default
  "MAILDOMAIN",	"uiuc.edu",		# Mail domain for phquery
  "ADMIN",	"p-pomes@uiuc.edu",	# Database administrator
  "PASSW",	"nameserv@uiuc.edu",	# Mail here for passwords (deprecated)
  "RUNDIR",	"$SrcDir/qi",		# Where QI should run
  "HELPDIR",	"$SrcDir/help",		# Where the help lives
  "NATIVESUBDIR","native",		# non-client-specific help
  "NOHELP",	"nohelp",		# file printed when no help topic
  "TEMPFILE",	"/tmp/qiXXXXXX",	# temporary file template
);

# These will be used as normal defines.  The keys will be converted to
# all upper-case.
%OtherDefines=(
  "Log_Qilog",	"LOG_LOCAL0",		# Syslog facility
  "Sig_Type",	"void",			# signal() return type
  "Mem_Type",	"char",			# *malloc() return type
  "Cpu_Limit",	"20",			# limit for CPU time
  "Drecsize",	384,			# size of .dir record
  "Dovrsize",	384,			# size of .dov record
  "Max_Key_len",16,			# max # chars to index
  "NIChars",	32,			# size of .idx record
  "NOChars",	1024,			# size of .iov record
  "PersonLimit","25",			# max # of people to return
#  "Use_Uid",	"10",			# setuid to this
#  "Use_Gid",	"15",			# setgid to this
);

#
# flags that are used only in the ph client
#
%PhFlags=(
  "NsService",	"ns",			# name of ns service
  "FallBackAddr","128.174.5.58",	# ns host ip address
  "FallBackPort","105",			# ns port number
  "MailDomain",	$DefineStrings{"MAILDOMAIN"},	# same as above
  "Host",	"ns.uiuc.edu",		# default qi host
  "Email_Auth",	"1",			# Use email authorization
);
