Mercurial > hg > nginx
annotate auto/os/features @ 3886:901d9d93e71b
"satisfy any" disabled custom 401 error page
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 11 Apr 2011 14:17:31 +0000 |
parents | 8a8eb335313d |
children |
rev | line source |
---|---|
515 | 1 |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 NGX_USER=${NGX_USER:-nobody} | |
6 | |
839 | 7 if [ -z "$NGX_GROUP" ]; then |
8 if [ $NGX_USER = nobody ]; then | |
9 if grep nobody /etc/group 2>&1 >/dev/null; then | |
10 echo "checking for nobody group ... found" | |
11 NGX_GROUP=nobody | |
12 else | |
13 echo "checking for nobody group ... not found" | |
515 | 14 |
839 | 15 if grep nogroup /etc/group 2>&1 >/dev/null; then |
16 echo "checking for nogroup group ... found" | |
17 NGX_GROUP=nogroup | |
18 else | |
19 echo "checking for nogroup group ... not found" | |
20 NGX_GROUP=nobody | |
21 fi | |
515 | 22 fi |
839 | 23 else |
24 NGX_GROUP=$NGX_USER | |
515 | 25 fi |
26 fi | |
577 | 27 |
515 | 28 |
29 ngx_feature="poll()" | |
30 ngx_feature_name= | |
31 ngx_feature_run=no | |
32 ngx_feature_incs="#include <poll.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
33 ngx_feature_path= |
515 | 34 ngx_feature_libs= |
35 ngx_feature_test="int n, dp; struct pollfd pl; | |
577 | 36 dp = 0; |
515 | 37 pl.fd = 0; |
38 pl.events = 0; | |
39 pl.revents = 0; | |
40 n = poll(&pl, 1, 0)" | |
41 . auto/feature | |
577 | 42 |
515 | 43 if [ $ngx_found = no ]; then |
44 EVENT_POLL=NONE | |
45 fi | |
577 | 46 |
515 | 47 |
48 ngx_feature="/dev/poll" | |
49 ngx_feature_name="NGX_HAVE_DEVPOLL" | |
50 ngx_feature_run=no | |
51 ngx_feature_incs="#include <sys/devpoll.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
52 ngx_feature_path= |
515 | 53 ngx_feature_libs= |
54 ngx_feature_test="int n, dp; struct dvpoll dvp; | |
55 dp = 0; | |
56 dvp.dp_fds = NULL; | |
57 dvp.dp_nfds = 0; | |
58 dvp.dp_timeout = 0; | |
59 n = ioctl(dp, DP_POLL, &dvp)" | |
60 . auto/feature | |
61 | |
62 if [ $ngx_found = yes ]; then | |
63 CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS" | |
64 EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE" | |
65 EVENT_FOUND=YES | |
66 fi | |
67 | |
68 | |
69 if test -z "$NGX_KQUEUE_CHECKED"; then | |
70 ngx_feature="kqueue" | |
71 ngx_feature_name="NGX_HAVE_KQUEUE" | |
72 ngx_feature_run=no | |
73 ngx_feature_incs="#include <sys/event.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
74 ngx_feature_path= |
515 | 75 ngx_feature_libs= |
76 ngx_feature_test="int kq; kq = kqueue()" | |
77 . auto/feature | |
78 | |
79 if [ $ngx_found = yes ]; then | |
80 | |
81 have=NGX_HAVE_CLEAR_EVENT . auto/have | |
82 EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE" | |
83 CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS" | |
84 EVENT_FOUND=YES | |
85 | |
86 ngx_feature="kqueue's NOTE_LOWAT" | |
87 ngx_feature_name="NGX_HAVE_LOWAT_EVENT" | |
88 ngx_feature_run=no | |
89 ngx_feature_incs="#include <sys/event.h>" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
90 ngx_feature_path= |
515 | 91 ngx_feature_libs= |
92 ngx_feature_test="struct kevent kev; | |
93 kev.fflags = NOTE_LOWAT;" | |
94 . auto/feature | |
619 | 95 |
96 | |
97 ngx_feature="kqueue's EVFILT_TIMER" | |
98 ngx_feature_name="NGX_HAVE_TIMER_EVENT" | |
99 ngx_feature_run=yes | |
100 ngx_feature_incs="#include <sys/event.h> | |
2598 | 101 #include <sys/time.h>" |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
102 ngx_feature_path= |
619 | 103 ngx_feature_libs= |
104 ngx_feature_test="int kq; | |
105 struct kevent kev; | |
106 struct timespec ts; | |
107 | |
108 if ((kq = kqueue()) == -1) return 1; | |
109 | |
110 kev.ident = 0; | |
111 kev.filter = EVFILT_TIMER; | |
112 kev.flags = EV_ADD|EV_ENABLE; | |
113 kev.fflags = 0; | |
114 kev.data = 1000; | |
115 kev.udata = 0; | |
116 | |
117 ts.tv_sec = 0; | |
118 ts.tv_nsec = 0; | |
119 | |
120 if (kevent(kq, &kev, 1, &kev, 1, &ts) == -1) return 1; | |
121 | |
122 if (kev.flags & EV_ERROR) return 1;" | |
123 | |
124 . auto/feature | |
515 | 125 fi |
126 fi | |
127 | |
619 | 128 |
129 if [ "$NGX_SYSTEM" = "NetBSD" ]; then | |
563 | 130 |
515 | 131 # NetBSD 2.0 incompatibly defines kevent.udata as "intptr_t" |
132 | |
133 cat << END >> $NGX_AUTO_CONFIG_H | |
134 | |
135 #define NGX_KQUEUE_UDATA_T | |
136 | |
137 END | |
138 | |
139 else | |
140 cat << END >> $NGX_AUTO_CONFIG_H | |
141 | |
142 #define NGX_KQUEUE_UDATA_T (void *) | |
143 | |
144 END | |
145 | |
146 fi | |
147 | |
148 | |
149 ngx_feature="crypt()" | |
150 ngx_feature_name= | |
151 ngx_feature_run=no | |
152 ngx_feature_incs= | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
153 ngx_feature_path= |
515 | 154 ngx_feature_libs= |
155 ngx_feature_test="crypt(\"test\", \"salt\");" | |
156 . auto/feature | |
157 | |
158 | |
159 if [ $ngx_found = no ]; then | |
160 | |
161 ngx_feature="crypt() in libcrypt" | |
875
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
162 ngx_feature_name= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
163 ngx_feature_run=no |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
164 ngx_feature_incs= |
7af8276b1c2f
test PCRE in FreeBSD, Linux, and NetBSD
Igor Sysoev <igor@sysoev.ru>
parents:
839
diff
changeset
|
165 ngx_feature_path= |
515 | 166 ngx_feature_libs=-lcrypt |
167 . auto/feature | |
168 | |
169 if [ $ngx_found = yes ]; then | |
170 CRYPT_LIB="-lcrypt" | |
171 fi | |
172 fi | |
2129 | 173 |
174 | |
3178 | 175 ngx_feature="F_READAHEAD" |
176 ngx_feature_name="NGX_HAVE_F_READAHEAD" | |
177 ngx_feature_run=no | |
178 ngx_feature_incs="#include <fcntl.h>" | |
179 ngx_feature_path= | |
180 ngx_feature_libs= | |
181 ngx_feature_test="fcntl(0, F_READAHEAD, 1);" | |
182 . auto/feature | |
183 | |
184 | |
185 ngx_feature="posix_fadvise()" | |
186 ngx_feature_name="NGX_HAVE_POSIX_FADVISE" | |
187 ngx_feature_run=no | |
188 ngx_feature_incs="#include <fcntl.h>" | |
189 ngx_feature_path= | |
190 ngx_feature_libs= | |
191 ngx_feature_test="posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);" | |
192 . auto/feature | |
193 | |
194 | |
2129 | 195 ngx_feature="O_DIRECT" |
196 ngx_feature_name="NGX_HAVE_O_DIRECT" | |
197 ngx_feature_run=no | |
198 ngx_feature_incs="#include <fcntl.h>" | |
199 ngx_feature_path= | |
200 ngx_feature_libs= | |
201 ngx_feature_test="fcntl(0, F_SETFL, O_DIRECT);" | |
202 . auto/feature | |
203 | |
204 | |
2248
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2143
diff
changeset
|
205 if [ $ngx_found = yes -a "$NGX_SYSTEM" = "Linux" ]; then |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2143
diff
changeset
|
206 have=NGX_HAVE_ALIGNED_DIRECTIO . auto/have |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2143
diff
changeset
|
207 fi |
1adec90a0e46
disable directio for unaligned reads in Linux
Igor Sysoev <igor@sysoev.ru>
parents:
2143
diff
changeset
|
208 |
2129 | 209 ngx_feature="F_NOCACHE" |
210 ngx_feature_name="NGX_HAVE_F_NOCACHE" | |
211 ngx_feature_run=no | |
212 ngx_feature_incs="#include <fcntl.h>" | |
213 ngx_feature_path= | |
214 ngx_feature_libs= | |
215 ngx_feature_test="fcntl(0, F_NOCACHE, 1);" | |
216 . auto/feature | |
2143 | 217 |
218 | |
219 ngx_feature="directio()" | |
220 ngx_feature_name="NGX_HAVE_DIRECTIO" | |
221 ngx_feature_run=no | |
222 ngx_feature_incs="#include <sys/types.h> | |
223 #include <sys/fcntl.h>" | |
224 ngx_feature_path= | |
225 ngx_feature_libs= | |
226 ngx_feature_test="directio(0, DIRECTIO_ON);" | |
227 . auto/feature | |
2615 | 228 |
229 | |
230 ngx_feature="statfs()" | |
231 ngx_feature_name="NGX_HAVE_STATFS" | |
232 ngx_feature_run=no | |
2624
418c9f97bd01
fix FreeBSD before 7 building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
233 ngx_feature_incs="$NGX_INCLUDE_SYS_PARAM_H |
418c9f97bd01
fix FreeBSD before 7 building, broken in r2616
Igor Sysoev <igor@sysoev.ru>
parents:
2615
diff
changeset
|
234 $NGX_INCLUDE_SYS_MOUNT_H |
2615 | 235 $NGX_INCLUDE_SYS_VFS_H" |
236 ngx_feature_path= | |
237 ngx_feature_libs= | |
238 ngx_feature_test="struct statfs fs; | |
239 statfs(NULL, &fs);" | |
240 . auto/feature | |
241 | |
242 | |
243 ngx_feature="statvfs()" | |
244 ngx_feature_name="NGX_HAVE_STATVFS" | |
245 ngx_feature_run=no | |
246 ngx_feature_incs="#include <sys/types.h> | |
247 #include <sys/statvfs.h>" | |
248 ngx_feature_path= | |
249 ngx_feature_libs= | |
250 ngx_feature_test="struct statvfs fs; | |
251 statvfs(NULL, &fs);" | |
252 . auto/feature | |
2880
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
253 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
254 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
255 ngx_feature="dlopen()" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
256 ngx_feature_name= |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
257 ngx_feature_run=no |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
258 ngx_feature_incs="#include <dlfcn.h>" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
259 ngx_feature_path= |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
260 ngx_feature_libs= |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
261 ngx_feature_test="dlopen(NULL, 0)" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
262 . auto/feature |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
263 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
264 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
265 if [ $ngx_found != yes ]; then |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
266 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
267 ngx_feature="dlopen() in libdl" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
268 ngx_feature_libs="-ldl" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
269 . auto/feature |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
270 |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
271 if [ $ngx_found = yes ]; then |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
272 NGX_LIBDL="-ldl" |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
273 fi |
ed741daa010a
test libdl before OpenSSL configuration
Igor Sysoev <igor@sysoev.ru>
parents:
2624
diff
changeset
|
274 fi |
2916
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
275 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
276 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
277 ngx_feature="sched_yield()" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
278 ngx_feature_name="NGX_HAVE_SCHED_YIELD" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
279 ngx_feature_run=no |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
280 ngx_feature_incs="#include <sched.h>" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
281 ngx_feature_path= |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
282 ngx_feature_libs= |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
283 ngx_feature_test="sched_yield()" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
284 . auto/feature |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
285 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
286 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
287 if [ $ngx_found != yes ]; then |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
288 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
289 ngx_feature="sched_yield() in librt" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
290 ngx_feature_libs="-lrt" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
291 . auto/feature |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
292 |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
293 if [ $ngx_found = yes ]; then |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
294 CORE_LIBS="$CORE_LIBS -lrt" |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
295 fi |
759ff3e380e3
librt must be tested before creating Makefile
Igor Sysoev <igor@sysoev.ru>
parents:
2880
diff
changeset
|
296 fi |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
297 |
3676 | 298 ngx_feature="SO_SETFIB" |
299 ngx_feature_name="NGX_HAVE_SETFIB" | |
300 ngx_feature_run=no | |
301 ngx_feature_incs="#include <sys/socket.h>" | |
302 ngx_feature_path= | |
303 ngx_feature_libs= | |
304 ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 4)" | |
305 . auto/feature | |
306 | |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
307 |
3786 | 308 ngx_feature="accept4()" |
309 ngx_feature_name="NGX_HAVE_ACCEPT4" | |
310 ngx_feature_run=no | |
311 ngx_feature_incs="#include <sys/socket.h>" | |
312 ngx_feature_path= | |
313 ngx_feature_libs= | |
314 ngx_feature_test="accept4(0, NULL, NULL, SOCK_NONBLOCK)" | |
315 . auto/feature | |
316 | |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
317 if [ $NGX_FILE_AIO = YES ]; then |
3113
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
318 |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
319 ngx_feature="kqueue AIO support" |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
320 ngx_feature_name="NGX_HAVE_FILE_AIO" |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
321 ngx_feature_run=no |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
322 ngx_feature_incs="#include <aio.h>" |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
323 ngx_feature_path= |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
324 ngx_feature_libs= |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
325 ngx_feature_test="int n; struct aiocb iocb; |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
326 iocb.aio_sigevent.sigev_notify = SIGEV_KEVENT; |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
327 n = aio_read(&iocb)" |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
328 . auto/feature |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
329 |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
330 if [ $ngx_found = yes ]; then |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
331 CORE_SRCS="$CORE_SRCS $FILE_AIO_SRCS" |
3113
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
332 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
333 elif [ $ngx_found = no ]; then |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
334 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
335 ngx_feature="Linux AIO support" |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
336 ngx_feature_name="NGX_HAVE_FILE_AIO" |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
337 ngx_feature_run=no |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
338 ngx_feature_incs="#include <linux/aio_abi.h> |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
339 #include <sys/syscall.h>" |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
340 ngx_feature_path= |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
341 ngx_feature_libs= |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
342 ngx_feature_test="int n = SYS_eventfd; |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
343 struct iocb iocb; |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
344 iocb.aio_lio_opcode = IOCB_CMD_PREAD; |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
345 iocb.aio_flags = IOCB_FLAG_RESFD; |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
346 iocb.aio_resfd = -1;" |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
347 . auto/feature |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
348 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
349 if [ $ngx_found = yes ]; then |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
350 have=NGX_HAVE_EVENTFD . auto/have |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
351 CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS" |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
352 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
353 else |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
354 cat << END |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
355 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
356 $0: no supported file AIO was found |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
357 Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
358 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
359 END |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
360 exit 1 |
e1e290965ed1
fail if no file aio was found
Igor Sysoev <igor@sysoev.ru>
parents:
3052
diff
changeset
|
361 fi |
3052
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
362 fi |
6060225e9261
FreeBSD and Linux AIO support
Igor Sysoev <igor@sysoev.ru>
parents:
2916
diff
changeset
|
363 fi |