2139
|
1
|
|
2 # Copyright (C) Igor Sysoev
|
4412
|
3 # Copyright (C) Nginx, Inc.
|
2139
|
4
|
|
5
|
|
6 ngx_feature="libxslt"
|
|
7 ngx_feature_name=
|
|
8 ngx_feature_run=no
|
|
9 ngx_feature_incs="#include <libxml/parser.h>
|
|
10 #include <libxml/tree.h>
|
|
11 #include <libxslt/xslt.h>
|
|
12 #include <libxslt/xsltInternals.h>
|
|
13 #include <libxslt/transform.h>
|
|
14 #include <libxslt/xsltutils.h>"
|
|
15 ngx_feature_path="/usr/include/libxml2"
|
|
16 ngx_feature_libs="-lxml2 -lxslt"
|
|
17 ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
|
|
18 xsltStylesheetPtr sheet = NULL;
|
|
19 xmlDocPtr doc;
|
|
20 doc = xmlParseChunk(ctxt, NULL, 0, 0);
|
|
21 xsltApplyStylesheet(sheet, doc, NULL);"
|
|
22 . auto/feature
|
|
23
|
|
24
|
|
25 if [ $ngx_found = no ]; then
|
|
26
|
|
27 # FreeBSD port
|
|
28
|
|
29 ngx_feature="libxslt in /usr/local/"
|
|
30 ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
|
31
|
|
32 if [ $NGX_RPATH = YES ]; then
|
|
33 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt"
|
|
34 else
|
|
35 ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt"
|
|
36 fi
|
|
37
|
|
38 . auto/feature
|
|
39 fi
|
|
40
|
|
41
|
|
42 if [ $ngx_found = no ]; then
|
|
43
|
|
44 # NetBSD port
|
|
45
|
|
46 ngx_feature="libxslt in /usr/pkg/"
|
|
47 ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include"
|
|
48
|
|
49 if [ $NGX_RPATH = YES ]; then
|
|
50 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt"
|
|
51 else
|
|
52 ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt"
|
|
53 fi
|
|
54
|
|
55 . auto/feature
|
|
56 fi
|
|
57
|
|
58
|
|
59 if [ $ngx_found = no ]; then
|
|
60
|
|
61 # MacPorts
|
|
62
|
|
63 ngx_feature="libxslt in /opt/local/"
|
|
64 ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
|
65
|
|
66 if [ $NGX_RPATH = YES ]; then
|
|
67 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt"
|
|
68 else
|
|
69 ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt"
|
|
70 fi
|
|
71
|
|
72 . auto/feature
|
|
73 fi
|
|
74
|
|
75
|
|
76 if [ $ngx_found = yes ]; then
|
2173
|
77
|
2139
|
78 CORE_INCS="$CORE_INCS $ngx_feature_path"
|
|
79 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
2173
|
80
|
|
81 else
|
|
82
|
|
83 cat << END
|
|
84
|
|
85 $0: error: the HTTP XSLT module requires the libxml2/libxslt
|
|
86 libraries. You can either do not enable the module or install the libraries.
|
|
87
|
|
88 END
|
|
89
|
|
90 exit 1
|
2139
|
91 fi
|
2299
|
92
|
|
93
|
|
94 ngx_feature="libexslt"
|
|
95 ngx_feature_name=NGX_HAVE_EXSLT
|
|
96 ngx_feature_run=no
|
|
97 ngx_feature_incs="#include <libexslt/exslt.h>"
|
|
98 ngx_feature_path="/usr/include/libxml2"
|
|
99 ngx_feature_libs="-lexslt"
|
|
100 ngx_feature_test="exsltRegisterAll();"
|
|
101 . auto/feature
|
|
102
|
|
103 if [ $ngx_found = no ]; then
|
|
104
|
|
105 # FreeBSD port
|
|
106
|
|
107 ngx_feature="libexslt in /usr/local/"
|
|
108 ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
|
109
|
|
110 if [ $NGX_RPATH = YES ]; then
|
|
111 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lexslt"
|
|
112 else
|
|
113 ngx_feature_libs="-L/usr/local/lib -lexslt"
|
|
114 fi
|
|
115
|
|
116 . auto/feature
|
|
117 fi
|
|
118
|
|
119
|
|
120 if [ $ngx_found = no ]; then
|
|
121
|
|
122 # NetBSD port
|
|
123
|
|
124 ngx_feature="libexslt in /usr/pkg/"
|
|
125 ngx_feature_path="/usr/pkg/include/libxml2 /usr/local/include"
|
|
126
|
|
127 if [ $NGX_RPATH = YES ]; then
|
|
128 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lexslt"
|
|
129 else
|
|
130 ngx_feature_libs="-L/usr/pkg/lib -lexslt"
|
|
131 fi
|
|
132
|
|
133 . auto/feature
|
|
134 fi
|
|
135
|
|
136
|
|
137 if [ $ngx_found = no ]; then
|
|
138
|
|
139 # MacPorts
|
|
140
|
|
141 ngx_feature="libexslt in /opt/local/"
|
|
142 ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
|
143
|
|
144 if [ $NGX_RPATH = YES ]; then
|
|
145 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lexslt"
|
|
146 else
|
|
147 ngx_feature_libs="-L/opt/local/lib -lexslt"
|
|
148 fi
|
|
149
|
|
150 . auto/feature
|
|
151 fi
|
|
152
|
|
153
|
|
154 if [ $ngx_found = yes ]; then
|
|
155 CORE_LIBS="$CORE_LIBS -lexslt"
|
|
156 fi
|