php-5.3.6 交叉编译 发生错误configure: error: ZLIB extension requires zlib >= 1.0.9

安装zlib-1.2.7

#cd  /zlib-1.2.7
# CC=arm-linux-gcc  ./configure  --prefix=~/libz  --enable-shared 
# make 
# make  install

然后编译php

# CC=arm-linux-gcc ./configure --host=arm-linux --prefix=/usr/local/php --enable-pdo  --with-zlib  --with-libxml  --with-gd  --with-freetype  --with-jpeg --with-png --enable-mbstring  --with-mysql=/usr/local/mysql/  --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-gd-native-ttf   --with-gettext=/usr/local/gettext/   --enable-magic-quotes--enable-sockets  --with-zlib -dir=~/libz --without-iconv

错误:checking if the location of ZLIB install directory is defined... ~/libz
checking for gzgets in -lz... no
configure: error: ZLIB extension requires zlib >= 1.0.9

图片说明
跪求解决办法!