diff options
Diffstat (limited to 'app/nginx/auto/os')
-rw-r--r-- | app/nginx/auto/os/conf | 116 | ||||
-rw-r--r-- | app/nginx/auto/os/darwin | 118 | ||||
-rw-r--r-- | app/nginx/auto/os/freebsd | 107 | ||||
-rw-r--r-- | app/nginx/auto/os/linux | 190 | ||||
-rw-r--r-- | app/nginx/auto/os/solaris | 61 | ||||
-rw-r--r-- | app/nginx/auto/os/win32 | 42 |
6 files changed, 0 insertions, 634 deletions
diff --git a/app/nginx/auto/os/conf b/app/nginx/auto/os/conf deleted file mode 100644 index 6ad0e74..0000000 --- a/app/nginx/auto/os/conf +++ /dev/null @@ -1,116 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -echo "checking for $NGX_SYSTEM specific features" - -case "$NGX_PLATFORM" in - - FreeBSD:*) - . auto/os/freebsd - ;; - - Linux:*) - . auto/os/linux - ;; - - SunOS:*) - . auto/os/solaris - ;; - - Darwin:*) - . auto/os/darwin - ;; - - win32) - . auto/os/win32 - ;; - - DragonFly:*) - have=NGX_FREEBSD . auto/have_headers - CORE_INCS="$UNIX_INCS" - CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" - CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" - - echo " + sendfile() found" - have=NGX_HAVE_SENDFILE . auto/have - CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS" - - ngx_spacer=' -' - ;; - - HP-UX:*) - # HP/UX - have=NGX_HPUX . auto/have_headers - CORE_INCS="$UNIX_INCS" - CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" - CORE_SRCS="$UNIX_SRCS" - CC_AUX_FLAGS="$CC_AUX_FLAGS -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" - CC_AUX_FLAGS="$CC_AUX_FLAGS -D_HPUX_ALT_XOPEN_SOCKET_API" - ;; - - OSF1:*) - # Tru64 UNIX - have=NGX_TRU64 . auto/have_headers - have=NGX_HAVE_STRERROR_R . auto/nohave - CORE_INCS="$UNIX_INCS" - CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" - CORE_SRCS="$UNIX_SRCS" - ;; - - GNU:*) - # GNU Hurd - have=NGX_GNU_HURD . auto/have_headers - CORE_INCS="$UNIX_INCS" - CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" - CORE_SRCS="$UNIX_SRCS" - CC_AUX_FLAGS="$CC_AUX_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" - ;; - - *) - CORE_INCS="$UNIX_INCS" - CORE_DEPS="$UNIX_DEPS $POSIX_DEPS" - CORE_SRCS="$UNIX_SRCS" - ;; - -esac - - -case "$NGX_MACHINE" in - - i386 | i686 | i86pc) - have=NGX_HAVE_NONALIGNED . auto/have - NGX_MACH_CACHE_LINE=32 - ;; - - amd64 | x86_64) - have=NGX_HAVE_NONALIGNED . auto/have - NGX_MACH_CACHE_LINE=64 - ;; - - sun4u | sun4v | sparc | sparc64) - have=NGX_ALIGNMENT value=16 . auto/define - # TODO - NGX_MACH_CACHE_LINE=64 - ;; - - ia64 ) - have=NGX_ALIGNMENT value=16 . auto/define - # TODO - NGX_MACH_CACHE_LINE=64 - ;; - - *) - have=NGX_ALIGNMENT value=16 . auto/define - NGX_MACH_CACHE_LINE=32 - ;; - -esac - -if test -z "$NGX_CPU_CACHE_LINE"; then - NGX_CPU_CACHE_LINE=$NGX_MACH_CACHE_LINE -fi - -have=NGX_CPU_CACHE_LINE value=$NGX_CPU_CACHE_LINE . auto/define diff --git a/app/nginx/auto/os/darwin b/app/nginx/auto/os/darwin deleted file mode 100644 index b4b3ad3..0000000 --- a/app/nginx/auto/os/darwin +++ /dev/null @@ -1,118 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -have=NGX_DARWIN . auto/have_headers - -CORE_INCS="$UNIX_INCS" -CORE_DEPS="$UNIX_DEPS $DARWIN_DEPS" -CORE_SRCS="$UNIX_SRCS $DARWIN_SRCS" - - - -ngx_spacer=' -' - -MAIN_LINK= -MODULE_LINK="-shared -Wl,-undefined,dynamic_lookup" - -# kqueue - -echo " + kqueue found" -have=NGX_HAVE_KQUEUE . auto/have -have=NGX_HAVE_CLEAR_EVENT . auto/have -EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE" -CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS" -EVENT_FOUND=YES -NGX_KQUEUE_CHECKED=YES - -ngx_feature="kqueue's EVFILT_TIMER" -ngx_feature_name="NGX_HAVE_TIMER_EVENT" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/event.h> - #include <sys/time.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int kq; - struct kevent kev; - struct timespec ts; - - if ((kq = kqueue()) == -1) return 1; - - kev.ident = 0; - kev.filter = EVFILT_TIMER; - kev.flags = EV_ADD|EV_ENABLE; - kev.fflags = 0; - kev.data = 1000; - kev.udata = 0; - - ts.tv_sec = 0; - ts.tv_nsec = 0; - - if (kevent(kq, &kev, 1, &kev, 1, &ts) == -1) return 1; - - if (kev.flags & EV_ERROR) return 1;" - -. auto/feature - - -ngx_feature="Darwin 64-bit kqueue millisecond timeout bug" -ngx_feature_name=NGX_DARWIN_KEVENT_BUG -ngx_feature_run=bug -ngx_feature_incs="#include <sys/event.h> - #include <sys/time.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int kq; - struct kevent kev; - struct timespec ts; - struct timeval tv, tv0; - - kq = kqueue(); - - ts.tv_sec = 0; - ts.tv_nsec = 999000000; - - gettimeofday(&tv, 0); - kevent(kq, NULL, 0, &kev, 1, &ts); - gettimeofday(&tv0, 0); - timersub(&tv0, &tv, &tv); - - if (tv.tv_sec * 1000000 + tv.tv_usec < 900000) return 1;" - -. auto/feature - - -# sendfile() - -CC_AUX_FLAGS="$CC_AUX_FLAGS" -ngx_feature="sendfile()" -ngx_feature_name="NGX_HAVE_SENDFILE" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/types.h> - #include <sys/socket.h> - #include <sys/uio.h> - #include <sys/errno.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int s = 0, fd = 1; - off_t n; off_t off = 0; - n = sendfile(s, fd, off, &n, NULL, 0); - if (n == -1 && errno == ENOSYS) return 1" -. auto/feature - -if [ $ngx_found = yes ]; then - CORE_SRCS="$CORE_SRCS $DARWIN_SENDFILE_SRCS" -fi - - -ngx_feature="atomic(3)" -ngx_feature_name=NGX_DARWIN_ATOMIC -ngx_feature_run=no -ngx_feature_incs="#include <libkern/OSAtomic.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int32_t lock = 0; - if (!OSAtomicCompareAndSwap32Barrier(0, 1, &lock)) return 1" -. auto/feature diff --git a/app/nginx/auto/os/freebsd b/app/nginx/auto/os/freebsd deleted file mode 100644 index 937ca20..0000000 --- a/app/nginx/auto/os/freebsd +++ /dev/null @@ -1,107 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -have=NGX_FREEBSD . auto/have_headers - -CORE_INCS="$UNIX_INCS" -CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" -CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" - -ngx_spacer=' -' - - -# __FreeBSD_version and sysctl kern.osreldate are the best ways -# to determine whether some capability exists and is safe to use. -# __FreeBSD_version is used for the testing of the build environment. -# sysctl kern.osreldate is used for the testing of the kernel capabilities. - -version=`grep "#define __FreeBSD_version" /usr/include/osreldate.h \ - | sed -e 's/^.* \(.*\)$/\1/'` - -osreldate=`/sbin/sysctl -n kern.osreldate` - - -# 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" - NGX_SETPROCTITLE_LIB="-lutil" -fi - -# sendfile - -if [ $osreldate -gt 300007 ]; then - echo " + sendfile() found" - - have=NGX_HAVE_SENDFILE . auto/have - CORE_SRCS="$CORE_SRCS $FREEBSD_SENDFILE_SRCS" -fi - -if [ $NGX_FILE_AIO = YES ]; then - if [ $osreldate -gt 502103 ]; then - echo " + sendfile()'s SF_NODISKIO found" - - have=NGX_HAVE_AIO_SENDFILE . auto/have - fi -fi - -# POSIX semaphores -# http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/127545 - -if [ $osreldate -ge 701106 ]; then - echo " + POSIX semaphores should work" -else - have=NGX_HAVE_POSIX_SEM . auto/nohave -fi - - -# kqueue - -if [ \( $osreldate -lt 500000 -a $osreldate -ge 410000 \) \ - -o $osreldate -ge 500011 ] -then - echo " + kqueue found" - - have=NGX_HAVE_KQUEUE . auto/have - have=NGX_HAVE_CLEAR_EVENT . auto/have - EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE" - CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS" - EVENT_FOUND=YES -fi - - -NGX_KQUEUE_CHECKED=YES - - -# kqueue's NOTE_LOWAT - -if [ \( $version -lt 500000 -a $version -ge 430000 \) \ - -o $version -ge 500018 ] -then - echo " + kqueue's NOTE_LOWAT found" - have=NGX_HAVE_LOWAT_EVENT . auto/have -fi - -# kqueue's EVFILT_TIMER - -if [ \( $version -lt 500000 -a $version -ge 440001 \) \ - -o $version -ge 500023 ] -then - echo " + kqueue's EVFILT_TIMER found" - have=NGX_HAVE_TIMER_EVENT . auto/have -fi - - -# cpuset_setaffinity() - -if [ $version -ge 701000 ]; then - echo " + cpuset_setaffinity() found" - have=NGX_HAVE_CPUSET_SETAFFINITY . auto/have -fi diff --git a/app/nginx/auto/os/linux b/app/nginx/auto/os/linux deleted file mode 100644 index fae8842..0000000 --- a/app/nginx/auto/os/linux +++ /dev/null @@ -1,190 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -have=NGX_LINUX . auto/have_headers - -CORE_INCS="$UNIX_INCS" -CORE_DEPS="$UNIX_DEPS $LINUX_DEPS" -CORE_SRCS="$UNIX_SRCS $LINUX_SRCS" - -ngx_spacer=' -' - -cc_aux_flags="$CC_AUX_FLAGS" -CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" - - -# Linux kernel version - -version=$((`uname -r \ - | sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \ - \1*256*256+\2*256+\3/p' \ - -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`)) - -version=${version:-0} - - -# posix_fadvise64() had been implemented in 2.5.60 - -if [ $version -lt 132412 ]; then - have=NGX_HAVE_POSIX_FADVISE . auto/nohave -fi - -# epoll, EPOLLET version - -ngx_feature="epoll" -ngx_feature_name="NGX_HAVE_EPOLL" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/epoll.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int efd = 0; - struct epoll_event ee; - ee.events = EPOLLIN|EPOLLOUT|EPOLLET; - ee.data.ptr = NULL; - (void) ee; - efd = epoll_create(100); - if (efd == -1) return 1;" -. auto/feature - -if [ $ngx_found = yes ]; then - have=NGX_HAVE_CLEAR_EVENT . auto/have - CORE_SRCS="$CORE_SRCS $EPOLL_SRCS" - EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE" - EVENT_FOUND=YES - - - # EPOLLRDHUP appeared in Linux 2.6.17, glibc 2.8 - - ngx_feature="EPOLLRDHUP" - ngx_feature_name="NGX_HAVE_EPOLLRDHUP" - ngx_feature_run=no - ngx_feature_incs="#include <sys/epoll.h>" - ngx_feature_path= - ngx_feature_libs= - ngx_feature_test="int efd = 0, fd = 0; - struct epoll_event ee; - ee.events = EPOLLIN|EPOLLRDHUP|EPOLLET; - ee.data.ptr = NULL; - epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)" - . auto/feature - - - # EPOLLEXCLUSIVE appeared in Linux 4.5, glibc 2.24 - - ngx_feature="EPOLLEXCLUSIVE" - ngx_feature_name="NGX_HAVE_EPOLLEXCLUSIVE" - ngx_feature_run=no - ngx_feature_incs="#include <sys/epoll.h>" - ngx_feature_path= - ngx_feature_libs= - ngx_feature_test="int efd = 0, fd = 0; - struct epoll_event ee; - ee.events = EPOLLIN|EPOLLEXCLUSIVE; - ee.data.ptr = NULL; - epoll_ctl(efd, EPOLL_CTL_ADD, fd, &ee)" - . auto/feature -fi - - -# O_PATH and AT_EMPTY_PATH were introduced in 2.6.39, glibc 2.14 - -ngx_feature="O_PATH" -ngx_feature_name="NGX_HAVE_O_PATH" -ngx_feature_run=no -ngx_feature_incs="#include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int fd; struct stat sb; - fd = openat(AT_FDCWD, \".\", O_PATH|O_DIRECTORY|O_NOFOLLOW); - if (fstatat(fd, \"\", &sb, AT_EMPTY_PATH) != 0) return 1" -. auto/feature - - -# sendfile() - -CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE" -ngx_feature="sendfile()" -ngx_feature_name="NGX_HAVE_SENDFILE" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/sendfile.h> - #include <errno.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int s = 0, fd = 1; - ssize_t n; off_t off = 0; - n = sendfile(s, fd, &off, 1); - if (n == -1 && errno == ENOSYS) return 1" -. auto/feature - -if [ $ngx_found = yes ]; then - CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS" -fi - - -# sendfile64() - -CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" -ngx_feature="sendfile64()" -ngx_feature_name="NGX_HAVE_SENDFILE64" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/sendfile.h> - #include <errno.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="int s = 0, fd = 1; - ssize_t n; off_t off = 0; - n = sendfile(s, fd, &off, 1); - if (n == -1 && errno == ENOSYS) return 1" -. auto/feature - - -ngx_include="sys/prctl.h"; . auto/include - -# prctl(PR_SET_DUMPABLE) - -ngx_feature="prctl(PR_SET_DUMPABLE)" -ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE" -ngx_feature_run=yes -ngx_feature_incs="#include <sys/prctl.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) return 1" -. auto/feature - - -# sched_setaffinity() - -ngx_feature="sched_setaffinity()" -ngx_feature_name="NGX_HAVE_SCHED_SETAFFINITY" -ngx_feature_run=no -ngx_feature_incs="#include <sched.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="cpu_set_t mask; - CPU_ZERO(&mask); - sched_setaffinity(0, sizeof(cpu_set_t), &mask)" -. auto/feature - - -# crypt_r() - -ngx_feature="crypt_r()" -ngx_feature_name="NGX_HAVE_GNU_CRYPT_R" -ngx_feature_run=no -ngx_feature_incs="#include <crypt.h>" -ngx_feature_path= -ngx_feature_libs=-lcrypt -ngx_feature_test="struct crypt_data cd; - crypt_r(\"key\", \"salt\", &cd);" -. auto/feature - - -ngx_include="sys/vfs.h"; . auto/include - - -CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" diff --git a/app/nginx/auto/os/solaris b/app/nginx/auto/os/solaris deleted file mode 100644 index 1dcfe84..0000000 --- a/app/nginx/auto/os/solaris +++ /dev/null @@ -1,61 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -have=NGX_SOLARIS . auto/have_headers - -CORE_INCS="$UNIX_INCS" -CORE_DEPS="$UNIX_DEPS $SOLARIS_DEPS" -CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS " -CORE_LIBS="$CORE_LIBS -lsocket -lnsl" - -NGX_RPATH=YES - -# Solaris's make does not support a blank line between target and rules -ngx_spacer= - -CC_AUX_FLAGS="$CC_AUX_FLAGS -D_FILE_OFFSET_BITS=64 -lsocket -lnsl" - - -if [ $ZLIB_ASM != NO ]; then - echo "$0: error: the --with-zlib-asm=CPU option is not supported" - echo "on that platform" - echo - - exit 1 -fi - - -ngx_feature="sendfilev()" -ngx_feature_name="NGX_HAVE_SENDFILE" -ngx_feature_run=no -ngx_feature_incs="#include <sys/sendfile.h>" -ngx_feature_path= -ngx_feature_libs="-lsendfile" -ngx_feature_test="int fd = 1; sendfilevec_t vec[1]; - size_t sent; ssize_t n; - n = sendfilev(fd, vec, 1, &sent); - if (n == -1) return 1" -. auto/feature - - -if [ $ngx_found = yes ]; then - CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS" - CORE_LIBS="$CORE_LIBS -lsendfile" -fi - - -ngx_feature="event ports" -ngx_feature_name="NGX_HAVE_EVENTPORT" -ngx_feature_run=no -ngx_feature_incs="#include <port.h>" -ngx_feature_path= -ngx_feature_libs= -ngx_feature_test="(void) port_create()" -. auto/feature - -if [ $ngx_found = yes ]; then - CORE_SRCS="$CORE_SRCS $EVENTPORT_SRCS" - EVENT_MODULES="$EVENT_MODULES $EVENTPORT_MODULE" -fi diff --git a/app/nginx/auto/os/win32 b/app/nginx/auto/os/win32 deleted file mode 100644 index 650cf49..0000000 --- a/app/nginx/auto/os/win32 +++ /dev/null @@ -1,42 +0,0 @@ - -# Copyright (C) Igor Sysoev -# Copyright (C) Nginx, Inc. - - -have=NGX_WIN32 . auto/have_headers - -CORE_INCS="$WIN32_INCS" -CORE_DEPS="$WIN32_DEPS" -CORE_SRCS="$WIN32_SRCS $IOCP_SRCS" -OS_CONFIG="$WIN32_CONFIG" -NGX_ICONS="$NGX_WIN32_ICONS" -SELECT_SRCS=$WIN32_SELECT_SRCS - -ngx_pic_opt= - -case "$NGX_CC_NAME" in - - gcc) - CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32" - MAIN_LINK="$MAIN_LINK -Wl,--export-all-symbols" - MAIN_LINK="$MAIN_LINK -Wl,--out-implib=$NGX_OBJS/libnginx.a" - MODULE_LINK="-shared -L $NGX_OBJS -lnginx" - ;; - - *) - CORE_LIBS="$CORE_LIBS advapi32.lib ws2_32.lib" - ;; - -esac - -EVENT_MODULES="$EVENT_MODULES $IOCP_MODULE" -EVENT_FOUND=YES - -if [ $EVENT_SELECT = NO ]; then - CORE_SRCS="$CORE_SRCS $SELECT_SRCS" - EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE" -fi - -have=NGX_HAVE_INET6 . auto/have - -have=NGX_HAVE_IOCP . auto/have |