From f4843be9990e766d93d225e3ff2e96cc170af25d Mon Sep 17 00:00:00 2001 From: Gregory Neil Shapiro Date: Mon, 23 Jul 2001 01:33:54 +0000 Subject: [PATCH] New make knob, SENDMAIL_M4_FLAGS, modifies the flags passed to m4 when building a .cf file from a .mc file. Include -D_FFR_TLS_O_T to enable tls policy control since the sendmail binary build enables that FFR as well. PR: conf/28361 MFC after: 1 week --- etc/defaults/make.conf | 6 ++++++ etc/mail/Makefile | 6 ++++-- etc/sendmail/Makefile | 5 ++++- share/examples/etc/make.conf | 6 ++++++ share/man/man5/make.conf.5 | 3 +++ 5 files changed, 23 insertions(+), 3 deletions(-) diff --git a/etc/defaults/make.conf b/etc/defaults/make.conf index 04eb496cf9ec..3a0f1b4e7ef6 100644 --- a/etc/defaults/make.conf +++ b/etc/defaults/make.conf @@ -367,6 +367,12 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ # #SENDMAIL_ADDITIONAL_MC=/etc/mail/foo.mc /etc/mail/bar.mc # +# Setting the following variable modifies the flags passed to m4 when +# building a .cf file from a .mc file. It can be used to enable +# features disabled by default. +# +#SENDMAIL_M4_FLAGS= +# # Setting the following variables modifies the build environment for # sendmail and its related utilities. For example, SASL support can be # added with settings such as: diff --git a/etc/mail/Makefile b/etc/mail/Makefile index f6e34b809f57..833b45f55dc4 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -39,6 +39,8 @@ # uucpdomain, virtusertable # +SENDMAIL_M4_FLAGS+= -D_FFR_TLS_O_T + .ifndef SENDMAIL_MC SENDMAIL_MC!= hostname SENDMAIL_MC:= ${SENDMAIL_MC}.mc @@ -124,8 +126,8 @@ M4FILES!= find ${SENDMAIL_CF_DIR} -type f -name '*.m4' -print .SUFFIXES: .cf .mc .mc.cf: ${M4FILES} - ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_CF_DIR}/m4/cf.m4 \ - ${@:R}.mc > ${.TARGET} + ${M4} -D_CF_DIR_=${SENDMAIL_CF_DIR}/ ${SENDMAIL_M4_FLAGS} \ + ${SENDMAIL_CF_DIR}/m4/cf.m4 ${@:R}.mc > ${.TARGET} # # Aliases are handled separately since they normally reside in /etc diff --git a/etc/sendmail/Makefile b/etc/sendmail/Makefile index 822899e4a60d..28b5244b3aeb 100644 --- a/etc/sendmail/Makefile +++ b/etc/sendmail/Makefile @@ -10,6 +10,8 @@ SENDMAIL_DIR= ${.CURDIR}/../../contrib/sendmail SMDIR= ${SENDMAIL_DIR}/src CFDIR= ${SENDMAIL_DIR}/cf +SENDMAIL_M4_FLAGS+= -D_FFR_TLS_O_T + # this is overkill, but.... M4FILES!= find ${CFDIR} -type f -name '*.m4' -print @@ -18,7 +20,8 @@ M4FILES!= find ${CFDIR} -type f -name '*.m4' -print .mc.cf: ${M4FILES} ${RM} ${.TARGET} (cd ${.CURDIR} && \ - ${M4} -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} + ${M4} -D_CF_DIR_=${CFDIR}/ ${SENDMAIL_M4_FLAGS} \ + ${CFDIR}/m4/cf.m4 ${@:R}.mc) > ${.TARGET} ${CHMOD} ${ROMODE} ${.TARGET} ALL= freebsd.cf diff --git a/share/examples/etc/make.conf b/share/examples/etc/make.conf index 04eb496cf9ec..3a0f1b4e7ef6 100644 --- a/share/examples/etc/make.conf +++ b/share/examples/etc/make.conf @@ -367,6 +367,12 @@ BDECFLAGS= -W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \ # #SENDMAIL_ADDITIONAL_MC=/etc/mail/foo.mc /etc/mail/bar.mc # +# Setting the following variable modifies the flags passed to m4 when +# building a .cf file from a .mc file. It can be used to enable +# features disabled by default. +# +#SENDMAIL_M4_FLAGS= +# # Setting the following variables modifies the build environment for # sendmail and its related utilities. For example, SASL support can be # added with settings such as: diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 8f31eecf81e6..bc077cead6f1 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -496,6 +496,9 @@ Additional .mc files which should be built into .cf files at build time. The value should include the full path to the .mc file(s), e.g., .Pa /etc/mail/foo.mc .Pa /etc/mail/bar.mc . +.It Va SENDMAIL_M4_FLAGS +.Pq Vt str +Flags passed to m4 when building a .cf file from a .mc file. .It Va SENDMAIL_CFLAGS .Pq Vt str Flags to pass to the compile command when building