diff -u a/gio/Makefile.am b/gio/Makefile.am
--- a/gio/Makefile.am	2011-07-05 06:04:15.000000000 +1000
+++ b/gio/Makefile.am	2011-07-24 18:21:48.221810782 +1000
@@ -414,6 +414,8 @@
 	$(XATTR_LIBS) 					\
 	$(NULL)
 
+libgio_2_0_la_CPPFLAGS = $(ZLIB_CFLAGS) $(AM_CPPFLAGS)
+
 if PLATFORM_WIN32
 no_undefined = -no-undefined
 endif
