Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 3243

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>Reference: Some Configuration Macros</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Extending PHP 4.0"
HREF="zend.html"><LINK
REL="PREVIOUS"
TITLE="Where to Go from Here"
HREF="zend.where-to-go.html"><LINK
REL="NEXT"
TITLE="API Macros"
HREF="zend.api-macros.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="chapter"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="zend.where-to-go.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="zend.api-macros.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="zend.configuration-macros"
>Chapter 41. Reference: Some Configuration Macros</A
></H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="zend.configuration-macros.html#zend.configuration-macros.config-m4"
><TT
CLASS="filename"
>config.m4</TT
></A
></DT
></DL
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="zend.configuration-macros.config-m4"
></A
><TT
CLASS="filename"
>config.m4</TT
></H1
><P
>&#13;    The file <TT
CLASS="filename"
>config.m4</TT
> is processed by
    <TT
CLASS="filename"
>buildconf</TT
> 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
    <A
HREF="zend.configuration-macros.html#tab.m4-macros"
>Table 41-1</A
>.
   </P
><DIV
CLASS="table"
><A
NAME="tab.m4-macros"
></A
><P
><B
>Table 41-1. M4 Macros for <TT
CLASS="filename"
>config.m4</TT
></B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><TBODY
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Macro</TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Description</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_MSG_CHECKING(message)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Prints a "checking &#60;message&#62;" text
         during <TT
CLASS="filename"
>configure</TT
>.</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_MSG_RESULT(value)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Gives the result to <TT
CLASS="literal"
>AC_MSG_CHECKING</TT
>;
         should specify either <TT
CLASS="literal"
>yes</TT
> or <TT
CLASS="literal"
>no</TT
> as <TT
CLASS="envar"
>value</TT
>.</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_MSG_ERROR(message)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Prints <TT
CLASS="envar"
>message</TT
> as error message
         during <TT
CLASS="filename"
>configure</TT
> and aborts the script.</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_DEFINE(name,value,description)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Adds
         <TT
CLASS="literal"
>#define</TT
> to <TT
CLASS="filename"
>php_config.h</TT
> with the value of
         <TT
CLASS="envar"
>value</TT
> and a comment that says <TT
CLASS="envar"
>description</TT
> (this
         is useful for conditional compilation of your module).</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_ADD_INCLUDE(path)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Adds a compiler include path; for example, used  if the
         module needs to add search paths for header files.</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_ADD_LIBRARY_WITH_PATH(libraryname,librarypath)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Specifies an additional library to link.</TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>AC_ARG_WITH(modulename,description,unconditionaltest,conditionaltest)</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>Quite a powerful macro, adding the
         module with <TT
CLASS="envar"
>description</TT
> to the
         <TT
CLASS="filename"
>configure --help</TT
> output. PHP checks
         whether the option
         <TT
CLASS="literal"
>--with-&#60;modulename&#62;</TT
> is given to the
         <TT
CLASS="filename"
>configure</TT
> script. If so, it runs the
         script <TT
CLASS="literal"
>unconditionaltest</TT
> (for example,
         <TT
CLASS="literal"
>--with-myext=yes</TT
>), in which case the value
         of the option is contained in the variable
         <TT
CLASS="envar"
>$withval</TT
>. Otherwise, it executes
         <TT
CLASS="literal"
>conditionaltest</TT
>.
        </TD
></TR
><TR
><TD
WIDTH="62%"
ALIGN="LEFT"
VALIGN="MIDDLE"
><TT
CLASS="literal"
>PHP_EXTENSION(modulename,
          [shared])</TT
></TD
><TD
WIDTH="38%"
ALIGN="LEFT"
VALIGN="MIDDLE"
>This macro is a <SPAN
CLASS="emphasis"
><I
CLASS="emphasis"
>must</I
></SPAN
> 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 <TT
CLASS="literal"
>COMPILE_DL_&#60;modulename&#62;</TT
>.</TD
></TR
></TBODY
></TABLE
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="zend.where-to-go.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="zend.api-macros.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Where to Go from Here</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="zend.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>API Macros</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>