| 18 |
<li><a name="TOC3" href="#SEC3">UTF-8 SUPPORT</a> |
<li><a name="TOC3" href="#SEC3">UTF-8 SUPPORT</a> |
| 19 |
<li><a name="TOC4" href="#SEC4">UNICODE CHARACTER PROPERTY SUPPORT</a> |
<li><a name="TOC4" href="#SEC4">UNICODE CHARACTER PROPERTY SUPPORT</a> |
| 20 |
<li><a name="TOC5" href="#SEC5">CODE VALUE OF NEWLINE</a> |
<li><a name="TOC5" href="#SEC5">CODE VALUE OF NEWLINE</a> |
| 21 |
<li><a name="TOC6" href="#SEC6">BUILDING SHARED AND STATIC LIBRARIES</a> |
<li><a name="TOC6" href="#SEC6">WHAT \R MATCHES</a> |
| 22 |
<li><a name="TOC7" href="#SEC7">POSIX MALLOC USAGE</a> |
<li><a name="TOC7" href="#SEC7">BUILDING SHARED AND STATIC LIBRARIES</a> |
| 23 |
<li><a name="TOC8" href="#SEC8">HANDLING VERY LARGE PATTERNS</a> |
<li><a name="TOC8" href="#SEC8">POSIX MALLOC USAGE</a> |
| 24 |
<li><a name="TOC9" href="#SEC9">AVOIDING EXCESSIVE STACK USAGE</a> |
<li><a name="TOC9" href="#SEC9">HANDLING VERY LARGE PATTERNS</a> |
| 25 |
<li><a name="TOC10" href="#SEC10">LIMITING PCRE RESOURCE USAGE</a> |
<li><a name="TOC10" href="#SEC10">AVOIDING EXCESSIVE STACK USAGE</a> |
| 26 |
<li><a name="TOC11" href="#SEC11">CREATING CHARACTER TABLES AT BUILD TIME</a> |
<li><a name="TOC11" href="#SEC11">LIMITING PCRE RESOURCE USAGE</a> |
| 27 |
<li><a name="TOC12" href="#SEC12">USING EBCDIC CODE</a> |
<li><a name="TOC12" href="#SEC12">CREATING CHARACTER TABLES AT BUILD TIME</a> |
| 28 |
<li><a name="TOC13" href="#SEC13">SEE ALSO</a> |
<li><a name="TOC13" href="#SEC13">USING EBCDIC CODE</a> |
| 29 |
<li><a name="TOC14" href="#SEC14">AUTHOR</a> |
<li><a name="TOC14" href="#SEC14">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a> |
| 30 |
<li><a name="TOC15" href="#SEC15">REVISION</a> |
<li><a name="TOC15" href="#SEC15">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a> |
| 31 |
|
<li><a name="TOC16" href="#SEC16">SEE ALSO</a> |
| 32 |
|
<li><a name="TOC17" href="#SEC17">AUTHOR</a> |
| 33 |
|
<li><a name="TOC18" href="#SEC18">REVISION</a> |
| 34 |
</ul> |
</ul> |
| 35 |
<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br> |
<br><a name="SEC1" href="#TOC1">PCRE BUILD-TIME OPTIONS</a><br> |
| 36 |
<P> |
<P> |
| 37 |
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 |
| 38 |
the library is compiled. They are all selected, or deselected, by providing |
the library is compiled. It assumes use of the <b>configure</b> script, where |
| 39 |
options to the <b>configure</b> script that is run before the <b>make</b> |
the optional features are selected or deselected by providing options to |
| 40 |
command. The complete list of options for <b>configure</b> (which includes the |
<b>configure</b> before running the <b>make</b> command. However, the same |
| 41 |
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 |
| 42 |
obtained by running |
the GUI facility of <b>CMakeSetup</b> if you are using <b>CMake</b> instead of |
| 43 |
|
<b>configure</b> to build PCRE. |
| 44 |
|
</P> |
| 45 |
|
<P> |
| 46 |
|
The complete list of options for <b>configure</b> (which includes the standard |
| 47 |
|
ones such as the selection of the installation directory) can be obtained by |
| 48 |
|
running |
| 49 |
<pre> |
<pre> |
| 50 |
./configure --help |
./configure --help |
| 51 |
</pre> |
</pre> |
| 129 |
overridden when the library functions are called. At build time it is |
overridden when the library functions are called. At build time it is |
| 130 |
conventional to use the standard for your operating system. |
conventional to use the standard for your operating system. |
| 131 |
</P> |
</P> |
| 132 |
<br><a name="SEC6" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br> |
<br><a name="SEC6" href="#TOC1">WHAT \R MATCHES</a><br> |
| 133 |
|
<P> |
| 134 |
|
By default, the sequence \R in a pattern matches any Unicode newline sequence, |
| 135 |
|
whatever has been selected as the line ending sequence. If you specify |
| 136 |
|
<pre> |
| 137 |
|
--enable-bsr-anycrlf |
| 138 |
|
</pre> |
| 139 |
|
the default is changed so that \R matches only CR, LF, or CRLF. Whatever is |
| 140 |
|
selected when PCRE is built can be overridden when the library functions are |
| 141 |
|
called. |
| 142 |
|
</P> |
| 143 |
|
<br><a name="SEC7" href="#TOC1">BUILDING SHARED AND STATIC LIBRARIES</a><br> |
| 144 |
<P> |
<P> |
| 145 |
The PCRE building process uses <b>libtool</b> to build both shared and static |
The PCRE building process uses <b>libtool</b> to build both shared and static |
| 146 |
Unix libraries by default. You can suppress one of these by adding one of |
Unix libraries by default. You can suppress one of these by adding one of |
| 150 |
</pre> |
</pre> |
| 151 |
to the <b>configure</b> command, as required. |
to the <b>configure</b> command, as required. |
| 152 |
</P> |
</P> |
| 153 |
<br><a name="SEC7" href="#TOC1">POSIX MALLOC USAGE</a><br> |
<br><a name="SEC8" href="#TOC1">POSIX MALLOC USAGE</a><br> |
| 154 |
<P> |
<P> |
| 155 |
When PCRE is called through the POSIX interface (see the |
When PCRE is called through the POSIX interface (see the |
| 156 |
<a href="pcreposix.html"><b>pcreposix</b></a> |
<a href="pcreposix.html"><b>pcreposix</b></a> |
| 166 |
</pre> |
</pre> |
| 167 |
to the <b>configure</b> command. |
to the <b>configure</b> command. |
| 168 |
</P> |
</P> |
| 169 |
<br><a name="SEC8" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br> |
<br><a name="SEC9" href="#TOC1">HANDLING VERY LARGE PATTERNS</a><br> |
| 170 |
<P> |
<P> |
| 171 |
Within a compiled pattern, offset values are used to point from one part to |
Within a compiled pattern, offset values are used to point from one part to |
| 172 |
another (for example, from an opening parenthesis to an alternation |
another (for example, from an opening parenthesis to an alternation |
| 182 |
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 |
| 183 |
additional bytes when handling them. |
additional bytes when handling them. |
| 184 |
</P> |
</P> |
| 185 |
<br><a name="SEC9" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br> |
<br><a name="SEC10" href="#TOC1">AVOIDING EXCESSIVE STACK USAGE</a><br> |
| 186 |
<P> |
<P> |
| 187 |
When matching with the <b>pcre_exec()</b> function, PCRE implements backtracking |
When matching with the <b>pcre_exec()</b> function, PCRE implements backtracking |
| 188 |
by making recursive calls to an internal function called <b>match()</b>. In |
by making recursive calls to an internal function called <b>match()</b>. In |
| 213 |
slowly when built in this way. This option affects only the <b>pcre_exec()</b> |
slowly when built in this way. This option affects only the <b>pcre_exec()</b> |
| 214 |
function; it is not relevant for the the <b>pcre_dfa_exec()</b> function. |
function; it is not relevant for the the <b>pcre_dfa_exec()</b> function. |
| 215 |
</P> |
</P> |
| 216 |
<br><a name="SEC10" href="#TOC1">LIMITING PCRE RESOURCE USAGE</a><br> |
<br><a name="SEC11" href="#TOC1">LIMITING PCRE RESOURCE USAGE</a><br> |
| 217 |
<P> |
<P> |
| 218 |
Internally, PCRE has a function called <b>match()</b>, which it calls repeatedly |
Internally, PCRE has a function called <b>match()</b>, which it calls repeatedly |
| 219 |
(sometimes recursively) when matching a pattern with the <b>pcre_exec()</b> |
(sometimes recursively) when matching a pattern with the <b>pcre_exec()</b> |
| 242 |
</pre> |
</pre> |
| 243 |
to the <b>configure</b> command. This value can also be overridden at run time. |
to the <b>configure</b> command. This value can also be overridden at run time. |
| 244 |
</P> |
</P> |
| 245 |
<br><a name="SEC11" href="#TOC1">CREATING CHARACTER TABLES AT BUILD TIME</a><br> |
<br><a name="SEC12" href="#TOC1">CREATING CHARACTER TABLES AT BUILD TIME</a><br> |
| 246 |
<P> |
<P> |
| 247 |
PCRE uses fixed tables for processing characters whose code values are less |
PCRE uses fixed tables for processing characters whose code values are less |
| 248 |
than 256. By default, PCRE is built with a set of tables that are distributed |
than 256. By default, PCRE is built with a set of tables that are distributed |
| 259 |
create alternative tables when cross compiling, you will have to do so "by |
create alternative tables when cross compiling, you will have to do so "by |
| 260 |
hand".) |
hand".) |
| 261 |
</P> |
</P> |
| 262 |
<br><a name="SEC12" href="#TOC1">USING EBCDIC CODE</a><br> |
<br><a name="SEC13" href="#TOC1">USING EBCDIC CODE</a><br> |
| 263 |
<P> |
<P> |
| 264 |
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 |
| 265 |
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 |
| 266 |
compiled to run in an EBCDIC environment by adding |
most computer operating systems. PCRE can, however, be compiled to run in an |
| 267 |
|
EBCDIC environment by adding |
| 268 |
<pre> |
<pre> |
| 269 |
--enable-ebcdic |
--enable-ebcdic |
| 270 |
</pre> |
</pre> |
| 271 |
to the <b>configure</b> command. This setting implies |
to the <b>configure</b> command. This setting implies |
| 272 |
--enable-rebuild-chartables. |
--enable-rebuild-chartables. You should only use it if you know that you are in |
| 273 |
|
an EBCDIC environment (for example, an IBM mainframe operating system). |
| 274 |
|
</P> |
| 275 |
|
<br><a name="SEC14" href="#TOC1">PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT</a><br> |
| 276 |
|
<P> |
| 277 |
|
By default, <b>pcregrep</b> reads all files as plain text. You can build it so |
| 278 |
|
that it recognizes files whose names end in <b>.gz</b> or <b>.bz2</b>, and reads |
| 279 |
|
them with <b>libz</b> or <b>libbz2</b>, respectively, by adding one or both of |
| 280 |
|
<pre> |
| 281 |
|
--enable-pcregrep-libz |
| 282 |
|
--enable-pcregrep-libbz2 |
| 283 |
|
</pre> |
| 284 |
|
to the <b>configure</b> command. These options naturally require that the |
| 285 |
|
relevant libraries are installed on your system. Configuration will fail if |
| 286 |
|
they are not. |
| 287 |
|
</P> |
| 288 |
|
<br><a name="SEC15" href="#TOC1">PCRETEST OPTION FOR LIBREADLINE SUPPORT</a><br> |
| 289 |
|
<P> |
| 290 |
|
If you add |
| 291 |
|
<pre> |
| 292 |
|
--enable-pcretest-libreadline |
| 293 |
|
</pre> |
| 294 |
|
to the <b>configure</b> command, <b>pcretest</b> is linked with the |
| 295 |
|
<b>libreadline</b> library, and when its input is from a terminal, it reads it |
| 296 |
|
using the <b>readline()</b> function. This provides line-editing and history |
| 297 |
|
facilities. Note that <b>libreadline</b> is GPL-licenced, so if you distribute a |
| 298 |
|
binary of <b>pcretest</b> linked in this way, there may be licensing issues. |
| 299 |
|
</P> |
| 300 |
|
<P> |
| 301 |
|
Setting this option causes the <b>-lreadline</b> option to be added to the |
| 302 |
|
<b>pcretest</b> build. In many operating environments with a sytem-installed |
| 303 |
|
<b>libreadline</b> this is sufficient. However, in some environments (e.g. |
| 304 |
|
if an unmodified distribution version of readline is in use), some extra |
| 305 |
|
configuration may be necessary. The INSTALL file for <b>libreadline</b> says |
| 306 |
|
this: |
| 307 |
|
<pre> |
| 308 |
|
"Readline uses the termcap functions, but does not link with the |
| 309 |
|
termcap or curses library itself, allowing applications which link |
| 310 |
|
with readline the to choose an appropriate library." |
| 311 |
|
</pre> |
| 312 |
|
If your environment has not been set up so that an appropriate library is |
| 313 |
|
automatically included, you may need to add something like |
| 314 |
|
<pre> |
| 315 |
|
LIBS="-ncurses" |
| 316 |
|
</pre> |
| 317 |
|
immediately before the <b>configure</b> command. |
| 318 |
</P> |
</P> |
| 319 |
<br><a name="SEC13" href="#TOC1">SEE ALSO</a><br> |
<br><a name="SEC16" href="#TOC1">SEE ALSO</a><br> |
| 320 |
<P> |
<P> |
| 321 |
<b>pcreapi</b>(3), <b>pcre_config</b>(3). |
<b>pcreapi</b>(3), <b>pcre_config</b>(3). |
| 322 |
</P> |
</P> |
| 323 |
<br><a name="SEC14" href="#TOC1">AUTHOR</a><br> |
<br><a name="SEC17" href="#TOC1">AUTHOR</a><br> |
| 324 |
<P> |
<P> |
| 325 |
Philip Hazel |
Philip Hazel |
| 326 |
<br> |
<br> |
| 329 |
Cambridge CB2 3QH, England. |
Cambridge CB2 3QH, England. |
| 330 |
<br> |
<br> |
| 331 |
</P> |
</P> |
| 332 |
<br><a name="SEC15" href="#TOC1">REVISION</a><br> |
<br><a name="SEC18" href="#TOC1">REVISION</a><br> |
| 333 |
<P> |
<P> |
| 334 |
Last updated: 05 June 2007 |
Last updated: 13 April 2008 |
| 335 |
<br> |
<br> |
| 336 |
Copyright © 1997-2007 University of Cambridge. |
Copyright © 1997-2008 University of Cambridge. |
| 337 |
<br> |
<br> |
| 338 |
<p> |
<p> |
| 339 |
Return to the <a href="index.html">PCRE index page</a>. |
Return to the <a href="index.html">PCRE index page</a>. |