view auto/os/features @ 384:09b703ae3ba5 NGINX_0_6_36

nginx 0.6.36 *) Change: now the "Invalid argument" error returned by setsockopt(TCP_NODELAY) on Solaris, is ignored. *) Change: now POSTs without "Content-Length" header line are allowed. *) Feature: the "try_files" directive. *) Feature: the --with-pcre option in the configure. *) Feature: the "if_modified_since" directive. *) Feature: the "$cookie_..." variables. *) Feature: the "$arg_..." variables. *) Bugfix: compatibility with Tru64 UNIX. Thanks to Dustin Marquess. *) Bugfix: a "ssl_engine" directive did not use a SSL-accelerator for asymmetric ciphers. Thanks to Marcin Gozdalik. *) Bugfix: in a redirect rewrite directive original arguments were concatenated with new arguments by a "?" rather than an "&"; the bug had appeared in 0.1.18. Thanks to Maxim Dounin. *) Bugfix: nginx could not be built on AIX. *) Bugfix: a double response might be returned if the epoll or rtsig methods are used and a redirect was returned to a request with body. Thanks to Eden Li. *) Bugfix: a segmentation fault might occur in worker process if "resolver" directive was used in SMTP proxy. *) Bugfix: fastcgi_store stored files not always. *) Bugfix: nginx did not process a FastCGI server response, if the server send too many messages to stderr before response.
author Igor Sysoev <http://sysoev.ru>
date Thu, 02 Apr 2009 00:00:00 +0400
parents 6ae1357b7b7c
children
line wrap: on
line source


# Copyright (C) Igor Sysoev


NGX_USER=${NGX_USER:-nobody}

if [ -z "$NGX_GROUP" ]; then
    if [ $NGX_USER = nobody ]; then
        if grep nobody /etc/group 2>&1 >/dev/null; then
            echo "checking for nobody group ... found"
            NGX_GROUP=nobody
        else
            echo "checking for nobody group ... not found"

            if grep nogroup /etc/group 2>&1 >/dev/null; then
                echo "checking for nogroup group ... found"
                NGX_GROUP=nogroup
            else
                echo "checking for nogroup group ... not found"
                NGX_GROUP=nobody
            fi
        fi
    else
        NGX_GROUP=$NGX_USER
    fi
fi


ngx_feature="poll()"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs="#include <poll.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="int  n, dp; struct pollfd  pl;
                  dp = 0;
                  pl.fd = 0;
                  pl.events = 0;
                  pl.revents = 0;
                  n = poll(&pl, 1, 0)"
. auto/feature

if [ $ngx_found = no ]; then
    EVENT_POLL=NONE
fi


ngx_feature="/dev/poll"
ngx_feature_name="NGX_HAVE_DEVPOLL"
ngx_feature_run=no
ngx_feature_incs="#include <sys/devpoll.h>"
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="int  n, dp; struct dvpoll  dvp;
                  dp = 0;
                  dvp.dp_fds = NULL;
                  dvp.dp_nfds = 0;
                  dvp.dp_timeout = 0;
                  n = ioctl(dp, DP_POLL, &dvp)"
. auto/feature

if [ $ngx_found = yes ]; then
    CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS"
    EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE"
    EVENT_FOUND=YES
fi


if test -z "$NGX_KQUEUE_CHECKED"; then
    ngx_feature="kqueue"
    ngx_feature_name="NGX_HAVE_KQUEUE"
    ngx_feature_run=no
    ngx_feature_incs="#include <sys/event.h>"
    ngx_feature_path=
    ngx_feature_libs=
    ngx_feature_test="int kq; kq = kqueue()"
    . auto/feature

    if [ $ngx_found = yes ]; then

        have=NGX_HAVE_CLEAR_EVENT . auto/have
        EVENT_MODULES="$EVENT_MODULES $KQUEUE_MODULE"
        CORE_SRCS="$CORE_SRCS $KQUEUE_SRCS"
        EVENT_FOUND=YES

        ngx_feature="kqueue's NOTE_LOWAT"
        ngx_feature_name="NGX_HAVE_LOWAT_EVENT"
        ngx_feature_run=no
        ngx_feature_incs="#include <sys/event.h>"
        ngx_feature_path=
        ngx_feature_libs=
        ngx_feature_test="struct kevent  kev;
                          kev.fflags = NOTE_LOWAT;"
        . auto/feature


        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


        if [ "$NGX_SYSTEM" = "Darwin" ]; then

            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
        fi
    fi
fi


if [ "$NGX_SYSTEM" = "NetBSD" ]; then

    # NetBSD 2.0 incompatibly defines kevent.udata as "intptr_t"

    cat << END >> $NGX_AUTO_CONFIG_H

#define NGX_KQUEUE_UDATA_T

END

else
    cat << END >> $NGX_AUTO_CONFIG_H

#define NGX_KQUEUE_UDATA_T  (void *)

END

fi


ngx_feature="crypt()"
ngx_feature_name=
ngx_feature_run=no
ngx_feature_incs=
ngx_feature_path=
ngx_feature_libs=
ngx_feature_test="crypt(\"test\", \"salt\");"
. auto/feature


if [ $ngx_found = no ]; then

    ngx_feature="crypt() in libcrypt"
    ngx_feature_name=
    ngx_feature_run=no
    ngx_feature_incs=
    ngx_feature_path=
    ngx_feature_libs=-lcrypt
    . auto/feature

    if [ $ngx_found = yes ]; then
        CRYPT_LIB="-lcrypt"
    fi
fi