[PATCH 4 of 4 v3] auto/lib/libxslt/conf: allow to override ngx_feature_path and ngx_feature_libs
Samuel Martin
s.martin49 at gmail.com
Fri Aug 1 23:14:09 UTC 2014
# HG changeset patch
# User Samuel Martin <s.martin49 at gmail.com>
# Date 1406932255 -7200
# Sat Aug 02 00:30:55 2014 +0200
# Node ID 1be88123e98c8b0e78602eeb3a8c3eb3444c15f3
# Parent a0389d32d970bc5740013805bc50d2f1de52aef6
auto/lib/libxslt/conf: allow to override ngx_feature_path and ngx_feature_libs
Because libxml2 headers are not in /usr/include by default, hardcoding the
include directory to /usr/include/libxml2 does not play well when
cross-compiling, or if libxml2 has been installed somewhere else.
This patch allows to define/override the libxslt include directory, and
the libxslt libs flags.
Being able to override the include location is especially useful when
cross-compiling to prevent gcc from complaining about unsafe include
location for cross-compilation (-Wpoision-system-directories).
So far, this warning is only triggered by libxslt.
Signed-off-by: Samuel Martin <s.martin49 at gmail.com>
diff -r a0389d32d970 -r 1be88123e98c auto/lib/libxslt/conf
--- a/auto/lib/libxslt/conf Sat Aug 02 00:30:54 2014 +0200
+++ b/auto/lib/libxslt/conf Sat Aug 02 00:30:55 2014 +0200
@@ -12,8 +12,8 @@
#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_path="${ngx_feature_path_libxslt:=/usr/include/libxml2}"
+ ngx_feature_libs="${ngx_feature_libs_libxslt:=-lxml2 -lxslt}"
ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
xsltStylesheetPtr sheet = NULL;
xmlDocPtr doc;
More information about the nginx-devel
mailing list