Mercurial > hg > nginx-mail
comparison auto/os/linux @ 0:f0b350454894 NGINX_0_1_0
nginx 0.1.0
*) The first public version.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Mon, 04 Oct 2004 00:00:00 +0400 |
parents | |
children | 4b2dafa26fe2 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0b350454894 |
---|---|
1 | |
2 # Copyright (C) Igor Sysoev | |
3 | |
4 | |
5 CORE_INCS="$UNIX_INCS" | |
6 CORE_DEPS="$UNIX_DEPS $LINUX_DEPS" | |
7 CORE_SRCS="$UNIX_SRCS $LINUX_SRCS" | |
8 EVENT_MODULES="$EVENT_MODULES" | |
9 | |
10 PIPE="-pipe" | |
11 | |
12 | |
13 CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" | |
14 | |
15 # Linux kernel version | |
16 | |
17 version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \ | |
18 | sed -e 's/^.* \(.*\)$/\1/'` | |
19 | |
20 | |
21 # enable the rt signals on Linux 2.2.19 and onward | |
22 | |
23 if [ $version -ge 131609 -o $EVENT_RTSIG = YES ]; then | |
24 echo " + using rt signals" | |
25 have=HAVE_RTSIG . auto/have | |
26 EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE" | |
27 CORE_SRCS="$CORE_SRCS $RTSIG_SRCS" | |
28 EVENT_FOUND=YES | |
29 fi | |
30 | |
31 | |
32 # epoll, EPOLLET version | |
33 | |
34 ngx_func="epoll"; | |
35 ngx_func_inc="#include <sys/epoll.h>" | |
36 ngx_func_test="int efd = 0, fd = 1, n; | |
37 struct epoll_event ee; | |
38 ee.events = EPOLLIN|EPOLLOUT|EPOLLET; | |
39 ee.data.ptr = NULL; | |
40 n = epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)" | |
41 . auto/func | |
42 | |
43 if [ $ngx_found = yes ]; then | |
44 have=HAVE_EPOLL . auto/have | |
45 have=HAVE_CLEAR_EVENT . auto/have | |
46 CORE_SRCS="$CORE_SRCS $EPOLL_SRCS" | |
47 EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE" | |
48 EVENT_FOUND=YES | |
49 fi | |
50 | |
51 | |
52 # sendfile() | |
53 | |
54 CC_TEST_FLAGS="-D_GNU_SOURCE" | |
55 ngx_func="sendfile()"; | |
56 ngx_func_inc="#include <sys/sendfile.h>" | |
57 ngx_func_test="int s = 0, fd = 1; | |
58 ssize_t n; off_t off = 0; | |
59 n = sendfile(s, fd, &off, 1)" | |
60 . auto/func | |
61 | |
62 if [ $ngx_found = yes ]; then | |
63 CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS" | |
64 fi | |
65 | |
66 | |
67 # sendfile64() | |
68 | |
69 CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" | |
70 ngx_func="sendfile64()"; . auto/func | |
71 | |
72 | |
73 # prctl(PR_SET_DUMPABLE) | |
74 | |
75 ngx_func="prctl()"; | |
76 ngx_func_inc="#include <sys/prctl.h>" | |
77 ngx_func_test="prctl(PR_SET_DUMPABLE, 1, 0, 0, 0)" | |
78 . auto/func | |
79 | |
80 if [ $ngx_found = yes ]; then | |
81 have=HAVE_PR_SET_DUMPABLE . auto/have | |
82 fi |