patch-auto_feature 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. --- nginx-1.9.12.orig/auto/feature 2016-02-24 15:53:23.000000000 +0100
  2. +++ nginx-1.9.12/auto/feature 2016-03-04 19:56:44.000000000 +0100
  3. @@ -52,50 +52,88 @@ if [ -x $NGX_AUTOTEST ]; then
  4. case "$ngx_feature_run" in
  5. yes)
  6. - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  7. - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  8. - echo " found"
  9. + if test -n "$ngx_feature_run_force_result" ; then
  10. + echo " not tested (maybe cross-compiling)"
  11. + if test -n "$ngx_feature_name" ; then
  12. + if test "$ngx_feature_run_force_result" = "yes" ; then
  13. + have=$ngx_have_feature . auto/have
  14. + fi
  15. + fi
  16. ngx_found=yes
  17. + else
  18. - if test -n "$ngx_feature_name"; then
  19. - have=$ngx_have_feature . auto/have
  20. + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  21. + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  22. + echo " found"
  23. + ngx_found=yes
  24. +
  25. + if test -n "$ngx_feature_name"; then
  26. + have=$ngx_have_feature . auto/have
  27. + fi
  28. +
  29. + else
  30. + echo " found but is not working"
  31. fi
  32. - else
  33. - echo " found but is not working"
  34. fi
  35. ;;
  36. value)
  37. - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  38. - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  39. - echo " found"
  40. + if test -n "$ngx_feature_run_force_result" ; then
  41. + echo " not tested (maybe cross-compiling)"
  42. + cat << END >> $NGX_AUTO_CONFIG_H
  43. +
  44. +#ifndef $ngx_feature_name
  45. +#define $ngx_feature_name $ngx_feature_run_force_result
  46. +#endif
  47. +
  48. +END
  49. ngx_found=yes
  50. + else
  51. - cat << END >> $NGX_AUTO_CONFIG_H
  52. + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  53. + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  54. + echo " found"
  55. + ngx_found=yes
  56. +
  57. + cat << END >> $NGX_AUTO_CONFIG_H
  58. #ifndef $ngx_feature_name
  59. #define $ngx_feature_name `$NGX_AUTOTEST`
  60. #endif
  61. END
  62. - else
  63. - echo " found but is not working"
  64. + else
  65. + echo " found but is not working"
  66. + fi
  67. +
  68. fi
  69. ;;
  70. bug)
  71. - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  72. - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  73. - echo " not found"
  74. -
  75. - else
  76. - echo " found"
  77. + if test -n "$ngx_feature_run_force_result" ; then
  78. + echo " not tested (maybe cross-compiling)"
  79. + if test -n "$ngx_feature_name"; then
  80. + if test "$ngx_feature_run_force_result" = "yes" ; then
  81. + have=$ngx_have_feature . auto/have
  82. + fi
  83. + fi
  84. ngx_found=yes
  85. + else
  86. - if test -n "$ngx_feature_name"; then
  87. - have=$ngx_have_feature . auto/have
  88. + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
  89. + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
  90. + echo " not found"
  91. +
  92. + else
  93. + echo " found"
  94. + ngx_found=yes
  95. +
  96. + if test -n "$ngx_feature_name"; then
  97. + have=$ngx_have_feature . auto/have
  98. + fi
  99. fi
  100. +
  101. fi
  102. ;;