include 1021 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright (C) Igor Sysoev
  2. echo $ngx_n "checking for $ngx_include ...$ngx_c"
  3. cat << END >> $NGX_AUTOCONF_ERR
  4. ----------------------------------------
  5. checking for $ngx_include
  6. END
  7. ngx_found=no
  8. cat << END > $NGX_AUTOTEST.c
  9. #include <$ngx_include>
  10. int main() {
  11. return 0;
  12. }
  13. END
  14. ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
  15. eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
  16. if [ -x $NGX_AUTOTEST ]; then
  17. ngx_found=yes
  18. echo " found"
  19. ngx_name=`echo $ngx_include \
  20. | tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`
  21. have=NGX_HAVE_$ngx_name . auto/have_headers
  22. eval "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
  23. #STUB
  24. eval "NGX_$ngx_name='#include <$ngx_include>'"
  25. else
  26. echo " not found"
  27. echo "----------" >> $NGX_AUTOCONF_ERR
  28. cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
  29. echo "----------" >> $NGX_AUTOCONF_ERR
  30. echo $ngx_test >> $NGX_AUTOCONF_ERR
  31. echo "----------" >> $NGX_AUTOCONF_ERR
  32. fi
  33. rm $NGX_AUTOTEST*