@@ -9,6 +9,8 @@ PHP_ARG_WITH(pcre-regex,,
9
9
[ --with-pcre-regex=DIR Include Perl Compatible Regular Expressions support.
10
10
DIR is the PCRE install prefix [ BUNDLED] ] , yes, no)
11
11
12
+ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality (BUNDLED only)] , yes, no)
13
+
12
14
if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
13
15
AC_MSG_CHECKING ( [ for PCRE headers location] )
14
16
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,,
43
45
AC_MSG_ERROR ( [ The PCRE extension requires PCRE library version >= 6.6] )
44
46
fi
45
47
48
+ PHP_CHECK_LIBRARY(pcre, pcre_jit_exec,
49
+ [
50
+ AC_DEFINE ( HAVE_PCRE_JIT_SUPPORT , 1 , [ ] )
51
+ ] ,[
52
+ ] ,[
53
+ -L$PCRE_LIBDIR
54
+ ] )
46
55
PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
47
56
48
57
AC_DEFINE ( HAVE_PCRE , 1 , [ ] )
@@ -65,16 +74,15 @@ PHP_ARG_WITH(pcre-regex,,
65
74
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
66
75
PHP_INSTALL_HEADERS([ ext/pcre] , [ php_pcre.h pcrelib/] )
67
76
AC_DEFINE ( HAVE_BUNDLED_PCRE , 1 , [ ] )
68
- fi
69
77
70
- PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality] , yes, no)
71
- if test "$PHP_PCRE_REGEX" != "no"; then
72
- AC_MSG_CHECKING ( [ whether to enable PCRE JIT functionality] )
73
- if test "$PHP_PCRE_JIT" != "no"; then
74
- AC_DEFINE ( HAVE_PCRE_JIT_SUPPORT , 1 , [ ] )
75
- AC_MSG_RESULT ( [ yes] )
76
- else
78
+ if test "$PHP_PCRE_REGEX" != "no"; then
79
+ AC_MSG_CHECKING ( [ whether to enable PCRE JIT functionality] )
80
+ if test "$PHP_PCRE_JIT" != "no"; then
81
+ AC_DEFINE ( HAVE_PCRE_JIT_SUPPORT , 1 , [ ] )
82
+ AC_MSG_RESULT ( [ yes] )
83
+ else
77
84
AC_MSG_RESULT ( [ no] )
85
+ fi
78
86
fi
79
87
fi
80
88
0 commit comments