0004-auto-lib-libxslt-conf-use-pkg-config.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 7783d63c87f94797aa134786214b0a84c000be75 Mon Sep 17 00:00:00 2001
  2. From: Samuel Martin <s.martin49@gmail.com>
  3. Date: Thu, 29 May 2014 19:22:27 +0200
  4. Subject: [PATCH] auto/lib/libxslt/conf: use pkg-config
  5. Change to using pkg-config to find the path to libxslt and its
  6. dependencies.
  7. Signed-off-by: Martin Bark <martin@barkynet.com>
  8. [Peter: updated for 1.15.6]
  9. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  10. ---
  11. auto/lib/libxslt/conf | 5 +++--
  12. 1 file changed, 3 insertions(+), 2 deletions(-)
  13. diff --git a/auto/lib/libxslt/conf b/auto/lib/libxslt/conf
  14. index 3063ac7c..3209e364 100644
  15. --- a/auto/lib/libxslt/conf
  16. +++ b/auto/lib/libxslt/conf
  17. @@ -12,8 +12,9 @@
  18. #include <libxslt/xsltInternals.h>
  19. #include <libxslt/transform.h>
  20. #include <libxslt/xsltutils.h>"
  21. - ngx_feature_path="/usr/include/libxml2"
  22. - ngx_feature_libs="-lxml2 -lxslt"
  23. + ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I libxslt|
  24. + sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')"
  25. + ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs libxslt)"
  26. ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
  27. xsltStylesheetPtr sheet = NULL;
  28. xmlDocPtr doc = NULL;
  29. --
  30. 2.11.0