2003-05-01 23:28:28 +00:00
|
|
|
dnl $Id$
|
|
|
|
dnl config.m4 for extension SPL
|
|
|
|
|
|
|
|
PHP_ARG_ENABLE(spl, enable SPL suppport,
|
2004-01-19 11:07:19 +00:00
|
|
|
[ --disable-spl Disable Standard PHP Library], yes)
|
2003-05-01 23:28:28 +00:00
|
|
|
|
|
|
|
if test "$PHP_SPL" != "no"; then
|
2005-12-20 21:36:47 +00:00
|
|
|
AC_MSG_CHECKING(whether zend_object_value is packed)
|
2005-12-24 13:19:49 +00:00
|
|
|
old_CPPFLAGS=$CPPFLAGS
|
|
|
|
CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
|
2005-12-20 21:36:47 +00:00
|
|
|
AC_TRY_RUN([
|
|
|
|
#include "Zend/zend_types.h"
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
|
|
|
|
}
|
|
|
|
], [
|
|
|
|
ac_result=1
|
|
|
|
],[
|
|
|
|
ac_result=0
|
|
|
|
], [
|
|
|
|
ac_result=0
|
2005-12-24 13:19:49 +00:00
|
|
|
])
|
|
|
|
CPPFLAGS=$old_CPPFLAGS
|
2006-03-03 21:35:16 +00:00
|
|
|
if test "$ac_result"; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
2006-09-20 20:29:24 +00:00
|
|
|
PHP_INSTALL_HEADERS([ext/spl/])
|
2006-01-06 14:03:28 +00:00
|
|
|
AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
|
2004-02-09 18:18:00 +00:00
|
|
|
AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
|
2006-08-23 09:47:07 +00:00
|
|
|
PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_sxe.c spl_exceptions.c spl_observer.c, no)
|
2006-11-12 19:01:33 +00:00
|
|
|
PHP_INSTALL_HEADERS([ext/spl], [php_spl.h spl_array.h spl_directory.h spl_engine.h spl_exceptions.h spl_functions.h spl_iterators.h spl_observer.h spl_sxe.h])
|
2006-12-04 18:01:24 +00:00
|
|
|
PHP_ADD_EXTENSION_DEP(spl, pcre, true)
|
2003-05-01 23:28:28 +00:00
|
|
|
fi
|