ngx_http_xslt_filter_module

This commit is contained in:
Igor Sysoev 2008-08-04 14:48:15 +00:00
parent 41a9c12b44
commit 99dbc09d5b
7 changed files with 1214 additions and 1 deletions

View file

@ -19,7 +19,9 @@ if test -n "$ngx_feature_name"; then
fi fi
if test -n "$ngx_feature_path"; then 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 fi
cat << END > $NGX_AUTOTEST.c cat << END > $NGX_AUTOTEST.c

View file

@ -41,6 +41,10 @@ if [ $USE_ZLIB = YES ]; then
. auto/lib/zlib/conf . auto/lib/zlib/conf
fi fi
if [ $USE_LIBXSLT = YES ]; then
. auto/lib/libxslt/conf
fi
if [ $USE_PERL = YES ]; then if [ $USE_PERL = YES ]; then
. auto/lib/perl/conf . auto/lib/perl/conf
fi fi

78
auto/lib/libxslt/conf Normal file
View file

@ -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

View file

@ -76,6 +76,9 @@ fi
# the module order is important # the module order is important
# ngx_http_static_module
# ngx_http_gzip_static_module
# ngx_http_dav_module
# ngx_http_autoindex_module # ngx_http_autoindex_module
# ngx_http_index_module # ngx_http_index_module
# #
@ -92,6 +95,8 @@ fi
# ngx_http_postpone_filter # ngx_http_postpone_filter
# ngx_http_charset_filter # ngx_http_charset_filter
# ngx_http_ssi_filter # ngx_http_ssi_filter
# ngx_http_xslt_filter
# ngx_http_sub_filter
# ngx_http_addition_filter # ngx_http_addition_filter
# ngx_http_userid_filter # ngx_http_userid_filter
# ngx_http_headers_filter # ngx_http_headers_filter
@ -129,6 +134,12 @@ if [ $HTTP_SSI = YES ]; then
HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS" HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS"
fi 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 if [ $HTTP_SUB = YES ]; then
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SUB_FILTER_MODULE" HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SUB_FILTER_MODULE"
HTTP_SRCS="$HTTP_SRCS $HTTP_SUB_SRCS" HTTP_SRCS="$HTTP_SRCS $HTTP_SUB_SRCS"

View file

@ -56,6 +56,7 @@ HTTP_SSL=NO
HTTP_SSI=YES HTTP_SSI=YES
HTTP_POSTPONE=NO HTTP_POSTPONE=NO
HTTP_REALIP=NO HTTP_REALIP=NO
HTTP_XSLT=NO
HTTP_SUB=NO HTTP_SUB=NO
HTTP_ADDITION=NO HTTP_ADDITION=NO
HTTP_DAV=NO HTTP_DAV=NO
@ -115,6 +116,8 @@ ZLIB_ASM=NO
USE_PERL=NO USE_PERL=NO
NGX_PERL=perl NGX_PERL=perl
USE_LIBXSLT=NO
NGX_GOOGLE_PERFTOOLS=NO NGX_GOOGLE_PERFTOOLS=NO
NGX_CPU_CACHE_LINE= NGX_CPU_CACHE_LINE=
@ -162,6 +165,7 @@ do
--with-http_ssl_module) HTTP_SSL=YES ;; --with-http_ssl_module) HTTP_SSL=YES ;;
--with-http_realip_module) HTTP_REALIP=YES ;; --with-http_realip_module) HTTP_REALIP=YES ;;
--with-http_addition_module) HTTP_ADDITION=YES ;; --with-http_addition_module) HTTP_ADDITION=YES ;;
--with-http_xslt_module) HTTP_XSLT=YES ;;
--with-http_sub_module) HTTP_SUB=YES ;; --with-http_sub_module) HTTP_SUB=YES ;;
--with-http_dav_module) HTTP_DAV=YES ;; --with-http_dav_module) HTTP_DAV=YES ;;
--with-http_flv_module) HTTP_FLV=YES ;; --with-http_flv_module) HTTP_FLV=YES ;;
@ -276,6 +280,7 @@ cat << END
--with-http_ssl_module enable ngx_http_ssl_module --with-http_ssl_module enable ngx_http_ssl_module
--with-http_realip_module enable ngx_http_realip_module --with-http_realip_module enable ngx_http_realip_module
--with-http_addition_module enable ngx_http_addition_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_sub_module enable ngx_http_sub_module
--with-http_dav_module enable ngx_http_dav_module --with-http_dav_module enable ngx_http_dav_module
--with-http_flv_module enable ngx_http_flv_module --with-http_flv_module enable ngx_http_flv_module

View file

@ -332,6 +332,10 @@ HTTP_SSI_DEPS=src/http/modules/ngx_http_ssi_filter_module.h
HTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.c 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_FILTER_MODULE=ngx_http_sub_filter_module
HTTP_SUB_SRCS=src/http/modules/ngx_http_sub_filter_module.c HTTP_SUB_SRCS=src/http/modules/ngx_http_sub_filter_module.c

File diff suppressed because it is too large Load diff