chregu Wed Nov 19 07:08:04 2003 EDT Modified files: /php-src/ext/xsl config.m4 php_xsl.c php_xsl.h Log: added exslt support Index: php-src/ext/xsl/config.m4 diff -u php-src/ext/xsl/config.m4:1.6 php-src/ext/xsl/config.m4:1.7 --- php-src/ext/xsl/config.m4:1.6 Mon Jun 30 13:23:52 2003 +++ php-src/ext/xsl/config.m4 Wed Nov 19 07:07:59 2003 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.6 2003/06/30 17:23:52 sniper Exp $ +dnl $Id: config.m4,v 1.7 2003/11/19 12:07:59 chregu Exp $ dnl PHP_ARG_WITH(xsl, for XSL support, @@ -33,9 +33,27 @@ XSL_INCS=`$XSLT_CONFIG --cflags` PHP_EVAL_LIBLINE($XSL_LIBS, XSL_SHARED_LIBADD) PHP_EVAL_INCLINE($XSL_INCS) + + AC_MSG_CHECKING([for EXSLT support]) + for i in $PHP_XSL /usr/local /usr; do + if test -r "$i/include/libexslt/exslt.h"; then + PHP_XSL_EXSL_DIR=$i + break + fi + done + if test -z "$PHP_XSL_EXSL_DIR"; then + AC_MSG_RESULT(not found) + else + AC_MSG_RESULT(found) + PHP_ADD_LIBRARY_WITH_PATH(exslt, $PHP_XSL_EXSL_DIR/lib, XSL_SHARED_LIBADD) + PHP_ADD_INCLUDE($PHP_XSL_EXSL_DIR/include) + AC_DEFINE(HAVE_XSL_EXSLT,1,[ ]) + fi else AC_MSG_ERROR([libxslt version 1.0.18 or greater required.]) fi + + fi AC_DEFINE(HAVE_XSL,1,[ ]) Index: php-src/ext/xsl/php_xsl.c diff -u php-src/ext/xsl/php_xsl.c:1.8 php-src/ext/xsl/php_xsl.c:1.9 --- php-src/ext/xsl/php_xsl.c:1.8 Sun Aug 24 06:18:08 2003 +++ php-src/ext/xsl/php_xsl.c Wed Nov 19 07:07:59 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.c,v 1.8 2003/08/24 10:18:08 rrichards Exp $ */ +/* $Id: php_xsl.c,v 1.9 2003/11/19 12:07:59 chregu Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -133,6 +133,10 @@ memcpy(&xsl_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); REGISTER_XSL_CLASS(ce, "xsltprocessor", NULL, php_xsl_xsltprocessor_class_functions, xsl_xsltprocessor_class_entry); +#if HAVE_XSL_EXSLT + exsltRegisterAll(); +#endif + return SUCCESS; } /* }}} */ @@ -244,12 +248,11 @@ PHP_MINFO_FUNCTION(xsl) { php_info_print_table_start(); - php_info_print_table_row(2, "XML/XSLT", "enabled"); { char buffer[128]; int major, minor, subminor; - php_info_print_table_row(2, "DOM/XSLT", "enabled"); + php_info_print_table_row(2, "XSL", "enabled"); major = xsltLibxsltVersion/10000; minor = (xsltLibxsltVersion - major * 10000) / 100; subminor = (xsltLibxsltVersion - major * 10000 - minor * 100); @@ -261,6 +264,10 @@ snprintf(buffer, 128, "%d.%d.%d", major, minor, subminor); php_info_print_table_row(2, "libxslt compiled against libxml Version", buffer); } +#if HAVE_XSL_EXSLT + php_info_print_table_row(2, "EXSLT", "enabled"); + php_info_print_table_row(2, "libexslt Version", LIBEXSLT_DOTTED_VERSION); +#endif php_info_print_table_end(); /* Remove comments if you have entries in php.ini Index: php-src/ext/xsl/php_xsl.h diff -u php-src/ext/xsl/php_xsl.h:1.4 php-src/ext/xsl/php_xsl.h:1.5 --- php-src/ext/xsl/php_xsl.h:1.4 Sun Aug 24 06:18:08 2003 +++ php-src/ext/xsl/php_xsl.h Wed Nov 19 07:07:59 2003 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.h,v 1.4 2003/08/24 10:18:08 rrichards Exp $ */ +/* $Id: php_xsl.h,v 1.5 2003/11/19 12:07:59 chregu Exp $ */ #ifndef PHP_XSL_H #define PHP_XSL_H @@ -38,6 +38,10 @@ #include <libxslt/xsltInternals.h> #include <libxslt/xsltutils.h> #include <libxslt/transform.h> +#if HAVE_XSL_EXSLT +#include <libexslt/exslt.h> +#include <libexslt/exsltconfig.h> +#endif #include "../dom/xml_common.h" #include "xsl_fe.h"
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php