downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

¿Problemas?> <Compilando extensiones PEC compartidas con phpize
Last updated: Fri, 20 May 2011

view this page in

Compilando extensiones PECL estáticamente en PHP

Quizá necesite construir una extensión PECL estáticamente en su binario de PHP. Para hacer esto, necesitará ubicar el fuente de la extensión bajo el directorio php-src/ext/ e indicarle al sistema de construcción de PHP que regenere su script de configuración.

$ cd /your/phpsrcdir/ext
$ pecl download extname
$ gzip -d < extname.tgz | tar -xvf -
$ mv extname-x.x.x extname

Esto generará el siguiente directorio:


/your/phpsrcdir/ext/extname

Desde aquí, fuerce a PHP a regenerar el script de configuración, y entonces construya PHP con normalidad:


$ cd /your/phpsrcdir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install

Note: Necesitará autoconf 2.13 y automake 1.4+ para ejecutar el script 'buildconf' (es posible que funcionen versiones más recientes de autoconf, pero no están oficialmente soportadas).

Dependiendo de la extensión, utilizará --enable-extname o --with-extname. Las extensiones que no requieren de bibliotecas externas generalmente utilizan --enable. Para asegurarse, ejecute el siguiente comando después de buildconf:


$ ./configure --help | grep extname



add a note add a note User Contributed Notes Compilando extensiones PECL estáticamente en PHP
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites