1
0
mirror of https://github.com/php/doc-en.git synced 2026-03-23 23:32:18 +01:00
Files
archived-doc-en/reference/libxml/setup.xml
2024-07-09 22:24:55 +01:00

105 lines
3.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<chapter xml:id="libxml.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
&reftitle.setup;
<!-- {{{ Requirements -->
<section xml:id="libxml.requirements">
&reftitle.required;
<para>
This extension requires <link xlink:href="&url.libxml;">libxml</link> &gt;=
2.9.0 as of PHP 8.0. libxml &gt;= 2.6.0 prior to PHP 8.0.
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation PHP >= 7.4 -->
<section xml:id="libxml.installation">
<title>Installation for PHP versions &gt;= 7.4</title>
<para>
The libxml extension is enabled by default, although it may be disabled with
<option role="configure">--without-libxml</option>.
</para>
<para>
PHP uses <literal>pkg-config</literal> to select the right library file, header files,
and compile flags to use for libxml2.
To ensure that the desired version of libxml2 is selected,
the <envar>PKG_CONFIG_PATH</envar> environment variable may
be used to control the search path for <literal>pkg-config</literal> prior to running the configure script:
<![CDATA[PKG_CONFIG_PATH="/path/to/libxml2/prefix/lib/pkgconfig:/lib/pkgconfig"]]>
</para>
</section>
<!-- }}} -->
<!-- {{{ Installation PHP < 7.4 -->
<section xml:id="libxml.installation_old">
<title>Installation for PHP versions &lt; 7.4</title>
<para>
The libxml extension is enabled by default, although it may be disabled with
<option role="configure">--disable-libxml</option>.
</para>
<para>
The optional <option role="configure">--with-libxml-dir</option>
directive is used to specify the location of <literal>libxml</literal>
on the system that PHP is being compiled on, otherwise only the
default locations are scanned. The <literal>configure</literal> process
checks for libxml (specifically, <literal>xml2-config</literal>) in the
following order:
</para>
<orderedlist>
<listitem>
<para>
The location ([DIR]) specified with <option role="configure">--with-libxml-dir</option>
([DIR]=<filename>/bin/xml2-config</filename>)
</para>
</listitem>
<listitem>
<para>
<filename>/usr/local/bin/xml2-config</filename>
</para>
</listitem>
<listitem>
<para>
<filename>/usr/bin/xml2-config</filename>
</para>
</listitem>
</orderedlist>
<para>
If <literal>configure</literal> cannot find <filename>xml2-config</filename> in the directory
specified by <option role="configure">--with-libxml-dir</option>, then
it'll continue on and check the default locations.
</para>
</section>
<!-- }}} -->
<!-- {{{ Resources -->
<section xml:id="libxml.resources">
&reftitle.resources;
&no.resource;
</section>
<!-- }}} -->
</chapter>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->