mirror of
https://github.com/nginx/nginx.git
synced 2024-12-12 02:09:04 +08:00
50 lines
1.0 KiB
Plaintext
50 lines
1.0 KiB
Plaintext
|
|
|
|
CORE_INCS="$UNIX_INCS"
|
|
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
|
|
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
|
|
|
|
MD5_LIB="-lmd"
|
|
ZLIB_LIB="-lz"
|
|
|
|
if [ $SELECT = YES ]; then
|
|
CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
|
|
EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
|
|
fi
|
|
|
|
if [ $POLL = YES ]; then
|
|
CORE_SRCS="$CORE_SRCS $POLL_SRCS"
|
|
EVENT_MODULES="$EVENT_MODULES $POLL_MODULE"
|
|
fi
|
|
|
|
version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
|
|
| sed -e 's/^.* \(.*\)$/\1/'`
|
|
|
|
|
|
# sendfile
|
|
|
|
if [ $version -gt 300007 ]; then
|
|
CFLAGS="$CFLAGS -D HAVE_SENDFILE=1"
|
|
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
|
|
fi
|
|
|
|
|
|
# kqueue
|
|
|
|
if [ \( $version -lt 500000 -a $version -ge 410000 \) \
|
|
-o $version -ge 500011 ]
|
|
then
|
|
CFLAGS="$CFLAGS -D HAVE_KQUEUE=1 -D HAVE_CLEAR_EVENT=1"
|
|
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
|
|
EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
|
|
fi
|
|
|
|
|
|
# kqueue's NOTE_LAWAT
|
|
|
|
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
|
|
-o $version -ge 500018 ]
|
|
then
|
|
CFLAGS="$CFLAGS -D HAVE_LOWAT_EVENT=1"
|
|
fi
|