ssh: Consolidate HAVE_LDNS / LIBWRAP in ssh.mk

Commit 9d63429fa1 ("ssh: move common Makefile boilerplate to a new
ssh.mk") introduced ssh.mk for common OpenSSH paths and flags, as part
of enabling FIDO/U2F.  Move duplicated MK_LDNS and MK_TCP_WRAPPERS
handling there.

Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D31896
This commit is contained in:
Ed Maste 2022-04-12 09:18:20 -04:00
parent 7f91623604
commit d71e7e57fc
14 changed files with 13 additions and 76 deletions

View file

@ -45,7 +45,7 @@ SRCS+= bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
SRCS+= getrrsetbyname.c
.else
LDNSDIR= ${SRCTOP}/contrib/ldns
CFLAGS+= -DHAVE_LDNS=1 -I${LDNSDIR}
CFLAGS+= -I${LDNSDIR}
SRCS+= getrrsetbyname-ldns.c
LIBADD+= ldns
.endif

View file

@ -7,12 +7,6 @@ MAN= sftp-server.8
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -6,15 +6,7 @@ SRCS= ssh-keysign.c readconf.c uidswap.c
MAN= ssh-keysign.8
BINMODE=4555
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
LIBADD+= crypto
LIBADD= crypto ssh
.include <bsd.prog.mk>

View file

@ -5,15 +5,7 @@ PROG= ssh-pkcs11-helper
SRCS= ssh-pkcs11.c ssh-pkcs11-helper.c
MAN= ssh-pkcs11-helper.8
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
LIBADD+= crypto
LIBADD= crypto ssh
.include <bsd.prog.mk>

View file

@ -26,12 +26,6 @@ MAN=
# pam should always happen before ssh here for static linking
LIBADD= pam ssh util
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.if ${MK_AUDIT} != "no"
CFLAGS+= -DUSE_BSM_AUDIT=1 -DHAVE_GETAUDIT_ADDR=1
LIBADD+= bsm

View file

@ -12,6 +12,14 @@ CFLAGS+= -include krb5_config.h
CFLAGS+= -DXAUTH_PATH=\"${LOCALBASE:U/usr/local}/bin/xauth\"
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
.endif
.if ${MK_TCP_WRAPPERS} != "no"
CFLAGS+= -DLIBWRAP=1
.endif
.if ${MK_USB} != "no"
# Built-in security key support
CFLAGS+= -include sk_config.h

View file

@ -7,12 +7,6 @@ PACKAGE= ssh
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -8,12 +8,6 @@ PACKAGE= ssh
LIBADD= ssh edit
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -7,12 +7,6 @@ PACKAGE= ssh
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -5,20 +5,12 @@ PROG= ssh-agent
SRCS= ssh-agent.c ssh-pkcs11-client.c
PACKAGE= ssh
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
LIBADD= crypto ssh
.if defined(LOCALBASE)
CFLAGS+= -DDEFAULT_PKCS11_WHITELIST='"/usr/lib*/*,${LOCALBASE}/lib*/*"'
.endif
LIBADD+= crypto
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -6,13 +6,7 @@ PROG= ssh-keygen
SRCS= ssh-keygen.c sshsig.c ssh-sk-client.c
PACKAGE= ssh
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
.endif
LIBADD+= crypto
LIBADD= crypto ssh
.include <bsd.prog.mk>

View file

@ -7,12 +7,6 @@ PACKAGE= ssh
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
#DPADD+= ${LIBLDNS}
#LDADD+= -lldns
.endif
.include <bsd.prog.mk>
.PATH: ${SSHDIR}

View file

@ -17,10 +17,6 @@ SRCS+= gss-genr.c
LIBADD= ssh
.if ${MK_LDNS} != "no"
CFLAGS+= -DHAVE_LDNS=1
.endif
.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
LIBADD+= gssapi
.endif

View file

@ -21,7 +21,6 @@ LIBADD+= gssapi_krb5 gssapi krb5
.endif
.if ${MK_TCP_WRAPPERS} != "no"
CFLAGS+= -DLIBWRAP=1
LIBADD+= wrap
.endif