How do I find the version number of system libraries in different versions of OS X?
To answer the specific question, in newer releases, libcairo is part of cairo, which is part of XQuartz rather than the Apple-supplied X11 installation. You can find out the supplied version by checking the page for the release in question - for example, here for 2.7.7.

As has been answered by Mark, the Apple Open Source site provides listings of all of the open source software included in each release.