The PCRE package contains Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl 5.
This package is known to build and work properly using an LFS-7.0 platform.
Download (HTTP): http://downloads.sourceforge.net/pcre/pcre-8.12.tar.bz2
Download (FTP): ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.12.tar.bz2
Download MD5 sum: f14a9fef3c92f3fc6c5ac92d7a2c7eb3
Download size: 976 KB
Estimated disk space required: 12 MB
Estimated build time: 0.3 SBU
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pcre
Install PCRE by running the following commands:
./configure --prefix=/usr \ --docdir=/usr/share/doc/pcre-8.12 \ --enable-utf8 \ --enable-unicode-properties \ --enable-pcregrep-libz \ --enable-pcregrep-libbz2 && make
To test the results, issue: make check. Note: The third set of the tests cannot be run if the "fr_FR" locale is missing from the system.
Now, as the root
user:
make install
If you reinstall Grep after
installing PCRE, Grep will get linked against PCRE and may cause problems if /usr
is a separate mount point. To avoid this,
either pass the option --disable-perl-regexp
when executing ./configure for Grep or move libpcre
to /lib
as
follows.
mv -v /usr/lib/libpcre.so.* /lib/ && ln -v -sf ../../lib/libpcre.so.0 /usr/lib/libpcre.so
--enable-utf8
: This switch
includes the code for handling UTF-8 character strings in the
library.
--enable-unicode-properties
: This
switch enables Unicode properties support. Note: You need this
switch if you are going to build GLib-2.30.1 with the --with-pcre=system
switch.
--enable-pcregrep-libz
:
This switch adds support to pcregrep to read .gz
compressed files.
--enable-pcregrep-libbz2
:
This switch adds support to pcregrep to read .bz2
compressed files.
--enable-shared
--disable-static
: This pair of switches prevents the
static libraries in this package from being built and installed.
Last updated on 2011-10-24 20:28:43 +0000