diff --git a/component/groonga/buildout.cfg b/component/groonga/buildout.cfg
index e51d117cdfb1b748baf1a3f6fcbd16a99f13beb3..d83fe3b0001f2e029e58b8cd2d7f757764db32e6 100644
--- a/component/groonga/buildout.cfg
+++ b/component/groonga/buildout.cfg
@@ -5,6 +5,9 @@
 parts =
   groonga
 
+extends =
+  ../zlib/buildout.cfg
+
 [groonga]
 recipe = hexagonit.recipe.cmmi
 url = http://packages.groonga.org/source/groonga/groonga-2.0.6.tar.gz
@@ -16,3 +19,7 @@ configure-options =
   --disable-document
   --disable-groonga-httpd
   --without-mecab
+environment =
+  CPPFLAGS =-I${zlib:location}/include
+  LDFLAGS =-Wl,-rpath=${zlib:location}/lib -L${zlib:location}/lib
+