<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/configure.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'configure.about.php',
    1 => '核心配置选项列表',
    2 => '核心配置选项列表',
  ),
  'up' => 
  array (
    0 => 'configure.php',
    1 => '配置选项',
  ),
  'prev' => 
  array (
    0 => 'configure.php',
    1 => '配置选项',
  ),
  'next' => 
  array (
    0 => 'ini.php',
    1 => 'php.ini 配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'appendices/configure/index.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="configure.about" class="sect1">
  <h2 class="title">核心配置选项列表</h2>
  <p class="para">
   下面是 PHP 的 <var class="filename">configure</var>
   脚本使用的部分选项的列表，用于类 Unix
   环境的编译。大部分配置选项在扩展模块参考页面适当的位置列出，而不是在这里。要查看所有可用配置选项的列表，在运行
   <strong class="command">autoconf</strong> 命令后在 PHP 的源代码目录运行
   <strong class="command">./configure --help</strong>（参见<a href="install.php" class="link">安装与配置</a>一章）。也可以阅读
   <a href="http://www.airs.com/ian/configure/" class="link external">&raquo;&nbsp;GNU configure</a>
   文档以获得有关 <strong class="command">configure</strong>
   命令的更详细信息，例如 <code class="literal">--prefix=PREFIX</code>。
  </p>

  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <p class="para">
    这些选项只用在编译的时候。如果想要修改 PHP 的运行时配置，请阅读<a href="configuration.php" class="link">运行时配置</a>。
   </p>
  </p></blockquote>

  <ul class="itemizedlist">
   <li class="listitem">
    <span class="simpara">
     <a href="configure.about.php#configure.options.misc" class="link">杂项</a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="configure.about.php#configure.options.php" class="link">PHP 行为</a>
    </span>
   </li>
   <li class="listitem">
    <span class="simpara">
     <a href="configure.about.php#configure.options.servers" class="link">服务器</a>
    </span>
   </li>
  </ul>

  <div class="sect2" id="configure.options">
   <h3 class="title">PHP 配置选项</h3>
   



 <div class="sect3" id="configure.options.misc">
  <h4 class="title">杂项选项</h4>
  <dl>
   
    <dt id="configure.enable-debug">
     <strong class="option configure">--enable-debug</strong>
    </dt>
    <dd>
     <p class="para">
      编译时加入调试符号。
     </p>
    </dd>
   
   
    <dt id="configure.with-layout">
     <strong class="option configure">--with-layout=TYPE</strong>
    </dt>
    <dd>
     <p class="para">
      设置已安装文件的布局方式。TYPE 是 PHP（默认）或 GNU。请注意，如果在 PREFIX（默认）下安装
      manpages，请选择 GNU 样式，以便在 <var class="filename">manpath</var> 实用程序的搜索路径中能够找到它们。
     </p>
    </dd>
   
   
    <dt id="configure.with-pear">
     <strong class="option configure">--with-pear=DIR</strong>
    </dt>
    <dd>
     <p class="para">
      在 DIR（默认为 PREFIX/lib/php）中安装 PEAR。
     </p>
    </dd>
   
   
    <dt id="configure.without-pear">
     <strong class="option configure">--without-pear</strong>
    </dt>
    <dd>
     <p class="para">
      不安装 PEAR。
     </p>
    </dd>
   

   
    <dt id="configure.enable-sigchild">
     <strong class="option configure">--enable-sigchild</strong>
    </dt>
    <dd>
     <p class="para">
      使用 PHP 自带的 SIGCHLD 处理器。
     </p>
    </dd>
   
   
    <dt id="configure.disable-rpath">
     <strong class="option configure">--disable-rpath</strong>
    </dt>
    <dd>
     <p class="para">
      禁用在搜索路径中传递其他运行库。
     </p>
    </dd>
   
   
    <dt id="configure.enable-libgcc">
     <strong class="option configure">--enable-libgcc</strong>
    </dt>
    <dd>
     <p class="para">
      启用 libgcc 的精确链接。
     </p>
    </dd>
   
   
    <dt id="configure.enable-php-streams">
     <strong class="option configure">--enable-php-streams</strong>
    </dt>
    <dd>
     <p class="para">
      包含试验性的 PHP 流。不要使用此选项，除非是要测试代码！
     </p>
    </dd>
   
   
    <dt id="configure.with-zlib-dir">
     <strong class="option configure">--with-zlib-dir[=DIR]</strong>
    </dt>
    <dd>
     <p class="para">
      定义 zlib 的安装目录。
     </p>
    </dd>
   

   
    <dt id="configure.with-tsrm-pthreads">
     <strong class="option configure">--with-tsrm-pthreads</strong>
    </dt>
    <dd>
     <p class="para">
      使用 POSIX 线程（默认）。
     </p>
    </dd>
   
   
    <dt id="configure.enable-shared">
     <strong class="option configure">--enable-shared[=PKGS]</strong>
    </dt>
    <dd>
     <p class="para">
      编译共享库 [default=yes]。
     </p>
    </dd>
   
   
    <dt id="configure.enable-static">
     <strong class="option configure">--enable-static[=PKGS]</strong>
    </dt>
    <dd>
     <p class="para">
      编译静态库 [default=yes]。
     </p>
    </dd>
   
   
    <dt id="configure.enable-fast-install">
     <strong class="option configure">--enable-fast-install[=PKGS]</strong>
    </dt>
    <dd>
     <p class="para">
      为快速安装优化 [default=yes]。
     </p>
    </dd>
   
   
    <dt id="configure.with-gnu-ld">
     <strong class="option configure">--with-gnu-ld</strong>
    </dt>
    <dd>
     <p class="para">
      假设 C 编译器使用 GNU ld [default=no]。
     </p>
    </dd>
   
   
    <dt id="configure.disable-libtool-lock">
     <strong class="option configure">--disable-libtool-lock</strong>
    </dt>
    <dd>
     <p class="para">
      避免锁死（可能破坏并联的编译）。
     </p>
    </dd>
   
   
    <dt id="configure.with-pic">
     <strong class="option configure">--with-pic</strong>
    </dt>
    <dd>
     <p class="para">
      尝试仅使用 PIC/非 PIC 对象 [default=use both]。
     </p>
    </dd>
   

   
    <dt id="configure.enable-versioning.php4">
     <strong class="option configure">--enable-versioning</strong>
    </dt>
    <dd>
     <p class="para">
      仅导出必须的符号。查看 INSTALL 文件以获得更多信息。
     </p>
    </dd>
   
  </dl>
 </div>



   



 <div class="sect3" id="configure.options.php">
  <h4 class="title">PHP 选项</h4>
  <dl>
   
    <dt id="configure.enable-maintainer-mode">
     <strong class="option configure">--enable-maintainer-mode</strong>
    </dt>
    <dd>
     <p class="para">
      对偶然安装一下的情形启用此选项，使得不检查编译规则和依赖关系。
     </p>
    </dd>
   
   
    <dt id="configure.with-config-file-path">
     <strong class="option configure">--with-config-file-path=PATH</strong>
    </dt>
    <dd>
     <p class="para">
      设置 <var class="filename">php.ini</var> 的搜索路径。默认为 PREFIX/lib。
     </p>
    </dd>
   
   
    <dt id="configure.disable-short-tags">
     <strong class="option configure">--disable-short-tags</strong>
    </dt>
    <dd>
     <p class="para">
      默认禁用短形式的开始标签 &lt;? 。
     </p>
    </dd>
   
   
    <dt id="configure.with-libdir">
     <strong class="option configure">--with-libdir</strong>
    </dt>
    <dd>
     <p class="para">
      在 Unix 系统上指定库的目录，用于构建 PHP。对于 64 位系统，需要将此参数指定为
      <code class="literal">lib64</code>，例如：<code class="literal">--with-libdir=lib64</code>。
     </p>
    </dd>
   
   
    <dt id="configure.enable-zts">
     <strong class="option configure">--enable-zts</strong>
    </dt>
    <dd>
     <p class="para">
      启用线程安全。PHP 8.0.0 之前的非 Windows 系统上，该选项为
      <strong class="option configure">--enable-maintainer-zts</strong>。
     </p>
    </dd>
   
  </dl>
 </div>



   



 <div class="sect3" id="configure.options.servers">
  <h4 class="title">SAPI 选项</h4>
  <p class="para">
   下面的列表包含 PHP 可用的 SAPI（<code class="literal">服务器应用编程接口</code>）。
  </p>
  <dl>
   
    <dt id="configure.with-apxs">
     <strong class="option configure">--with-apxs[=FILE]</strong>
    </dt>
    <dd>
     <p class="para">
      编译共享的 Apache 模块。FILE 是可选的 Apache apxs
      工具的路径，默认指向 apxs。请确认指定的
      apxs 已经安装在服务器中，并且它不是 Apache 源码包中的那个 apxs。
     </p>
    </dd>
   
   
    <dt id="configure.with-apache">
     <strong class="option configure">--with-apache[=DIR]</strong>
    </dt>
    <dd>
     <p class="para">
      编译静态 Apache 模块。DIR 是 Apache 编译目录的顶层，默认为
      <var class="filename">/usr/local/apache</var>。
     </p>
    </dd>
   
   
    <dt id="configure.with-mod-charset">
     <strong class="option configure">--with-mod_charset</strong>
    </dt>
    <dd>
     <p class="para">
      启用 mod_charset 的转换表（俄文的 Apache 使用）。
     </p>
    </dd>
   
   
    <dt id="configure.with-apxs2">
     <strong class="option configure">--with-apxs2[=FILE]</strong>
    </dt>
    <dd>
     <p class="para">
      编译共享的 Apache 2.0 模块。FILE 是可选的
      Apache apxs 工具的路径，默认指向 apxs。
     </p>
    </dd>
   

   
    <dt id="configure.disable-cli">
     <strong class="option configure">--disable-cli</strong>
    </dt>
    <dd>
     <p class="para">
      禁止编译 PHP 的 CLI 版本（使用它将同时强制使用
      <a href="configure.about.php#configure.without-pear" class="link">--without-pear</a> 选项）。更多信息请参阅
      <a href="features.commandline.php" class="link">PHP 的命令行模式</a>。
     </p>
    </dd>
   

   
    <dt id="configure.enable-phpdbg">
     <strong class="option configure">--enable-phpdbg</strong>
    </dt>
    <dd>
     <p class="para">
      启用 phpdbg 调试 SAPI 模块支持。
     </p>
    </dd>
   

   
    <dt id="configure.enable-embed">
     <strong class="option configure">--enable-embed[=TYPE]</strong>
    </dt>
    <dd>
     <p class="para">
      启用编译嵌入的 SAPI 库。TYPE 或者为 <code class="literal">shared</code>
      或者为 <code class="literal">static</code>，默认为
      <code class="literal">shared</code>。
     </p>
    </dd>
   

   
    <dt id="configure.with-servlet">
     <strong class="option configure">--with-servlet[=DIR]</strong>
    </dt>
    <dd>
     <p class="para">
      包含 servlet 支持。DIR 是 JSDK 的安装目录。此 SAPI
      要求 java 扩展必须作为共享模块编译到 PHP 中。
     </p>
    </dd>
   

   
    <dt id="configure.disable-cgi">
     <strong class="option configure">--disable-cgi</strong>
    </dt>
    <dd>
     <p class="para">
      禁止编译 CGI 版本的 PHP。
     </p>
     <p class="para">
      这个选项也会启用 FastCGI。
     </p>
    </dd>
   

  </dl>
 </div>



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