ngx_http_xslt_filter_module
diff --git a/auto/feature b/auto/feature
index 2cb4059..cd71e27 100644
--- a/auto/feature
+++ b/auto/feature
@@ -19,7 +19,9 @@
fi
if test -n "$ngx_feature_path"; then
- ngx_feature_inc_path="-I $ngx_feature_path"
+ for ngx_temp in $ngx_feature_path; do
+ ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp"
+ done
fi
cat << END > $NGX_AUTOTEST.c
diff --git a/auto/lib/conf b/auto/lib/conf
index fcf2b3f..0462228 100644
--- a/auto/lib/conf
+++ b/auto/lib/conf
@@ -41,6 +41,10 @@
. auto/lib/zlib/conf
fi
+if [ $USE_LIBXSLT = YES ]; then
+ . auto/lib/libxslt/conf
+fi
+
if [ $USE_PERL = YES ]; then
. auto/lib/perl/conf
fi
diff --git a/auto/lib/libxslt/conf b/auto/lib/libxslt/conf
new file mode 100644
index 0000000..877c171
--- /dev/null
+++ b/auto/lib/libxslt/conf
@@ -0,0 +1,78 @@
+
+# Copyright (C) Igor Sysoev
+
+
+ ngx_feature="libxslt"
+ ngx_feature_name=
+ ngx_feature_run=no
+ ngx_feature_incs="#include <libxml/parser.h>
+ #include <libxml/tree.h>
+ #include <libxslt/xslt.h>
+ #include <libxslt/xsltInternals.h>
+ #include <libxslt/transform.h>
+ #include <libxslt/xsltutils.h>"
+ ngx_feature_path="/usr/include/libxml2"
+ ngx_feature_libs="-lxml2 -lxslt"
+ ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
+ xsltStylesheetPtr sheet = NULL;
+ xmlDocPtr doc;
+ doc = xmlParseChunk(ctxt, NULL, 0, 0);
+ xsltApplyStylesheet(sheet, doc, NULL);"
+ . auto/feature
+
+
+if [ $ngx_found = no ]; then
+
+ # FreeBSD port
+
+ ngx_feature="libxslt in /usr/local/"
+ ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
+
+ if [ $NGX_RPATH = YES ]; then
+ ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt"
+ else
+ ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt"
+ fi
+
+ . auto/feature
+fi
+
+
+if [ $ngx_found = no ]; then
+
+ # NetBSD port
+
+ ngx_feature="libxslt in /usr/pkg/"
+ ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include"
+
+ if [ $NGX_RPATH = YES ]; then
+ ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt"
+ else
+ ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt"
+ fi
+
+ . auto/feature
+fi
+
+
+if [ $ngx_found = no ]; then
+
+ # MacPorts
+
+ ngx_feature="libxslt in /opt/local/"
+ ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
+
+ if [ $NGX_RPATH = YES ]; then
+ ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt"
+ else
+ ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt"
+ fi
+
+ . auto/feature
+fi
+
+
+if [ $ngx_found = yes ]; then
+ CORE_INCS="$CORE_INCS $ngx_feature_path"
+ CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
+fi
diff --git a/auto/modules b/auto/modules
index cba3768..0c2a367 100644
--- a/auto/modules
+++ b/auto/modules
@@ -76,6 +76,9 @@
# the module order is important
+# ngx_http_static_module
+# ngx_http_gzip_static_module
+# ngx_http_dav_module
# ngx_http_autoindex_module
# ngx_http_index_module
#
@@ -92,6 +95,8 @@
# ngx_http_postpone_filter
# ngx_http_charset_filter
# ngx_http_ssi_filter
+# ngx_http_xslt_filter
+# ngx_http_sub_filter
# ngx_http_addition_filter
# ngx_http_userid_filter
# ngx_http_headers_filter
@@ -129,6 +134,12 @@
HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS"
fi
+if [ $HTTP_XSLT = YES ]; then
+ USE_LIBXSLT=YES
+ HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_XSLT_FILTER_MODULE"
+ HTTP_SRCS="$HTTP_SRCS $HTTP_XSLT_SRCS"
+fi
+
if [ $HTTP_SUB = YES ]; then
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SUB_FILTER_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_SUB_SRCS"
diff --git a/auto/options b/auto/options
index e00bf97..1498243 100644
--- a/auto/options
+++ b/auto/options
@@ -56,6 +56,7 @@
HTTP_SSI=YES
HTTP_POSTPONE=NO
HTTP_REALIP=NO
+HTTP_XSLT=NO
HTTP_SUB=NO
HTTP_ADDITION=NO
HTTP_DAV=NO
@@ -115,6 +116,8 @@
USE_PERL=NO
NGX_PERL=perl
+USE_LIBXSLT=NO
+
NGX_GOOGLE_PERFTOOLS=NO
NGX_CPU_CACHE_LINE=
@@ -162,6 +165,7 @@
--with-http_ssl_module) HTTP_SSL=YES ;;
--with-http_realip_module) HTTP_REALIP=YES ;;
--with-http_addition_module) HTTP_ADDITION=YES ;;
+ --with-http_xslt_module) HTTP_XSLT=YES ;;
--with-http_sub_module) HTTP_SUB=YES ;;
--with-http_dav_module) HTTP_DAV=YES ;;
--with-http_flv_module) HTTP_FLV=YES ;;
@@ -276,6 +280,7 @@
--with-http_ssl_module enable ngx_http_ssl_module
--with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_module
+ --with-http_xslt_module enable ngx_http_xslt_module
--with-http_sub_module enable ngx_http_sub_module
--with-http_dav_module enable ngx_http_dav_module
--with-http_flv_module enable ngx_http_flv_module
diff --git a/auto/sources b/auto/sources
index 12ab1b7..82734dd 100644
--- a/auto/sources
+++ b/auto/sources
@@ -332,6 +332,10 @@
HTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.c
+HTTP_XSLT_FILTER_MODULE=ngx_http_xslt_filter_module
+HTTP_XSLT_SRCS=src/http/modules/ngx_http_xslt_filter_module.c
+
+
HTTP_SUB_FILTER_MODULE=ngx_http_sub_filter_module
HTTP_SUB_SRCS=src/http/modules/ngx_http_sub_filter_module.c