conf 3.7 KB

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