Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 22a02ab88ee7099ea6d7fdf524536d58 > files > 23

apache-mod_xslt2-1.3.8-1.2004112100.14mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML
><HEAD
><TITLE
>Installation</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="mod-xslt2 Users and Administrators Manual"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="History"
HREF="x44.html"><LINK
REL="NEXT"
TITLE="mod-xslt2 Setup and Usage"
HREF="x181.html"></HEAD
><BODY
CLASS="SECT1"
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"
>mod-xslt2 Users and Administrators Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="x44.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x181.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN49"
>4. Installation</A
></H1
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN51"
>4.1. Prerequisites</A
></H2
><P
>To install this module, you must:

<P
></P
><OL
TYPE="1"
><LI
><P
>Make sure ``libxml2'' and ``libxslt'' and their headers (libxml2-dev and libxslt-dev)
are correctly installed on your system, and that the commands
``xslt-config'' and ``xml2-config'' can be found in your path.</P
></LI
><LI
><P
>Make sure you have a version of ``libxslt'' above 1.0.30.</P
></LI
><LI
><P
>Make sure ``libpcre'' (at least version 4.5) and its headers 
(libpcre-dev) are correctly installed on your system and that 
the command ``pcre-config'' can be found in your path.</P
></LI
><LI
><P
>Make sure to have a version of Make from the GNU project, often
known as ``gmake'' on many systems. If your system does provide
a ``gmake'' command, use that instead of ``make'' in all the 
provided examples.</P
></LI
></OL
>

You may also consider recompiling libxml2 or libxslt after applying some of the
patches provided in the ``patches/'' directory in mod-xslt2 sources. For further
information about the available patches, please read the file ``README.Patches''.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN63"
>4.1.1. Apache 1.3.x</A
></H3
><P
>To install mod-xslt2 on apache 1.3.x, you need to have the apache
headers installed (apache-dev) and the command ``apxs'' available.</P
><P
>You also need to know the path of ``apxs'', which can be found by
running something like ``locate apxs'', ``whereis apxs'' or 
``find / -name apxs''.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN67"
>4.1.2. Apache 2.0.x</A
></H3
><P
>To install mod-xslt2 on an apache 2.0.x server, you need to have:

<P
></P
><UL
><LI
><P
>the apache headers file installed (apache2-dev)</P
></LI
><LI
><P
>the command ``apxs'' or ``apxs2'' available somewhere on your system
(you can find it by running ``locate apxs'', ``whereis apxs'' or 
``find / -name apxs'')</P
></LI
><LI
><P
>``libapr'' and its headers installed somewhere on your system (libapr0,
libapr0-dev) and the command ``apr-config'' (the presence of this command
usually implies the availability of the library)</P
></LI
><LI
><P
>libaprutil and its headers installed somewhere on your system (libaprutil,
libaprutil-dev) and the command ``apu-config'' (the presence of this command
usually implies the availability of the library)</P
></LI
></UL
>&#13;</P
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN79"
>4.2. Quick start</A
></H2
><P
>From your shell, run as a normal user:

<PRE
CLASS="SCREEN"
>  $ gzip -cd mod-xslt2*|tar x
  $ cd mod-xslt2*
  $ mkdir build
  $ cd build
  $ ../configure --with-sapi=apache1</PRE
>

Where ``apache1'' is the name of the web server
you want mod-xslt2 to be compiled for. In place
of apache1, at time of writing, you can specify
apache2 or none. If you specify ``none'' you
will get the library and the utilities that 
constitute most of mod-xslt2 compiled and 
installed.</P
><P
>If you do not specify any ``--with-sapi'' 
option, configure will try to figure out which
web server is installed on your system.
However, if you have more than one web server
supported by mod-xslt2 installed, configure
will compile mod-xslt2 for the first 
detected one.</P
><P
>Configure will also try to autodetect most of the
needed parameters and will warn you about small
incompatibilities it <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>will</I
></SPAN
> find in the libraries
on your system. Sometimes it will also suggest
you to apply a particular patch to your libxml2
or libxslt. Read ``README.Patches'' to have more
information about those patches.</P
><P
>Anyway, after successful configure completion, you 
should run:

<PRE
CLASS="SCREEN"
>  $ make
  $ su root
  # make install</PRE
>

If you ever want to remove mod-xslt2, you could also
run:

<PRE
CLASS="SCREEN"
>  # make uninstall</PRE
>&#13;</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN89"
>4.3. Configure parameters</A
></H2
><P
>As any ``configure'' script, mod-xslt2 configure accepts many parameters.
Some of those parameters are always available while a few of them depend
on the ``web server'' mod-xslt2 is being compiled for and on the libraries
available on your system.</P
><P
>The following sections will discuss all the parameters accepted by configure.
However, the ``configure --help'' screen is authoritative, as this document
may get outdated.</P
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN93"
>4.3.1. Installation related parameters</A
></H3
><P
>The following parameters can be used to choose where mod-xslt2 will 
be installed:

<P
></P
><UL
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--bindir=BINDIR</I
></SPAN
> where BINDIR is the directory where you want 
the binaries (modxslt-parse, modxslt-perror, modxslt-config) to be put
during installtion</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--libdir=LIBDIR</I
></SPAN
> where LIBDIR is the directory where you want the library
(libmodxslt0) to be put during installation</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--includedir=INCLUDEDIR</I
></SPAN
> where INCLUDEDIR is the directory where you want libmodxslt
headers to be put during installation</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--mandir=MANDIR</I
></SPAN
> where MANDIR is the directory where you want the manual pages
for the above listed commands to be put during installation</P
></LI
></UL
>

Usually, the place where to put sapi specific binaries generated 
by the compilation process is automatically detected. 
In any case, the following options may influence how the 
above paths are calculated:

<P
></P
><UL
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--prefix=PREFIX</I
></SPAN
> where, if no ``--mandir'' is specified, MANDIR
is calculated to be ``PREFIX/man'', while if no ``--includedir'' is specified,
INCLUDEDIR is calculated to be ``PREFIX/include''.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--exec-prefix=EPREFIX</I
></SPAN
> where, if no ``--bindir'' is specified, BINDIR
is calculated to be ``EPREFIX/bindir'', while if no ``--libdir'' is specified,
LIBDIR is calculated to be ``PREFIX/libdir''.</P
></LI
></UL
></P
><P
>Note that if you are, for example, packaging mod-xslt2 and want all the
files to be installed under a particular directory, you can use the 
DESTDIR environment variable as usual.</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN117"
>4.3.2. Compilation related parameters</A
></H3
><P
>The following parameters can be used to enable/disable mod-xslt2 features
or to choose compilation parameters:

<P
></P
><UL
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--enable-debug</I
></SPAN
> enables mod-xslt2 debugging code. This parameter
heavily relies on ``gcc'' and the ``libc'' (strings are not checked to be NULL in printf) being 
used. enable-debug will flood your apache error.log, so don't use it in a production environment.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--enable-xslt-debug</I
></SPAN
> enables libxslt debugging functions. This is
useful to verify correct behavior of libxslt. Take a look to libxslt documentation for more
details.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--disable-thread</I
></SPAN
> due to lack or bad multithreading/multimodules support
in some of the libraries used by mod-xslt2, some global variables allocated in TSD have been used (do 
not complain to me). This parameter disables libmodxslt multithreading support (the usage
of a TSD to keep global variables).</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--disable-extensions</I
></SPAN
> mod-xslt2 makes available some xslt extensions,
useful for web programmers. Compiling mod-xslt2 with this parameter disables those extensions.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--enable-libxslt-hack</I
></SPAN
> libmodxslt sometimes calls error handlers with
the wrong descriptors. Enabling this option, will provide one more layer
of protection against this kind of error in libxslt (that, at time of
writing, has not been corrected by the authors). Another solution is
to patch the library to avoid the problem. Please read ``README.Patches''.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--enable-fallback-wraparound</I
></SPAN
> once you get the errors working correctly,
if you use the ``fallback'' tag, you may see strange messages flooding your
logs. This option tells mod-xslt2 to remove fallback nodes at least when used
inside mod-xslt2 extension elements, to reduce the number of those messages.
Another solution is to patch the library to avoid the problem. Please
read ``README.Patches''.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--enable-exslt</I
></SPAN
> enable exslt extensions for libxslt. Default is disabled.
If you need or want to use the advanced string operators, remember to enable this option.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--disable-xinclude</I
></SPAN
> disable modxslt usage of xinclude. Default is enabled.
If you want to disable xinclude or maintain backward compatibility, you are free to disable xinclude.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-sapi=apache1|apache2|none</I
></SPAN
> allows you to specify for which web server (sapi) 
to compile mod-xslt2. Currently, you can specify ``apache1'' for apache version 1.3.x,
``apache2'' for apache version &gt; 2.0.44, ``apache'' to enable apache
version autodetection or ``none'' to compile only mod-xslt2 utilities and libraries. 
More sapi modules are currently being developed.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-xml2-config=path</I
></SPAN
> allows you to specify where the libxml2 
``xml2-config'' script is located. If not specifyed, the first one found in the search path will be
used. As an example, you could specify something like:
``--with-xml2-config=/usr/local/libxml2-2.5.57/bin/xml2-config''</P
><P
>If you don't have xml2-config on your system, you probably haven't installed
libxml2 correctly or you haven't installed the ``-dev'' version of the
packages (rpm &amp; deb). If you don't know where it is, you can run ``locate xml2-config'' or
``find / -name xml2-config'' to locate it.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-xslt-config=path</I
></SPAN
> allows you to specify where the ``xslt-config'' script
is located. If not specifyed, the first one found in the search path will be
used.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-pcre-config=path</I
></SPAN
> allows you to specify where the ``pcre-config'' script
is located. If not specifyed, the first one found in the search path will be
used. If not found, support for ``Perl Compatible Regular Expressions'' will
be <SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>disabled</I
></SPAN
>.</P
></LI
></UL
>&#13;</P
></DIV
><DIV
CLASS="SECT3"
><H3
CLASS="SECT3"
><A
NAME="AEN159"
>4.3.3. SAPI Specific configure parameters</A
></H3
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN161"
>4.3.3.1. Apache 1</A
></H4
><P
>&#13;<P
></P
><UL
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-apxs</I
></SPAN
> allows you to specify the ``apxs'' that should be used.
By default, the first ``apxs'' found in the ``PATH'' or in ``/usr/bin'',
``/usr/local/bin'', ``/usr/local/apache/bin'' is used. If you have
no apxs on your system, you probably don't have apache headers (or the
package apache-dev) installed correctly.</P
></LI
></UL
>
Note that running ``make install'' will install mod-xslt2 in the path returned
by the ``apxs'' found (``apxs -q LIBEXECDIR''), eventually prefixed by the 
DESTDIR environment variabe as usual.</P
></DIV
><DIV
CLASS="SECT4"
><H4
CLASS="SECT4"
><A
NAME="AEN168"
>4.3.3.2. Apache 2.0.x</A
></H4
><P
>&#13;<P
></P
><UL
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-apxs</I
></SPAN
> allows you to specify the ``apxs'' that should be used.
By default, the first ``apxs'' found in the ``PATH'' or in ``/usr/bin'',
``/usr/local/bin'', ``/usr/local/apache/bin'' is used. If you have
no apxs on your system, you probably don't have apache headers (or the
package apache-dev) installed correctly.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-apr-config</I
></SPAN
> allows you to specify the ``apr-config'' script that
should be used. By default, the first ``apr-config'' found is used.</P
></LI
><LI
><P
><SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>--with-apu-config</I
></SPAN
> allows you to specify the ``apu-config'' script that
should be used. By default, the first ``apu-config'' found is used.</P
></LI
></UL
>

Note that running ``make install'' will install mod-xslt2 in the path returned
by the ``apxs'' found (``apxs -q LIBEXECDIR''), eventually prefixed by the 
prefix specified with ``--prefix'' to configure. </P
></DIV
></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="x44.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="x181.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>History</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>mod-xslt2 Setup and Usage</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>