Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.15.12 ]​[ nginx-1.16.0 ]​

0001 
0002 # Copyright (C) Igor Sysoev
0003 # Copyright (C) Nginx, Inc.
0004 
0005 
0006 have=NGX_FREEBSD . auto/have_headers
0007 
0008 CORE_INCS="$UNIX_INCS"
0009 CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS"
0010 CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS"
0011 
0012 ngx_spacer='
0013 '
0014 
0015 
0016 # __FreeBSD_version and sysctl kern.osreldate are the best ways
0017 # to determine whether some capability exists and is safe to use.
0018 # __FreeBSD_version is used for the testing of the build environment.
0019 # sysctl kern.osreldate is used for the testing of the kernel capabilities.
0020 
0021 version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \
0022          | sed -e 's/^.* \(.*\)$/\1/'`
0023 
0024 osreldate=`/sbin/sysctl -n kern.osreldate`
0025 
0026 
0027 # setproctitle() in libutil
0028 
0029 if [ \( $version -ge 500000 -a $version -lt 500012 \) \
0030      -o $version -lt 410002 ]
0031 then
0032     echo " + setproctitle() in libutil"
0033 
0034     CORE_LIBS="$CORE_LIBS -lutil"
0035     NGX_SETPROCTITLE_LIB="-lutil"
0036 fi
0037 
0038 # sendfile
0039 
0040 if [ $osreldate -gt 300007 ]; then
0041     echo " + sendfile() found"
0042 
0043     have=NGX_HAVE_SENDFILE . auto/have
0044     CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS"
0045 fi
0046 
0047 if [ $NGX_FILE_AIO = YES ]; then
0048     if [ $osreldate -gt 502103 ]; then
0049         echo " + sendfile()'s SF_NODISKIO found"
0050 
0051         have=NGX_HAVE_AIO_SENDFILE . auto/have
0052     fi
0053 fi
0054 
0055 # POSIX semaphores
0056 # http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545
0057 
0058 if [ $osreldate -ge 701106 ]; then
0059     echo " + POSIX semaphores should work"
0060 else
0061     have=NGX_HAVE_POSIX_SEM . auto/nohave
0062 fi
0063 
0064 
0065 # kqueue
0066 
0067 if [ \( $osreldate -lt 500000 -a $osreldate -ge 410000 \) \
0068      -o $osreldate -ge 500011 ]
0069 then
0070     echo " + kqueue found"
0071 
0072     have=NGX_HAVE_KQUEUE . auto/have
0073     have=NGX_HAVE_CLEAR_EVENT . auto/have
0074     EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
0075     CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
0076     EVENT_FOUND=YES
0077 fi
0078 
0079 
0080 NGX_KQUEUE_CHECKED=YES
0081 
0082 
0083 # kqueue's NOTE_LOWAT
0084 
0085 if [ \( $version -lt 500000 -a $version -ge 430000 \) \
0086      -o $version -ge 500018 ]
0087 then
0088     echo " + kqueue's NOTE_LOWAT found"
0089     have=NGX_HAVE_LOWAT_EVENT . auto/have
0090 fi
0091 
0092 # kqueue's EVFILT_TIMER
0093 
0094 if [ \( $version -lt 500000 -a $version -ge 440001 \) \
0095      -o $version -ge 500023 ]
0096 then
0097     echo " + kqueue's EVFILT_TIMER found"
0098     have=NGX_HAVE_TIMER_EVENT . auto/have
0099 fi
0100 
0101 
0102 # cpuset_setaffinity()
0103 
0104 if [ $version -ge 701000 ]; then
0105     echo " + cpuset_setaffinity() found"
0106     have=NGX_HAVE_CPUSET_SETAFFINITY . auto/have
0107 fi