git: a7ce4a295346 - stable/12 - MFC: Add -DSTARTTLS CFLAG in order to enable DANE in sendmail builds

From: Gregory Neil Shapiro <gshapiro_at_FreeBSD.org>
Date: Wed, 01 Feb 2023 03:27:23 UTC
The branch stable/12 has been updated by gshapiro:

URL: https://cgit.FreeBSD.org/src/commit/?id=a7ce4a295346d207d835a2f3318231cebc7d4ccd

commit a7ce4a295346d207d835a2f3318231cebc7d4ccd
Author:     Gregory Neil Shapiro <gshapiro@FreeBSD.org>
AuthorDate: 2023-01-15 21:24:38 +0000
Commit:     Gregory Neil Shapiro <gshapiro@FreeBSD.org>
CommitDate: 2023-02-01 03:20:12 +0000

    MFC: Add -DSTARTTLS CFLAG in order to enable DANE in sendmail builds
    
    (cherry picked from commit 3413ee88c39dbfedfa7d00db536a8e8dc073a562)
---
 lib/libmilter/Makefile | 5 +++++
 lib/libsmutil/Makefile | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/lib/libmilter/Makefile b/lib/libmilter/Makefile
index 17bb09857fcf..b3243c2a66cf 100644
--- a/lib/libmilter/Makefile
+++ b/lib/libmilter/Makefile
@@ -15,6 +15,11 @@ CFLAGS+=-DSM_CONF_POLL
 CFLAGS+=-DNETINET6
 .endif
 
+.if ${MK_OPENSSL} != "no"
+# STARTTLS support
+CFLAGS+=-DSTARTTLS
+.endif
+
 # User customizations to the sendmail build environment
 CFLAGS+=${SENDMAIL_CFLAGS}
 
diff --git a/lib/libsmutil/Makefile b/lib/libsmutil/Makefile
index ff3f8491225b..7bbd21e21bbb 100644
--- a/lib/libsmutil/Makefile
+++ b/lib/libsmutil/Makefile
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+.include <src.opts.mk>
+
 PACKAGE=lib${LIB}
 SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
 .PATH:	${SENDMAIL_DIR}/libsmutil
@@ -7,6 +9,11 @@ SENDMAIL_DIR=${SRCTOP}/contrib/sendmail
 CFLAGS+=-I${SENDMAIL_DIR}/src -I${SENDMAIL_DIR}/include -I.
 CFLAGS+=-DNEWDB -DNIS -DMAP_REGEX -DNOT_SENDMAIL
 
+.if ${MK_OPENSSL} != "no"
+# STARTTLS support
+CFLAGS+=-DSTARTTLS
+.endif
+
 # User customizations to the sendmail build environment
 CFLAGS+=${SENDMAIL_CFLAGS}