Make our checks more consistent, readable, and modern-meson idiomatic
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2313>
(cherry picked from commit 3983c7408c)
(cherry picked from commit acb16385e95d611a83209a26e31e9bcd68df7069)
(cherry picked from commit ca1d1442ce2ef7f28607db0bfd505ff59264523f)