config.m4 1.1 KB

123456789101112131415161718192021222324252627
  1. dnl $Id$
  2. dnl config.m4 for extension SPL
  3. AC_MSG_CHECKING(whether zend_object_value is packed)
  4. old_CPPFLAGS=$CPPFLAGS
  5. CPPFLAGS="$INCLUDES -I$abs_srcdir $CPPFLAGS"
  6. AC_TRY_RUN([
  7. #include "Zend/zend_types.h"
  8. int main(int argc, char **argv) {
  9. return ((sizeof(zend_object_handle) + sizeof(zend_object_handlers*)) == sizeof(zend_object_value)) ? 0 : 1;
  10. }
  11. ], [
  12. ac_result=1
  13. AC_MSG_RESULT(yes)
  14. ],[
  15. ac_result=0
  16. AC_MSG_RESULT(no)
  17. ], [
  18. ac_result=0
  19. AC_MSG_RESULT(no)
  20. ])
  21. CPPFLAGS=$old_CPPFLAGS
  22. AC_DEFINE_UNQUOTED(HAVE_PACKED_OBJECT_VALUE, $ac_result, [Whether struct _zend_object_value is packed])
  23. AC_DEFINE(HAVE_SPL, 1, [Whether you want SPL (Standard PHP Library) support])
  24. PHP_NEW_EXTENSION(spl, php_spl.c spl_functions.c spl_engine.c spl_iterators.c spl_array.c spl_directory.c spl_exceptions.c spl_observer.c spl_dllist.c spl_heap.c spl_fixedarray.c, no)
  25. 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_dllist.h spl_heap.h spl_fixedarray.h])
  26. PHP_ADD_EXTENSION_DEP(spl, pcre, true)