Mercurial > hg > nginx-quic
annotate auto/feature @ 1050:5d9451a01c5d
add comment
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 18 Jan 2007 20:23:16 +0000 |
parents | 756e8a5b1f78 |
children | dad4423ef56a |
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 |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
22 ngx_feature_inc_path="-I $ngx_feature_path" |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
23 fi |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
24 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
25 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
|
26 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
27 #include <sys/types.h> |
455 | 28 $NGX_INCLUDE_UNISTD_H |
29 $ngx_feature_incs | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
30 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
31 int main() { |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
32 $ngx_feature_test; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
33 return 0; |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
34 } |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
35 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
36 END |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 |
455 | 38 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
39 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \ |
455 | 40 -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" |
461 | 41 |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
42 ngx_feature_inc_path= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
705
diff
changeset
|
43 |
946 | 44 eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1" |
455 | 45 |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
46 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
47 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
|
48 |
619 | 49 case "$ngx_feature_run" in |
50 | |
51 yes) | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
52 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
705 | 53 if /bin/sh -c $NGX_AUTOTEST >/dev/null 2>&1; then |
619 | 54 echo " found" |
55 ngx_found=yes | |
455 | 56 |
619 | 57 if test -n "$ngx_feature_name"; then |
58 have=$ngx_have_feature . auto/have | |
59 fi | |
455 | 60 |
619 | 61 else |
62 echo " found but is not working" | |
63 fi | |
64 ;; | |
65 | |
66 bug) | |
702
67deba330372
auto/configure [ PAUSE ] hwcap bug
Igor Sysoev <igor@sysoev.ru>
parents:
645
diff
changeset
|
67 # /bin/sh is used to intercept "Killed" or "Abort trap" messages |
705 | 68 if /bin/sh -c $NGX_AUTOTEST >/dev/null 2>&1; then |
619 | 69 echo " not found" |
455 | 70 |
619 | 71 else |
72 echo " found" | |
73 ngx_found=yes | |
74 | |
75 if test -n "$ngx_feature_name"; then | |
76 have=$ngx_have_feature . auto/have | |
77 fi | |
78 fi | |
79 ;; | |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
80 |
619 | 81 *) |
82 echo " found" | |
83 ngx_found=yes | |
455 | 84 |
619 | 85 if test -n "$ngx_feature_name"; then |
86 have=$ngx_have_feature . auto/have | |
87 fi | |
88 ;; | |
455 | 89 |
619 | 90 esac |
358
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
91 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
92 else |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
93 echo " not found" |
455 | 94 |
95 echo "----------" >> $NGX_AUTOCONF_ERR | |
96 cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR | |
97 echo "----------" >> $NGX_AUTOCONF_ERR | |
98 echo $ngx_test >> $NGX_AUTOCONF_ERR | |
99 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
|
100 fi |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
101 |
0a03c921c81d
nginx-0.0.7-2004-06-17-21:18:53 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
102 rm $NGX_AUTOTEST* |