<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'install.pecl.static.php',
    1 => 'PECL-Erweiterungen statisch in PHP kompilieren',
    2 => 'PECL-Erweiterungen statisch in PHP kompilieren',
  ),
  'up' => 
  array (
    0 => 'install.pecl.php',
    1 => 'Installation der PECL-Erweiterungen',
  ),
  'prev' => 
  array (
    0 => 'install.pecl.php-config.php',
    1 => 'php-config',
  ),
  'next' => 
  array (
    0 => 'install.composer.intro.php',
    1 => 'Introduction to Composer',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    '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-Erweiterungen statisch in PHP kompilieren</h2>
  <p class="simpara">
   In manchen Fällen kann es nötig sein, eine PECL-Erweiterung statisch in das
   PHP-Binary zu kompilieren. Dazu muss der Quellcode der Erweiterung in das
   Verzeichnis <code class="literal">/pfad/zu/php/src/</code> einfügt werden und das
   PHP-Build-System angewiesen werden, sein configure-Skript neu zu erstellen.
  </p>
  <p class="para">
   <div class="example-contents screen">
<div class="cdata"><pre>
$ cd /pfad/zu/php/src/ext
$ pecl download extname
$ gzip -d &lt; extname.tgz | tar -xvf -
$ mv extname-x.x.x extname
</pre></div>
   </div>
  </p>
  <p class="simpara">
   Dadurch wird das folgende Verzeichnis erstellt:
  </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
/pfad/zu/php/src/ext/extname
</pre></div>
  </div>
  <p class="simpara">
   An dieser Stelle muss PHP veranlasst werden, das configure-Skript neu zu
   erstellen, und anschließend kann PHP gebaut werden wie gewohnt:
  </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
$ cd /pfad/zu/php/src/
$ 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">Hinweis</strong>: 
   <span class="simpara">
    Um das Skript <strong class="command">buildconf</strong> auszuführen, werden
    <strong class="command">autoconf</strong> <code class="literal">2.68</code> und
    <strong class="command">automake</strong> benötigt. Neuere Versionen von autoconf
    könnten funktionieren, werden aber nicht unterstützt.
   </span>
  </p></blockquote>
  <p class="simpara">
   Ob <strong class="option configure">--enable-extname</strong> oder
   <strong class="option configure">--with-extname</strong> verwendet wird, hängt von
   der Erweiterung ab. Bei einer Erweiterung, die keine externen Bibliotheken
   benötigt, wird in der Regel <strong class="option configure">--enable</strong>
   verwendet. Um sicher zu sein, kann nach <strong class="command">buildconf</strong>
   folgender Befehl ausgeführt werden:
  </p>
  <div class="example-contents screen">
<div class="cdata"><pre>
$ ./configure --help | grep extname
</pre></div>
  </div>
 </div><?php manual_footer($setup); ?>