#### Linux From Scratch - Version r13.0-133

### Chapter 8. Installing Basic System Software

- Prev

  Readline-8.3

- Next

  M4-1.4.21

- Up
- Home

# 8.13. Pcre2-10.47

The pcre2 package contains a new generation of the Perl Compatible Regular Expression libraries.

Approximate build time: 0.2 SBU
Required disk space: 28 MB

## 8.13.1. Installation of Pcre2

Prepare pcre2 for compilation:

    ./configure --prefix=/usr                       \
                --docdir=/usr/share/doc/pcre2-10.47 \
                --enable-unicode                    \
                --enable-jit                        \
                --enable-pcre2-16                   \
                --enable-pcre2-32                   \
                --enable-pcre2grep-libz             \
                --enable-pcre2grep-libbz2           \
                --enable-pcre2test-libreadline      \
                --disable-static

The meaning of the new configure options:

`--enable-unicode`

  This option enables Unicode support and includes the functions for handling UTF-8/16/32 character strings in the library.

`--enable-jit`

  This option enables Just-in-time compiling, which can greatly speed up pattern matching.

`--enable-pcre2-16`

  This option enables 16 bit character support.

`--enable-pcre2-32`

  This option enables 32 bit character support.

`--enable-pcre2grep-libz`

  This option adds support for reading .gz compressed files to pcre2grep.

`--enable-pcre2grep-libbz2`

  This option adds support for reading .bz2 compressed files to pcre2grep.

`--enable-pcre2test-libreadline`

  This option adds line editing and history features to the pcre2test program.

Compile the package:

    make

To test the results, issue:

    make check

Install the package:

    make install

## 8.13.2. Contents of Pcre2

Installed programs: pcre2grep and pcre2test
Installed library: libpcre2-8.so, libpcre2-16.so, libpcre2-32.so, and libpcre2-posix.so

### Short Descriptions

pcre2grep | is a version of grep that understands Perl compatible regular expressions
pcre2test | can test a Perl compatible regular expression

- Prev

  Readline-8.3

- Next

  M4-1.4.21

- Up
- Home