blob: 30ef6d0dac75dd93db6af203add57c6bbb4ddc4f [file] [log] [blame]
Igor Sysoev1ae389d2008-08-04 14:48:15 +00001
2# Copyright (C) Igor Sysoev
3
4
5 ngx_feature="libxslt"
6 ngx_feature_name=
7 ngx_feature_run=no
8 ngx_feature_incs="#include <libxml/parser.h>
9 #include <libxml/tree.h>
10 #include <libxslt/xslt.h>
11 #include <libxslt/xsltInternals.h>
12 #include <libxslt/transform.h>
13 #include <libxslt/xsltutils.h>"
14 ngx_feature_path="/usr/include/libxml2"
15 ngx_feature_libs="-lxml2 -lxslt"
16 ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
17 xsltStylesheetPtr sheet = NULL;
18 xmlDocPtr doc;
19 doc = xmlParseChunk(ctxt, NULL, 0, 0);
20 xsltApplyStylesheet(sheet, doc, NULL);"
21 . auto/feature
22
23
24if [ $ngx_found = no ]; then
25
26 # FreeBSD port
27
28 ngx_feature="libxslt in /usr/local/"
29 ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
30
31 if [ $NGX_RPATH = YES ]; then
32 ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt"
33 else
34 ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt"
35 fi
36
37 . auto/feature
38fi
39
40
41if [ $ngx_found = no ]; then
42
43 # NetBSD port
44
45 ngx_feature="libxslt in /usr/pkg/"
46 ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include"
47
48 if [ $NGX_RPATH = YES ]; then
49 ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt"
50 else
51 ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt"
52 fi
53
54 . auto/feature
55fi
56
57
58if [ $ngx_found = no ]; then
59
60 # MacPorts
61
62 ngx_feature="libxslt in /opt/local/"
63 ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
64
65 if [ $NGX_RPATH = YES ]; then
66 ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt"
67 else
68 ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt"
69 fi
70
71 . auto/feature
72fi
73
74
75if [ $ngx_found = yes ]; then
Igor Sysoevd28170c2008-08-13 08:32:35 +000076
Igor Sysoev1ae389d2008-08-04 14:48:15 +000077 CORE_INCS="$CORE_INCS $ngx_feature_path"
78 CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
Igor Sysoevd28170c2008-08-13 08:32:35 +000079
80else
81
82cat << END
83
84$0: error: the HTTP XSLT module requires the libxml2/libxslt
85libraries. You can either do not enable the module or install the libraries.
86
87END
88
89 exit 1
Igor Sysoev1ae389d2008-08-04 14:48:15 +000090fi