Mercurial > hg > nginx-vendor-0-5
comparison auto/types/typedef @ 0:f0b350454894 NGINX_0_1_0
nginx 0.1.0
*) The first public version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Oct 2004 00:00:00 +0400 |
parents | |
children | 4b2dafa26fe2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0b350454894 |
---|---|
1 | |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 echo $ngx_n "checking for $ngx_type ..." $ngx_c | |
6 echo >> $NGX_ERR | |
7 echo "checking for $ngx_type" >> $NGX_ERR | |
8 | |
9 found=no | |
10 | |
11 for type in $ngx_type $ngx_types | |
12 do | |
13 | |
14 cat << END > $NGX_AUTOTEST.c | |
15 | |
16 #include <sys/types.h> | |
17 #include <signal.h> | |
18 #include <sys/socket.h> | |
19 #include <sys/time.h> | |
20 #include <sys/resource.h> | |
21 #include <netinet/in.h> | |
22 $NGX_INTTYPES_H | |
23 | |
24 int main() { | |
25 $type i = 0; | |
26 return 0; | |
27 } | |
28 | |
29 END | |
30 | |
31 eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1" | |
32 | |
33 if [ -x $NGX_AUTOTEST ]; then | |
34 if [ $type = $ngx_type ]; then | |
35 echo " found" | |
36 found=yes | |
37 else | |
38 echo ", $type used" | |
39 found=$type | |
40 fi | |
41 fi | |
42 | |
43 rm $NGX_AUTOTEST* | |
44 | |
45 if [ $found = no ]; then | |
46 echo $ngx_n " $type not found" $ngx_c | |
47 else | |
48 break | |
49 fi | |
50 done | |
51 | |
52 if [ $found = no ]; then | |
53 echo | |
54 echo "$0: error: can not define $ngx_type" | |
55 exit 1 | |
56 fi | |
57 | |
58 if [ $found != yes ]; then | |
59 echo "typedef $found $ngx_type;" >> $NGX_AUTO_CONFIG_H | |
60 fi |