The ``compiled(p)`` predicate checks (and can only check) if the argument is
valid Nim code. It cannot autodetect the availability of external C headers,
libraries, etc. For that, you'll need a tool such as autoconf (though I'm
personally leaning towards `autosetup <https://msteveb.github.io/autosetup/>`_
these days).