@@ -11,21 +11,10 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality
11
11
12
12
if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
13
13
14
+ # FIXME: don't define "I'm not bundled" as only versions installed in /usr
14
15
if test "$PHP_PCRE_REGEX" = "/usr"; then
15
- if test -z "$PKG_CONFIG"; then
16
- AC_PATH_PROG ( PKG_CONFIG , pkg-config , no )
17
- fi
18
- if test -x "$PKG_CONFIG"; then
19
- AC_MSG_CHECKING ( for PCRE2 10.30 or greater )
20
- if $PKG_CONFIG --atleast-version 10.30 libpcre2-8; then
21
- PCRE2_VER=`$PKG_CONFIG --modversion libpcre2-8`
22
- AC_MSG_RESULT ( $PCRE2_VER )
23
- else
24
- AC_MSG_ERROR ( PCRE2 version 10.30 or later is required to compile php with PCRE2 support )
25
- fi
26
- PCRE2_LIB=`$PKG_CONFIG --libs libpcre2-8`
27
- PCRE2_INC=`$PKG_CONFIG --cflags libpcre2-8`
28
- fi
16
+ PKG_CHECK_MODULES([ PCRE2] , [ libpcre2-8 >= 10.30] , ,
17
+ AC_MSG_ERROR ( PCRE2 version 10.30 or later is required to compile php with PCRE2 support ) )
29
18
fi
30
19
31
20
dnl PCRE2 in a non standard prefix should still have its config tool.
@@ -41,13 +30,13 @@ PHP_ARG_WITH(pcre-jit,,[ --with-pcre-jit Enable PCRE JIT functionality
41
30
AC_MSG_RESULT ( $PCRE2_VER )
42
31
fi
43
32
PCRE2_LIB=`$PCRE2_CONF --libs8`
44
- PCRE2_INC =`$PCRE2_CONF --cflags`
33
+ PCRE2_CFLAGS =`$PCRE2_CONF --cflags`
45
34
else
46
35
AC_MSG_ERROR ( Couldn't find pcre2-config )
47
36
fi
48
37
fi
49
38
50
- PHP_EVAL_INCLINE($PCRE2_INC )
39
+ PHP_EVAL_INCLINE($PCRE2_CFLAGS )
51
40
PHP_EVAL_LIBLINE($PCRE2_LIB)
52
41
AC_DEFINE ( PCRE2_CODE_UNIT_WIDTH , 8 , [ ] )
53
42
AC_DEFINE ( HAVE_PCRE , 1 , [ ] )
0 commit comments