/[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 195 by ph10, Mon Jul 30 13:23:28 2007 UTC revision 436 by ph10, Sun Sep 6 16:23:55 2009 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 \fBcmake-gui\fP if you are using \fBCMake\fP instead of
13    \fBconfigure\fP to build PCRE.
14    .P
15    There is a lot more information about building PCRE in non-Unix-like
16    environments in the file called \fINON_UNIX_USE\fP, which is part of the PCRE
17    distribution. You should consult this file as well as the \fIREADME\fP file if
18    you are building in a non-Unix-like environment.
19    .P
20    The complete list of options for \fBconfigure\fP (which includes the standard
21    ones such as the selection of the installation directory) can be obtained by
22    running
23  .sp  .sp
24    ./configure --help    ./configure --help
25  .sp  .sp
# Line 33  to the \fBconfigure\fP command. Line 43  to the \fBconfigure\fP command.
43  .SH "UTF-8 SUPPORT"  .SH "UTF-8 SUPPORT"
44  .rs  .rs
45  .sp  .sp
46  To build PCRE with support for UTF-8 character strings, add  To build PCRE with support for UTF-8 Unicode character strings, add
47  .sp  .sp
48    --enable-utf8    --enable-utf8
49  .sp  .sp
# Line 41  to the \fBconfigure\fP command. Of itsel Line 51  to the \fBconfigure\fP command. Of itsel
51  strings as UTF-8. As well as compiling PCRE with this option, you also have  strings as UTF-8. As well as compiling PCRE with this option, you also have
52  have to set the PCRE_UTF8 option when you call the \fBpcre_compile()\fP  have to set the PCRE_UTF8 option when you call the \fBpcre_compile()\fP
53  function.  function.
54    .P
55    If you set --enable-utf8 when compiling in an EBCDIC environment, PCRE expects
56    its input to be either ASCII or UTF-8 (depending on the runtime option). It is
57    not possible to support both EBCDIC and UTF-8 codes in the same version of the
58    library. Consequently, --enable-utf8 and --enable-ebcdic are mutually
59    exclusive.
60  .  .
61  .SH "UNICODE CHARACTER PROPERTY SUPPORT"  .SH "UNICODE CHARACTER PROPERTY SUPPORT"
62  .rs  .rs
# Line 67  documentation. Line 83  documentation.
83  .SH "CODE VALUE OF NEWLINE"  .SH "CODE VALUE OF NEWLINE"
84  .rs  .rs
85  .sp  .sp
86  By default, PCRE interprets character 10 (linefeed, LF) as indicating the end  By default, PCRE interprets the linefeed (LF) character as indicating the end
87  of a line. This is the normal newline character on Unix-like systems. You can  of a line. This is the normal newline character on Unix-like systems. You can
88  compile PCRE to use character 13 (carriage return, CR) instead, by adding  compile PCRE to use carriage return (CR) instead, by adding
89  .sp  .sp
90    --enable-newline-is-cr    --enable-newline-is-cr
91  .sp  .sp
# Line 96  Whatever line ending convention is selec Line 112  Whatever line ending convention is selec
112  overridden when the library functions are called. At build time it is  overridden when the library functions are called. At build time it is
113  conventional to use the standard for your operating system.  conventional to use the standard for your operating system.
114  .  .
115    .SH "WHAT \eR MATCHES"
116    .rs
117    .sp
118    By default, the sequence \eR in a pattern matches any Unicode newline sequence,
119    whatever has been selected as the line ending sequence. If you specify
120    .sp
121      --enable-bsr-anycrlf
122    .sp
123    the default is changed so that \eR matches only CR, LF, or CRLF. Whatever is
124    selected when PCRE is built can be overridden when the library functions are
125    called.
126    .
127  .SH "BUILDING SHARED AND STATIC LIBRARIES"  .SH "BUILDING SHARED AND STATIC LIBRARIES"
128  .rs  .rs
129  .sp  .sp
# Line 236  EBCDIC environment by adding Line 264  EBCDIC environment by adding
264    --enable-ebcdic    --enable-ebcdic
265  .sp  .sp
266  to the \fBconfigure\fP command. This setting implies  to the \fBconfigure\fP command. This setting implies
267  --enable-rebuild-chartables. You should only use it if you know that you are in  --enable-rebuild-chartables. You should only use it if you know that you are in
268  an EBCDIC environment (for example, an IBM mainframe operating system).  an EBCDIC environment (for example, an IBM mainframe operating system). The
269    --enable-ebcdic option is incompatible with --enable-utf8.
270    .
271    .SH "PCREGREP OPTIONS FOR COMPRESSED FILE SUPPORT"
272    .rs
273    .sp
274    By default, \fBpcregrep\fP reads all files as plain text. You can build it so
275    that it recognizes files whose names end in \fB.gz\fP or \fB.bz2\fP, and reads
276    them with \fBlibz\fP or \fBlibbz2\fP, respectively, by adding one or both of
277    .sp
278      --enable-pcregrep-libz
279      --enable-pcregrep-libbz2
280    .sp
281    to the \fBconfigure\fP command. These options naturally require that the
282    relevant libraries are installed on your system. Configuration will fail if
283    they are not.
284    .
285    .SH "PCRETEST OPTION FOR LIBREADLINE SUPPORT"
286    .rs
287    .sp
288    If you add
289    .sp
290      --enable-pcretest-libreadline
291    .sp
292    to the \fBconfigure\fP command, \fBpcretest\fP is linked with the
293    \fBlibreadline\fP library, and when its input is from a terminal, it reads it
294    using the \fBreadline()\fP function. This provides line-editing and history
295    facilities. Note that \fBlibreadline\fP is GPL-licenced, so if you distribute a
296    binary of \fBpcretest\fP linked in this way, there may be licensing issues.
297    .P
298    Setting this option causes the \fB-lreadline\fP option to be added to the
299    \fBpcretest\fP build. In many operating environments with a sytem-installed
300    \fBlibreadline\fP this is sufficient. However, in some environments (e.g.
301    if an unmodified distribution version of readline is in use), some extra
302    configuration may be necessary. The INSTALL file for \fBlibreadline\fP says
303    this:
304    .sp
305      "Readline uses the termcap functions, but does not link with the
306      termcap or curses library itself, allowing applications which link
307      with readline the to choose an appropriate library."
308    .sp
309    If your environment has not been set up so that an appropriate library is
310    automatically included, you may need to add something like
311    .sp
312      LIBS="-ncurses"
313    .sp
314    immediately before the \fBconfigure\fP command.
315  .  .
316  .  .
317  .SH "SEE ALSO"  .SH "SEE ALSO"
# Line 260  Cambridge CB2 3QH, England. Line 334  Cambridge CB2 3QH, England.
334  .rs  .rs
335  .sp  .sp
336  .nf  .nf
337  Last updated: 30 July 2007  Last updated: 06 September 2009
338  Copyright (c) 1997-2007 University of Cambridge.  Copyright (c) 1997-2009 University of Cambridge.
339  .fi  .fi

Legend:
Removed from v.195  
changed lines
  Added in v.436

  ViewVC Help
Powered by ViewVC 1.1.5