diff --git a/buildout/software-profiles/mysql-5.1.cfg b/buildout/software-profiles/mysql-5.1.cfg
index 5d7dc7597cbfa1f64b76d8a5aca931c95f29a85c..872938359820709a4eaeca7478099c3b50518e3d 100644
--- a/buildout/software-profiles/mysql-5.1.cfg
+++ b/buildout/software-profiles/mysql-5.1.cfg
@@ -1,4 +1,14 @@
 [buildout]
+extends =
+  ../software-profiles/autoconf.cfg
+  ../software-profiles/automake.cfg
+  ../software-profiles/zlib.cfg
+  ../software-profiles/bison.cfg
+  ../software-profiles/flex.cfg
+  ../software-profiles/libtool.cfg
+  ../software-profiles/ncurses.cfg
+  ../software-profiles/openssl.cfg
+
 parts =
     mysql-5.1
 
@@ -11,9 +21,9 @@ download-only = true
 
 [mysql-hooks-download]
 recipe = hexagonit.recipe.download
-url = http://www.nexedi.org/static/buildout-hooks/${:filename}
+url = http://www.nexedi.org/static/buildout-hooks/mysql-tritonn-hooks.py-r40089
 filename = mysql-tritonn-hooks.py
-md5sum = 484abb02375e354ef7be0438dc369f85
+md5sum = b4d57a527fecaf7a8277fee3c3047bc4
 download-only = true
 
 [mysql-5.1]
@@ -38,7 +48,14 @@ configure-options =
   --with-server-suffix=mysql-5.1
   --with-readline
   --with-ssl
+make-options =
+  LIBTOOL=libtool
 
 patch-options = -p1
 patches =
   ${mysql-5.1-sphinx-patch:location}/${mysql-5.1-sphinx-patch:filename}
+environment =
+  PATH =${autoconf:location}/bin:${libtool:location}/bin:${bison:location}/bin:${flex:location}/bin:%(PATH)s
+  CFLAGS =-I${ncurses:location}/include
+  CXXFLAGS =-I${ncurses:location}/include
+  LDFLAGS =-Wl,-rpath -Wl,${zlib:location}/lib -Wl,-rpath -Wl,${ncurses:location}/lib