include 1020 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. echo $ngx_n "checking for $ngx_include ...$ngx_c"
  4. cat << END >> $NGX_AUTOCONF_ERR
  5. ----------------------------------------
  6. checking for $ngx_include
  7. END
  8. ngx_found=no
  9. cat << END > $NGX_AUTOTEST.c
  10. $NGX_INCLUDE_SYS_PARAM_H
  11. #include <$ngx_include>
  12. int main(void) {
  13. return 0;
  14. }
  15. END
  16. ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
  17. eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
  18. if [ -x $NGX_AUTOTEST ]; then
  19. ngx_found=yes
  20. echo " found"
  21. ngx_name=`echo $ngx_include \
  22. | tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`
  23. have=NGX_HAVE_$ngx_name . auto/have_headers
  24. eval "NGX_INCLUDE_$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 -rf $NGX_AUTOTEST*