? example.patch
Index: configure.in
===================================================================
RCS file: /cvs/gnome/pango/configure.in,v
retrieving revision 1.218
diff -u -p -r1.218 configure.in
--- configure.in	13 Dec 2005 00:08:48 -0000	1.218
+++ configure.in	31 Dec 2005 12:46:56 -0000
@@ -282,12 +282,15 @@ have_cairo=false
 have_cairo_freetype=false
 have_cairo_win32=false
 have_cairo_atsui=false
+have_cairo_png_functions=false
 
 PKG_CHECK_MODULES(CAIRO, cairo >= 0.5.2-head, have_cairo=true, :)
    
 if $have_cairo ; then
   pango_save_ldflags=$LDFLAGS
   LDFLAGS="$LDFLAGS $CAIRO_LIBS"
+
+  AC_CHECK_LIB(cairo, cairo_surface_write_to_png, have_cairo_png_functions=true, :) 
   AC_CHECK_LIB(cairo, cairo_win32_scaled_font_select_font, have_cairo_win32=true, :)
   if $have_cairo_win32 && $have_win32; then
     AC_DEFINE(HAVE_CAIRO_WIN32, 1, [Whether Cairo uses the Win32 GDI for fonts])
@@ -311,6 +314,7 @@ AM_CONDITIONAL(HAVE_CAIRO, $have_cairo)
 AM_CONDITIONAL(HAVE_CAIRO_WIN32, $have_cairo_win32 && $have_win32)
 AM_CONDITIONAL(HAVE_CAIRO_FREETYPE, $have_cairo_freetype && $have_freetype)
 AM_CONDITIONAL(HAVE_CAIRO_ATSUI, $have_cairo_atsui && $have_atsui)
+AM_CONDITIONAL(HAVE_CAIRO_PNG_FUNCTIONS, $have_cairo_png_functions)
 
 #
 # We must have some backend defined, in order for the pango-querymodules
Index: examples/Makefile.am
===================================================================
RCS file: /cvs/gnome/pango/examples/Makefile.am,v
retrieving revision 1.52
diff -u -p -r1.52 Makefile.am
--- examples/Makefile.am	30 Nov 2005 22:16:56 -0000	1.52
+++ examples/Makefile.am	31 Dec 2005 12:46:57 -0000
@@ -82,7 +82,9 @@ pango_cairoview_LDADD =					\
 
 ###################################################
 if HAVE_CAIRO
+if HAVE_CAIRO_PNG_FUNCTIONS
 noinst_PROGRAMS += cairosimple
+endif
 endif
 
 cairosimple_SOURCES =					\
