]> granicus.if.org Git - php/commitdiff
added exslt support
authorChristian Stocker <chregu@php.net>
Wed, 19 Nov 2003 12:07:59 +0000 (12:07 +0000)
committerChristian Stocker <chregu@php.net>
Wed, 19 Nov 2003 12:07:59 +0000 (12:07 +0000)
ext/xsl/config.m4
ext/xsl/php_xsl.c
ext/xsl/php_xsl.h

index 81f375c49fd705e1b66e6897f0c8b850fca15254..13290409ac293787725f79420fc408fdb50fe916 100644 (file)
@@ -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,[ ])
index 742192b9b2a68b288a6bcf6091b749fbfcd315a6..534ff41cad04d8409b9e2b61de26eca5c4732bae 100644 (file)
@@ -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
index c7c4151de229d9ab5cd50597bc7953c6541a06b6..f0ce76955eed53ac9a3d1eea9ed087708e4c4951 100644 (file)
@@ -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"