# $Cambridge: hermes/src/prayer/defaults/Config-hermes,v 1.32 2011/11/09 14:07:40 dpc22 Exp $
#
# Prayer - a Webmail Interface
#
# Copyright (c) University of Cambridge 2000 - 2002
# See the file NOTICE for conditions of use and distribution.
#
# Conventional Configure file.

SSL_ENABLE           = true   # SSL requires OpenSSL
SESSION_CACHE_ENABLE = true   # SSL session cache Requires Berkeley DB 3 or 4
GZIP_ENABLE          = true   # Enable on the fly compression of pages
LDAP_ENABLE          = true   # Add LDAP interface
FENCE_ENABLE         = false  # Use Electric Fence to catch malloc problems
MUTEX_SEMAPHORE      = true   # Use SYSV mutexes rather than file locking
TIDY_ENABLE          = true   # Use libtidy for HTML sanitisation.

# Following depend on the way that you have configured c-client
CCLIENT_SSL_ENABLE   = false  # C-client was built with SSL support
CCLIENT_PAM_ENABLE   = false  # C-client was built with PAM support
CCLIENT_KERB_ENABLE  = false  # C-client was built with Kerberos support

# Probably don't need the following
RAVEN_ENABLE         = true   # Only of use in Cambridge at the moment.
ACCOUNTD_ENABLE      = false  # Only of use in Cambridge at the moment.
ACCOUNTD_SSL_ENABLE  = true   # Enable SSL support in account management daemon
ACCOUNTD_PAM_ENABLE  = true   # Enable PAM support in account management daemon

############################################################################
# Location of compiler
CC           = gcc
# Location of make program (GNU make required)
MAKE         = gmake
# Location of install program (GNU install or compatible required)
INSTALL      = install

# Base Compiler options for GCC.
#BASECFLAGS   = -Wall -g
#BASELDFLAGS  = -g
BASECFLAGS   = -Wall -g -O2
BASELDFLAGS  = -g -O2
BASE_LIBS    = -lcrypt -lutil

# Base Compiler options for Sun SUNWspro compiler
#CC          = /opt/SUNWspro/bin/cc
#BASECFLAGS  = -fast
#BASELDFLAGS = -s
#BASE_LIBS   = -lcrypt -lxnet -lnsl -lsocket

############################################################################
# Location of various include files and libraries.
############################################################################

# Location of c-client library.
#
# Following works if we have a vanilla c-client installation at same level
# as the prayer installation. Relies on a symbolic link ./prayer/c-client
# which points to ../../imap/c-client. This just reduces the amount of
# noise output on each line when building the package.
#
CCLIENT_DIR=../c-client
CCLIENT_INCLUDE=-I $(CCLIENT_DIR)
CCLIENT_LIBS=./$(CCLIENT_DIR)/c-client.a

#
# Following works with imap-devel RPM package from Redhat 7.
#
#CCLIENT_INCLUDE = -I/usr/include/imap
#CCLIENT_LIBS    = -lc-client
#
# Complication:
#   The Redhat RPM package links against SSL, PAM and kerberos libraries.
#
#CCLIENT_SSL_ENABLE  = true
#CCLIENT_PAM_ENABLE  = true
#CCLIENT_KERB_ENABLE = true

#
# Following works with the mail/cclient port from FreeBSD
#
#CCLIENT_INCLUDE = -I/usr/local/include/c-client
#CCLIENT_LIBS    = -L/usr/local/lib -lc-client4
#
# Complication:
#   The FreeBSD port uses PAM and optionally SSL if built WITH_SSL=yes.
#
#CCLIENT_SSL_ENABLE  = true
#CCLIENT_KERB_ENABLE = true

############################################################################

# Electric fence (required if FENCE_ENABLE set)
FENCE_INCLUDE=
FENCE_LIBS=-lmcheck

# Zlib (required if GZIP_ENABLE set)
Z_INCLUDE = -I@zlib@/include
Z_LIBS    = -Wl,-R@zlib@/lib -L@zlib@/lib -lz

# Tidy library (required if TIDY_ENABLE set)
TIDY_IS_TIDYP=true
TIDY_INCLUDE=-I../tidyp/include
TIDY_LIBS=../tidyp/src/.libs/libtidyp.a

# LDAP (required if LDAP_ENABLE set)
LDAP_INCLUDE =
LDAP_LIBS    = -lldap

# Pam (required if CCLIENT_PAM_ENABLE set)
PAM_INCLUDE =
PAM_LIBS    = -lpam

# Kerberos (required if CCLIENT_KERB_ENABLE set)
KERB_INCLUDE = -I/usr/kerberos/include
KERB_LIBS    = -L/usr/kerberos/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err

# SSL definitions (required if SSL_ENABLE or CCLIENT_SSL_ENABLE set)
#
# Following suitable for Linux and FreeBSD which have SSL preinstalled
# (Header files from OpenSSL 0.9.7 want to include various Kerboros stuff)
#
SSL_INCLUDE= -I@OpenSSL@/include
SSL_LIBS= -Wl,-R@OpenSSL@/lib -L@OpenSSL@/lib -lssl -lcrypto
OPENSSL= @OpenSSL@/bin/openssl

# Following definitions suitable for our Sun systems.
#SSL_BASE=/opt/local/ssl/current
#SSL_INCLUDE=-I ${SSL_BASE}/include
#SSL_LIBS=-L ${SSL_BASE}/lib -lssl -lcrypto
#OPENSSL=${SSL_BASE}/bin/openssl

# DB definitions (required if SESSION_CACHE_ENABLE set)
#
# Following suitable for Redhat Linux which has DB 3 preinstalled
DB_INCLUDE= -I@db4@/include
DB_LIBS= -Wl,-R@db4@/lib -L@db4@/lib -ldb-4 -lpthread

# Following suitable for FreeBSD with DB 4 package installed
#DB_INCLUDE=-I/usr/local/include/db4
#DB_LIBS=-L/usr/local/lib -ldb4

############################################################################

# Install location of prayer configuration and support files. The initial
# config file runs prayer processes as user "prayer" and group "prayer".
# If you are using SSL, the certificate file must be readable by RW_USER or
# RW_GROUP. It is important that nothing else can read the certificate file.

# Build root (used by Redhat RPM system)
BROOT=

# Directory, User and group for read-write files: log files, sockets etc
VAR_PREFIX = /var/spool/prayer
RW_USER    = prayer
RW_GROUP   = prayer

# Root Directory, User and group for read-only configuration files.
# Default configuration and permissions does not allow prayer user to
# update prayer configuration file.

PREFIX    = @PREFIX@
RO_USER   = system
RO_GROUP  = system

# Access permissions for general objects (wrt above users and groups)
PUBLIC_EXEC  = 0755
PUBLIC_DIR   = 0755
PUBLIC_FILE  = 0644

# Access permissions for private objects (wrt above users and groups)
PRIVATE_EXEC = 0750
PRIVATE_DIR  = 0750
PRIVATE_FILE = 0640

# Location of configuration files and binaries
PRAYER_CONFIG_FILE   = ${PREFIX}/etc/prayer.cf
BIN_DIR              = ${PREFIX}/sbin
ACCOUNTD_CONFIG_FILE = @PREFIX@/etc/accountd.cf
