mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-17 09:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@297078 c90b9560-bf6c-de11-be94-00142212c4b1
105 lines
4.7 KiB
XML
105 lines
4.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<sect2 xml:id="internals2.ze1.zendapi.configuration-macros" xmlns="http://docbook.org/ns/docbook">
|
|
<title>Reference: Some Configuration Macros</title>
|
|
<sect3 xml:id="internals2.ze1.zendapi.configuration-macros.config-m4">
|
|
<title><filename>config.m4</filename></title>
|
|
<para>
|
|
The file <filename>config.m4</filename> is processed by
|
|
<filename>buildconf</filename> and must contain all the instructions to be
|
|
executed during configuration. For example, these can include tests for required
|
|
external files, such as header files, libraries, and so on. PHP defines a set of macros
|
|
that can be used in this process, the most useful of which are described in
|
|
<xref linkend="internals2.ze1.zendapi.tab.m4-macros"/>.
|
|
</para>
|
|
<table xml:id="internals2.ze1.zendapi.tab.m4-macros">
|
|
<title>M4 Macros for <filename>config.m4</filename></title>
|
|
<tgroup cols="2">
|
|
<colspec colnum="1" colname="col1" colwidth="1.63*"/>
|
|
<colspec colnum="2" colname="col2" colwidth="1.00*"/>
|
|
<tbody>
|
|
<row>
|
|
<entry colname="col1">Macro</entry>
|
|
<entry colname="col2">Description</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_MSG_CHECKING(message)</literal></entry>
|
|
<entry colname="col2">Prints a "checking <message>" text
|
|
during <filename>configure</filename>.</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_MSG_RESULT(value)</literal></entry>
|
|
<entry colname="col2">Gives the result to <literal>AC_MSG_CHECKING</literal>;
|
|
should specify either <literal>yes</literal> or <literal>no</literal> as <envar>value</envar>.</entry>
|
|
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_MSG_ERROR(message)</literal></entry>
|
|
<entry colname="col2">Prints <envar>message</envar> as error message
|
|
during <filename>configure</filename> and aborts the script.</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_DEFINE(name,value,description)</literal></entry>
|
|
<entry colname="col2">Adds
|
|
<literal>#define</literal> to <filename>php_config.h</filename> with the value of
|
|
<envar>value</envar> and a comment that says <envar>description</envar> (this
|
|
is useful for conditional compilation of your module).</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_ADD_INCLUDE(path)</literal></entry>
|
|
<entry colname="col2">Adds a compiler include path; for example, used if the
|
|
module needs to add search paths for header files.</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_ADD_LIBRARY_WITH_PATH(libraryname,librarypath)</literal></entry>
|
|
<entry colname="col2">Specifies an additional library to link.</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>AC_ARG_WITH(modulename,description,unconditionaltest,conditionaltest)</literal></entry>
|
|
<entry colname="col2">Quite a powerful macro, adding the
|
|
module with <envar>description</envar> to the
|
|
<filename>configure --help</filename> output. PHP checks
|
|
whether the option
|
|
<literal>--with-<modulename></literal> is given to the
|
|
<filename>configure</filename> script. If so, it runs the
|
|
script <literal>unconditionaltest</literal> (for example,
|
|
<literal>--with-myext=yes</literal>), in which case the value
|
|
of the option is contained in the variable
|
|
<envar>$withval</envar>. Otherwise, it executes
|
|
<literal>conditionaltest</literal>.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry colname="col1"><literal>PHP_EXTENSION(modulename,
|
|
[shared])</literal></entry>
|
|
<entry colname="col2">This macro is a <emphasis>must</emphasis> to call for PHP
|
|
to configure your extension. You can supply a second argument
|
|
in addition to your module name, indicating whether you intend compilation as a
|
|
shared module. This will result in a definition at compile time for your
|
|
source as <literal>COMPILE_DL_<modulename></literal>.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
</sect3>
|
|
</sect2>
|
|
<!-- 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
|
|
-->
|