It may be necessary to build a PECL extension statically into the PHP binary.
To do this, the extension source will need to be placed under the
/path/to/php/src/dir/ext/
directory, and the PHP build system will be required to regenerate its
configure script.
$ cd /path/to/php/src/dir/ext
$ pecl download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
/path/to/php/src/dir/ext/extname
From here, PHP needs to be forced to rebuild the configure script, and then
it can be built as normal:
$ cd /path/to/php/src/dir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install
$ ./configure --help | grep extname