You need both pixman and cairo, which you can find here: http://cairographics.org/releases/
Pixman configure:
../pixman-0.32.4/configure --prefix=/root/prefix --disable-libpng --disable-gtk
Cairo configure:
PKG_CONFIG_PATH=/root/prefix/lib/pkgconfig ../cairo-1.12.16/configure --prefix=/root/prefix --enable-xlib=no --enable-xcb=no --enable-xcb-shm=no --enable-win32=no --enable-quartz=no --enable-script=no --enable-ft=no --enable-fc=no --enable-ps=no --enable-pdf=no --enable-svg=no --enable-gobject=no --enable-trace=no --enable-interpreter=no --enable-png=no
PKG_CONFIG_PATH
is important because cairo's configure is too dumb to figure out where pixman is otherwise.
This disables pretty much everything cairo cares about btw, so it's going to cry about stuff it really really doesn't advise you to disable (such as the PNG functionality), but it's okay if you just want to draw to an image surface.