<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'install.pecl.static.php',
    1 => 'PECL 拡張モジュールを PHP に静的に組み込む',
    2 => 'PECL 拡張モジュールを PHP に静的に組み込む',
  ),
  'up' => 
  array (
    0 => 'install.pecl.php',
    1 => 'PECL 拡張モジュールのインストール',
  ),
  'prev' => 
  array (
    0 => 'install.pecl.php-config.php',
    1 => 'php-config',
  ),
  'next' => 
  array (
    0 => 'install.composer.intro.php',
    1 => 'Composer 入門',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    '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.static" class="sect1">
   <h2 class="title">PECL 拡張モジュールを PHP に静的に組み込む</h2>
   <p class="simpara">
    PECL 拡張モジュールを PHP に静的に組み込みたいと思うこともあるでしょう。
    そのためには、拡張モジュールのソースを <var class="filename">/path/to/php/src/dir/ext/</var>
    ディレクトリに置き、PHP にその設定スクリプトを生成させる必要があります。
   </p>
   <p class="para">
    <div class="example-contents screen">
<div class="cdata"><pre>
$ cd /path/to/php/src/dir/ext
$ pecl download extname
$ gzip -d &lt; extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
</pre></div>
    </div>
   </p>
   <p class="simpara">
    上記を行うと、以下のディレクトリが作成されます。
   </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
/path/to/php/src/dir/ext/extname
</pre></div>
  </div>
   <p class="simpara">
    これ以降、PHP に configure スクリプトを再実行させ、通常通りに
    PHP をビルドします。
   </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
$ cd /path/to/php/src/dir
$ rm configure
$ ./buildconf --force
$ ./configure --help
$ ./configure --with-extname --enable-someotherext --with-foobar
$ make
$ make install
</pre></div>
  </div>
   <blockquote class="note"><p><strong class="note">注意</strong>: 
    <span class="simpara">
     <strong class="command">buildconf</strong> スクリプトを実行するためには、<strong class="command">autoconf</strong> <code class="literal">2.68</code> と <strong class="command">automake</strong> <code class="literal">1.4+</code>
     が必要です
     (新しいバージョンの <strong class="command">autoconf</strong> でも動作するかも知れませんが、
     サポートされていません)。
    </span>
   </p></blockquote>
   <p class="simpara">
    拡張モジュールによって、<strong class="option configure">--enable-extname</strong>
    もしくは <strong class="option configure">--with-extname</strong> オプションを指定します。
    外部ライブラリを使用しない拡張モジュールについては、
    <strong class="option configure">--enable</strong> が使われるのが一般的です。
    <strong class="command">buildconf</strong> の後で、以下を行うと確認できます。
   </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
$ ./configure --help | grep extname
</pre></div>
  </div>
  </div><?php manual_footer($setup); ?>