diff --git a/secure/lib/libssh/Makefile b/secure/lib/libssh/Makefile index 0a5b25e6780..1917e0a58e3 100644 --- a/secure/lib/libssh/Makefile +++ b/secure/lib/libssh/Makefile @@ -46,7 +46,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 852055bfe62..4aac86ac01b 100644 --- a/secure/libexec/sftp-server/Makefile +++ b/secure/libexec/sftp-server/Makefile @@ -8,12 +8,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 e5aa05f40f1..129b34199fa 100644 --- a/secure/libexec/ssh-keysign/Makefile +++ b/secure/libexec/ssh-keysign/Makefile @@ -7,15 +7,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 2e04a0ed1fc..50669753196 100644 --- a/secure/libexec/ssh-pkcs11-helper/Makefile +++ b/secure/libexec/ssh-pkcs11-helper/Makefile @@ -6,15 +6,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 bb262306233..a8d5eac7739 100644 --- a/secure/usr.bin/scp/Makefile +++ b/secure/usr.bin/scp/Makefile @@ -8,12 +8,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 72229d100c4..2f51bf524c6 100644 --- a/secure/usr.bin/sftp/Makefile +++ b/secure/usr.bin/sftp/Makefile @@ -9,12 +9,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 43ee63c567e..ddde5213002 100644 --- a/secure/usr.bin/ssh-add/Makefile +++ b/secure/usr.bin/ssh-add/Makefile @@ -8,12 +8,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 83813452e69..a96af6255b7 100644 --- a/secure/usr.bin/ssh-agent/Makefile +++ b/secure/usr.bin/ssh-agent/Makefile @@ -6,20 +6,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 6595ad3db13..e15b7aafbb4 100644 --- a/secure/usr.bin/ssh-keygen/Makefile +++ b/secure/usr.bin/ssh-keygen/Makefile @@ -7,13 +7,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 b71c07a91b9..72057781a28 100644 --- a/secure/usr.bin/ssh-keyscan/Makefile +++ b/secure/usr.bin/ssh-keyscan/Makefile @@ -8,12 +8,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 e16433ec5d1..ad4b692c961 100644 --- a/secure/usr.bin/ssh/Makefile +++ b/secure/usr.bin/ssh/Makefile @@ -18,10 +18,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 5d6dca203a0..f0a6105e83b 100644 --- a/secure/usr.sbin/sshd/Makefile +++ b/secure/usr.sbin/sshd/Makefile @@ -22,7 +22,6 @@ LIBADD+= gssapi_krb5 gssapi krb5 .endif .if ${MK_TCP_WRAPPERS} != "no" -CFLAGS+= -DLIBWRAP=1 LIBADD+= wrap .endif