<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/install.pecl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'install.pecl.phpize.php',
    1 => '用 phpize 编译共享 PECL 扩展库',
    2 => '用 phpize 编译共享 PECL 扩展库',
  ),
  'up' => 
  array (
    0 => 'install.pecl.php',
    1 => 'PECL 扩展安装',
  ),
  'prev' => 
  array (
    0 => 'install.pecl.pear.php',
    1 => '用 PEAR 编译共享 PECL 扩展库',
  ),
  'next' => 
  array (
    0 => 'install.pecl.php-config.php',
    1 => 'php-config',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'install/pecl.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="install.pecl.phpize" class="sect1">
  <h2 class="title">用 phpize 编译共享 PECL 扩展库</h2>
  <p class="simpara">
   有时候不能用 <strong class="command">pecl</strong>
   安装命令。这可能是因为存在防火墙，或者要安装的扩展不可用作
   PECL 兼容的包，例如 Git 中尚未发布的扩展库。如果要编译这种扩展，可以用更底层的编译工具来手工进行编译。
  </p>
  <p class="simpara">
   <strong class="command">phpize</strong> 命令是用来准备 PHP
   扩展库的编译环境的。下面例子中，扩展库的源程序位于
   <var class="filename">extname</var> 目录中：
  </p>
  <p class="para">
   <div class="example-contents screen">
<div class="cdata"><pre>
$ cd extname
$ phpize
$ ./configure
$ make
# make install
</pre></div>
   </div>
  </p>
  <p class="simpara">
   成功的安装将创建 <var class="filename">extname.so</var> 并放置于
   PHP 的<a href="ini.core.php#ini.extension-dir" class="link">扩展库目录</a>中。需要调整
   <var class="filename">php.ini</var>，加入 <code class="literal">extension=extname.so</code>
   这一行之后才能使用此扩展库。
  </p>
  <p class="simpara">
   如果系统中没有 <strong class="command">phpize</strong> 命令并且使用了预编译的包（例如
   RPM），那要安装 PHP 包相应的开发版本，此版本通常包含了
   <strong class="command">phpize</strong> 命令以及用于编译 PHP 及其扩展库的正确头文件。
  </p>
  <p class="simpara">
   使用 <strong class="command">phpize --help</strong> 命令可以显示此命令用法。
  </p>
 </div><?php manual_footer($setup); ?>