]> granicus.if.org Git - php/commitdiff
Fix bug #78197: PCRE2 version check
authorPeter Kokot <peterkokot@gmail.com>
Sun, 23 Jun 2019 13:46:47 +0000 (15:46 +0200)
committerPeter Kokot <peterkokot@gmail.com>
Mon, 1 Jul 2019 00:42:29 +0000 (02:42 +0200)
When external PCRE library version is of format ##.##-RC# the check
failed.

ext/pcre/config0.m4

index b9542f0113063e8496ef6e8ce0ac288fae8a9159..3b043aec802975d8ff0d676a9a29bc76fed2b3e1 100644 (file)
@@ -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)