diff options
Diffstat (limited to 'ext/zip/config.m4')
| -rw-r--r-- | ext/zip/config.m4 | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/ext/zip/config.m4 b/ext/zip/config.m4 index 271bd2faa0..8b635d1a1a 100644 --- a/ext/zip/config.m4 +++ b/ext/zip/config.m4 @@ -3,13 +3,16 @@ dnl $Id$ dnl PHP_ARG_ENABLE(zip, for zip archive read/writesupport, -[ --enable-zip Include Zip read/write support]) +[ --enable-zip Include Zip read/write support.]) if test -z "$PHP_ZLIB_DIR"; then PHP_ARG_WITH(zlib-dir, for the location of libz, -[ --with-zlib-dir[=DIR] ZIP: Set the path to libz install prefix], no, no) +[ --with-zlib-dir[=DIR] zip: Set the path to libz install prefix.], no, no) fi +PHP_ARG_WITH(pcre-dir, pcre install prefix, +[ --with-pcre-dir FILTER: pcre install prefix], no, no) + if test "$PHP_ZIP" != "no"; then if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then @@ -44,6 +47,32 @@ if test "$PHP_ZIP" != "no"; then PHP_ADD_INCLUDE($PHP_ZLIB_INCDIR) fi + + dnl This is PECL build, check if bundled PCRE library is used + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$INCLUDES + AC_EGREP_CPP(yes,[ +#include <main/php_config.h> +#if defined(HAVE_BUNDLED_PCRE) && !defined(COMPILE_DL_PCRE) +yes +#endif + ],[ + PHP_PCRE_REGEX=yes + ],[ + AC_EGREP_CPP(yes,[ +#include <main/php_config.h> +#if defined(HAVE_PCRE) && !defined(COMPILE_DL_PCRE) +yes +#endif + ],[ + PHP_PCRE_REGEX=pecl + ],[ + PHP_PCRE_REGEX=no + ]) + ]) + CPPFLAGS=$old_CPPFLAGS + + PHP_ZIP_SOURCES="$PHP_ZIP_SOURCES lib/zip_add.c lib/zip_error.c lib/zip_fclose.c \ lib/zip_fread.c lib/zip_open.c lib/zip_source_filep.c \ lib/zip_strerror.c lib/zip_close.c lib/zip_error_get.c \ |
