Annotation of embedaddon/nginx/auto/os/linux, revision 1.1

1.1     ! misho       1: 
        !             2: # Copyright (C) Igor Sysoev
        !             3: # Copyright (C) Nginx, Inc.
        !             4: 
        !             5: 
        !             6: have=NGX_LINUX . auto/have_headers
        !             7: 
        !             8: CORE_INCS="$UNIX_INCS"
        !             9: CORE_DEPS="$UNIX_DEPS $LINUX_DEPS"
        !            10: CORE_SRCS="$UNIX_SRCS $LINUX_SRCS"
        !            11: 
        !            12: ngx_spacer='
        !            13: '
        !            14: 
        !            15: cc_aux_flags="$CC_AUX_FLAGS"
        !            16: CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
        !            17: 
        !            18: 
        !            19: # Linux kernel version
        !            20: 
        !            21: version=$((`uname -r \
        !            22:     | sed -n -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/ \
        !            23:                                                  \1*256*256+\2*256+\3/p' \
        !            24:              -e 's/^\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1*256*256+\2*256/p'`))
        !            25: 
        !            26: version=${version:-0}
        !            27: 
        !            28: 
        !            29: # enable the rt signals on Linux between 2.2.19 and 2.6.17
        !            30: 
        !            31: if [ \( $version -ge 131603 -a $version -lt 132626 \) -o $EVENT_RTSIG = YES ]
        !            32: then
        !            33:     echo " + rt signals found"
        !            34:     have=NGX_HAVE_RTSIG . auto/have
        !            35:     EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
        !            36:     CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
        !            37:     EVENT_FOUND=YES
        !            38: fi
        !            39: 
        !            40: 
        !            41: # posix_fadvise64() had been implemented in 2.5.60
        !            42: 
        !            43: if [ $version -lt 132412 ]; then
        !            44:     have=NGX_HAVE_POSIX_FADVISE . auto/nohave
        !            45: fi
        !            46: 
        !            47: # epoll, EPOLLET version
        !            48: 
        !            49: ngx_feature="epoll"
        !            50: ngx_feature_name="NGX_HAVE_EPOLL"
        !            51: ngx_feature_run=yes
        !            52: ngx_feature_incs="#include <sys/epoll.h>"
        !            53: ngx_feature_path=
        !            54: ngx_feature_libs=
        !            55: ngx_feature_test="int efd = 0;
        !            56:                   struct epoll_event ee;
        !            57:                   ee.events = EPOLLIN|EPOLLOUT|EPOLLET;
        !            58:                   ee.data.ptr = NULL;
        !            59:                   efd = epoll_create(100);
        !            60:                   if (efd == -1) return 1;"
        !            61: . auto/feature
        !            62: 
        !            63: if [ $ngx_found = yes ]; then
        !            64:     have=NGX_HAVE_CLEAR_EVENT . auto/have
        !            65:     CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
        !            66:     EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
        !            67:     EVENT_FOUND=YES
        !            68: fi
        !            69: 
        !            70: 
        !            71: # sendfile()
        !            72: 
        !            73: CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE"
        !            74: ngx_feature="sendfile()"
        !            75: ngx_feature_name="NGX_HAVE_SENDFILE"
        !            76: ngx_feature_run=yes
        !            77: ngx_feature_incs="#include <sys/sendfile.h>
        !            78:                   #include <errno.h>"
        !            79: ngx_feature_path=
        !            80: ngx_feature_libs=
        !            81: ngx_feature_test="int s = 0, fd = 1;
        !            82:                   ssize_t n; off_t off = 0;
        !            83:                   n = sendfile(s, fd, &off, 1);
        !            84:                   if (n == -1 && errno == ENOSYS) return 1"
        !            85: . auto/feature
        !            86: 
        !            87: if [ $ngx_found = yes ]; then
        !            88:     CORE_SRCS="$CORE_SRCS $LINUX_SENDFILE_SRCS"
        !            89: fi
        !            90: 
        !            91: 
        !            92: # sendfile64()
        !            93: 
        !            94: CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"
        !            95: ngx_feature="sendfile64()"
        !            96: ngx_feature_name="NGX_HAVE_SENDFILE64"
        !            97: ngx_feature_run=yes
        !            98: ngx_feature_incs="#include <sys/sendfile.h>
        !            99:                   #include <errno.h>"
        !           100: ngx_feature_path=
        !           101: ngx_feature_libs=
        !           102: ngx_feature_test="int s = 0, fd = 1;
        !           103:                   ssize_t n; off_t off = 0;
        !           104:                   n = sendfile(s, fd, &off, 1);
        !           105:                   if (n == -1 && errno == ENOSYS) return 1"
        !           106: . auto/feature
        !           107: 
        !           108: 
        !           109: ngx_include="sys/prctl.h"; . auto/include
        !           110: 
        !           111: # prctl(PR_SET_DUMPABLE)
        !           112: 
        !           113: ngx_feature="prctl(PR_SET_DUMPABLE)"
        !           114: ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE"
        !           115: ngx_feature_run=yes
        !           116: ngx_feature_incs="#include <sys/prctl.h>"
        !           117: ngx_feature_path=
        !           118: ngx_feature_libs=
        !           119: ngx_feature_test="if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) == -1) return 1"
        !           120: . auto/feature
        !           121: 
        !           122: 
        !           123: # sched_setaffinity()
        !           124: 
        !           125: ngx_feature="sched_setaffinity()"
        !           126: ngx_feature_name="NGX_HAVE_SCHED_SETAFFINITY"
        !           127: ngx_feature_run=no
        !           128: ngx_feature_incs="#include <sched.h>"
        !           129: ngx_feature_path=
        !           130: ngx_feature_libs=
        !           131: ngx_feature_test="cpu_set_t mask;
        !           132:                   CPU_ZERO(&mask);
        !           133:                   sched_setaffinity(0, sizeof(cpu_set_t), &mask)"
        !           134: . auto/feature
        !           135: 
        !           136: 
        !           137: # crypt_r()
        !           138: 
        !           139: ngx_feature="crypt_r()"
        !           140: ngx_feature_name="NGX_HAVE_GNU_CRYPT_R"
        !           141: ngx_feature_run=no
        !           142: ngx_feature_incs="#include <crypt.h>"
        !           143: ngx_feature_path=
        !           144: ngx_feature_libs=-lcrypt
        !           145: ngx_feature_test="struct crypt_data  cd;
        !           146:                   crypt_r(\"key\", \"salt\", &cd);"
        !           147: . auto/feature
        !           148: 
        !           149: 
        !           150: ngx_include="sys/vfs.h";     . auto/include
        !           151: 
        !           152: 
        !           153: CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>