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