diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index 43fa46149df..d5292be88a4 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -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 diff --git a/secure/libexec/sftp-server/Makefile b/secure/libexec/sftp-server/Makefile index 40d86926d1b..29f7a8df9fd 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -7,12 +7,6 @@ MAN= sftp-server.8 LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/libexec/ssh-keysign/Makefile b/secure/libexec/ssh-keysign/Makefile index 6027b164a35..e66ed527aff 100644 --- a/secure/libexec/ssh-keysign/Makefile +++ b/secure/libexec/ssh-keysign/Makefile @@ -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 diff --git a/secure/libexec/ssh-pkcs11-helper/Makefile b/secure/libexec/ssh-pkcs11-helper/Makefile index 4bc3a814ab8..84374fdca43 100644 --- a/secure/libexec/ssh-pkcs11-helper/Makefile +++ b/secure/libexec/ssh-pkcs11-helper/Makefile @@ -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 diff --git a/secure/libexec/sshd-session/Makefile b/secure/libexec/sshd-session/Makefile index bce96112f65..81e48155918 100644 --- a/secure/libexec/sshd-session/Makefile +++ b/secure/libexec/sshd-session/Makefile @@ -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 diff --git a/secure/ssh.mk b/secure/ssh.mk index bd88e43aa0a..8411fb11fb1 100644 --- a/secure/ssh.mk +++ b/secure/ssh.mk @@ -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 diff --git a/secure/usr.bin/scp/Makefile b/secure/usr.bin/scp/Makefile index dbc896286dd..2ecea0ef52d 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/sftp/Makefile b/secure/usr.bin/sftp/Makefile index 841c89b71c6..f903f5e611d 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -8,12 +8,6 @@ PACKAGE= ssh LIBADD= ssh edit -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-add/Makefile b/secure/usr.bin/ssh-add/Makefile index ec709c72108..8df3789534a 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-agent/Makefile b/secure/usr.bin/ssh-agent/Makefile index bc5985a7325..06abc627fcd 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -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 .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh-keygen/Makefile b/secure/usr.bin/ssh-keygen/Makefile index 149dc693665..89e61e68ee5 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -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 diff --git a/secure/usr.bin/ssh-keyscan/Makefile b/secure/usr.bin/ssh-keyscan/Makefile index b842841f765..baa7f54b048 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -7,12 +7,6 @@ PACKAGE= ssh LIBADD= ssh -.if ${MK_LDNS} != "no" -CFLAGS+= -DHAVE_LDNS=1 -#DPADD+= ${LIBLDNS} -#LDADD+= -lldns -.endif - .include .PATH: ${SSHDIR} diff --git a/secure/usr.bin/ssh/Makefile b/secure/usr.bin/ssh/Makefile index aba1bce9c9a..df85f47d597 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -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 diff --git a/secure/usr.sbin/sshd/Makefile b/secure/usr.sbin/sshd/Makefile index d3b228bbbeb..23a053f27ae 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -21,7 +21,6 @@ LIBADD+= gssapi_krb5 gssapi krb5 .endif .if ${MK_TCP_WRAPPERS} != "no" -CFLAGS+= -DLIBWRAP=1 LIBADD+= wrap .endif