Mercurial > hg > nginx
comparison auto/inc @ 210:00cafae0bdf1
nginx-0.0.1-2003-12-14-23:10:27 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Sun, 14 Dec 2003 20:10:27 +0000 |
parents | 0b81c7a0b133 |
children | 1903c6821958 |
comparison
equal
deleted
inserted
replaced
209:e1c815be05ae | 210:00cafae0bdf1 |
---|---|
1 | 1 |
2 echo "checking for $NGX_INC" | 2 echo -n "checking for $ngx_inc ..." |
3 echo >> $NGX_ERR | |
4 echo "checking for $ngx_inc" >> $NGX_ERR | |
3 | 5 |
4 NGX_FOUND=NO | 6 ngx_found=no |
5 | 7 |
6 inc=`echo $NGX_INC | sed -e 's/\./_/' | sed -e 's/\//_/' | tr '[a-z]' '[A-Z]'` | 8 inc=`echo $ngx_inc | sed -e 's/\./_/' | sed -e 's/\//_/' | tr '[a-z]' '[A-Z]'` |
7 | 9 |
8 echo "#include <$NGX_INC>" > autotest.c | 10 cat << END > $NGX_AUTOTEST.c |
9 echo "int main() { return 0; }" >> autotest.c | |
10 | 11 |
11 eval "${CC} -o autotest autotest.c > /dev/null 2>&1" | 12 #include <$ngx_inc> |
12 | 13 |
13 if [ -x autotest ]; then | 14 int main() { |
14 echo " + $NGX_INC found" | 15 return 0; |
16 } | |
15 | 17 |
16 echo "#ifndef HAVE_$inc" >> $NGX_AUTO_CONFIG_H | 18 END |
17 echo "#define HAVE_$inc 1" >> $NGX_AUTO_CONFIG_H | |
18 echo "#endif" >> $NGX_AUTO_CONFIG_H | |
19 echo >> $NGX_AUTO_CONFIG_H | |
20 | 19 |
21 eval "NGX_$inc='#include <$NGX_INC>'" | 20 eval "${CC} -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1" |
22 NGX_FOUND=YES | 21 |
22 if [ -x $NGX_AUTOTEST ]; then | |
23 echo " found" | |
24 | |
25 cat << END >> $NGX_AUTO_CONFIG_H | |
26 | |
27 #ifndef HAVE_$inc | |
28 #define HAVE_$inc 1 | |
29 #endif | |
30 | |
31 END | |
32 | |
33 eval "NGX_$inc='#include <$ngx_inc>'" | |
34 ngx_found=yes | |
23 | 35 |
24 else | 36 else |
25 echo " + $NGX_INC not found" | 37 echo " not found" |
26 fi | 38 fi |
27 | 39 |
28 rm autotest* | 40 rm $NGX_AUTOTEST* |