The information *is* available in a structured way: search PKG_CONFIG_PATH
and open the file named ${package}.pc therein (or in /usr/lib/pkgconfig if
PKG_CONFIG_PATH is not set) and just parse the file directly. Its format
is *really* not that complicated. I've parsed it in a few dozen lines of
shell...