|
68 | 68 | pcre2lib/pcre2_tables.c pcre2lib/pcre2_ucd.c pcre2lib/pcre2_valid_utf.c pcre2lib/pcre2_xclass.c \
|
69 | 69 | pcre2lib/pcre2_find_bracket.c pcre2lib/pcre2_convert.c pcre2lib/pcre2_extuni.c pcre2lib/pcre2_script_run.c"
|
70 | 70 | PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcre2lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
|
71 |
| - PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS) |
72 |
| - PHP_ADD_BUILD_DIR($ext_builddir/pcre2lib) |
73 |
| - PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcre2lib/]) |
74 | 71 | AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
|
75 | 72 | AC_DEFINE(PCRE2_CODE_UNIT_WIDTH, 8, [ ])
|
76 | 73 |
|
77 | 74 | AC_MSG_CHECKING([whether to enable PCRE JIT functionality])
|
78 | 75 | if test "$PHP_PCRE_JIT" != "no"; then
|
79 | 76 | AC_DEFINE(HAVE_PCRE_JIT_SUPPORT, 1, [ ])
|
80 | 77 | AC_MSG_RESULT([yes])
|
| 78 | + |
| 79 | + AC_CACHE_CHECK([whether Intel CET is enabled], ac_cv_have_pcre2_intel_cet, [ |
| 80 | + AC_COMPILE_IFELSE([ |
| 81 | + AC_LANG_SOURCE([[ |
| 82 | + #ifndef __CET__ |
| 83 | + # error CET is not enabled |
| 84 | + #endif |
| 85 | + ]])], [ |
| 86 | + ac_cv_have_pcre2_intel_cet=yes |
| 87 | + ], [ |
| 88 | + ac_cv_have_pcre2_intel_cet=no |
| 89 | + ]) |
| 90 | + if test "$ac_cv_have_pcre2_intel_cet" = yes; then |
| 91 | + PHP_PCRE_CFLAGS="-mshstk $PHP_PCRE_CFLAGS" |
| 92 | + fi |
| 93 | + ]) |
| 94 | + |
81 | 95 | else
|
82 | 96 | AC_MSG_RESULT([no])
|
83 | 97 | fi
|
84 | 98 |
|
| 99 | + PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS) |
| 100 | + PHP_ADD_BUILD_DIR($ext_builddir/pcre2lib) |
| 101 | + PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcre2lib/]) |
| 102 | + |
85 | 103 | if test "$PHP_VALGRIND" != "no" && test "$have_valgrind" = "yes"; then
|
86 | 104 | dnl Enable pcre valgrind support only in DEBUG build (it affects performance)
|
87 | 105 | if test "$ZEND_DEBUG" = "yes"; then
|
|
0 commit comments