1 diff --git a/pcre-shared.patch b/pcre-shared.patch
2 index 39632a0..81b9ecf 100644
3 --- a/pcre-shared.patch
4 +++ b/pcre-shared.patch
6 ---- php-5.3.1/ext/pcre/config0.m4 2009-11-27 08:19:08.836025192 +0000
7 -+++ php-5.3.1/ext/pcre/config0.m4 2009-11-30 22:09:24.385647500 +0000
10 - if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
11 - AC_MSG_CHECKING([for PCRE headers location])
12 -- for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
13 -+ for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do
14 - test -f $i/pcre.h && PCRE_INCDIR=$i
18 - AC_MSG_RESULT([$PCRE_INCDIR])
20 - AC_MSG_CHECKING([for PCRE library location])
21 -- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
22 -+ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
23 - test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
27 - AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
30 -- PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
31 -+ PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
33 - AC_DEFINE(HAVE_PCRE, 1, [ ])
34 - PHP_ADD_INCLUDE($PCRE_INCDIR)
35 -- PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
36 -+ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
37 - PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
38 -+ EXTRA_LIBS="$EXTRA_LIBS -lpcre"
40 - AC_MSG_CHECKING([for PCRE library to use])
41 - AC_MSG_RESULT([bundled])
43 - pcrelib/pcre_ord2utf8.c pcrelib/pcre_refcount.c pcrelib/pcre_study.c \
44 - pcrelib/pcre_tables.c pcrelib/pcre_try_flipped.c pcrelib/pcre_valid_utf8.c \
45 - pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
46 -- PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,-I@ext_srcdir@/pcrelib)
47 -+ PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib)
48 - PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
49 - PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
50 - AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])
51 --- php-5.3.1/ext/pcre/php_pcre.h 2009-11-30 20:59:04.046581246 +0200
52 +++ php-5.3.1.pcre/ext/pcre/php_pcre.h 2009-11-30 21:38:06.435493243 +0000
58 +--- php-5.3.24/ext/pcre/config0.m4.orig 2013-04-10 09:42:48.000000000 +0200
59 ++++ php-5.3.24/ext/pcre/config0.m4 2013-04-12 18:54:41.113531049 +0200
62 + if test "$PHP_PCRE_REGEX" != "yes" && test "$PHP_PCRE_REGEX" != "no"; then
63 + AC_MSG_CHECKING([for PCRE headers location])
64 +- for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include; do
65 ++ for i in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/include $PHP_PCRE_REGEX/include/pcre $PHP_PCRE_REGEX/local/include /usr/include; do
66 + test -f $i/pcre.h && PCRE_INCDIR=$i
70 + AC_MSG_RESULT([$PCRE_INCDIR])
72 + AC_MSG_CHECKING([for PCRE library location])
73 +- for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR; do
74 ++ for j in $PHP_PCRE_REGEX $PHP_PCRE_REGEX/$PHP_LIBDIR /usr/$PHP_LIBDIR; do
75 + test -f $j/libpcre.a || test -f $j/libpcre.$SHLIB_SUFFIX_NAME && PCRE_LIBDIR=$j
79 + AC_MSG_ERROR([The PCRE extension requires PCRE library version >= 6.6])
82 +- PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR)
83 ++ PHP_ADD_LIBRARY_WITH_PATH(pcre, $PCRE_LIBDIR, PCRE_SHARED_LIBADD)
85 + AC_DEFINE(HAVE_PCRE, 1, [ ])
86 + PHP_ADD_INCLUDE($PCRE_INCDIR)
87 +- PHP_NEW_EXTENSION(pcre, php_pcre.c, no)
88 ++ PHP_NEW_EXTENSION(pcre, php_pcre.c, $ext_shared)
89 + PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h])
90 ++ EXTRA_LIBS="$EXTRA_LIBS -lpcre"
92 + AC_MSG_CHECKING([for PCRE library to use])
93 + AC_MSG_RESULT([bundled])
95 + pcrelib/pcre_tables.c pcrelib/pcre_valid_utf8.c \
96 + pcrelib/pcre_version.c pcrelib/pcre_xclass.c"
97 + PHP_PCRE_CFLAGS="-DHAVE_CONFIG_H -I@ext_srcdir@/pcrelib"
98 +- PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, no,,$PHP_PCRE_CFLAGS)
99 ++ PHP_NEW_EXTENSION(pcre, $pcrelib_sources php_pcre.c, $ext_shared,,-I@ext_srcdir@/pcrelib)
100 + PHP_ADD_BUILD_DIR($ext_builddir/pcrelib)
101 + PHP_INSTALL_HEADERS([ext/pcre], [php_pcre.h pcrelib/])
102 + AC_DEFINE(HAVE_BUNDLED_PCRE, 1, [ ])