2005-12-04 20:35:38 +00:00
|
|
|
dnl $Id$
|
|
|
|
dnl config.m4 for extension phar
|
|
|
|
|
2008-01-17 03:59:07 +00:00
|
|
|
PHP_ARG_ENABLE(phar, for phar archive support,
|
2007-12-31 22:42:40 +00:00
|
|
|
[ --enable-phar Enable phar support])
|
|
|
|
|
2006-01-01 21:42:55 +00:00
|
|
|
if test "$PHP_PHAR" != "no"; then
|
2008-01-17 03:48:29 +00:00
|
|
|
AC_MSG_CHECKING([for ZIP includes])
|
|
|
|
if test -f $abs_srcdir/include/php/ext/zip/lib/zip.h; then
|
|
|
|
zip_inc_path=$abs_srcdir/ext
|
|
|
|
AC_DEFINE(HAVE_PHAR_ZIP,1,[ ])
|
|
|
|
AC_MSG_RESULT($zip_inc_path)
|
2008-01-17 04:04:30 +00:00
|
|
|
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,,-I$zip_inc_path $PHAR_DEFS)
|
2008-01-17 03:48:29 +00:00
|
|
|
elif test -f $abs_srcdir/ext/zip/lib/zip.h; then
|
|
|
|
zip_inc_path=$abs_srcdir/ext
|
|
|
|
AC_DEFINE(HAVE_PHAR_ZIP,1,[ ])
|
|
|
|
AC_MSG_RESULT($zip_inc_path)
|
2008-01-17 04:04:30 +00:00
|
|
|
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,,-I$zip_inc_path $PHAR_DEFS)
|
2008-01-17 03:48:29 +00:00
|
|
|
elif test -f $prefix/include/php/ext/zip/lib/zip.h; then
|
|
|
|
zip_inc_path=$prefix/include/php/ext
|
|
|
|
AC_DEFINE(HAVE_PHAR_ZIP,1,[ ])
|
|
|
|
AC_MSG_RESULT($zip_inc_path)
|
2008-01-17 04:04:30 +00:00
|
|
|
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,,-I$zip_inc_path $PHAR_DEFS)
|
2008-01-17 03:48:29 +00:00
|
|
|
else
|
|
|
|
zip_inc_path=/dev/null
|
|
|
|
AC_DEFINE(HAVE_PHAR_ZIP,0,[ ])
|
|
|
|
AC_MSG_RESULT([not found, disabling ZIP-based phar support])
|
2008-01-17 04:04:30 +00:00
|
|
|
PHP_NEW_EXTENSION(phar, tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared)
|
2008-01-17 03:48:29 +00:00
|
|
|
fi
|
2007-12-31 22:42:40 +00:00
|
|
|
PHP_ADD_BUILD_DIR($ext_builddir/lib, 1)
|
|
|
|
PHP_SUBST(PHAR_SHARED_LIBADD)
|
2008-01-17 02:03:59 +00:00
|
|
|
PHP_ADD_EXTENSION_DEP(phar, zip, true)
|
2007-12-18 05:32:11 +00:00
|
|
|
PHP_ADD_EXTENSION_DEP(phar, zlib, true)
|
|
|
|
PHP_ADD_EXTENSION_DEP(phar, bz2, true)
|
|
|
|
PHP_ADD_EXTENSION_DEP(phar, spl, true)
|
2007-02-04 16:25:25 +00:00
|
|
|
PHP_ADD_MAKEFILE_FRAGMENT
|
2006-01-01 21:42:55 +00:00
|
|
|
fi
|