Sometimes, using the pecl installer is not an option. This could be because you're behind a firewall, or it could be because the extension you want to install is not available as a PECL compatible package, such as unreleased extensions from SVN. If you need to build such an extension, you can use the lower-level build tools to perform the build manually.
The phpize command is used to prepare the build environment for a PHP extension. In the following sample, the sources for an extension are in a directory named extname:
$ cd extname
$ phpize
$ ./configure
$ make
# make install
摘自:http://php.net/manual/en/install.pecl.phpize.php
例:在扩展GD库的时候执行phpize报错
phpize
Cannot find config.m4.
Make sure that you run '/data/php/bin/phpize' in the top level source directory of the module
cd /usr/src/php-5.6.2/ext/gd
phpize
./configure
make
make install
vim /data/php/etc/php.ini
添加
extension_dir = "/data/php/lib/php/extensions/no-debug-non-zts-20131226/"
extension=gd.so
重启php
/etc/init.d/php-fpm restart
php -m | grep gd
gd