PCRE パッケージは Perl 互換正規表現 (Perl Compatible Regular Expression) ライブラリを提供します。 このライブラリを用いれば Perl 5 と同様の文法により、正規表現によるパターンマッチングを実現することができます。
LFS や依存パッケージが本ブックに示す最新安定バージョンでなかった場合には、BLFS 開発版においては、パッケージのビルドや処理実行が適切に行われないことがあります。
ダウンロード (HTTP): https://sourceforge.net/projects/pcre/files/pcre/8.45/pcre-8.45.tar.bz2
ダウンロード MD5 sum: 4452288e6a0eefb2ab11d36010a1eebb
ダウンロードサイズ: 1.5 MB
必要ディスク容量: 23 MB (with tests)
概算ビルド時間: 0.3 SBU (with tests)
以下のコマンドを実行して PCRE をビルドします。
./configure --prefix=/usr \
--docdir=/usr/share/doc/pcre-8.45 \
--enable-unicode-properties \
--enable-pcre16 \
--enable-pcre32 \
--enable-pcregrep-libz \
--enable-pcregrep-libbz2 \
--enable-pcretest-libreadline \
--disable-static &&
make
ビルド結果をテストする場合は make check を実行します。
root ユーザーになって以下を実行します。
make install
--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.78.3.
--enable-pcre16: This
switch enables 16 bit character support.
--enable-pcre32: This
switch enables 32 bit character support.
--enable-pcregrep-libz:
このスイッチは pcregrep
に対して、.gz により圧縮されたファイルの読込機能を付与します。
--enable-pcregrep-libbz2:
このスイッチは pcregrep
に対して、.bz2 により圧縮されたファイルの読込機能を付与します。
--enable-pcretest-libreadline:
このスイッチは pcretest
プログラムにおいて、行編集および履歴機能を付与します。
--disable-static:
このスイッチはスタティックライブラリをインストールしないようにします。
--enable-jit: this option enables
Just-in-time compiling, which can greatly speed up pattern
matching.