@@ -17,12 +17,20 @@ if test "$PHP_PCRE_REGEX" != "no"; then
17
17
PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
18
18
AC_DEFINE ( HAVE_BUNDLED_PCRE , 1 , [ ] )
19
19
else
20
- test -f $PHP_PCRE_REGEX/pcre.h && PCRE_INCDIR= $PHP_PCRE_REGEX
21
- test -f $PHP_PCRE_REGEX/include/ pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include
22
- test -f $PHP_PCRE_REGEX/include/pcre/pcre.h && PCRE_INCDIR=$PHP_PCRE_REGEX/include/pcre
20
+ for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre; do
21
+ test -f $i/ pcre.h && PCRE_INCDIR=$i
22
+ done
23
23
24
24
if test -z "$PCRE_INCDIR"; then
25
- AC_MSG_RESULT ( Could not find pcre.h in $PHP_PCRE_REGEX )
25
+ AC_MSG_ERROR ( [ Could not find pcre.h in $PHP_PCRE_REGEX] )
26
+ fi
27
+
28
+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/lib; do
29
+ test -f $j/libpcre.a -o -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
30
+ done
31
+
32
+ if test -z "$PCRE_LIBDIR" ; then
33
+ AC_MSG_ERROR ( [ Could not find libpcre.(a|$SHLIB_SUFFIX_NAME) in $PHP_PCRE_REGEX] )
26
34
fi
27
35
28
36
changequote ( { ,} )
@@ -35,14 +43,7 @@ if test "$PHP_PCRE_REGEX" != "no"; then
35
43
fi
36
44
pcre_version=$pcre_major$pcre_minor
37
45
if test "$pcre_version" -lt 208; then
38
- AC_MSG_ERROR ( The PCRE extension requires PCRE library version >= 2.08 )
39
- fi
40
-
41
- test -f $PHP_PCRE_REGEX/libpcre.a && PCRE_LIBDIR=$PHP_PCRE_REGEX
42
- test -f $PHP_PCRE_REGEX/lib/libpcre.a && PCRE_LIBDIR=$PHP_PCRE_REGEX/lib
43
-
44
- if test -z "$PCRE_LIBDIR" ; then
45
- AC_MSG_ERROR ( Could not find libpcre.a in $PHP_PCRE_REGEX )
46
+ AC_MSG_ERROR ( [ The PCRE extension requires PCRE library version >= 2.08] )
46
47
fi
47
48
48
49
PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
@@ -51,7 +52,5 @@ if test "$PHP_PCRE_REGEX" != "no"; then
51
52
PHP_ADD_INCLUDE($PCRE_INCDIR)
52
53
PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared,,-DSUPPORT_UTF8 -DLINK_SIZE=2)
53
54
fi
55
+ PHP_SUBST(PCRE_SHARED_LIBADD)
54
56
fi
55
- PHP_SUBST(PCRE_SHARED_LIBADD)
56
-
57
- AC_CHECK_FUNC ( memmove , [ ] , [ AC_DEFINE ( USE_BCOPY , 1 , [ ] ) ] )
0 commit comments