Mercurial > hg > nginx-quic
annotate auto/feature @ 4227:4af8ea9c3a86
Fixed port range checking.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 25 Oct 2011 13:48:43 +0000 |
parents | 0ec738f18346 |
children | d620f497c50f |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
358
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
358
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
358
diff
changeset
|
3 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
455 | 5 echo $ngx_n "checking for $ngx_feature ...$ngx_c" |
6 | |
7 cat << END >> $NGX_AUTOCONF_ERR | |
8 | |
9 ---------------------------------------- | |
10 checking for $ngx_feature | |
11 | |
12 END | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
13 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 ngx_found=no |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
15 |
455 | 16 if test -n "$ngx_feature_name"; then |
645 | 17 ngx_have_feature=`echo $ngx_feature_name \ |
18 | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` | |
455 | 19 fi |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
20 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
21 if test -n "$ngx_feature_path"; then |
2139 | 22 for ngx_temp in $ngx_feature_path; do |
23 ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp" | |
24 done | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
25 fi |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
26 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 cat << END > $NGX_AUTOTEST.c |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
28 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
29 #include <sys/types.h> |
455 | 30 $NGX_INCLUDE_UNISTD_H |
31 $ngx_feature_incs | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
32 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
33 int main() { |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
34 $ngx_feature_test; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
35 return 0; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 } |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 END |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
39 |
455 | 40 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
41 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \ |
3367
568a854383f9
test invalid --with-ld-opt in right place
Igor Sysoev <igor@sysoev.ru>
parents:
2139
diff
changeset
|
42 -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs" |
461 | 43 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
44 ngx_feature_inc_path= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
45 |
946 | 46 eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1" |
455 | 47 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
48 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
49 if [ -x $NGX_AUTOTEST ]; then |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
50 |
619 | 51 case "$ngx_feature_run" in |
52 | |
53 yes) | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
54 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
3916
0ec738f18346
log "Abort trap" or similar messages
Igor Sysoev <igor@sysoev.ru>
parents:
3787
diff
changeset
|
55 if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then |
619 | 56 echo " found" |
57 ngx_found=yes | |
455 | 58 |
619 | 59 if test -n "$ngx_feature_name"; then |
60 have=$ngx_have_feature . auto/have | |
61 fi | |
455 | 62 |
619 | 63 else |
64 echo " found but is not working" | |
65 fi | |
66 ;; | |
67 | |
3787
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
68 value) |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
69 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
3916
0ec738f18346
log "Abort trap" or similar messages
Igor Sysoev <igor@sysoev.ru>
parents:
3787
diff
changeset
|
70 if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then |
3787
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
71 echo " found" |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
72 ngx_found=yes |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
73 |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
74 cat << END >> $NGX_AUTO_CONFIG_H |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
75 |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
76 #ifndef $ngx_feature_name |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
77 #define $ngx_feature_name `$NGX_AUTOTEST` |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
78 #endif |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
79 |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
80 END |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
81 else |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
82 echo " found but is not working" |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
83 fi |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
84 ;; |
e294f37401c0
use copied strerror() messages and autoconfigured sys_nerr value
Igor Sysoev <igor@sysoev.ru>
parents:
3367
diff
changeset
|
85 |
619 | 86 bug) |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
87 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
3916
0ec738f18346
log "Abort trap" or similar messages
Igor Sysoev <igor@sysoev.ru>
parents:
3787
diff
changeset
|
88 if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then |
619 | 89 echo " not found" |
455 | 90 |
619 | 91 else |
92 echo " found" | |
93 ngx_found=yes | |
94 | |
95 if test -n "$ngx_feature_name"; then | |
96 have=$ngx_have_feature . auto/have | |
97 fi | |
98 fi | |
99 ;; | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
100 |
619 | 101 *) |
102 echo " found" | |
103 ngx_found=yes | |
455 | 104 |
619 | 105 if test -n "$ngx_feature_name"; then |
106 have=$ngx_have_feature . auto/have | |
107 fi | |
108 ;; | |
455 | 109 |
619 | 110 esac |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
111 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
112 else |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
113 echo " not found" |
455 | 114 |
115 echo "----------" >> $NGX_AUTOCONF_ERR | |
116 cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR | |
117 echo "----------" >> $NGX_AUTOCONF_ERR | |
118 echo $ngx_test >> $NGX_AUTOCONF_ERR | |
119 echo "----------" >> $NGX_AUTOCONF_ERR | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
120 fi |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
121 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
122 rm $NGX_AUTOTEST* |