comparison auto/os/features @ 3113:e1e290965ed1

fail if no file aio was found
author Igor Sysoev <igor@sysoev.ru>
date Thu, 10 Sep 2009 12:08:30 +0000
parents 6060225e9261
children 975f0558aab3
comparison
equal deleted inserted replaced
3112:5ddc9458e4bb 3113:e1e290965ed1
275 fi 275 fi
276 fi 276 fi
277 277
278 278
279 if [ $NGX_FILE_AIO = YES ]; then 279 if [ $NGX_FILE_AIO = YES ]; then
280
280 ngx_feature="kqueue AIO support" 281 ngx_feature="kqueue AIO support"
281 ngx_feature_name="NGX_HAVE_FILE_AIO" 282 ngx_feature_name="NGX_HAVE_FILE_AIO"
282 ngx_feature_run=no 283 ngx_feature_run=no
283 ngx_feature_incs="#include <aio.h>" 284 ngx_feature_incs="#include <aio.h>"
284 ngx_feature_path= 285 ngx_feature_path=
288 n = aio_read(&iocb)" 289 n = aio_read(&iocb)"
289 . auto/feature 290 . auto/feature
290 291
291 if [ $ngx_found = yes ]; then 292 if [ $ngx_found = yes ]; then
292 CORE_SRCS="$CORE_SRCS $FILE_AIO_SRCS" 293 CORE_SRCS="$CORE_SRCS $FILE_AIO_SRCS"
293 fi 294
294 fi 295 elif [ $ngx_found = no ]; then
295 296
296 297 ngx_feature="Linux AIO support"
297 if [ $NGX_FILE_AIO = YES ]; then 298 ngx_feature_name="NGX_HAVE_FILE_AIO"
298 ngx_feature="Linux AIO support" 299 ngx_feature_run=no
299 ngx_feature_name="NGX_HAVE_FILE_AIO" 300 ngx_feature_incs="#include <linux/aio_abi.h>
300 ngx_feature_run=no 301 #include <sys/syscall.h>"
301 ngx_feature_incs="#include <linux/aio_abi.h> 302 ngx_feature_path=
302 #include <sys/syscall.h>" 303 ngx_feature_libs=
303 ngx_feature_path= 304 ngx_feature_test="int n = SYS_eventfd;
304 ngx_feature_libs= 305 struct iocb iocb;
305 ngx_feature_test="int n = SYS_eventfd; 306 iocb.aio_lio_opcode = IOCB_CMD_PREAD;
306 struct iocb iocb; 307 iocb.aio_flags = IOCB_FLAG_RESFD;
307 iocb.aio_lio_opcode = IOCB_CMD_PREAD; 308 iocb.aio_resfd = -1;"
308 iocb.aio_flags = IOCB_FLAG_RESFD; 309 . auto/feature
309 iocb.aio_resfd = -1;" 310
310 . auto/feature 311 if [ $ngx_found = yes ]; then
311 312 have=NGX_HAVE_EVENTFD . auto/have
312 if [ $ngx_found = yes ]; then 313 CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS"
313 have=NGX_HAVE_EVENTFD . auto/have 314
314 CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS" 315 else
315 fi 316 cat << END
316 fi 317
318 $0: no supported file AIO was found
319 Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only
320
321 END
322 exit 1
323 fi
324 fi
325 fi