conf 2.4 KB

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