Kore Nordmann looks at his attempt to install the cairo_wrapper and includes a handy note on how he found to get it working.
I tried to install the cairo_wrapper by Hartmut on my gentoo machines, to play around with it, and probably writing an output driver for Image_3D, but I had some problems installing it, I want to share.
He was seeing failures with phpize when he tried to compile it, but had a suggestion from Hartmut on something that would help - setting an environment variable (PHP_AUTOHEADER) and then running the pear command from there.