sys/capability.h will be removed before FreeBSD 13. The (now) correct header to use on all supported (and most unsupported) versions of FreeBSD is sys/capsicum.h. There's no need for autoconf checks etc. to check for both (in the ports tree) but upstream may want to if there's a desire to build on older releases.
A commit references this bug: Author: bapt Date: Mon Nov 12 16:23:46 UTC 2018 New revision: 484808 URL: https://svnweb.freebsd.org/changeset/ports/484808 Log: Use sys/capsicum.h instead of deprecated sys/capability.h PR: 233169 Reported by: emaste Changes: head/www/kcgi/files/ head/www/kcgi/files/patch-sandbox-capsicum.c