name 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Copyright (C) Igor Sysoev
  2. # Copyright (C) Nginx, Inc.
  3. if [ "$NGX_PLATFORM" != win32 ]; then
  4. ngx_feature="C compiler"
  5. ngx_feature_name=
  6. ngx_feature_run=yes
  7. ngx_feature_incs=
  8. ngx_feature_path=
  9. ngx_feature_libs=
  10. ngx_feature_test=
  11. . auto/feature
  12. if [ $ngx_found = no ]; then
  13. echo
  14. echo $0: error: C compiler $CC is not found
  15. echo
  16. exit 1
  17. fi
  18. fi
  19. if [ "$CC" = cl ]; then
  20. NGX_CC_NAME=msvc
  21. echo " + using Microsoft Visual C++ compiler"
  22. elif [ "$CC" = wcl386 ]; then
  23. NGX_CC_NAME=owc
  24. echo " + using Open Watcom C compiler"
  25. elif [ "$CC" = bcc32 ]; then
  26. NGX_CC_NAME=bcc
  27. echo " + using Borland C++ compiler"
  28. elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
  29. NGX_CC_NAME=icc
  30. echo " + using Intel C++ compiler"
  31. elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
  32. NGX_CC_NAME=gcc
  33. echo " + using GNU C compiler"
  34. elif `$CC -v 2>&1 | grep 'clang version' >/dev/null 2>&1`; then
  35. NGX_CC_NAME=clang
  36. echo " + using Clang C compiler"
  37. elif `$CC -v 2>&1 | grep 'LLVM version' >/dev/null 2>&1`; then
  38. NGX_CC_NAME=clang
  39. echo " + using Clang C compiler"
  40. elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
  41. NGX_CC_NAME=sunc
  42. echo " + using Sun C compiler"
  43. elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
  44. NGX_CC_NAME=ccc
  45. echo " + using Compaq C compiler"
  46. elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
  47. NGX_CC_NAME=acc
  48. echo " + using HP aC++ compiler"
  49. else
  50. NGX_CC_NAME=unknown
  51. fi