The configure script needs some changes to support Debian GNU/k{Free,Net}BSD out of the box. These generally behave like a Linux userland but have a different kernel name. Please see the URL for the patch.
https://buildd.debian.org/status/recent.php?pkg=samba&a=kfreebsd-amd64&suite=sid&limit=30 suggests that this is all working these days, so closing. https://salsa.debian.org/samba-team/samba/blob/master/debian/rules and https://salsa.debian.org/samba-team/samba/tree/master/debian/patches has no kfreebsd patches or significant rules either.