comparison auto/os/freebsd @ 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 $FREEBSD_DEPS"
7 CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
8
9 PIPE="-pipe"
10
11
12 # __FreeBSD_version is the best way to determine whether
13 # some capability exists and is safe to use
14
15 version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
16 | sed -e 's/^.* \(.*\)$/\1/'`
17
18
19 # setproctitle() in libutil
20
21 if [ \( $version -ge 500000 -a $version -lt 500012 \) \
22 -o $version -lt 410002 ]
23 then
24 echo " + setproctitle() in libutil"
25
26 CORE_LIBS="$CORE_LIBS -lutil"
27 fi
28
29 # sendfile
30
31 if [ $version -gt 300007 ]; then
32 echo " + using sendfile()"
33
34 have=HAVE_SENDFILE . auto/have
35 CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
36 fi
37
38
39 # kqueue
40
41 if [ \( $version -lt 500000 -a $version -ge 410000 \) \
42 -o $version -ge 500011 ]
43 then
44 echo " + using kqueue"
45
46 have=HAVE_KQUEUE . auto/have
47 have=HAVE_CLEAR_EVENT . auto/have
48 EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
49 CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
50 EVENT_FOUND=YES
51 fi
52
53
54 # kqueue's NOTE_LAWAT
55
56 if [ \( $version -lt 500000 -a $version -ge 430000 \) \
57 -o $version -ge 500018 ]
58 then
59 echo " + using kqueue's NOTE_LOWAT"
60 have=HAVE_LOWAT_EVENT . auto/have
61 fi
62
63
64 if [ $USE_THREADS = "rfork" ]; then
65
66 echo " + using rfork()"
67
68 # # kqueue's EVFILT_SIGNAL is safe
69 #
70 # if [ $version -gt 460101 ]; then
71 # echo " + kqueue's EVFILT_SIGNAL is safe"
72 # have=HAVE_SAFE_EVFILT_SIGNAL . auto/have
73 # else
74 # echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this"
75 # echo "FreeBSD version, so --with-threads=rfork could not be used"
76 # echo
77 #
78 # exit 1
79 # fi
80 fi
81
82
83 if [ $EVENT_AIO = YES ]; then
84 have=HAVE_AIO . auto/have
85 EVENT_MODULES="$EVENT_MODULES $AIO_MODULE"
86 CORE_SRCS="$CORE_SRCS $AIO_SRCS"
87 else
88 have=HAVE_AIO . auto/nohave
89 fi