summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorChristian Stocker <chregu@php.net>2003-11-19 12:07:59 +0000
committerChristian Stocker <chregu@php.net>2003-11-19 12:07:59 +0000
commitb63803a06cb13360051085700fa8523066826441 (patch)
tree7c59bc4d8e669816cd99c2f35dff755b5f20b9ea /ext
parent2fefe6148baf48ae5c7a29514ad61ab6d4f4c993 (diff)
downloadphp-git-b63803a06cb13360051085700fa8523066826441.tar.gz
added exslt support
Diffstat (limited to 'ext')
-rw-r--r--ext/xsl/config.m418
-rw-r--r--ext/xsl/php_xsl.c11
-rw-r--r--ext/xsl/php_xsl.h4
3 files changed, 31 insertions, 2 deletions
diff --git a/ext/xsl/config.m4 b/ext/xsl/config.m4
index 81f375c49f..13290409ac 100644
--- a/ext/xsl/config.m4
+++ b/ext/xsl/config.m4
@@ -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,[ ])
diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c
index 742192b9b2..534ff41cad 100644
--- a/ext/xsl/php_xsl.c
+++ b/ext/xsl/php_xsl.c
@@ -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
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h
index c7c4151de2..f0ce76955e 100644
--- a/ext/xsl/php_xsl.h
+++ b/ext/xsl/php_xsl.h
@@ -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"