/[pcre]/code/trunk/doc/pcrebuild.3
ViewVC logotype

Diff of /code/trunk/doc/pcrebuild.3

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 93 by nigel, Sat Feb 24 21:41:42 2007 UTC revision 260 by ph10, Thu Sep 20 10:19:16 2007 UTC
# Line 5  PCRE - Perl-compatible regular expressio Line 5  PCRE - Perl-compatible regular expressio
5  .rs  .rs
6  .sp  .sp
7  This document describes the optional features of PCRE that can be selected when  This document describes the optional features of PCRE that can be selected when
8  the library is compiled. They are all selected, or deselected, by providing  the library is compiled. It assumes use of the \fBconfigure\fP script, where
9  options to the \fBconfigure\fP script that is run before the \fBmake\fP  the optional features are selected or deselected by providing options to
10  command. The complete list of options for \fBconfigure\fP (which includes the  \fBconfigure\fP before running the \fBmake\fP command. However, the same
11  standard ones such as the selection of the installation directory) can be  options can be selected in both Unix-like and non-Unix-like environments using
12  obtained by running  the GUI facility of \fBCMakeSetup\fP if you are using \fBCMake\fP instead of
13    \fBconfigure\fP to build PCRE.
14    .P
15    The complete list of options for \fBconfigure\fP (which includes the standard
16    ones such as the selection of the installation directory) can be obtained by
17    running
18  .sp  .sp
19    ./configure --help    ./configure --help
20  .sp  .sp
21  The following sections describe certain options whose names begin with --enable  The following sections include descriptions of options whose names begin with
22  or --disable. These settings specify changes to the defaults for the  --enable or --disable. These settings specify changes to the defaults for the
23  \fBconfigure\fP command. Because of the way that \fBconfigure\fP works,  \fBconfigure\fP command. Because of the way that \fBconfigure\fP works,
24  --enable and --disable always come in pairs, so the complementary option always  --enable and --disable always come in pairs, so the complementary option always
25  exists as well, but as it specifies the default, it is not described.  exists as well, but as it specifies the default, it is not described.
# Line 56  character properties, you must add Line 61  character properties, you must add
61  to the \fBconfigure\fP command. This implies UTF-8 support, even if you have  to the \fBconfigure\fP command. This implies UTF-8 support, even if you have
62  not explicitly requested it.  not explicitly requested it.
63  .P  .P
64  Including Unicode property support adds around 90K of tables to the PCRE  Including Unicode property support adds around 30K of tables to the PCRE
65  library, approximately doubling its size. Only the general category properties  library. Only the general category properties such as \fILu\fP and \fINd\fP are
66  such as \fILu\fP and \fINd\fP are supported. Details are given in the  supported. Details are given in the
67  .\" HREF  .\" HREF
68  \fBpcrepattern\fP  \fBpcrepattern\fP
69  .\"  .\"
# Line 83  character sequence CRLF. If you want thi Line 88  character sequence CRLF. If you want thi
88  .sp  .sp
89  to the \fBconfigure\fP command. There is a fourth option, specified by  to the \fBconfigure\fP command. There is a fourth option, specified by
90  .sp  .sp
91      --enable-newline-is-anycrlf
92    .sp
93    which causes PCRE to recognize any of the three sequences CR, LF, or CRLF as
94    indicating a line ending. Finally, a fifth option, specified by
95    .sp
96    --enable-newline-is-any    --enable-newline-is-any
97  .sp  .sp
98  which causes PCRE to recognize any Unicode newline sequence.  causes PCRE to recognize any Unicode newline sequence.
99  .P  .P
100  Whatever line ending convention is selected when PCRE is built can be  Whatever line ending convention is selected when PCRE is built can be
101  overridden when the library functions are called. At build time it is  overridden when the library functions are called. At build time it is
102  conventional to use the standard for your operating system.  conventional to use the standard for your operating system.
103  .  .
104    .SH "WHAT \eR MATCHES"
105    .rs
106    .sp
107    By default, the sequence \eR in a pattern matches any Unicode newline sequence,
108    whatever has been selected as the line ending sequence. If you specify
109    .sp
110      --enable-bsr-anycrlf
111    .sp
112    the default is changed so that \eR matches only CR, LF, or CRLF. Whatever is
113    selected when PCRE is built can be overridden when the library functions are
114    called.
115    .
116  .SH "BUILDING SHARED AND STATIC LIBRARIES"  .SH "BUILDING SHARED AND STATIC LIBRARIES"
117  .rs  .rs
118  .sp  .sp
# Line 137  or four-byte offsets by adding a setting Line 159  or four-byte offsets by adding a setting
159  to the \fBconfigure\fP command. The value given must be 2, 3, or 4. Using  to the \fBconfigure\fP command. The value given must be 2, 3, or 4. Using
160  longer offsets slows down the operation of PCRE because it has to load  longer offsets slows down the operation of PCRE because it has to load
161  additional bytes when handling them.  additional bytes when handling them.
 .P  
 If you build PCRE with an increased link size, test 2 (and test 5 if you are  
 using UTF-8) will fail. Part of the output of these tests is a representation  
 of the compiled pattern, and this changes with the link size.  
162  .  .
163  .SH "AVOIDING EXCESSIVE STACK USAGE"  .SH "AVOIDING EXCESSIVE STACK USAGE"
164  .rs  .rs
# Line 163  build a version of PCRE that works this Line 181  build a version of PCRE that works this
181  .sp  .sp
182  to the \fBconfigure\fP command. With this configuration, PCRE will use the  to the \fBconfigure\fP command. With this configuration, PCRE will use the
183  \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables to call memory  \fBpcre_stack_malloc\fP and \fBpcre_stack_free\fP variables to call memory
184  management functions. Separate functions are provided because the usage is very  management functions. By default these point to \fBmalloc()\fP and
185  predictable: the block sizes requested are always the same, and the blocks are  \fBfree()\fP, but you can replace the pointers so that your own functions are
186  always freed in reverse order. A calling program might be able to implement  used.
187  optimized functions that perform better than the standard \fBmalloc()\fP and  .P
188  \fBfree()\fP functions. PCRE runs noticeably more slowly when built in this  Separate functions are provided rather than using \fBpcre_malloc\fP and
189  way. This option affects only the \fBpcre_exec()\fP function; it is not  \fBpcre_free\fP because the usage is very predictable: the block sizes
190  relevant for the the \fBpcre_dfa_exec()\fP function.  requested are always the same, and the blocks are always freed in reverse
191    order. A calling program might be able to implement optimized functions that
192    perform better than \fBmalloc()\fP and \fBfree()\fP. PCRE runs noticeably more
193    slowly when built in this way. This option affects only the \fBpcre_exec()\fP
194    function; it is not relevant for the the \fBpcre_dfa_exec()\fP function.
195  .  .
196  .SH "LIMITING PCRE RESOURCE USAGE"  .SH "LIMITING PCRE RESOURCE USAGE"
197  .rs  .rs
# Line 202  constraints. However, you can set a lowe Line 224  constraints. However, you can set a lowe
224  .sp  .sp
225  to the \fBconfigure\fP command. This value can also be overridden at run time.  to the \fBconfigure\fP command. This value can also be overridden at run time.
226  .  .
227    .SH "CREATING CHARACTER TABLES AT BUILD TIME"
228    .rs
229    .sp
230    PCRE uses fixed tables for processing characters whose code values are less
231    than 256. By default, PCRE is built with a set of tables that are distributed
232    in the file \fIpcre_chartables.c.dist\fP. These tables are for ASCII codes
233    only. If you add
234    .sp
235      --enable-rebuild-chartables
236    .sp
237    to the \fBconfigure\fP command, the distributed tables are no longer used.
238    Instead, a program called \fBdftables\fP is compiled and run. This outputs the
239    source for new set of tables, created in the default locale of your C runtime
240    system. (This method of replacing the tables does not work if you are cross
241    compiling, because \fBdftables\fP is run on the local host. If you need to
242    create alternative tables when cross compiling, you will have to do so "by
243    hand".)
244    .
245  .SH "USING EBCDIC CODE"  .SH "USING EBCDIC CODE"
246  .rs  .rs
247  .sp  .sp
248  PCRE assumes by default that it will run in an environment where the character  PCRE assumes by default that it will run in an environment where the character
249  code is ASCII (or Unicode, which is a superset of ASCII). PCRE can, however, be  code is ASCII (or Unicode, which is a superset of ASCII). This is the case for
250  compiled to run in an EBCDIC environment by adding  most computer operating systems. PCRE can, however, be compiled to run in an
251    EBCDIC environment by adding
252  .sp  .sp
253    --enable-ebcdic    --enable-ebcdic
254  .sp  .sp
255  to the \fBconfigure\fP command.  to the \fBconfigure\fP command. This setting implies
256    --enable-rebuild-chartables. You should only use it if you know that you are in
257    an EBCDIC environment (for example, an IBM mainframe operating system).
258  .  .
259  .  .
260  .SH "SEE ALSO"  .SH "SEE ALSO"
261  .rs  .rs
262  .sp  .sp
263  \fBpcreapi\fP(3), \fBpcre_config\fP(3).  \fBpcreapi\fP(3), \fBpcre_config\fP(3).
264  .P  .
265  .in 0  .
266  Last updated: 30 November 2006  .SH AUTHOR
267  .br  .rs
268  Copyright (c) 1997-2006 University of Cambridge.  .sp
269    .nf
270    Philip Hazel
271    University Computing Service
272    Cambridge CB2 3QH, England.
273    .fi
274    .
275    .
276    .SH REVISION
277    .rs
278    .sp
279    .nf
280    Last updated: 21 September 2007
281    Copyright (c) 1997-2007 University of Cambridge.
282    .fi

Legend:
Removed from v.93  
changed lines
  Added in v.260

  ViewVC Help
Powered by ViewVC 1.1.5