PCRE-8.43

#### Beyond Linux® From Scratch (systemd Edition) - Version 9.0

### Chapter 9. General Libraries

- Prev

  NSPR-4.21

- Next

  PCRE2-10.33

- Up
- Home

# PCRE-8.43

## Introduction to PCRE

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-9.0 platform.

### Package Information

- Download (HTTP): https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.bz2

- Download (FTP): ftp://ftp.pcre.org/pub/pcre/pcre-8.43.tar.bz2

- Download MD5 sum: 636222e79e392c3d95dcc545f24f98c4

- Download size: 1.5 MB

- Estimated disk space required: 19 MB (with tests)

- Estimated build time: 0.3 SBU (with tests)

### PCRE Dependencies

#### Optional

Valgrind-3.15.0

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/pcre

## Installation of PCRE

Install PCRE by running the following commands:

    ./configure --prefix=/usr                     \
                --docdir=/usr/share/doc/pcre-8.43 \
                --enable-unicode-properties       \
                --enable-pcre16                   \
                --enable-pcre32                   \
                --enable-pcregrep-libz            \
                --enable-pcregrep-libbz2          \
                --enable-pcretest-libreadline     \
                --disable-static                 &&
    make

To test the results, issue: make check.

Now, as the `root` user:

    make install                     &&
    mv -v /usr/lib/libpcre.so.* /lib &&
    ln -sfv ../../lib/$(readlink /usr/lib/libpcre.so) /usr/lib/libpcre.so

## Command Explanations

`--enable-unicode-properties`: This switch enables Unicode properties support and includes the code for handling UTF-8/16/32 character strings in the library. You need this switch if you are going to build GLib-2.60.6 with the `--with-pcre=system` switch.

`--enable-pcre16`: This switch enables 16 bit character support.

`--enable-pcre32`: This switch enables 32 bit character support.

`--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-pcretest-libreadline`: This switch adds line editing and history features to pcretest program.

`--disable-static`: This switch prevents installation of static versions of the libraries.

mv -v /usr/lib/libpcre.so.* /lib: Moves the PCRE library on the root filesystem so that it is available in case grep gets reinstalled with PCRE support.

`--enable-jit`: this option enables Just-in-time compiling, which can greatly speed up pattern matching.

## Contents

Installed Programs: pcregrep, pcretest, and pcre-config
Installed Libraries: libpcre.so, libpcre16.so, libpcre32.so, libpcrecpp.so and libpcreposix.so
Installed Directory: /usr/share/doc/pcre-8.43

### Short Descriptions

pcregrep | is a grep that understands Perl compatible regular expressions.
pcretest | can test a Perl compatible regular expression.
pcre-config | is used during the compile process of programs linking to the PCRE libraries.

Last updated on 2019-08-16 15:28:01 -0700

- Prev

  NSPR-4.21

- Next

  PCRE2-10.33

- Up
- Home