1 |
README file for PCRE (Perl-compatible regular expression library) |
README file for PCRE (Perl-compatible regular expression library) |
2 |
----------------------------------------------------------------- |
----------------------------------------------------------------- |
3 |
|
|
4 |
|
The latest release of PCRE is always available from |
5 |
|
|
6 |
|
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-xxx.tar.gz |
7 |
|
|
8 |
Please read the NEWS file if you are upgrading from a previous release. |
Please read the NEWS file if you are upgrading from a previous release. |
9 |
|
|
10 |
|
|
21 |
|
|
22 |
specifies that the C compiler should be run with the flags '-O2 -Wall' instead |
specifies that the C compiler should be run with the flags '-O2 -Wall' instead |
23 |
of the default, and that "make install" should install PCRE under /opt/local |
of the default, and that "make install" should install PCRE under /opt/local |
24 |
instead of the default /usr/local. The "configure" script builds two files: |
instead of the default /usr/local. The "configure" script builds thre files: |
25 |
|
|
26 |
. Makefile is built by copying Makefile.in and making certain substitutions. |
. Makefile is built by copying Makefile.in and making substitutions. |
27 |
. config.h is built by copying config.in and making certain substitutions. |
. config.h is built by copying config.in and making substitutions. |
28 |
|
. pcre-config is built by copying pcre-config.in and making substitutions. |
29 |
|
|
30 |
Once "configure" has run, you can run "make". It builds two libraries called |
Once "configure" has run, you can run "make". It builds two libraries called |
31 |
libpcre.a and libpcreposix.a, a test program called pcretest, and the pgrep |
libpcre and libpcreposix, a test program called pcretest, and the pgrep |
32 |
command. You can use "make install" to copy these, and the public header file |
command. You can use "make install" to copy these, and the public header file |
33 |
pcre.h, to appropriate live directories on your system, in the normal way. |
pcre.h, to appropriate live directories on your system, in the normal way. |
34 |
|
|
35 |
|
Running "make install" also installs the command pcre-config, which can be used |
36 |
|
to recall information about the PCRE configuration and installation. For |
37 |
|
example, |
38 |
|
|
39 |
|
pcre-config --version |
40 |
|
|
41 |
|
prints the version number, and |
42 |
|
|
43 |
|
pcre-config --libs |
44 |
|
|
45 |
|
outputs information about where the library is installed. This command can be |
46 |
|
included in makefiles for programs that use PCRE, saving the programmer from |
47 |
|
having to remember too many details. |
48 |
|
|
49 |
|
|
50 |
Shared libraries on Unix systems |
Shared libraries on Unix systems |
51 |
-------------------------------- |
-------------------------------- |
52 |
|
|
53 |
The default distribution builds static libraries. It is also possible to build |
The default distribution builds PCRE as two shared libraries. This support is |
54 |
PCRE as two shared libraries. This support is new and experimental and may not |
new and experimental and may not work on all systems. It relies on the |
55 |
work on all systems. It relies on the "libtool" scripts - these are distributed |
"libtool" scripts - these are distributed with PCRE. It should build a |
56 |
with PCRE. To build PCRE using shared libraries you must use --enable-shared |
"libtool" script and use this to compile and link shared libraries, which are |
57 |
when configuring it. For example |
placed in a subdirectory called .libs. The programs pcretest and pgrep are |
58 |
|
built to use these uninstalled libraries by means of wrapper scripts. When you |
59 |
./configure --prefix=/usr/gnu --enable-shared |
use "make install" to install shared libraries, pgrep and pcretest are |
60 |
|
automatically re-built to use the newly installed libraries. However, only |
61 |
Then run "make" in the usual way. It should build a "libtool" script and use |
pgrep is installed, as pcretest is really just a test program. |
62 |
this to compile and link shared libraries, which are placed in a subdirectory |
|
63 |
called .libs. The programs pcretest and pgrep are built to use these |
To build PCRE using static libraries you must use --disable-shared when |
64 |
uninstalled libraries by means of wrapper scripts. When you use "make install" |
configuring it. For example |
65 |
to install shared libraries, pgrep is automatically re-built to use the newly |
|
66 |
installed library before it itself is installed. |
./configure --prefix=/usr/gnu --disable-shared |
67 |
|
|
68 |
|
Then run "make" in the usual way. |
69 |
|
|
70 |
|
|
71 |
Building on non-Unix systems |
Building on non-Unix systems |
180 |
study.c ) source of |
study.c ) source of |
181 |
pcre.c ) the functions |
pcre.c ) the functions |
182 |
pcreposix.c ) |
pcreposix.c ) |
183 |
pcre.h header for the external API |
pcre.in "source" for the header for the external API; pcre.h |
184 |
|
is built from this by "configure" |
185 |
pcreposix.h header for the external POSIX wrapper API |
pcreposix.h header for the external POSIX wrapper API |
186 |
internal.h header for internal use |
internal.h header for internal use |
187 |
config.in template for config.h, which is built by configure |
config.in template for config.h, which is built by configure |
192 |
ChangeLog log of changes to the code |
ChangeLog log of changes to the code |
193 |
INSTALL generic installation instructions |
INSTALL generic installation instructions |
194 |
LICENCE conditions for the use of PCRE |
LICENCE conditions for the use of PCRE |
195 |
|
COPYING the same, using GNU's standard name |
196 |
Makefile.in template for Unix Makefile, which is built by configure |
Makefile.in template for Unix Makefile, which is built by configure |
197 |
NEWS important changes in this release |
NEWS important changes in this release |
198 |
NON-UNIX-USE notes on building PCRE on non-Unix systems |
NON-UNIX-USE notes on building PCRE on non-Unix systems |
220 |
pcretest.c test program |
pcretest.c test program |
221 |
perltest Perl test program |
perltest Perl test program |
222 |
pgrep.c source of a grep utility that uses PCRE |
pgrep.c source of a grep utility that uses PCRE |
223 |
|
pcre-config.in source of script which retains PCRE information |
224 |
testdata/testinput1 test data, compatible with Perl 5.004 and 5.005 |
testdata/testinput1 test data, compatible with Perl 5.004 and 5.005 |
225 |
testdata/testinput2 test data for error messages and non-Perl things |
testdata/testinput2 test data for error messages and non-Perl things |
226 |
testdata/testinput3 test data, compatible with Perl 5.005 |
testdata/testinput3 test data, compatible with Perl 5.005 |
236 |
pcre.def |
pcre.def |
237 |
|
|
238 |
Philip Hazel <ph10@cam.ac.uk> |
Philip Hazel <ph10@cam.ac.uk> |
239 |
January 2000 |
February 2000 |