From 1f7ac54fbd544b90729437bc61f76addab082c01 Mon Sep 17 00:00:00 2001 From: gshapiro Date: Sun, 17 Sep 2000 00:41:33 +0000 Subject: Give users a way to alter the sendmail (and related utilities) build environment so they can enable functionality such as SASL, LDAP, Hesiod. --- bin/rmail/Makefile | 6 ++++++ etc/defaults/make.conf | 15 +++++++++++++++ lib/libsmdb/Makefile | 3 +++ lib/libsmutil/Makefile | 3 +++ libexec/mail.local/Makefile | 6 ++++++ libexec/smrsh/Makefile | 6 ++++++ secure/usr.sbin/sendmail/Makefile | 8 +++++++- share/examples/etc/make.conf | 15 +++++++++++++++ usr.sbin/mailstats/Makefile | 6 ++++++ usr.sbin/makemap/Makefile | 6 ++++++ usr.sbin/praliases/Makefile | 6 ++++++ usr.sbin/sendmail/Makefile | 8 +++++++- 12 files changed, 86 insertions(+), 2 deletions(-) diff --git a/bin/rmail/Makefile b/bin/rmail/Makefile index a094671..87bd3c9 100644 --- a/bin/rmail/Makefile +++ b/bin/rmail/Makefile @@ -19,6 +19,12 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + # If you want to have your rmail queuing the mail only, uncomment the # following: # CFLAGS+= -DQUEUE_ONLY diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index 0f7486e..4b872c9 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -269,3 +269,18 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ # The list of languages and encodings to build and install # #DOC_LANG= en_US.ISO_8859-1 ru_RU.KOI8-R +# +# +# sendmail +# Setting the following variables modifes the build environment for +# sendmail and its related utilities. For example, SASL support can be +# added with settings such as: +# +# SENDMAIL_CFLAGS=-I/usr/local/include -DSASL +# SENDMAIL_LDFLAGS=-L/usr/local/lib +# SENDMAIL_LDADD=-lsasl +# +#SENDMAIL_CFLAGS= +#SENDMAIL_LDFLAGS= +#SENDMAIL_LDADD= +#SENDMAIL_DPADD= diff --git a/lib/libsmdb/Makefile b/lib/libsmdb/Makefile index 1b4c33e..4aa78a1 100644 --- a/lib/libsmdb/Makefile +++ b/lib/libsmdb/Makefile @@ -6,6 +6,9 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include CFLAGS+=-DNEWDB -DNOT_SENDMAIL +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} + LIB= smdb SRCS+= smdb.c smdb1.c smdb2.c smndbm.c diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile index 237159c..07b9cda 100644 --- a/lib/libsmutil/Makefile +++ b/lib/libsmutil/Makefile @@ -6,6 +6,9 @@ SENDMAIL_DIR=${.CURDIR}/../../contrib/sendmail CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} + LIB= smutil SRCS+= debug.c errstring.c lockfile.c safefile.c snprintf.c strl.c diff --git a/libexec/mail.local/Makefile b/libexec/mail.local/Makefile index 1a61dd8..62047c6 100644 --- a/libexec/mail.local/Makefile +++ b/libexec/mail.local/Makefile @@ -21,4 +21,10 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + .include diff --git a/libexec/smrsh/Makefile b/libexec/smrsh/Makefile index 086368f..37c2e4d 100644 --- a/libexec/smrsh/Makefile +++ b/libexec/smrsh/Makefile @@ -19,4 +19,10 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + .include diff --git a/secure/usr.sbin/sendmail/Makefile b/secure/usr.sbin/sendmail/Makefile index 0eaa386..d6fa2924 100644 --- a/secure/usr.sbin/sendmail/Makefile +++ b/secure/usr.sbin/sendmail/Makefile @@ -28,7 +28,7 @@ SRCS= alias.c arpadate.c bf_torek.c clock.c collect.c conf.c control.c \ stab.c stats.c sysexits.c timers.c trace.c udb.c usersmtp.c util.c \ version.c DPADD= ${LIBUTIL} ${LIBWRAP} -LDADD+= -lutil -lwrap +LDADD= -lutil -lwrap MAN1= mailq.1 newaliases.1 MAN5= aliases.5 MAN8= sendmail.8 @@ -44,6 +44,12 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + beforeinstall: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/log/sendmail.st diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index 0f7486e..4b872c9 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -269,3 +269,18 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ # The list of languages and encodings to build and install # #DOC_LANG= en_US.ISO_8859-1 ru_RU.KOI8-R +# +# +# sendmail +# Setting the following variables modifes the build environment for +# sendmail and its related utilities. For example, SASL support can be +# added with settings such as: +# +# SENDMAIL_CFLAGS=-I/usr/local/include -DSASL +# SENDMAIL_LDFLAGS=-L/usr/local/lib +# SENDMAIL_LDADD=-lsasl +# +#SENDMAIL_CFLAGS= +#SENDMAIL_LDFLAGS= +#SENDMAIL_LDADD= +#SENDMAIL_DPADD= diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile index 6a7520c..89806a0 100644 --- a/usr.sbin/mailstats/Makefile +++ b/usr.sbin/mailstats/Makefile @@ -19,4 +19,10 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + .include diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile index d92368c..bd2d8c6 100644 --- a/usr.sbin/makemap/Makefile +++ b/usr.sbin/makemap/Makefile @@ -27,4 +27,10 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMDB} ${LIBSMUTIL} LDADD+= ${LIBSMDB} ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + .include diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile index 57fbaa0..6b242a2 100644 --- a/usr.sbin/praliases/Makefile +++ b/usr.sbin/praliases/Makefile @@ -27,4 +27,10 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMDB} ${LIBSMUTIL} LDADD+= ${LIBSMDB} ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + .include diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile index 0eaa386..d6fa2924 100644 --- a/usr.sbin/sendmail/Makefile +++ b/usr.sbin/sendmail/Makefile @@ -28,7 +28,7 @@ SRCS= alias.c arpadate.c bf_torek.c clock.c collect.c conf.c control.c \ stab.c stats.c sysexits.c timers.c trace.c udb.c usersmtp.c util.c \ version.c DPADD= ${LIBUTIL} ${LIBWRAP} -LDADD+= -lutil -lwrap +LDADD= -lutil -lwrap MAN1= mailq.1 newaliases.1 MAN5= aliases.5 MAN8= sendmail.8 @@ -44,6 +44,12 @@ LIBSMUTIL:= ${LIBSMUTILDIR}/libsmutil.a DPADD+= ${LIBSMUTIL} LDADD+= ${LIBSMUTIL} +# User customizations to the sendmail build environment +CFLAGS+=${SENDMAIL_CFLAGS} +LDFLAGS+=${SENDMAIL_LDFLAGS} +LDADD+=${SENDMAIL_LDADD} +DPADD+=${SENDMAIL_DPADD} + beforeinstall: ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 644 /dev/null \ ${DESTDIR}/var/log/sendmail.st -- cgit v1.1