nginx/auto/os/freebsd

50 lines
1.0 KiB
Plaintext
Raw Normal View History

2003-11-26 04:44:56 +08:00
CORE_INCS="$UNIX_INCS"
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
2004-01-23 17:26:18 +08:00
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
2003-11-26 04:44:56 +08:00
MD5_LIB="-lmd"
ZLIB_LIB="-lz"
2004-01-23 17:26:18 +08:00
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
2003-11-26 04:44:56 +08:00
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
2003-12-23 01:27:24 +08:00
CFLAGS="$CFLAGS -D HAVE_KQUEUE=1 -D HAVE_CLEAR_EVENT=1"
2003-11-26 04:44:56 +08:00
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