Mercurial > hg > nginx
annotate auto/os/freebsd @ 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 | 113cd532b328 |
children | 0daede16d68b |
rev | line source |
---|---|
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
2 # Copyright (C) Igor Sysoev |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
3 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
4 |
509 | 5 have=NGX_FREEBSD . auto/have_headers |
455 | 6 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
7 CORE_INCS="$UNIX_INCS" |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
8 CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" |
238
674f85a4d00f
nginx-0.0.1-2004-01-23-12:26:18 import
Igor Sysoev <igor@sysoev.ru>
parents:
215
diff
changeset
|
9 CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
10 |
455 | 11 ngx_spacer=' |
12 ' | |
283
8f65fee68270
nginx-0.0.2-2004-03-10-20:55:19 import
Igor Sysoev <igor@sysoev.ru>
parents:
272
diff
changeset
|
13 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
14 |
455 | 15 # __FreeBSD_version and sysctl kern.osreldate are the best ways |
16 # to determine whether some capability exists and is safe to use. | |
686 | 17 # __FreeBSD_version is used for the testing of the build environment. |
455 | 18 # sysctl kern.osreldate is used for the testing of the kernel capabilities. |
260
5dacbb4daaf6
nginx-0.0.2-2004-02-17-20:53:12 import
Igor Sysoev <igor@sysoev.ru>
parents:
253
diff
changeset
|
19 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
20 version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \ |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
21 | sed -e 's/^.* \(.*\)$/\1/'` |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
22 |
455 | 23 osreldate=`/sbin/sysctl -n kern.osreldate` |
24 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
25 |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
26 # setproctitle() in libutil |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
27 |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
28 if [ \( $version -ge 500000 -a $version -lt 500012 \) \ |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
29 -o $version -lt 410002 ] |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
30 then |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
31 echo " + setproctitle() in libutil" |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
32 |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
33 CORE_LIBS="$CORE_LIBS -lutil" |
509 | 34 NGX_SETPROCTITLE_LIB="-lutil" |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
35 fi |
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
36 |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
37 # sendfile |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
38 |
455 | 39 if [ $osreldate -gt 300007 ]; then |
563 | 40 echo " + sendfile() found" |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
41 |
469 | 42 have=NGX_HAVE_SENDFILE . auto/have |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
43 CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS" |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
44 fi |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
45 |
3065 | 46 if [ $osreldate -gt 502103 ]; then |
47 echo " + sendfile()'s SF_NODISKIO found" | |
48 | |
49 have=NGX_HAVE_AIO_SENDFILE . auto/have | |
50 fi | |
51 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
52 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
53 # kqueue |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
54 |
455 | 55 if [ \( $osreldate -lt 500000 -a $osreldate -ge 410000 \) \ |
56 -o $osreldate -ge 500011 ] | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
57 then |
563 | 58 echo " + kqueue found" |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
59 |
469 | 60 have=NGX_HAVE_KQUEUE . auto/have |
61 have=NGX_HAVE_CLEAR_EVENT . auto/have | |
298
4a3f18406832
nginx-0.0.3-2004-03-30-10:27:36 import
Igor Sysoev <igor@sysoev.ru>
parents:
291
diff
changeset
|
62 EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE" |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
63 CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS" |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
64 EVENT_FOUND=YES |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
65 fi |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
66 |
489 | 67 |
455 | 68 NGX_KQUEUE_CHECKED=YES |
69 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
70 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
71 # kqueue's NOTE_LAWAT |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
72 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
73 if [ \( $version -lt 500000 -a $version -ge 430000 \) \ |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
74 -o $version -ge 500018 ] |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
75 then |
563 | 76 echo " + kqueue's NOTE_LOWAT found" |
469 | 77 have=NGX_HAVE_LOWAT_EVENT . auto/have |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
78 fi |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
79 |
563 | 80 # kqueue's EVFILT_TIMER |
81 | |
82 if [ \( $version -lt 500000 -a $version -ge 440001 \) \ | |
83 -o $version -ge 500023 ] | |
84 then | |
85 echo " + kqueue's EVFILT_TIMER found" | |
86 have=NGX_HAVE_TIMER_EVENT . auto/have | |
87 fi | |
88 | |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
89 |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
90 if [ $USE_THREADS = "rfork" ]; then |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
91 |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
92 echo " + using rfork()" |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
93 |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
94 # # kqueue's EVFILT_SIGNAL is safe |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
95 # |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
96 # if [ $version -gt 460101 ]; then |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
97 # echo " + kqueue's EVFILT_SIGNAL is safe" |
469 | 98 # have=NGX_HAVE_SAFE_EVFILT_SIGNAL . auto/have |
444
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
99 # else |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
100 # echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this" |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
101 # echo "FreeBSD version, so --with-threads=rfork could not be used" |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
102 # echo |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
103 # |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
104 # exit 1 |
42d11f017717
nginx-0.1.0-2004-09-29-20:00:49 import; remove years from copyright
Igor Sysoev <igor@sysoev.ru>
parents:
376
diff
changeset
|
105 # fi |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
106 fi |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
107 |
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
108 |
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
109 if [ $EVENT_AIO = YES ]; then |
467 | 110 if [ \( $version -lt 500000 -a $version -ge 430000 \) \ |
111 -o $version -ge 500014 ] | |
112 then | |
469 | 113 have=NGX_HAVE_AIO . auto/have |
467 | 114 EVENT_MODULES="$EVENT_MODULES $AIO_MODULE" |
115 CORE_SRCS="$CORE_SRCS $AIO_SRCS" | |
116 else | |
117 | |
118 cat << END | |
119 | |
120 $0: error: the kqueue does not support AIO on this FreeBSD version | |
121 | |
122 END | |
123 | |
124 exit 1 | |
125 fi | |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
126 fi |