2 # Copyright (C) Igor Sysoev
5 echo $ngx_n "checking for $ngx_type ...$ngx_c"
7 cat << END >> $NGX_AUTOCONF_ERR
9 ----------------------------------------
10 checking for $ngx_type
16 for ngx_try in $ngx_type $ngx_types
19 cat << END > $NGX_AUTOTEST.c
21 #include <sys/types.h>
23 #include <sys/socket.h>
25 #include <sys/resource.h>
26 #include <netinet/in.h>
27 $NGX_INCLUDE_INTTYPES_H
36 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
37 -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
39 eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
41 if [ -x $NGX_AUTOTEST ]; then
42 if [ $ngx_try = $ngx_type ]; then
46 echo ", $ngx_try used"
53 if [ $ngx_found = no ]; then
54 echo $ngx_n " $ngx_try not found$ngx_c"
56 echo "----------" >> $NGX_AUTOCONF_ERR
57 cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
58 echo "----------" >> $NGX_AUTOCONF_ERR
59 echo $ngx_test >> $NGX_AUTOCONF_ERR
60 echo "----------" >> $NGX_AUTOCONF_ERR
67 if [ $ngx_found = no ]; then
69 echo "$0: error: can not define $ngx_type"
74 if [ $ngx_found != yes ]; then
75 echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H