Mercurial > hg > nginx
annotate auto/os/freebsd @ 2175:a69886fc2864
*) fix segfaults in types hash
*) fix inheritance: default hash instead of inherited one
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 13 Aug 2008 16:25:48 +0000 |
parents | 0bbb66f76af1 |
children | 113cd532b328 |
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 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
46 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
47 # kqueue |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
48 |
455 | 49 if [ \( $osreldate -lt 500000 -a $osreldate -ge 410000 \) \ |
50 -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
|
51 then |
563 | 52 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
|
53 |
469 | 54 have=NGX_HAVE_KQUEUE . auto/have |
55 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
|
56 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
|
57 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
|
58 EVENT_FOUND=YES |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
59 fi |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
60 |
489 | 61 |
455 | 62 NGX_KQUEUE_CHECKED=YES |
63 | |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
64 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
65 # kqueue's NOTE_LAWAT |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
66 |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
67 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
|
68 -o $version -ge 500018 ] |
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
69 then |
563 | 70 echo " + kqueue's NOTE_LOWAT found" |
469 | 71 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
|
72 fi |
267
83205e0b5522
nginx-0.0.2-2004-02-24-20:31:46 import
Igor Sysoev <igor@sysoev.ru>
parents:
261
diff
changeset
|
73 |
563 | 74 # kqueue's EVFILT_TIMER |
75 | |
76 if [ \( $version -lt 500000 -a $version -ge 440001 \) \ | |
77 -o $version -ge 500023 ] | |
78 then | |
79 echo " + kqueue's EVFILT_TIMER found" | |
80 have=NGX_HAVE_TIMER_EVENT . auto/have | |
81 fi | |
82 | |
376
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
83 |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
84 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
|
85 |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
86 echo " + using rfork()" |
d0451e402e27
nginx-0.0.7-2004-07-05-10:55:54 import
Igor Sysoev <igor@sysoev.ru>
parents:
355
diff
changeset
|
87 |
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
|
88 # # 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
|
89 # |
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
|
90 # 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
|
91 # echo " + kqueue's EVFILT_SIGNAL is safe" |
469 | 92 # 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
|
93 # 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
|
94 # 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
|
95 # 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
|
96 # 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
|
97 # |
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
|
98 # 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
|
99 # fi |
195
8dee38ea9117
nginx-0.0.1-2003-11-25-23:44:56 import
Igor Sysoev <igor@sysoev.ru>
parents:
diff
changeset
|
100 fi |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
101 |
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
102 |
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
103 if [ $EVENT_AIO = YES ]; then |
467 | 104 if [ \( $version -lt 500000 -a $version -ge 430000 \) \ |
105 -o $version -ge 500014 ] | |
106 then | |
469 | 107 have=NGX_HAVE_AIO . auto/have |
467 | 108 EVENT_MODULES="$EVENT_MODULES $AIO_MODULE" |
109 CORE_SRCS="$CORE_SRCS $AIO_SRCS" | |
110 else | |
111 | |
112 cat << END | |
113 | |
114 $0: error: the kqueue does not support AIO on this FreeBSD version | |
115 | |
116 END | |
117 | |
118 exit 1 | |
119 fi | |
248
e885208c518b
nginx-0.0.2-2004-02-03-00:19:52 import
Igor Sysoev <igor@sysoev.ru>
parents:
238
diff
changeset
|
120 fi |