gateway2/angie-Angie-1.11.8/auto/include
2026-08-14 18:56:28 +08:00

79 lines
1.3 KiB
Plaintext

# Copyright (C) 2024 Web Server LLC
# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.
if check_cache "$ngx_include" "include"; then
return
fi
echo $ngx_n "checking for $ngx_include ...$ngx_c"
cat << END >> $NGX_AUTOCONF_ERR
----------------------------------------
checking for $ngx_include
END
ngx_found=no
cat << END > $NGX_AUTOTEST.c
$NGX_INCLUDE_SYS_PARAM_H
#include <$ngx_include>
int main(void) {
return 0;
}
END
ngx_test="($CC -c -o $NGX_AUTOTEST.o $NGX_AUTOTEST.c && \
$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.o)"
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
if [ -x $NGX_AUTOTEST ]; then
ngx_found=yes
echo " found"
name2macro "$ngx_include"
ngx_name="$res"
have=NGX_HAVE_$ngx_name . auto/have_headers
eval "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
else
echo " not found"
echo "----------" >> $NGX_AUTOCONF_ERR
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
echo "----------" >> $NGX_AUTOCONF_ERR
echo $ngx_test >> $NGX_AUTOCONF_ERR
echo "----------" >> $NGX_AUTOCONF_ERR
fi
rm -rf $NGX_AUTOTEST*
if [ $NGX_FEATURE_CACHE = NO ]; then
return
fi
cache_output_start
echo "ngx_found=$ngx_found"
if [ $ngx_found = yes ]; then
echo "have=NGX_HAVE_$ngx_name . auto/have_headers"
echo "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
fi
cache_output_end