
# Copyright (C) Igor Sysoev


if test -z "$NGX_PLATFORM"; then
    echo "checking for OS"

    NGX_SYSTEM=`uname -s 2>/dev/null`
    NGX_RELEASE=`uname -r 2>/dev/null`
    NGX_MACHINE=`uname -m 2>/dev/null`

    echo " + $NGX_SYSTEM $NGX_RELEASE $NGX_MACHINE"

    NGX_PLATFORM="$NGX_SYSTEM:$NGX_RELEASE:$NGX_MACHINE";

else
    echo "building for $NGX_PLATFORM"
fi

case "$NGX_PLATFORM" in

    FreeBSD:* | DragonFly:*)
        . auto/os/freebsd
    ;;

    Linux:*)
        . auto/os/linux
    ;;

    SunOS:*)
        . auto/os/solaris
    ;;

    win32)
        . auto/os/win32
    ;;

    *)
        CORE_INCS="$UNIX_INCS"
        CORE_DEPS="$UNIX_DEPS $POSIX_DEPS"
        CORE_SRCS="$UNIX_SRCS"
        CRYPT_LIB="-lcrypt"
    ;;

esac


case "$NGX_MACHINE" in

     i386|i686|i86pc|amd64)
         have=NGX_HAVE_NONALIGNED . auto/have
     ;;

esac


if [ "$NGX_PLATFORM" != win32 ]; then

     NGX_USER=${NGX_USER:-nobody}

    if [ -z "$NGX_GROUP" -a $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


    ngx_feature="poll()"
    ngx_feature_name=
    ngx_feature_run=no
    ngx_feature_incs="#include <poll.h>"
    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_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_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_libs=
            ngx_feature_test="struct kevent  kev;
                              kev.fflags = NOTE_LOWAT;"
            . auto/feature
        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
fi
