conf 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # Copyright (C) Igor Sysoev
  2. echo "checking for $NGX_SYSTEM specific features"
  3. case "$NGX_PLATFORM" in
  4. FreeBSD:*)
  5. . auto/os/freebsd
  6. ;;
  7. Linux:*)
  8. . auto/os/linux
  9. ;;
  10. SunOS:*)
  11. . auto/os/solaris
  12. ;;
  13. win32)
  14. . auto/os/win32
  15. ;;
  16. DragonFly:*)
  17. have=NGX_FREEBSD . auto/have_headers
  18. CORE_INCS="$UNIX_INCS"
  19. CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
  20. CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
  21. echo " + sendfile() found"
  22. have=NGX_HAVE_SENDFILE . auto/have
  23. CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
  24. ngx_spacer='
  25. '
  26. ;;
  27. Darwin:*)
  28. have=NGX_DARWIN . auto/have_headers
  29. have=NGX_HAVE_INHERITED_NONBLOCK . auto/have
  30. CORE_INCS="$UNIX_INCS"
  31. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  32. CORE_SRCS="$UNIX_SRCS"
  33. ngx_feature="atomic(3)"
  34. ngx_feature_name=NGX_DARWIN_ATOMIC
  35. ngx_feature_run=no
  36. ngx_feature_incs="#include <libkern/OSAtomic.h>"
  37. ngx_feature_path=
  38. ngx_feature_libs=
  39. ngx_feature_test="int32_t lock, n;
  40. n = OSAtomicCompareAndSwap32Barrier(0, 1, lock)"
  41. . auto/feature
  42. ;;
  43. HP-UX:*)
  44. # HP/UX
  45. have=NGX_HPUX . auto/have_headers
  46. CORE_INCS="$UNIX_INCS"
  47. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  48. CORE_SRCS="$UNIX_SRCS"
  49. CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
  50. ;;
  51. OSF1:*)
  52. # Tru64 UNIX
  53. have=NGX_TRU64 . auto/have_headers
  54. have=NGX_HAVE_STRERROR_R . auto/nohave
  55. CORE_INCS="$UNIX_INCS"
  56. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  57. CORE_SRCS="$UNIX_SRCS"
  58. ;;
  59. *)
  60. CORE_INCS="$UNIX_INCS"
  61. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  62. CORE_SRCS="$UNIX_SRCS"
  63. ;;
  64. esac
  65. case "$NGX_MACHINE" in
  66. i386 | i686 | i86pc)
  67. have=NGX_HAVE_NONALIGNED . auto/have
  68. NGX_MACH_CACHE_LINE=32
  69. ;;
  70. amd64 | x86_64)
  71. have=NGX_HAVE_NONALIGNED . auto/have
  72. NGX_MACH_CACHE_LINE=64
  73. ;;
  74. sun4u | sun4v | sparc | sparc64)
  75. have=NGX_ALIGNMENT value=16 . auto/define
  76. # TODO
  77. NGX_MACH_CACHE_LINE=64
  78. ;;
  79. ia64 )
  80. have=NGX_ALIGNMENT value=16 . auto/define
  81. # TODO
  82. NGX_MACH_CACHE_LINE=64
  83. ;;
  84. *)
  85. NGX_MACH_CACHE_LINE=32
  86. ;;
  87. esac
  88. if test -z "$NGX_CPU_CACHE_LINE"; then
  89. NGX_CPU_CACHE_LINE=$NGX_MACH_CACHE_LINE
  90. fi
  91. have=NGX_CPU_CACHE_LINE value=$NGX_CPU_CACHE_LINE . auto/define