python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / nginx / 0002-auto-feature-add-mechanism-allowing-to-force-feature.patch
blob13bef5ffdb69a4e5027dd95fadd7de437c3faaf1
1 From ef72be22ad6d58e230f75553d80b470b80c3303a Mon Sep 17 00:00:00 2001
2 From: Samuel Martin <s.martin49@gmail.com>
3 Date: Sun, 4 May 2014 00:40:49 +0200
4 Subject: [PATCH] auto/feature: add mechanism allowing to force feature run
5 test result
7 Whenever a feature needs to run a test, the ngx_feature_run_force_result
8 variable can be set to the desired test result, and thus skip the test.
10 Therefore, the generated config.h file will honor these presets.
12 This mechanism aims to make easier cross-compilation support.
14 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
15 ---
16 auto/feature | 80 ++++++++++++++++++++++++++++++++++++++++++++----------------
17 1 file changed, 59 insertions(+), 21 deletions(-)
19 diff --git a/auto/feature b/auto/feature
20 index 1145f28..a194b85 100644
21 --- a/auto/feature
22 +++ b/auto/feature
23 @@ -52,50 +52,88 @@ if [ -x $NGX_AUTOTEST ]; then
24 case "$ngx_feature_run" in
26 yes)
27 - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
28 - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
29 - echo " found"
30 + if test -n "$ngx_feature_run_force_result" ; then
31 + echo " not tested (maybe cross-compiling)"
32 + if test -n "$ngx_feature_name" ; then
33 + if test "$ngx_feature_run_force_result" = "yes" ; then
34 + have=$ngx_have_feature . auto/have
35 + fi
36 + fi
37 ngx_found=yes
38 + else
40 - if test -n "$ngx_feature_name"; then
41 - have=$ngx_have_feature . auto/have
42 + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
43 + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
44 + echo " found"
45 + ngx_found=yes
47 + if test -n "$ngx_feature_name"; then
48 + have=$ngx_have_feature . auto/have
49 + fi
51 + else
52 + echo " found but is not working"
55 - else
56 - echo " found but is not working"
60 value)
61 - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
62 - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
63 - echo " found"
64 + if test -n "$ngx_feature_run_force_result" ; then
65 + echo " not tested (maybe cross-compiling)"
66 + cat << END >> $NGX_AUTO_CONFIG_H
68 +#ifndef $ngx_feature_name
69 +#define $ngx_feature_name $ngx_feature_run_force_result
70 +#endif
72 +END
73 ngx_found=yes
74 + else
76 - cat << END >> $NGX_AUTO_CONFIG_H
77 + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
78 + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
79 + echo " found"
80 + ngx_found=yes
82 + cat << END >> $NGX_AUTO_CONFIG_H
84 #ifndef $ngx_feature_name
85 #define $ngx_feature_name `$NGX_AUTOTEST`
86 #endif
88 END
89 - else
90 - echo " found but is not working"
91 + else
92 + echo " found but is not working"
93 + fi
98 bug)
99 - # /bin/sh is used to intercept "Killed" or "Abort trap" messages
100 - if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
101 - echo " not found"
103 - else
104 - echo " found"
105 + if test -n "$ngx_feature_run_force_result" ; then
106 + echo " not tested (maybe cross-compiling)"
107 + if test -n "$ngx_feature_name"; then
108 + if test "$ngx_feature_run_force_result" = "yes" ; then
109 + have=$ngx_have_feature . auto/have
110 + fi
111 + fi
112 ngx_found=yes
113 + else
115 - if test -n "$ngx_feature_name"; then
116 - have=$ngx_have_feature . auto/have
117 + # /bin/sh is used to intercept "Killed" or "Abort trap" messages
118 + if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
119 + echo " not found"
121 + else
122 + echo " found"
123 + ngx_found=yes
125 + if test -n "$ngx_feature_name"; then
126 + have=$ngx_have_feature . auto/have
127 + fi
134 1.9.2