I think the best would be to figure out first if `xml2-config` exists and if yes, use it, otherwise look for `pkg-config`. I expect `xml2-config` comes from developers of the project, while `pkg-config` is more a distro/packager variant, but the main argument would be that currently it works fine with `xml2-config`. If some distro has no longer `xml2-config`, then `pkg-config` will be used anyhow.