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:
Date: Mon Nov 12 16:23:46 UTC 2018
New revision: 484808
Use sys/capsicum.h instead of deprecated sys/capability.h
Reported by: emaste