mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
added exslt support
This commit is contained in:
parent
2fefe6148b
commit
b63803a06c
3 changed files with 31 additions and 2 deletions
|
@ -33,9 +33,27 @@ if test "$PHP_XSL" != "no"; then
|
|||
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,[ ])
|
||||
|
|
|
@ -133,6 +133,10 @@ PHP_MINIT_FUNCTION(xsl)
|
|||
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_RSHUTDOWN_FUNCTION(xsl)
|
|||
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 @@ PHP_MINFO_FUNCTION(xsl)
|
|||
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
|
||||
|
|
|
@ -38,6 +38,10 @@ extern zend_module_entry xsl_module_entry;
|
|||
#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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue