Do we have any conclusion here, should we go this way:
I will go for try first pkg-config and let xml2-config as a fallback since that change is going to be just in newer versions.
and about the MacOS - maybe the compilation will also work with the fewer flags, I can't test it though.