conf 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. NetBSD:*)
  32. CORE_INCS="$UNIX_INCS"
  33. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  34. CORE_SRCS="$UNIX_SRCS"
  35. NGX_RPATH=YES
  36. ;;
  37. HP-UX:*)
  38. # HP/UX
  39. have=NGX_HPUX . auto/have_headers
  40. CORE_INCS="$UNIX_INCS"
  41. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  42. CORE_SRCS="$UNIX_SRCS"
  43. CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
  44. CC_AUX_FLAGS="$CC_AUX_FLAGS -D_HPUX_ALT_XOPEN_SOCKET_API"
  45. ;;
  46. OSF1:*)
  47. # Tru64 UNIX
  48. have=NGX_TRU64 . auto/have_headers
  49. have=NGX_HAVE_STRERROR_R . auto/nohave
  50. CORE_INCS="$UNIX_INCS"
  51. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  52. CORE_SRCS="$UNIX_SRCS"
  53. ;;
  54. GNU:*)
  55. # GNU Hurd
  56. have=NGX_GNU_HURD . auto/have_headers
  57. CORE_INCS="$UNIX_INCS"
  58. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  59. CORE_SRCS="$UNIX_SRCS"
  60. CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
  61. ;;
  62. *)
  63. CORE_INCS="$UNIX_INCS"
  64. CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
  65. CORE_SRCS="$UNIX_SRCS"
  66. ;;
  67. esac
  68. case "$NGX_MACHINE" in
  69. i386 | i686 | i86pc)
  70. have=NGX_HAVE_NONALIGNED . auto/have
  71. NGX_MACH_CACHE_LINE=32
  72. ;;
  73. amd64 | x86_64)
  74. have=NGX_HAVE_NONALIGNED . auto/have
  75. NGX_MACH_CACHE_LINE=64
  76. ;;
  77. sun4u | sun4v | sparc | sparc64)
  78. have=NGX_ALIGNMENT value=16 . auto/define
  79. # TODO
  80. NGX_MACH_CACHE_LINE=64
  81. ;;
  82. ia64 )
  83. have=NGX_ALIGNMENT value=16 . auto/define
  84. # TODO
  85. NGX_MACH_CACHE_LINE=64
  86. ;;
  87. aarch64 )
  88. have=NGX_ALIGNMENT value=16 . auto/define
  89. NGX_MACH_CACHE_LINE=64
  90. ;;
  91. *)
  92. have=NGX_ALIGNMENT value=16 . auto/define
  93. NGX_MACH_CACHE_LINE=32
  94. ;;
  95. esac
  96. if test -z "$NGX_CPU_CACHE_LINE"; then
  97. NGX_CPU_CACHE_LINE=$NGX_MACH_CACHE_LINE
  98. fi
  99. have=NGX_CPU_CACHE_LINE value=$NGX_CPU_CACHE_LINE . auto/define