From 3fd3e052cc8d7b789710d9a1591b9939fa1809d2 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 23 Jun 2019 15:46:47 +0200 Subject: [PATCH 1/2] Fix bug #78197: PCRE2 version check When external PCRE library version is of format ##.##-RC# the check failed. --- ext/pcre/config0.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index b9542f0113063..0244d6d90d3d7 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -35,7 +35,7 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality if test -x "$PCRE2_CONF"; then AC_MSG_CHECKING(for PCRE2 10.30 or greater) PCRE2_VER=`$PCRE2_CONF --version` - if test "`echo $PCRE2_VER | sed 's,\.,,g'`" -lt 1030; then + if test "`echo $PCRE2_VER | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\(.\)*/\1\2/g'`" -lt "1030"; then AC_MSG_ERROR(PCRE2 version 10.30 or later is required to compile php with PCRE2 support) else AC_MSG_RESULT($PCRE2_VER) From 68fd96c082246981d59060648ae07195dc2913cf Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Tue, 25 Jun 2019 14:25:36 +0200 Subject: [PATCH 2/2] Simplify last not neede capturing group --- ext/pcre/config0.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 0244d6d90d3d7..3b043aec80297 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0.m4 @@ -35,7 +35,7 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality if test -x "$PCRE2_CONF"; then AC_MSG_CHECKING(for PCRE2 10.30 or greater) PCRE2_VER=`$PCRE2_CONF --version` - if test "`echo $PCRE2_VER | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\)\(.\)*/\1\2/g'`" -lt "1030"; then + if test "`echo $PCRE2_VER | $SED 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1\2/g'`" -lt "1030"; then AC_MSG_ERROR(PCRE2 version 10.30 or later is required to compile php with PCRE2 support) else AC_MSG_RESULT($PCRE2_VER)