2003-11-25 17:44:56 -03:00
|
|
|
|
|
|
|
CORE_INCS="$UNIX_INCS"
|
|
|
|
CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
|
2004-01-23 06:26:18 -03:00
|
|
|
CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
|
2003-11-25 17:44:56 -03:00
|
|
|
|
2004-03-11 12:42:41 -03:00
|
|
|
PIPE="-pipe"
|
2004-03-10 14:55:19 -03:00
|
|
|
|
2003-11-25 17:44:56 -03:00
|
|
|
|
2004-02-17 18:11:27 -03:00
|
|
|
# __FreeBSD_version is the best way to determine whether
|
|
|
|
# some capability exists and is safe to use
|
2004-02-17 14:53:12 -03:00
|
|
|
|
2003-11-25 17:44:56 -03:00
|
|
|
version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
|
|
|
|
| sed -e 's/^.* \(.*\)$/\1/'`
|
|
|
|
|
|
|
|
|
2004-02-24 14:31:46 -03:00
|
|
|
# setproctitle() in libutil
|
|
|
|
|
|
|
|
if [ \( $version -ge 500000 -a $version -lt 500012 \) \
|
|
|
|
-o $version -lt 410002 ]
|
|
|
|
then
|
|
|
|
echo " + setproctitle() in libutil"
|
|
|
|
|
|
|
|
CORE_LIBS="$CORE_LIBS -lutil"
|
|
|
|
fi
|
|
|
|
|
2003-11-25 17:44:56 -03:00
|
|
|
# sendfile
|
|
|
|
|
|
|
|
if [ $version -gt 300007 ]; then
|
2004-02-29 18:03:02 -03:00
|
|
|
echo " + using sendfile()"
|
2004-02-24 14:31:46 -03:00
|
|
|
|
2004-02-02 18:19:52 -03:00
|
|
|
have=HAVE_SENDFILE . auto/have
|
2003-11-25 17:44:56 -03:00
|
|
|
CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# kqueue
|
|
|
|
|
|
|
|
if [ \( $version -lt 500000 -a $version -ge 410000 \) \
|
|
|
|
-o $version -ge 500011 ]
|
|
|
|
then
|
2004-02-29 18:03:02 -03:00
|
|
|
echo " + using kqueue"
|
2004-02-24 14:31:46 -03:00
|
|
|
|
2004-02-02 18:19:52 -03:00
|
|
|
have=HAVE_KQUEUE . auto/have
|
|
|
|
have=HAVE_CLEAR_EVENT . auto/have
|
2003-11-25 17:44:56 -03:00
|
|
|
EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
|
2004-03-30 02:27:36 -04:00
|
|
|
CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
|
2004-02-02 18:19:52 -03:00
|
|
|
EVENT_FOUND=YES
|
2003-11-25 17:44:56 -03:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# kqueue's NOTE_LAWAT
|
|
|
|
|
|
|
|
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
|
|
|
|
-o $version -ge 500018 ]
|
|
|
|
then
|
2004-03-16 09:35:20 -04:00
|
|
|
echo " + using kqueue's NOTE_LOWAT"
|
2004-02-02 18:19:52 -03:00
|
|
|
have=HAVE_LOWAT_EVENT . auto/have
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2004-07-05 02:55:54 -04:00
|
|
|
if [ $USE_THREADS = "rfork" ]; then
|
|
|
|
|
|
|
|
echo " + using rfork()"
|
|
|
|
|
|
|
|
# kqueue's EVFILT_SIGNAL is safe
|
|
|
|
|
|
|
|
if [ $version -gt 460101 ]; then
|
|
|
|
echo " + kqueue's EVFILT_SIGNAL is safe"
|
|
|
|
have=HAVE_SAFE_EVFILT_SIGNAL . auto/have
|
|
|
|
else
|
|
|
|
echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this"
|
|
|
|
echo "FreeBSD version, so --with-threads=rfork could not be used"
|
|
|
|
echo
|
|
|
|
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2004-02-02 18:19:52 -03:00
|
|
|
if [ $EVENT_AIO = YES ]; then
|
2004-03-30 02:27:36 -04:00
|
|
|
have=HAVE_AIO . auto/have
|
2004-02-02 18:19:52 -03:00
|
|
|
EVENT_MODULES="$EVENT_MODULES $AIO_MODULE"
|
2004-03-30 02:27:36 -04:00
|
|
|
CORE_SRCS="$CORE_SRCS $AIO_SRCS"
|
|
|
|
else
|
|
|
|
have=HAVE_AIO . auto/nohave
|
2003-11-25 17:44:56 -03:00
|
|
|
fi
|