com php-src: Fixed bug #75285i Broken build when system libpcre don't have jit support: ext/pcre/config0.m4

From: Date: Fri, 29 Sep 2017 13:47:50 +0000
Subject: com php-src: Fixed bug #75285i Broken build when system libpcre don't have jit support: ext/pcre/config0.m4
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99581@lists.php.net to get a copy of this message
Commit: 7c8357929cc3e0cabcb312c3fae48f6fb949944e Author: Remi Collet <remi@php.net> Fri, 29 Sep 2017 15:47:50 +0200 Parents: c3a1cc382a3cdeac8009c4dc9c184a7a3517bd32 Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=7c8357929cc3e0cabcb312c3fae48f6fb949944e Log: Fixed bug #75285i Broken build when system libpcre don't have jit support Detect JIT support in system library, So --with-pcre-jit is only for bundled library. Bugs: https://bugs.php.net/75285 Changed paths: M ext/pcre/config0.m4 Diff: diff --git a/ext/pcre/config0.m4 b/ext/pcre/config0.m4 index 6d5b257..80c8a58 100644 --- a/ext/pcre/config0.m4 +++ b/ext/pcre/config0..m4 @@ -9,6 +9,8 @@ PHP_ARG_WITH(pcre-regex,, [ --with-pcre-regex=DIR Include Perl Compatible Regular Expressions support. DIR is the PCRE install prefix [BUNDLED]], yes, no) +PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality (BUNDLED only)], yes, no) + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then AC_MSG_CHECKING([for PCRE headers location]) for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do @@ -43,6 +45,13 @@ PHP_ARG_WITH(pcre-regex,, AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6]) fi + PHP_CHECK_LIBRARY(pcre, pcre_jit_exec, + [ + AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ]) + ],[ + ],[ + -L$PCRE_LIBDIR + ]) PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR) AC_DEFINE(HAVE_PCRE, 1, [ ]) @@ -65,16 +74,15 @@ PHP_ARG_WITH(pcre-regex,, PHP_ADD_BUILD_DIR($ext_builddir/pcrelib) PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/]) AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ]) - fi -PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality], yes, no) - if test "$PHP_PCRE_REGEX" != "no"; then - AC_MSG_CHECKING([whether to enable PCRE JIT functionality]) - if test "$PHP_PCRE_JIT" != "no"; then - AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ]) - AC_MSG_RESULT([yes]) - else + if test "$PHP_PCRE_REGEX" != "no"; then + AC_MSG_CHECKING([whether to enable PCRE JIT functionality]) + if test "$PHP_PCRE_JIT" != "no"; then + AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ]) + AC_MSG_RESULT([yes]) + else AC_MSG_RESULT([no]) + fi fi fi

« previous php.cvs (#99581) next »