mirror of
https://github.com/php/php-src.git
synced 2024-11-30 21:35:36 +08:00
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.
This commit is contained in:
parent
c3a1cc382a
commit
7c8357929c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user