Skip to content

Autotools: Fix external PCRE JIT check #15430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions ext/pcre/config0.m4
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ if test "$PHP_EXTERNAL_PCRE" != "no"; then
AS_VAR_IF([PHP_PCRE_JIT], [no],,
[AC_CACHE_CHECK([whether external PCRE2 library has JIT supported],
[php_cv_have_pcre2_jit],
[AC_RUN_IFELSE([AC_LANG_SOURCE([
[
CFLAGS_SAVE=$CFLAGS
LIBS_SAVE=$LIBS
CFLAGS="$CFLAGS $PCRE2_CFLAGS"
LIBS="$LIBS $PCRE2_LIBS"
AC_RUN_IFELSE([AC_LANG_SOURCE([
#include <pcre2.h>
#include <stdlib.h>
int main(void) {
Expand All @@ -42,7 +47,10 @@ if test "$PHP_EXTERNAL_PCRE" != "no"; then
[AS_CASE([$host_cpu],
[arm*|i[[34567]]86|x86_64|mips*|powerpc*|sparc],
[php_cv_have_pcre2_jit=yes],
[php_cv_have_pcre2_jit=no])])])
[php_cv_have_pcre2_jit=no])])
CFLAGS=$CFLAGS_SAVE
LIBS=$LIBS_SAVE
])
AS_VAR_IF([php_cv_have_pcre2_jit], [yes],
[AC_DEFINE([HAVE_PCRE_JIT_SUPPORT], [1])])
])
Expand Down
Loading