PCRE2-10.44

Introduction to PCRE2

The PCRE2 package contains a new generation of the Perl Compatible Regular Expression libraries. These are useful for implementing regular expression pattern matching using the same syntax and semantics as Perl.

Package Information

PCRE2 Dependencies

Installation of PCRE2

Install PCRE2 by running the following commands:

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

Now, as the root user:

make install

32-bit Installation of PCRE2

First clean the directory:

make distclean

Now install lib32-PCRE2 by running the following commands:

CC="gcc -m32" CXX="g++ -m32"                    \
PKG_CONFIG_PATH="/usr/lib32/pkgconfig"          \
./configure --prefix=/usr                       \
            --libdir=/usr/lib32                 \
            --host=i686-pc-linux-gnu            \
            --enable-unicode                    \
            --enable-jit                        \
            --enable-pcre2-16                   \
            --enable-pcre2-32                   \
            --enable-pcre2grep-libz             \
            --enable-pcre2grep-libbz2           \
            --enable-pcre2test-libreadline      \
            --disable-static                    &&
make

Now, as the root user:

make DESTDIR=$PWD/DESTDIR install     &&
cp -vR DESTDIR/usr/lib32/* /usr/lib32 &&
rm -rf DESTDIR                        &&
ldconfig

Command Explanations

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

--enable-pcre2-16: This switch enables 16 bit character support.

--enable-pcre2-32: This switch enables 32 bit character support.

--enable-pcre2grep-libz: This switch adds support for reading .gz compressed files to pcre2grep.

--enable-pcre2grep-libbz2: This switch adds support for reading .bz2 compressed files to pcre2grep.

--enable-pcre2test-libreadline: This switch adds line editing and history features to the pcre2test program.

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

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

Contents

Installed Programs: pcre2-config, pcre2grep, and pcre2test.
Installed Libraries: libpcre2-8.so, libpcre2-16.so, libpcre2-32.so, and libpcre2-posix.so
Installed Directory: /usr/share/doc/pcre2-10.44

Short Descriptions

pcre2grep

is a version of grep that understands Perl compatible regular expressions.

pcre2test

can test a Perl compatible regular expression.

pcre2-config

outputs compilation information to programs linking against the PCRE2 libraries