PHP 手冊
前一頁 | 章 7. Installation of PECL extensions | 下一頁

# Compiling PECL extensions statically into PHP

To statically include the extension within the PHP build, put the extensions source into the `ext/` directory found in the PHP source. For example:

    $ cd /your/phpsrcdir/ext
    $ pear download extname
    $ gzip -d < extname.tgz | tar -xvf -
    $ mv extname-x.x.x extname
    $ rm package.xml

This will result in the following directory:

    /your/phpsrcdir/ext/extname

From here, build PHP as normal:

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

Whether --enable-extname or --with-extname is used depends on the extension. Typically an extension that does not require external libraries uses --enable. To be sure, run the following after buildconf:

    $ ./configure --help | grep extname

前一頁 | 內容 | 下一頁
Compiling shared PECL extensions with phpize | 上一層 | Problems?