nginx/auto/os/freebsd
2004-01-23 09:26:18 +00:00

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