Release 0.8.7-1
[nginx-catap.git] / auto / include
blob3a047d303de7461f84b360c0a5a4419c41854602
2 # Copyright (C) Igor Sysoev
5 echo $ngx_n "checking for $ngx_include ...$ngx_c"
7 cat << END >> $NGX_AUTOCONF_ERR
9 ----------------------------------------
10 checking for $ngx_include
12 END
15 ngx_found=no
17 cat << END > $NGX_AUTOTEST.c
19 $NGX_INCLUDE_SYS_PARAM_H
20 #include <$ngx_include>
22 int main() {
23     return 0;
26 END
29 ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
31 eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
33 if [ -x $NGX_AUTOTEST ]; then
35     ngx_found=yes
37     echo " found"
39     ngx_name=`echo $ngx_include \
40               | tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`
43     have=NGX_HAVE_$ngx_name . auto/have_headers
45     eval "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
47     #STUB
48     eval "NGX_$ngx_name='#include <$ngx_include>'"
50 else
51     echo " not found"
53     echo "----------"    >> $NGX_AUTOCONF_ERR
54     cat $NGX_AUTOTEST.c  >> $NGX_AUTOCONF_ERR
55     echo "----------"    >> $NGX_AUTOCONF_ERR
56     echo $ngx_test       >> $NGX_AUTOCONF_ERR
57     echo "----------"    >> $NGX_AUTOCONF_ERR
60 rm $NGX_AUTOTEST*