<?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.php-config.php',
    1 => 'php-config',
    2 => 'php-config',
  ),
  'up' => 
  array (
    0 => 'install.pecl.php',
    1 => 'PECL 扩展安装',
  ),
  'prev' => 
  array (
    0 => 'install.pecl.phpize.php',
    1 => '用 phpize 编译共享 PECL 扩展库',
  ),
  'next' => 
  array (
    0 => 'install.pecl.static.php',
    1 => '将 PECL 扩展库静态编译入 PHP',
  ),
  '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.php-config" class="sect1">
  <h2 class="title">
   <strong class="command">php-config</strong>
  </h2>
  
  <p class="para">
   <strong class="command">php-config</strong> 是一个简单的命令行脚本用于获取所安装的 PHP 配置的信息。
  </p>
  
  <p class="para">
   在编译扩展时，如果安装有多个 PHP 版本，可以在配置时用
   <strong class="option configure">--with-php-config</strong> 选项来指定使用哪一个版本编译，设置相应
   <strong class="command">php-config</strong> 脚本的路径。
  </p>
  
  <p class="para">
   <strong class="command">php-config</strong> 脚本在命令行所能使用的选项可以通过 <strong class="option unknown">-h</strong> 选项来查询：
   <div class="example-contents screen">
<div class="cdata"><pre>
Usage: /usr/local/bin/php-config [OPTION]
Options:
  --prefix            [...]
  --includes          [...]
  --ldflags           [...]
  --libs              [...]
  --extension-dir     [...]
  --include-dir       [...]
  --php-binary        [...]
  --php-sapis         [...]
  --configure-options [...]
  --version           [...]
  --vernum            [...]
</pre></div>
   </div>
  </p>
  
  <p class="para">
   <table class="doctable table">
    <caption><strong>命令行选项</strong></caption>
    
     <thead>
      <tr>
       <th>选项</th>
       <th>说明</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>--prefix</td>
       <td>PHP 所安装的路径前缀，例如 /usr/local</td>
      </tr>

      <tr>
       <td>--includes</td>
       <td>
        列出用 <code class="literal">-I</code> 选项包含的所有文件
       </td>
      </tr>

      <tr>
       <td>--ldflags</td>
       <td>
        PHP 编译时所使用的 <code class="literal">LD</code> flag
       </td>
      </tr>

      <tr>
       <td>--libs</td>
       <td>PHP 编译时所附加的库</td>
      </tr>

      <tr>
       <td>--extension-dir</td>
       <td>扩展库的默认路径</td>
      </tr>

      <tr>
       <td>--include-dir</td>
       <td>
        头文件的默认路径前缀
       </td>
      </tr>

      <tr>
       <td>--php-binary</td>
       <td>PHP CLI 或者 CGI 可执行文件的完整路径</td>
      </tr>

      <tr>
       <td>--php-sapis</td>
       <td>列出所有可用的 SAPI 模块</td>
      </tr>

      <tr>
       <td>--configure-options</td>
       <td>
        重现当前 PHP 在编译时的配置选项
       </td>
      </tr>

      <tr>
       <td>--version</td>
       <td>PHP 版本号</td>
      </tr>

      <tr>
       <td>--vernum</td>
       <td>PHP 版本号，以整数表示</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div><?php manual_footer($setup); ?>