Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.13.12 ]​[ nginx-1.12.2 ]​

0001 
0002 # Copyright (C) Igor Sysoev
0003 # Copyright (C) Nginx, Inc.
0004 
0005 
0006 echo $ngx_n "checking for $ngx_feature ...$ngx_c"
0007 
0008 cat << END >> $NGX_AUTOCONF_ERR
0009 
0010 ----------------------------------------
0011 checking for $ngx_feature
0012 
0013 END
0014 
0015 ngx_found=no
0016 
0017 if test -n "$ngx_feature_name"; then
0018     ngx_have_feature=`echo $ngx_feature_name \
0019                    | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
0020 fi
0021 
0022 if test -n "$ngx_feature_path"; then
0023     for ngx_temp in $ngx_feature_path; do
0024         ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp"
0025     done
0026 fi
0027 
0028 cat << END > $NGX_AUTOTEST.c
0029 
0030 #include <sys/types.h>
0031 $NGX_INCLUDE_UNISTD_H
0032 $ngx_feature_incs
0033 
0034 int main(void) {
0035     $ngx_feature_test;
0036     return 0;
0037 }
0038 
0039 END
0040 
0041 
0042 ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
0043           -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs"
0044 
0045 ngx_feature_inc_path=
0046 
0047 eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1"
0048 
0049 
0050 if [ -x $NGX_AUTOTEST ]; then
0051 
0052     case "$ngx_feature_run" in
0053 
0054         yes)
0055             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
0056             if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
0057                 echo " found"
0058                 ngx_found=yes
0059 
0060                 if test -n "$ngx_feature_name"; then
0061                     have=$ngx_have_feature . auto/have
0062                 fi
0063 
0064             else
0065                 echo " found but is not working"
0066             fi
0067         ;;
0068 
0069         value)
0070             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
0071             if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
0072                 echo " found"
0073                 ngx_found=yes
0074 
0075                 cat << END >> $NGX_AUTO_CONFIG_H
0076 
0077 #ifndef $ngx_feature_name
0078 #define $ngx_feature_name  `$NGX_AUTOTEST`
0079 #endif
0080 
0081 END
0082             else
0083                 echo " found but is not working"
0084             fi
0085         ;;
0086 
0087         bug)
0088             # /bin/sh is used to intercept "Killed" or "Abort trap" messages
0089             if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
0090                 echo " not found"
0091 
0092             else
0093                 echo " found"
0094                 ngx_found=yes
0095 
0096                 if test -n "$ngx_feature_name"; then
0097                     have=$ngx_have_feature . auto/have
0098                 fi
0099             fi
0100         ;;
0101 
0102         *)
0103             echo " found"
0104             ngx_found=yes
0105 
0106             if test -n "$ngx_feature_name"; then
0107                 have=$ngx_have_feature . auto/have
0108             fi
0109         ;;
0110 
0111     esac
0112 
0113 else
0114     echo " not found"
0115 
0116     echo "----------"    >> $NGX_AUTOCONF_ERR
0117     cat $NGX_AUTOTEST.c  >> $NGX_AUTOCONF_ERR
0118     echo "----------"    >> $NGX_AUTOCONF_ERR
0119     echo $ngx_test       >> $NGX_AUTOCONF_ERR
0120     echo "----------"    >> $NGX_AUTOCONF_ERR
0121 fi
0122 
0123 rm -rf $NGX_AUTOTEST*