mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
remove needless source tree
This commit is contained in:
parent
ae4497bf5d
commit
c65b9ee740
301 changed files with 0 additions and 146504 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2002-2014 Igor Sysoev
|
||||
* Copyright (C) 2011-2014 Nginx, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
Documentation is available at http://nginx.org
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# aCC: HP ANSI C++ B3910B A.03.55.02
|
||||
|
||||
# C89 mode
|
||||
|
||||
CFLAGS="$CFLAGS -Ae"
|
||||
CC_TEST_FLAGS="-Ae"
|
||||
|
||||
PCRE_OPT="$PCRE_OPT -Ae"
|
||||
ZLIB_OPT="$ZLIB_OPT -Ae"
|
||||
MD5_OPT="$MD5_OPT -Ae"
|
|
@ -1,72 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Borland C++ 5.5
|
||||
|
||||
# optimizations
|
||||
|
||||
# maximize speed
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-5"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-6"
|
||||
;;
|
||||
esac
|
||||
|
||||
# __stdcall
|
||||
#CPU_OPT="$CPU_OPT -ps"
|
||||
# __fastcall
|
||||
#CPU_OPT="$CPU_OPT -pr"
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
# multithreaded
|
||||
CFLAGS="$CFLAGS -tWM"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -w!"
|
||||
|
||||
# disable logo
|
||||
CFLAGS="$CFLAGS -q"
|
||||
|
||||
|
||||
# precompiled headers
|
||||
CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.csm"
|
||||
NGX_PCH="$NGX_OBJS/ngx_config.csm"
|
||||
NGX_BUILD_PCH="-H=$NGX_OBJS/ngx_config.csm"
|
||||
NGX_USE_PCH="-Hu -H=$NGX_OBJS/ngx_config.csm"
|
||||
|
||||
|
||||
# Win32 GUI mode application
|
||||
#LINK="\$(CC) -laa"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RES="$NGX_OBJS/nginx.res"
|
||||
NGX_RCC="brcc32 -fo$NGX_OBJS/nginx.res \$(CORE_INCS) $NGX_WIN32_RC"
|
||||
# the pragma allows to link the resource file using bcc32 and
|
||||
# to avoid the direct ilink32 calling and the c0w32.obj's WinMain/main problem
|
||||
NGX_PRAGMA="#pragma resource \"$NGX_OBJS/nginx.res\""
|
||||
|
||||
|
||||
ngx_include_opt="-I"
|
||||
ngx_objout="-o"
|
||||
ngx_binout="-e"
|
||||
ngx_objext="obj"
|
||||
ngx_binext=".exe"
|
||||
|
||||
ngx_long_start='@&&|
|
||||
'
|
||||
ngx_long_end='|'
|
||||
|
||||
ngx_regex_dirsep='\\'
|
||||
ngx_dirsep="\\"
|
|
@ -1,46 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Compaq C V6.5-207
|
||||
|
||||
ngx_include_opt="-I"
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS -msg_enable level6 -msg_fatal level6"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable unknownmacro"
|
||||
CFLAGS="$CFLAGS -msg_disable unusedincl"
|
||||
CFLAGS="$CFLAGS -msg_disable unnecincl"
|
||||
CFLAGS="$CFLAGS -msg_disable nestincl"
|
||||
CFLAGS="$CFLAGS -msg_disable strctpadding"
|
||||
CFLAGS="$CFLAGS -msg_disable ansialiascast"
|
||||
CFLAGS="$CFLAGS -msg_disable inlinestoclsmod"
|
||||
CFLAGS="$CFLAGS -msg_disable cxxkeyword"
|
||||
CFLAGS="$CFLAGS -msg_disable longlongsufx"
|
||||
CFLAGS="$CFLAGS -msg_disable valuepres"
|
||||
|
||||
# STUB
|
||||
CFLAGS="$CFLAGS -msg_disable truncintcast"
|
||||
CFLAGS="$CFLAGS -msg_disable trunclongcast"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable truncintasn"
|
||||
CFLAGS="$CFLAGS -msg_disable trunclongint"
|
||||
CFLAGS="$CFLAGS -msg_disable intconcastsgn"
|
||||
CFLAGS="$CFLAGS -msg_disable intconstsign"
|
||||
CFLAGS="$CFLAGS -msg_disable switchlong"
|
||||
CFLAGS="$CFLAGS -msg_disable subscrbounds2"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable hexoctunsign"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable ignorecallval"
|
||||
CFLAGS="$CFLAGS -msg_disable nonstandcast"
|
||||
CFLAGS="$CFLAGS -msg_disable embedcomment"
|
||||
CFLAGS="$CFLAGS -msg_disable unreachcode"
|
||||
CFLAGS="$CFLAGS -msg_disable questcompare2"
|
||||
CFLAGS="$CFLAGS -msg_disable unusedtop"
|
||||
CFLAGS="$CFLAGS -msg_disable unrefdecl"
|
||||
|
||||
CFLAGS="$CFLAGS -msg_disable bitnotint"
|
|
@ -1,104 +0,0 @@
|
|||
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# clang
|
||||
|
||||
|
||||
NGX_CLANG_VER=`$CC -v 2>&1 | grep '\(clang\|LLVM\) version' 2>&1 \
|
||||
| sed -e 's/^.* version \(.*\)/\1/'`
|
||||
|
||||
echo " + clang version: $NGX_CLANG_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"clang $NGX_CLANG_VER\"" . auto/define
|
||||
|
||||
|
||||
CC_TEST_FLAGS="-pipe"
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
#NGX_CLANG_OPT="-O2"
|
||||
#NGX_CLANG_OPT="-Oz"
|
||||
NGX_CLANG_OPT="-O"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium
|
||||
CPU_OPT="-march=pentium"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentiumpro | pentium3)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-march=pentiumpro"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4
|
||||
CPU_OPT="-march=pentium4"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
athlon)
|
||||
# optimize for Athlon
|
||||
CPU_OPT="-march=athlon"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron
|
||||
CPU_OPT="-march=opteron"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $CPU_OPT"
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS -pipe $CPU_OPT"
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="-O2 -pipe $CPU_OPT"
|
||||
else
|
||||
PCRE_OPT="$PCRE_OPT -pipe"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="-O2 -pipe $CPU_OPT"
|
||||
else
|
||||
MD5_OPT="$MD5_OPT -pipe"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O2 -pipe $CPU_OPT"
|
||||
else
|
||||
ZLIB_OPT="$ZLIB_OPT -pipe"
|
||||
fi
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS $NGX_CLANG_OPT -Wall -Wextra -Wpointer-arith"
|
||||
CFLAGS="$CFLAGS -Wconditional-uninitialized"
|
||||
#CFLAGS="$CFLAGS -Wmissing-prototypes"
|
||||
|
||||
# we have a lot of unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
|
||||
# deprecated system OpenSSL library on OS X
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
|
||||
fi
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
if [ ".$CPP" = "." ]; then
|
||||
CPP="$CC -E"
|
||||
fi
|
|
@ -1,218 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
LINK="\$(CC)"
|
||||
|
||||
ngx_include_opt="-I "
|
||||
ngx_compile_opt="-c"
|
||||
ngx_objout="-o "
|
||||
ngx_binout="-o "
|
||||
ngx_objext="o"
|
||||
ngx_binext=
|
||||
|
||||
ngx_long_start=
|
||||
ngx_long_end=
|
||||
|
||||
ngx_regex_dirsep="\/"
|
||||
ngx_dirsep='/'
|
||||
|
||||
ngx_regex_cont=' \\\
|
||||
'
|
||||
ngx_cont=' \
|
||||
'
|
||||
ngx_tab=' \
|
||||
'
|
||||
ngx_spacer=
|
||||
|
||||
ngx_long_regex_cont=$ngx_regex_cont
|
||||
ngx_long_cont=$ngx_cont
|
||||
|
||||
. auto/cc/name
|
||||
|
||||
if test -n "$CFLAGS"; then
|
||||
|
||||
CC_TEST_FLAGS="$CFLAGS $NGX_CC_OPT"
|
||||
|
||||
case $NGX_CC_NAME in
|
||||
|
||||
ccc)
|
||||
# Compaq C V6.5-207
|
||||
|
||||
ngx_include_opt="-I"
|
||||
;;
|
||||
|
||||
sunc)
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
i86pc)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
|
||||
;;
|
||||
|
||||
sun4u | sun4v)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
case $CPU in
|
||||
|
||||
amd64)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
case $NGX_CC_NAME in
|
||||
gcc)
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
|
||||
# 4.0.0, 4.0.1, 4.1.0
|
||||
|
||||
. auto/cc/gcc
|
||||
;;
|
||||
|
||||
clang)
|
||||
# Clang C compiler
|
||||
|
||||
. auto/cc/clang
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel C++ compiler 7.1, 8.0, 8.1
|
||||
|
||||
. auto/cc/icc
|
||||
;;
|
||||
|
||||
sunc)
|
||||
# Sun C 5.7 Patch 117837-04 2005/05/11
|
||||
|
||||
. auto/cc/sunc
|
||||
;;
|
||||
|
||||
ccc)
|
||||
# Compaq C V6.5-207
|
||||
|
||||
. auto/cc/ccc
|
||||
;;
|
||||
|
||||
acc)
|
||||
# aCC: HP ANSI C++ B3910B A.03.55.02
|
||||
|
||||
. auto/cc/acc
|
||||
;;
|
||||
|
||||
msvc*)
|
||||
# MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
|
||||
|
||||
. auto/cc/msvc
|
||||
;;
|
||||
|
||||
owc)
|
||||
# Open Watcom C 1.0, 1.2
|
||||
|
||||
. auto/cc/owc
|
||||
;;
|
||||
|
||||
bcc)
|
||||
# Borland C++ 5.5
|
||||
|
||||
. auto/cc/bcc
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CC_TEST_FLAGS="$CC_TEST_FLAGS $NGX_CC_OPT"
|
||||
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $NGX_CC_OPT"
|
||||
NGX_TEST_LD_OPT="$NGX_LD_OPT"
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
if test -n "$NGX_LD_OPT"; then
|
||||
ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="gcc builtin atomic operations"
|
||||
ngx_feature_name=NGX_HAVE_GCC_ATOMIC
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="long n = 0;
|
||||
if (!__sync_bool_compare_and_swap(&n, 0, 1))
|
||||
return 1;
|
||||
if (__sync_fetch_and_add(&n, 1) != 1)
|
||||
return 1;
|
||||
if (n != 2)
|
||||
return 1;
|
||||
__sync_synchronize();"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ "$NGX_CC_NAME" = "ccc" ]; then
|
||||
echo "checking for C99 variadic macros ... disabled"
|
||||
else
|
||||
ngx_feature="C99 variadic macros"
|
||||
ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#define var(dummy, ...) sprintf(__VA_ARGS__)"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[30]; buf[0] = '0';
|
||||
var(0, buf, \"%d\", 1);
|
||||
if (buf[0] != '1') return 1"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="gcc variadic macros"
|
||||
ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#define var(dummy, args...) sprintf(args)"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[30]; buf[0] = '0';
|
||||
var(0, buf, \"%d\", 1);
|
||||
if (buf[0] != '1') return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
# ngx_feature="inline"
|
||||
# ngx_feature_name=
|
||||
# ngx_feature_run=no
|
||||
# ngx_feature_incs="int inline f(void) { return 1 }"
|
||||
# ngx_feature_path=
|
||||
# ngx_feature_libs=
|
||||
# ngx_feature_test=
|
||||
# . auto/feature
|
||||
#
|
||||
# if [ $ngx_found = yes ]; then
|
||||
# fi
|
||||
|
||||
fi
|
|
@ -1,186 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
|
||||
# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
|
||||
# 4.0.0, 4.0.1, 4.1.0
|
||||
|
||||
|
||||
NGX_GCC_VER=`$CC -v 2>&1 | grep 'gcc version' 2>&1 \
|
||||
| sed -e 's/^.* version \(.*\)/\1/'`
|
||||
|
||||
echo " + gcc version: $NGX_GCC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"gcc $NGX_GCC_VER\"" . auto/define
|
||||
|
||||
|
||||
# Solaris 7's /usr/ccs/bin/as does not support "-pipe"
|
||||
|
||||
CC_TEST_FLAGS="-pipe"
|
||||
|
||||
ngx_feature="gcc -pipe switch"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
CC_TEST_FLAGS=
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
PIPE="-pipe"
|
||||
fi
|
||||
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
sun4u | sun4v | sparc | sparc64 )
|
||||
# "-mcpu=v9" enables the "casa" assembler instruction
|
||||
CFLAGS="$CFLAGS -mcpu=v9"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
#NGX_GCC_OPT="-O2"
|
||||
#NGX_GCC_OPT="-Os"
|
||||
NGX_GCC_OPT="-O"
|
||||
|
||||
#CFLAGS="$CFLAGS -fomit-frame-pointer"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-march=pentium"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentiumpro | pentium3)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-march=pentiumpro"
|
||||
NGX_CPU_CACHE_LINE=32
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4, gcc 3.x
|
||||
CPU_OPT="-march=pentium4"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
athlon)
|
||||
# optimize for Athlon, gcc 3.x
|
||||
CPU_OPT="-march=athlon"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron, gcc 3.x
|
||||
CPU_OPT="-march=opteron"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc32)
|
||||
# build 32-bit UltraSparc binary
|
||||
CPU_OPT="-m32"
|
||||
CORE_LINK="$CORE_LINK -m32"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc64)
|
||||
# build 64-bit UltraSparc binary
|
||||
CPU_OPT="-m64"
|
||||
CORE_LINK="$CORE_LINK -m64"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
ppc64)
|
||||
# build 64-bit PowerPC binary
|
||||
CPU_OPT="-m64"
|
||||
CPU_OPT="$CPU_OPT -falign-functions=32 -falign-labels=32"
|
||||
CPU_OPT="$CPU_OPT -falign-loops=32 -falign-jumps=32"
|
||||
CORE_LINK="$CORE_LINK -m64"
|
||||
NGX_CPU_CACHE_LINE=128
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $CPU_OPT"
|
||||
|
||||
case "$NGX_GCC_VER" in
|
||||
2.7*)
|
||||
# batch build
|
||||
CPU_OPT=
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $PIPE $CPU_OPT"
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
||||
else
|
||||
PCRE_OPT="$PCRE_OPT $PIPE"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
||||
else
|
||||
MD5_OPT="$MD5_OPT $PIPE"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O2 -fomit-frame-pointer $PIPE $CPU_OPT"
|
||||
else
|
||||
ZLIB_OPT="$ZLIB_OPT $PIPE"
|
||||
fi
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
# -W requires at least -O
|
||||
CFLAGS="$CFLAGS ${NGX_GCC_OPT:--O} -W"
|
||||
|
||||
CFLAGS="$CFLAGS -Wall -Wpointer-arith"
|
||||
#CFLAGS="$CFLAGS -Wconversion"
|
||||
#CFLAGS="$CFLAGS -Winline"
|
||||
#CFLAGS="$CFLAGS -Wmissing-prototypes"
|
||||
|
||||
|
||||
case "$NGX_GCC_VER" in
|
||||
3.* | 4.* )
|
||||
# we have a lot of the unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused-parameter"
|
||||
# 4.2.1 shows the warning in wrong places
|
||||
#CFLAGS="$CFLAGS -Wunreachable-code"
|
||||
|
||||
# deprecated system OpenSSL library on OS X
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
CFLAGS="$CFLAGS -Wno-deprecated-declarations"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
# we have a lot of the unused function arguments
|
||||
CFLAGS="$CFLAGS -Wno-unused"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
||||
|
||||
# DragonFly's gcc3 generates DWARF
|
||||
#CFLAGS="$CFLAGS -g -gstabs"
|
||||
|
||||
if [ ".$CPP" = "." ]; then
|
||||
CPP="$CC -E"
|
||||
fi
|
|
@ -1,121 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Intel C++ compiler 7.1, 8.0, 8.1, 9.0, 11.1
|
||||
|
||||
NGX_ICC_VER=`$CC -V 2>&1 | grep 'Version' 2>&1 \
|
||||
| sed -e 's/^.* Version \([^ ]*\) *Build.*$/\1/'`
|
||||
|
||||
echo " + icc version: $NGX_ICC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"Intel C Compiler $NGX_ICC_VER\"" . auto/define
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
CFLAGS="$CFLAGS -O"
|
||||
|
||||
CORE_LINK="$CORE_LINK -opt_report_file=$NGX_OBJS/opt_report_file"
|
||||
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-march=pentium"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-mcpu=pentiumpro -march=pentiumpro"
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4, default
|
||||
CPU_OPT="-march=pentium4"
|
||||
;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="-O $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="-O $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="-O $CPU_OPT"
|
||||
fi
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS -w2"
|
||||
|
||||
# disable some warnings
|
||||
|
||||
# invalid type conversion: "int" to "char *"
|
||||
CFLAGS="$CFLAGS -wd171"
|
||||
# argument is incompatible with corresponding format string conversion
|
||||
CFLAGS="$CFLAGS -wd181"
|
||||
# zero used for undefined preprocessing identifier
|
||||
CFLAGS="$CFLAGS -wd193"
|
||||
# the format string ends before this argument
|
||||
CFLAGS="$CFLAGS -wd268"
|
||||
# invalid format string conversion
|
||||
CFLAGS="$CFLAGS -wd269"
|
||||
# conversion from "long long" to "size_t" may lose significant bits
|
||||
CFLAGS="$CFLAGS -wd810"
|
||||
# parameter was never referenced
|
||||
CFLAGS="$CFLAGS -wd869"
|
||||
# attribute "unused" is only allowed in a function definition, warning on pTHX_
|
||||
CFLAGS="$CFLAGS -wd1301"
|
||||
|
||||
# STUB
|
||||
# enumerated type mixed with another type
|
||||
CFLAGS="$CFLAGS -wd188"
|
||||
# controlling expression is constant
|
||||
CFLAGS="$CFLAGS -wd279"
|
||||
# operands are evaluated in unspecified order
|
||||
CFLAGS="$CFLAGS -wd981"
|
||||
# external definition with no prior declaration
|
||||
CFLAGS="$CFLAGS -wd1418"
|
||||
# external declaration in primary source file
|
||||
CFLAGS="$CFLAGS -wd1419"
|
||||
|
||||
case "$NGX_ICC_VER" in
|
||||
9.*)
|
||||
# "cc" clobber ignored, warnings for Liunx's htonl()/htons()
|
||||
CFLAGS="$CFLAGS -wd1469"
|
||||
# explicit conversion of a 64-bit integral type to a smaller
|
||||
# integral type
|
||||
CFLAGS="$CFLAGS -wd1683"
|
||||
# conversion from pointer to same-sized integral type,
|
||||
# warning on offsetof()
|
||||
CFLAGS="$CFLAGS -wd1684"
|
||||
# floating-point equality and inequality comparisons are unreliable,
|
||||
# warning on SvTRUE()
|
||||
CFLAGS="$CFLAGS -wd1572"
|
||||
;;
|
||||
|
||||
8.*)
|
||||
# "cc" clobber ignored, warnings for Liunx's htonl()/htons()
|
||||
CFLAGS="$CFLAGS -wd1469"
|
||||
# floating-point equality and inequality comparisons are unreliable,
|
||||
# warning on SvTRUE()
|
||||
CFLAGS="$CFLAGS -wd1572"
|
||||
;;
|
||||
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
|
@ -1,136 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# MSVC 6.0 SP2
|
||||
# MSVC Toolkit 2003 (7.1)
|
||||
# MSVC 2005 Express Edition SP1 (8.0)
|
||||
|
||||
# optimizations
|
||||
|
||||
# maximize speed, equivalent to -Og -Oi -Ot -Oy -Ob2 -Gs -GF -Gy
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
|
||||
# enable global optimization
|
||||
#CFLAGS="$CFLAGS -Og"
|
||||
# enable intrinsic functions
|
||||
#CFLAGS="$CFLAGS -Oi"
|
||||
|
||||
# disable inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob0"
|
||||
# explicit inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob1"
|
||||
# explicit and implicit inline expansion
|
||||
#CFLAGS="$CFLAGS -Ob2"
|
||||
|
||||
# enable frame pointer omission
|
||||
#CFLAGS="$CFLAGS -Oy"
|
||||
# disable stack checking calls
|
||||
#CFLAGS="$CFLAGS -Gs"
|
||||
|
||||
# pools strings as read/write
|
||||
#CFLAGS="$CFLAGS -Gf"
|
||||
# pools strings as read-only
|
||||
#CFLAGS="$CFLAGS -GF"
|
||||
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-G5"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
CPU_OPT="-G6"
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4, MSVC 7
|
||||
CPU_OPT="-G7"
|
||||
;;
|
||||
esac
|
||||
|
||||
# __cdecl, default, must be used with OpenSSL, md5 asm, and sha1 asm
|
||||
#CPU_OPT="$CPU_OPT -Gd"
|
||||
# __stdcall
|
||||
#CPU_OPT="$CPU_OPT -Gz"
|
||||
# __fastcall
|
||||
#CPU_OPT="$CPU_OPT -Gr"
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
CFLAGS="$CFLAGS -W4"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -WX"
|
||||
|
||||
# disable logo
|
||||
CFLAGS="$CFLAGS -nologo"
|
||||
|
||||
# the link flags
|
||||
CORE_LINK="$CORE_LINK -link -verbose:lib"
|
||||
|
||||
# link with libcmt.lib, multithreaded
|
||||
LIBC="-MT"
|
||||
# link with msvcrt.dll
|
||||
# however, MSVC Toolkit 2003 has no MSVCRT.LIB
|
||||
#LIBC="-MD"
|
||||
|
||||
CFLAGS="$CFLAGS $LIBC"
|
||||
|
||||
CORE_LIBS="$CORE_LIBS kernel32.lib user32.lib"
|
||||
|
||||
# Win32 GUI mode application
|
||||
#CORE_LINK="$CORE_LINK -subsystem:windows -entry:mainCRTStartup"
|
||||
|
||||
# debug
|
||||
# msvc8 under Wine issues
|
||||
# Program database manager mismatch; please check your installation
|
||||
if [ $NGX_CC_NAME != msvc8 ]; then
|
||||
CFLAGS="$CFLAGS -Zi"
|
||||
CORE_LINK="$CORE_LINK -debug"
|
||||
fi
|
||||
|
||||
|
||||
# MSVC 2005 supports C99 variadic macros
|
||||
if [ $NGX_CC_NAME = msvc8 ]; then
|
||||
have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
|
||||
fi
|
||||
|
||||
|
||||
# precompiled headers
|
||||
CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
|
||||
CORE_LINK="$CORE_LINK $NGX_OBJS/ngx_pch.obj"
|
||||
NGX_PCH="$NGX_OBJS/ngx_config.pch"
|
||||
NGX_BUILD_PCH="-Ycngx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
||||
NGX_USE_PCH="-Yungx_config.h -Fp$NGX_OBJS/ngx_config.pch"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RES="$NGX_OBJS/nginx.res"
|
||||
NGX_RCC="rc -fo$NGX_RES \$(CORE_INCS) $NGX_WIN32_RC"
|
||||
CORE_LINK="$NGX_RES $CORE_LINK"
|
||||
|
||||
|
||||
ngx_objout="-Fo"
|
||||
ngx_binout="-Fe"
|
||||
ngx_objext="obj"
|
||||
ngx_binext=".exe"
|
||||
|
||||
ngx_long_start='@<<
|
||||
'
|
||||
ngx_long_end='<<'
|
||||
ngx_long_regex_cont=' \
|
||||
'
|
||||
ngx_long_cont='
|
||||
'
|
||||
|
||||
# MSVC understand / in path
|
||||
#ngx_regex_dirsep='\\'
|
||||
#ngx_dirsep="\\"
|
|
@ -1,89 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
ngx_feature="C compiler"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test=
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo
|
||||
echo $0: error: C compiler $CC is not found
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
if [ "$CC" = cl ]; then
|
||||
if `$NGX_WINE $CC -v 2>&1 \
|
||||
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16' \
|
||||
>/dev/null 2>&1`; then
|
||||
|
||||
NGX_CC_NAME=msvc10
|
||||
echo " + using Microsoft Visual C++ 10 compiler"
|
||||
|
||||
elif `$NGX_WINE $CC -v 2>&1 \
|
||||
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14' \
|
||||
>/dev/null 2>&1`; then
|
||||
|
||||
NGX_CC_NAME=msvc8
|
||||
echo " + using Microsoft Visual C++ 8 compiler"
|
||||
|
||||
elif `$NGX_WINE $CC -v 2>&1 \
|
||||
| grep '^Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 13' \
|
||||
>/dev/null 2>&1`; then
|
||||
|
||||
NGX_CC_NAME=msvc7
|
||||
echo " + using Microsoft Visual C++ 7 compiler"
|
||||
|
||||
else
|
||||
NGX_CC_NAME=msvc
|
||||
echo " + using Microsoft Visual C++ compiler"
|
||||
fi
|
||||
|
||||
elif [ "$CC" = wcl386 ]; then
|
||||
NGX_CC_NAME=owc
|
||||
echo " + using Open Watcom C compiler"
|
||||
|
||||
elif [ "$CC" = bcc32 ]; then
|
||||
NGX_CC_NAME=bcc
|
||||
echo " + using Borland C++ compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^Intel(R) C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=icc
|
||||
echo " + using Intel C++ compiler"
|
||||
|
||||
elif `$CC -v 2>&1 | grep 'gcc version' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=gcc
|
||||
echo " + using GNU C compiler"
|
||||
|
||||
elif `$CC -v 2>&1 | grep '\(clang\|LLVM\) version' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=clang
|
||||
echo " + using Clang C compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep 'Sun C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=sunc
|
||||
echo " + using Sun C compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^Compaq C' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=ccc
|
||||
echo " + using Compaq C compiler"
|
||||
|
||||
elif `$CC -V 2>&1 | grep '^aCC: ' >/dev/null 2>&1`; then
|
||||
NGX_CC_NAME=acc
|
||||
echo " + using HP aC++ compiler"
|
||||
|
||||
else
|
||||
NGX_CC_NAME=unknown
|
||||
|
||||
fi
|
|
@ -1,104 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Open Watcom C 1.0, 1.2, 1.3
|
||||
|
||||
# optimizations
|
||||
|
||||
# maximize speed
|
||||
CFLAGS="$CFLAGS -ot"
|
||||
# reorder instructions for best pipeline usage
|
||||
CFLAGS="$CFLAGS -op"
|
||||
# inline intrinsic functions
|
||||
CFLAGS="$CFLAGS -oi"
|
||||
# inline expansion
|
||||
CFLAGS="$CFLAGS -oe"
|
||||
# disable stack checking calls
|
||||
CFLAGS="$CFLAGS -s"
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
# register-based arguments passing conventions
|
||||
CPU_OPT="-5r"
|
||||
# stack-based arguments passing conventions
|
||||
#CPU_OPT="-5s"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II and Pentium III
|
||||
# register-based arguments passing conventions
|
||||
CPU_OPT="-6r"
|
||||
# stack-based arguments passing conventions
|
||||
#CPU_OPT="-6s"
|
||||
;;
|
||||
esac
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
|
||||
# warnings
|
||||
|
||||
# maximum level
|
||||
CFLAGS="$CFLAGS -wx"
|
||||
#CFLAGS="$CFLAGS -w3"
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -we"
|
||||
|
||||
# built target is NT
|
||||
CFLAGS="$CFLAGS -bt=nt"
|
||||
|
||||
# multithreaded
|
||||
CFLAGS="$CFLAGS -bm"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -d2"
|
||||
|
||||
# quiet
|
||||
CFLAGS="$CFLAGS -zq"
|
||||
|
||||
# Open Watcom C 1.2
|
||||
have=NGX_HAVE_C99_VARIADIC_MACROS . auto/have
|
||||
|
||||
|
||||
# the precompiled headers
|
||||
#CORE_DEPS="$CORE_DEPS $NGX_OBJS/ngx_config.pch"
|
||||
#NGX_PCH="$NGX_OBJS/ngx_config.pch"
|
||||
#NGX_BUILD_PCH="-fhq=$NGX_OBJS/ngx_config.pch"
|
||||
#NGX_USE_PCH="-fh=$NGX_OBJS/ngx_config.pch"
|
||||
|
||||
|
||||
# the link flags, built target is NT GUI mode application
|
||||
#CORE_LINK="$CORE_LINK -l=nt_win"
|
||||
|
||||
|
||||
# the resource file
|
||||
NGX_RCC="wrc \$(CORE_INCS) -fo=$NGX_OBJS/nginx.res "
|
||||
NGX_RCC="$NGX_RCC $NGX_WIN32_RC $NGX_OBJS/nginx.exe"
|
||||
|
||||
|
||||
ngx_include_opt="-i="
|
||||
ngx_objout="-fo"
|
||||
ngx_binout="-fe="
|
||||
ngx_objext="obj"
|
||||
ngx_binext=".exe"
|
||||
|
||||
ngx_regex_dirsep='\\'
|
||||
ngx_dirsep="\\"
|
||||
|
||||
ngx_long_start=' '
|
||||
ngx_long_end=' '
|
||||
ngx_long_regex_cont=' \&\
|
||||
'
|
||||
ngx_long_cont=' &
|
||||
'
|
||||
|
||||
ngx_regex_cont=' \&\
|
||||
'
|
||||
ngx_cont=' &
|
||||
'
|
||||
ngx_tab=' &
|
||||
'
|
|
@ -1,158 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
# Sun C 5.7 Patch 117837-04 2005/05/11 Sun Studio 10
|
||||
# Sun C 5.8 2005/10/13 Sun Studio 11
|
||||
# Sun C 5.9 SunOS_i386 2007/05/03 Sun Studio 12
|
||||
# Sun C 5.9 SunOS_sparc 2007/05/03
|
||||
# Sun C 5.10 SunOS_i386 2009/06/03 Sun Studio 12.1
|
||||
# Sun C 5.11 SunOS_i386 2010/08/13 Sun Studio 12.2
|
||||
|
||||
NGX_SUNC_VER=`$CC -V 2>&1 | grep 'Sun C' 2>&1 \
|
||||
| sed -e 's/^.* Sun C \(.*\)/\1/'`
|
||||
|
||||
echo " + Sun C version: $NGX_SUNC_VER"
|
||||
|
||||
have=NGX_COMPILER value="\"Sun C $NGX_SUNC_VER\"" . auto/define
|
||||
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main() { printf("%d", __SUNPRO_C); }
|
||||
|
||||
END
|
||||
|
||||
eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
ngx_sunc_ver=`$NGX_AUTOTEST`
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
# 1424 == 0x590, Sun Studio 12
|
||||
|
||||
if [ "$ngx_sunc_ver" -ge 1424 ]; then
|
||||
ngx_sparc32="-m32"
|
||||
ngx_sparc64="-m64"
|
||||
ngx_amd64="-m64"
|
||||
|
||||
else
|
||||
ngx_sparc32="-xarch=v8plus"
|
||||
ngx_sparc64="-xarch=v9"
|
||||
ngx_amd64="-xarch=amd64"
|
||||
fi
|
||||
|
||||
case "$NGX_MACHINE" in
|
||||
|
||||
i86pc)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
|
||||
;;
|
||||
|
||||
sun4u | sun4v)
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
# optimizations
|
||||
|
||||
# 20736 == 0x5100, Sun Studio 12.1
|
||||
|
||||
if [ "$ngx_sunc_ver" -ge 20736 ]; then
|
||||
ngx_fast="-fast"
|
||||
|
||||
else
|
||||
# older versions had problems with bit-fields
|
||||
ngx_fast="-fast -xalias_level=any"
|
||||
fi
|
||||
|
||||
IPO=-xipo
|
||||
CFLAGS="$CFLAGS $ngx_fast $IPO"
|
||||
CORE_LINK="$CORE_LINK $ngx_fast $IPO"
|
||||
|
||||
|
||||
case $CPU in
|
||||
pentium)
|
||||
# optimize for Pentium and Athlon
|
||||
CPU_OPT="-xchip=pentium"
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
# optimize for Pentium Pro, Pentium II
|
||||
CPU_OPT="-xchip=pentium_pro"
|
||||
;;
|
||||
|
||||
pentium3)
|
||||
# optimize for Pentium III
|
||||
CPU_OPT="-xchip=pentium3"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse"
|
||||
CPU_OPT="$CPU_OPT -xcache=16/32/4:256/32/4"
|
||||
;;
|
||||
|
||||
pentium4)
|
||||
# optimize for Pentium 4
|
||||
CPU_OPT="-xchip=pentium4"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse2"
|
||||
CPU_OPT="$CPU_OPT -xcache=8/64/4:256/128/8"
|
||||
;;
|
||||
|
||||
opteron)
|
||||
# optimize for Opteron
|
||||
CPU_OPT="-xchip=opteron"
|
||||
#CPU_OPT="$CPU_OPT -xarch=sse2"
|
||||
CPU_OPT="$CPU_OPT -xcache=64/64/2:1024/64/16"
|
||||
;;
|
||||
|
||||
sparc32)
|
||||
# build 32-bit UltraSparc binary
|
||||
CPU_OPT="$ngx_sparc32"
|
||||
CORE_LINK="$CORE_LINK $ngx_sparc32"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc32"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
sparc64)
|
||||
# build 64-bit UltraSparc binary
|
||||
CPU_OPT="$ngx_sparc64"
|
||||
CORE_LINK="$CORE_LINK $ngx_sparc64"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_sparc64"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
amd64)
|
||||
# build 64-bit amd64 binary
|
||||
CPU_OPT="$ngx_amd64"
|
||||
CORE_LINK="$CORE_LINK $ngx_amd64"
|
||||
CC_AUX_FLAGS="$CC_AUX_FLAGS $ngx_amd64"
|
||||
NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
|
||||
NGX_CPU_CACHE_LINE=64
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
CFLAGS="$CFLAGS $CPU_OPT"
|
||||
|
||||
|
||||
if [ ".$PCRE_OPT" = "." ]; then
|
||||
PCRE_OPT="$ngx_fast $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$MD5_OPT" = "." ]; then
|
||||
MD5_OPT="$ngx_fast $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
if [ ".$ZLIB_OPT" = "." ]; then
|
||||
ZLIB_OPT="$ngx_fast $IPO $CPU_OPT"
|
||||
fi
|
||||
|
||||
|
||||
# stop on warning
|
||||
CFLAGS="$CFLAGS -errwarn=%all"
|
||||
|
||||
# debug
|
||||
CFLAGS="$CFLAGS -g"
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $have
|
||||
#define $have $value
|
||||
#endif
|
||||
|
||||
END
|
|
@ -1,45 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for system byte ordering ...$ngx_c"
|
||||
echo >> $NGX_ERR
|
||||
echo "checking for system byte ordering" >> $NGX_ERR
|
||||
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
int main() {
|
||||
int i = 0x11223344;
|
||||
char *p;
|
||||
|
||||
p = (char *) &i;
|
||||
if (*p == 0x44) return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
if $NGX_AUTOTEST >/dev/null 2>&1; then
|
||||
echo " little endian"
|
||||
have=NGX_HAVE_LITTLE_ENDIAN . auto/have
|
||||
else
|
||||
echo " big endian"
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
else
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
echo
|
||||
echo "$0: error: cannot detect system byte ordering"
|
||||
exit 1
|
||||
fi
|
|
@ -1,123 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_feature ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_feature
|
||||
|
||||
END
|
||||
|
||||
ngx_found=no
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
ngx_have_feature=`echo $ngx_feature_name \
|
||||
| tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
|
||||
fi
|
||||
|
||||
if test -n "$ngx_feature_path"; then
|
||||
for ngx_temp in $ngx_feature_path; do
|
||||
ngx_feature_inc_path="$ngx_feature_inc_path -I $ngx_temp"
|
||||
done
|
||||
fi
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
$NGX_INCLUDE_UNISTD_H
|
||||
$ngx_feature_incs
|
||||
|
||||
int main() {
|
||||
$ngx_feature_test;
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS $ngx_feature_inc_path \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_TEST_LD_OPT $ngx_feature_libs"
|
||||
|
||||
ngx_feature_inc_path=
|
||||
|
||||
eval "/bin/sh -c \"$ngx_test\" >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
case "$ngx_feature_run" in
|
||||
|
||||
yes)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
;;
|
||||
|
||||
value)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_feature_name
|
||||
#define $ngx_feature_name `$NGX_AUTOTEST`
|
||||
#endif
|
||||
|
||||
END
|
||||
else
|
||||
echo " found but is not working"
|
||||
fi
|
||||
;;
|
||||
|
||||
bug)
|
||||
# /bin/sh is used to intercept "Killed" or "Abort trap" messages
|
||||
if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then
|
||||
echo " not found"
|
||||
|
||||
else
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
|
||||
if test -n "$ngx_feature_name"; then
|
||||
have=$ngx_have_feature . auto/have
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $have
|
||||
#define $have 1
|
||||
#endif
|
||||
|
||||
END
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_HEADERS_H
|
||||
|
||||
#ifndef $have
|
||||
#define $have 1
|
||||
#endif
|
||||
|
||||
END
|
|
@ -1,13 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_include="unistd.h"; . auto/include
|
||||
ngx_include="inttypes.h"; . auto/include
|
||||
ngx_include="limits.h"; . auto/include
|
||||
ngx_include="sys/filio.h"; . auto/include
|
||||
ngx_include="sys/param.h"; . auto/include
|
||||
ngx_include="sys/mount.h"; . auto/include
|
||||
ngx_include="sys/statvfs.h"; . auto/include
|
||||
ngx_include="crypt.h"; . auto/include
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_include ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_include
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_found=no
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
$NGX_INCLUDE_SYS_PARAM_H
|
||||
#include <$ngx_include>
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_test="$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
|
||||
ngx_found=yes
|
||||
|
||||
echo " found"
|
||||
|
||||
ngx_name=`echo $ngx_include \
|
||||
| tr abcdefghijklmnopqrstuvwxyz/. ABCDEFGHIJKLMNOPQRSTUVWXYZ__`
|
||||
|
||||
|
||||
have=NGX_HAVE_$ngx_name . auto/have_headers
|
||||
|
||||
eval "NGX_INCLUDE_$ngx_name='#include <$ngx_include>'"
|
||||
|
||||
#STUB
|
||||
eval "NGX_$ngx_name='#include <$ngx_include>'"
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
|
@ -1,51 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
NGX_MAKEFILE=$NGX_OBJS/Makefile
|
||||
NGX_MODULES_C=$NGX_OBJS/ngx_modules.c
|
||||
|
||||
NGX_AUTO_HEADERS_H=$NGX_OBJS/ngx_auto_headers.h
|
||||
NGX_AUTO_CONFIG_H=$NGX_OBJS/ngx_auto_config.h
|
||||
|
||||
NGX_AUTOTEST=$NGX_OBJS/autotest
|
||||
NGX_AUTOCONF_ERR=$NGX_OBJS/autoconf.err
|
||||
|
||||
# STUBs
|
||||
NGX_ERR=$NGX_OBJS/autoconf.err
|
||||
MAKEFILE=$NGX_OBJS/Makefile
|
||||
|
||||
|
||||
NGX_PCH=
|
||||
NGX_USE_PCH=
|
||||
|
||||
|
||||
# check the echo's "-n" option and "\c" capability
|
||||
|
||||
if echo "test\c" | grep c >/dev/null; then
|
||||
|
||||
if echo -n test | grep n >/dev/null; then
|
||||
ngx_n=
|
||||
ngx_c=
|
||||
|
||||
else
|
||||
ngx_n=-n
|
||||
ngx_c=
|
||||
fi
|
||||
|
||||
else
|
||||
ngx_n=
|
||||
ngx_c='\c'
|
||||
fi
|
||||
|
||||
|
||||
# create Makefile
|
||||
|
||||
cat << END > Makefile
|
||||
|
||||
default: build
|
||||
|
||||
clean:
|
||||
rm -rf Makefile $NGX_OBJS
|
||||
END
|
|
@ -1,83 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $USE_PCRE = YES -o $PCRE != NONE ]; then
|
||||
. auto/lib/pcre/conf
|
||||
|
||||
else
|
||||
if [ $USE_PCRE = DISABLED -a $HTTP_REWRITE = YES ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option or you have to enable the PCRE support.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $USE_OPENSSL = YES ]; then
|
||||
. auto/lib/openssl/conf
|
||||
fi
|
||||
|
||||
if [ $USE_MD5 = YES ]; then
|
||||
|
||||
if [ $USE_OPENSSL = YES ]; then
|
||||
have=NGX_HAVE_OPENSSL_MD5_H . auto/have
|
||||
have=NGX_OPENSSL_MD5 . auto/have
|
||||
have=NGX_HAVE_MD5 . auto/have
|
||||
MD5=YES
|
||||
MD5_LIB=OpenSSL
|
||||
|
||||
else
|
||||
. auto/lib/md5/conf
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ $USE_SHA1 = YES ]; then
|
||||
|
||||
if [ $USE_OPENSSL = YES ]; then
|
||||
have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
|
||||
have=NGX_HAVE_SHA1 . auto/have
|
||||
SHA1=YES
|
||||
SHA1_LIB=OpenSSL
|
||||
|
||||
else
|
||||
. auto/lib/sha1/conf
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ $USE_ZLIB = YES ]; then
|
||||
. auto/lib/zlib/conf
|
||||
fi
|
||||
|
||||
if [ $USE_LIBXSLT = YES ]; then
|
||||
. auto/lib/libxslt/conf
|
||||
fi
|
||||
|
||||
if [ $USE_LIBGD = YES ]; then
|
||||
. auto/lib/libgd/conf
|
||||
fi
|
||||
|
||||
if [ $USE_PERL = YES ]; then
|
||||
. auto/lib/perl/conf
|
||||
fi
|
||||
|
||||
if [ $HTTP_GEOIP = YES ]; then
|
||||
. auto/lib/geoip/conf
|
||||
fi
|
||||
|
||||
if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then
|
||||
. auto/lib/google-perftools/conf
|
||||
fi
|
||||
|
||||
if [ $NGX_LIBATOMIC != NO ]; then
|
||||
. auto/lib/libatomic/conf
|
||||
fi
|
|
@ -1,94 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="GeoIP library"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <GeoIP.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lGeoIP"
|
||||
ngx_feature_test="GeoIP_open(NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="GeoIP library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="GeoIP library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="GeoIP library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lGeoIP"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lGeoIP"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
if [ $NGX_IPV6 = YES ]; then
|
||||
ngx_feature="GeoIP IPv6 support"
|
||||
ngx_feature_name="NGX_HAVE_GEOIP_V6"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <stdio.h>
|
||||
#include <GeoIP.h>"
|
||||
#ngx_feature_path=
|
||||
#ngx_feature_libs=
|
||||
ngx_feature_test="printf(\"%d\", GEOIP_CITY_EDITION_REV0_V6);"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the GeoIP module requires the GeoIP library.
|
||||
You can either do not enable the module or install the library.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
|
@ -1,61 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="Google perftools"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lprofiler"
|
||||
ngx_feature_test="ProfilerStop()"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="Google perftools in /usr/local/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="Google perftools in /opt/local/"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lprofiler"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lprofiler"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the Google perftools module requires the Google perftools
|
||||
library. You can either do not enable the module or install the library.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
|
@ -1,43 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $NGX_LIBATOMIC != YES ]; then
|
||||
|
||||
have=NGX_HAVE_LIBATOMIC . auto/have
|
||||
CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src"
|
||||
LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/src/libatomic_ops.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/src/libatomic_ops.a"
|
||||
|
||||
else
|
||||
|
||||
ngx_feature="atomic_ops library"
|
||||
ngx_feature_name=NGX_HAVE_LIBATOMIC
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#define AO_REQUIRE_CAS
|
||||
#include <atomic_ops.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-latomic_ops"
|
||||
ngx_feature_test="long n = 0;
|
||||
if (!AO_compare_and_swap(&n, 0, 1))
|
||||
return 1;
|
||||
if (AO_fetch_and_add(&n, 1) != 1)
|
||||
return 1;
|
||||
if (n != 2)
|
||||
return 1;
|
||||
AO_nop();"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: libatomic_ops library was not found.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_LIBATOMIC/src/libatomic_ops.a: $NGX_LIBATOMIC/Makefile
|
||||
cd $NGX_LIBATOMIC && \$(MAKE)
|
||||
|
||||
$NGX_LIBATOMIC/Makefile: $NGX_MAKEFILE
|
||||
cd $NGX_LIBATOMIC \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& ./configure
|
||||
|
||||
END
|
|
@ -1,83 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="GD library"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <gd.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lgd"
|
||||
ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="GD library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="GD library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="GD library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lgd"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lgd"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP image filter module requires the GD library.
|
||||
You can either do not enable the module or install the libraries.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
|
||||
fi
|
|
@ -1,156 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
ngx_feature="libxslt"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
#include <libxslt/xslt.h>
|
||||
#include <libxslt/xsltInternals.h>
|
||||
#include <libxslt/transform.h>
|
||||
#include <libxslt/xsltutils.h>"
|
||||
ngx_feature_path="/usr/include/libxml2"
|
||||
ngx_feature_libs="-lxml2 -lxslt"
|
||||
ngx_feature_test="xmlParserCtxtPtr ctxt = NULL;
|
||||
xsltStylesheetPtr sheet = NULL;
|
||||
xmlDocPtr doc;
|
||||
doc = xmlParseChunk(ctxt, NULL, 0, 0);
|
||||
xsltApplyStylesheet(sheet, doc, NULL);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="libxslt in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="libxslt in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include/libxml2 /usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="libxslt in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lxml2 -lxslt"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lxml2 -lxslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP XSLT module requires the libxml2/libxslt
|
||||
libraries. You can either do not enable the module or install the libraries.
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="libexslt"
|
||||
ngx_feature_name=NGX_HAVE_EXSLT
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <libexslt/exslt.h>"
|
||||
ngx_feature_path="/usr/include/libxml2"
|
||||
ngx_feature_libs="-lexslt"
|
||||
ngx_feature_test="exsltRegisterAll();"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="libexslt in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="libexslt in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include/libxml2 /usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="libexslt in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include/libxml2 /opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lexslt"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lexslt"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lexslt"
|
||||
fi
|
|
@ -1,32 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then
|
||||
. auto/lib/pcre/make
|
||||
fi
|
||||
|
||||
if [ $MD5 != NONE -a $MD5 != NO -a $MD5 != YES ]; then
|
||||
. auto/lib/md5/make
|
||||
fi
|
||||
|
||||
if [ $SHA1 != NONE -a $SHA1 != NO -a $SHA1 != YES ]; then
|
||||
. auto/lib/sha1/make
|
||||
fi
|
||||
|
||||
if [ $OPENSSL != NONE -a $OPENSSL != NO -a $OPENSSL != YES ]; then
|
||||
. auto/lib/openssl/make
|
||||
fi
|
||||
|
||||
if [ $ZLIB != NONE -a $ZLIB != NO -a $ZLIB != YES ]; then
|
||||
. auto/lib/zlib/make
|
||||
fi
|
||||
|
||||
if [ $NGX_LIBATOMIC != NO -a $NGX_LIBATOMIC != YES ]; then
|
||||
. auto/lib/libatomic/make
|
||||
fi
|
||||
|
||||
if [ $USE_PERL = YES ]; then
|
||||
. auto/lib/perl/make
|
||||
fi
|
|
@ -1,103 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $MD5 != NONE ]; then
|
||||
|
||||
if grep MD5_Init $MD5/md5.h 2>&1 >/dev/null; then
|
||||
# OpenSSL md5
|
||||
OPENSSL_MD5=YES
|
||||
have=NGX_HAVE_OPENSSL_MD5 . auto/have
|
||||
have=NGX_OPENSSL_MD5 . auto/have
|
||||
else
|
||||
# rsaref md5
|
||||
OPENSSL_MD5=NO
|
||||
fi
|
||||
|
||||
have=NGX_HAVE_MD5 . auto/have
|
||||
CORE_INCS="$CORE_INCS $MD5"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc* | owc* | bcc)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/md5.lib"
|
||||
CORE_LIBS="$CORE_LIBS $MD5/md5.lib"
|
||||
;;
|
||||
|
||||
icc*)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
CORE_LIBS="$CORE_LIBS $MD5/md5_dgst.o"
|
||||
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $MD5/asm/mx86-elf.o"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
LINK_DEPS="$LINK_DEPS $MD5/libmd5.a"
|
||||
CORE_LIBS="$CORE_LIBS $MD5/libmd5.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $MD5 -lmd5"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
MD5=NO
|
||||
|
||||
# FreeBSD, Solaris 10
|
||||
|
||||
ngx_feature="md5 in system md library"
|
||||
ngx_feature_name=NGX_HAVE_MD5
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <md5.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lmd"
|
||||
ngx_feature_test="MD5_CTX md5; MD5Init(&md5)"
|
||||
. auto/feature
|
||||
|
||||
ngx_md5_lib="system md"
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Solaris 8/9
|
||||
|
||||
ngx_feature="md5 in system md5 library"
|
||||
ngx_feature_libs="-lmd5"
|
||||
. auto/feature
|
||||
|
||||
ngx_md5_lib="system md5"
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# OpenSSL crypto library
|
||||
|
||||
ngx_feature="md5 in system OpenSSL crypto library"
|
||||
ngx_feature_name="NGX_OPENSSL_MD5"
|
||||
ngx_feature_incs="#include <openssl/md5.h>"
|
||||
ngx_feature_libs="-lcrypto"
|
||||
ngx_feature_test="MD5_CTX md5; MD5_Init(&md5)"
|
||||
. auto/feature
|
||||
|
||||
ngx_md5_lib="system crypto"
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_OPENSSL_MD5_H . auto/have
|
||||
have=NGX_HAVE_MD5 . auto/have
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
MD5=YES
|
||||
MD5_LIB=$ngx_md5_lib
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,96 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc*)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC MD5_ASM=$MD5_ASM"
|
||||
ngx_md5="MD5=\"$MD5\""
|
||||
;;
|
||||
|
||||
owc*)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_md5=`echo MD5=\"$MD5\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\" -DMD5_ASM=$MD5_ASM"
|
||||
ngx_md5=`echo \-DMD5=\"$MD5\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
done=NO
|
||||
|
||||
|
||||
case "$NGX_PLATFORM" in
|
||||
|
||||
win32)
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$MD5/md5.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/md5/$ngx_makefile $ngx_opt $ngx_md5
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
SunOS:*:i86pc)
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$MD5/libmd5.a: $NGX_MAKEFILE
|
||||
cd $MD5 \\
|
||||
&& \$(MAKE) CFLAGS="$MD5_OPT -DSOL -DMD5_ASM -DL_ENDIAN" \\
|
||||
CC="\$(CC)" CPP="\$(CPP)" \\
|
||||
MD5_ASM_OBJ=asm/mx86-sol.o clean libmd5.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
# FreeBSD: i386
|
||||
# Linux: i686
|
||||
|
||||
*:i386 | *:i686)
|
||||
if [ $MD5_ASM = YES ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$MD5/libmd5.a: $NGX_MAKEFILE
|
||||
cd $MD5 \\
|
||||
&& \$(MAKE) CFLAGS="$MD5_OPT -DELF -DMD5_ASM -DL_ENDIAN" \\
|
||||
CC="\$(CC)" CPP="\$(CPP)" \\
|
||||
MD5_ASM_OBJ=asm/mx86-elf.o clean libmd5.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $done = NO ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$MD5/libmd5.a: $NGX_MAKEFILE
|
||||
cd $MD5 \\
|
||||
&& \$(MAKE) CFLAGS="$MD5_OPT" \\
|
||||
CC="\$(CC)" MD5_ASM_OBJ= clean libmd5.a
|
||||
|
||||
END
|
||||
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN
|
||||
|
||||
!if "$(MD5_ASM)" == "YES"
|
||||
|
||||
md5.lib:
|
||||
cd $(MD5)
|
||||
bcc32 -c $(CFLAGS) -DMD5_ASM md5_dgst.c
|
||||
tlib md5.lib +md5_dgst.obj +"asm\m-win32.obj"
|
||||
|
||||
!else
|
||||
|
||||
md5.lib:
|
||||
cd $(MD5)
|
||||
bcc32 -c $(CFLAGS) md5_dgst.c
|
||||
tlib md5.lib +md5_dgst.obj
|
||||
|
||||
!endif
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN
|
||||
|
||||
!IF "$(MD5_ASM)" == "YES"
|
||||
|
||||
md5.lib:
|
||||
cd $(MD5)
|
||||
cl -c $(CFLAGS) -D MD5_ASM md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj asm/m-win32.obj
|
||||
|
||||
!ELSE
|
||||
|
||||
md5.lib:
|
||||
cd $(MD5)
|
||||
cl -c $(CFLAGS) md5_dgst.c
|
||||
link -lib -out:md5.lib md5_dgst.obj
|
||||
|
||||
!ENDIF
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT)
|
||||
|
||||
md5.lib:
|
||||
cd $(MD5)
|
||||
wcl386 -c $(CFLAGS) -dL_ENDIAN md5_dgst.c
|
||||
wlib -n md5.lib md5_dgst.obj
|
|
@ -1,78 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $OPENSSL != NONE ]; then
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl | bcc32)
|
||||
have=NGX_OPENSSL . auto/have
|
||||
have=NGX_SSL . auto/have
|
||||
|
||||
CFLAGS="$CFLAGS -DNO_SYS_TYPES_H"
|
||||
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/openssl/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL/openssl/include/openssl/ssl.h"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/ssleay32.lib"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/openssl/lib/libeay32.lib"
|
||||
|
||||
# libeay32.lib requires gdi32.lib
|
||||
CORE_LIBS="$CORE_LIBS gdi32.lib"
|
||||
# OpenSSL 1.0.0 requires crypt32.lib
|
||||
CORE_LIBS="$CORE_LIBS crypt32.lib"
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_OPENSSL . auto/have
|
||||
have=NGX_SSL . auto/have
|
||||
|
||||
CORE_INCS="$CORE_INCS $OPENSSL/.openssl/include"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL/.openssl/include/openssl/ssl.h"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libssl.a"
|
||||
CORE_LIBS="$CORE_LIBS $OPENSSL/.openssl/lib/libcrypto.a"
|
||||
CORE_LIBS="$CORE_LIBS $NGX_LIBDL"
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lgdi32 -lcrypt32 -lws2_32"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
OPENSSL=NO
|
||||
|
||||
ngx_feature="OpenSSL library"
|
||||
ngx_feature_name="NGX_OPENSSL"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <openssl/ssl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lssl -lcrypto"
|
||||
ngx_feature_test="SSL_library_init()"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_SSL . auto/have
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs $NGX_LIBDL"
|
||||
OPENSSL=YES
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $OPENSSL != YES ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: SSL modules require the OpenSSL library.
|
||||
You can either do not enable the modules, or install the OpenSSL library
|
||||
into the system, or build the OpenSSL library statically from the source
|
||||
with nginx by using --with-openssl=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,67 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$CC" in
|
||||
|
||||
cl)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/openssl/include/openssl/ssl.h: $NGX_MAKEFILE
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.msvc \
|
||||
OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
bcc32)
|
||||
|
||||
ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$OPENSSL\\openssl\\lib\\libeay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\openssl\\lib\\ssleay32.lib: \
|
||||
$OPENSSL\\openssl\\include\\openssl\\ssl.h" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
`echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h: $NGX_MAKEFILE" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
*)
|
||||
case $USE_THREADS in
|
||||
NO) OPENSSL_OPT="$OPENSSL_OPT no-threads" ;;
|
||||
*) OPENSSL_OPT="$OPENSSL_OPT threads" ;;
|
||||
esac
|
||||
|
||||
case $OPENSSL in
|
||||
/*) ngx_prefix="$OPENSSL/.openssl" ;;
|
||||
*) ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
|
||||
esac
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$OPENSSL/.openssl/include/openssl/ssl.h: $NGX_MAKEFILE
|
||||
cd $OPENSSL \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) clean; fi \\
|
||||
&& ./config --prefix=$ngx_prefix no-shared $OPENSSL_OPT \\
|
||||
&& \$(MAKE) \\
|
||||
&& \$(MAKE) install LIBDIR=lib
|
||||
|
||||
END
|
||||
|
||||
;;
|
||||
|
||||
esac
|
|
@ -1,18 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure BC-32 no-shared --prefix=openssl $(OPENSSL_OPT)
|
||||
|
||||
ms\do_nasm
|
||||
|
||||
$(MAKE) -f ms\bcb.mak
|
||||
$(MAKE) -f ms\bcb.mak install
|
||||
|
||||
# Borland's make does not expand "[ch]" in
|
||||
# copy "inc32\openssl\*.[ch]" "openssl\include\openssl"
|
||||
copy inc32\openssl\*.h openssl\include\openssl
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
all:
|
||||
cd $(OPENSSL)
|
||||
|
||||
perl Configure VC-WIN32 no-shared --prefix=openssl $(OPENSSL_OPT)
|
||||
|
||||
ms\do_ms
|
||||
|
||||
$(MAKE) -f ms\nt.mak
|
||||
$(MAKE) -f ms\nt.mak install
|
|
@ -1,203 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $PCRE != NONE ]; then
|
||||
CORE_INCS="$CORE_INCS $PCRE"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc* | owc* | bcc)
|
||||
have=NGX_PCRE . auto/have
|
||||
have=PCRE_STATIC . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/pcre.lib"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.lib"
|
||||
;;
|
||||
|
||||
icc* )
|
||||
have=NGX_PCRE . auto/have
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
|
||||
echo $ngx_n "checking for PCRE library ...$ngx_c"
|
||||
|
||||
if [ -f $PCRE/pcre.h ]; then
|
||||
ngx_pcre_ver=`grep PCRE_MAJOR $PCRE/pcre.h \
|
||||
| sed -e 's/^.*PCRE_MAJOR.* \(.*\)$/\1/'`
|
||||
|
||||
else if [ -f $PCRE/configure.in ]; then
|
||||
ngx_pcre_ver=`grep PCRE_MAJOR= $PCRE/configure.in \
|
||||
| sed -e 's/^.*=\(.*\)$/\1/'`
|
||||
|
||||
else
|
||||
ngx_pcre_ver=`grep pcre_major, $PCRE/configure.ac \
|
||||
| sed -e 's/^.*pcre_major,.*\[\(.*\)\].*$/\1/'`
|
||||
fi
|
||||
fi
|
||||
|
||||
echo " $ngx_pcre_ver major version found"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
|
||||
case "$ngx_pcre_ver" in
|
||||
4|5)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre.o"
|
||||
;;
|
||||
|
||||
6)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
|
||||
;;
|
||||
|
||||
*)
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_chartables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_compile.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_exec.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_fullinfo.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_globals.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_tables.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_try_flipped.o"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/pcre_newline.o"
|
||||
;;
|
||||
|
||||
esac
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_PCRE . auto/have
|
||||
|
||||
if [ "$NGX_PLATFORM" = win32 ]; then
|
||||
have=PCRE_STATIC . auto/have
|
||||
fi
|
||||
|
||||
CORE_DEPS="$CORE_DEPS $PCRE/pcre.h"
|
||||
LINK_DEPS="$LINK_DEPS $PCRE/.libs/libpcre.a"
|
||||
CORE_LIBS="$CORE_LIBS $PCRE/.libs/libpcre.a"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $PCRE_JIT = YES ]; then
|
||||
have=NGX_HAVE_PCRE_JIT . auto/have
|
||||
PCRE_CONF_OPT="$PCRE_CONF_OPT --enable-jit"
|
||||
fi
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
PCRE=NO
|
||||
|
||||
ngx_feature="PCRE library"
|
||||
ngx_feature_name="NGX_PCRE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <pcre.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lpcre"
|
||||
ngx_feature_test="pcre *re;
|
||||
re = pcre_compile(NULL, 0, NULL, 0, NULL);
|
||||
if (re == NULL) return 1"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# FreeBSD port
|
||||
|
||||
ngx_feature="PCRE library in /usr/local/"
|
||||
ngx_feature_path="/usr/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/local/lib -L/usr/local/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/local/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# RedHat RPM, Solaris package
|
||||
|
||||
ngx_feature="PCRE library in /usr/include/pcre/"
|
||||
ngx_feature_path="/usr/include/pcre"
|
||||
ngx_feature_libs="-lpcre"
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# NetBSD port
|
||||
|
||||
ngx_feature="PCRE library in /usr/pkg/"
|
||||
ngx_feature_path="/usr/pkg/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/usr/pkg/lib -L/usr/pkg/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/usr/pkg/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# MacPorts
|
||||
|
||||
ngx_feature="PCRE library in /opt/local/"
|
||||
ngx_feature_path="/opt/local/include"
|
||||
|
||||
if [ $NGX_RPATH = YES ]; then
|
||||
ngx_feature_libs="-R/opt/local/lib -L/opt/local/lib -lpcre"
|
||||
else
|
||||
ngx_feature_libs="-L/opt/local/lib -lpcre"
|
||||
fi
|
||||
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_INCS="$CORE_INCS $ngx_feature_path"
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
PCRE=YES
|
||||
fi
|
||||
|
||||
if [ $PCRE = YES ]; then
|
||||
ngx_feature="PCRE JIT support"
|
||||
ngx_feature_name="NGX_HAVE_PCRE_JIT"
|
||||
ngx_feature_test="int jit = 0;
|
||||
pcre_free_study(NULL);
|
||||
pcre_config(PCRE_CONFIG_JIT, &jit);
|
||||
if (jit != 1) return 1;"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
PCRE_JIT=YES
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $PCRE != YES ]; then
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP rewrite module requires the PCRE library.
|
||||
You can either disable the module by using --without-http_rewrite_module
|
||||
option, or install the PCRE library into the system, or build the PCRE library
|
||||
statically from the source with nginx by using --with-pcre=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,64 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc*)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
|
||||
ngx_pcre="PCRE=\"$PCRE\""
|
||||
;;
|
||||
|
||||
owc*)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_pcre=`echo PCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
|
||||
ngx_pcre=`echo \-DPCRE=\"$PCRE\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
*)
|
||||
ngx_makefile=
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ -n "$ngx_makefile" ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$PCRE/pcre.lib: $PCRE/pcre.h $NGX_MAKEFILE" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre $ngx_opt
|
||||
|
||||
`echo "$PCRE/pcre.h:" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/pcre/$ngx_makefile $ngx_pcre pcre.h
|
||||
|
||||
END
|
||||
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$PCRE/pcre.h: $PCRE/Makefile
|
||||
|
||||
$PCRE/Makefile: $NGX_MAKEFILE
|
||||
cd $PCRE \\
|
||||
&& if [ -f Makefile ]; then \$(MAKE) distclean; fi \\
|
||||
&& CC="\$(CC)" CFLAGS="$PCRE_OPT" \\
|
||||
./configure --disable-shared $PCRE_CONF_OPT
|
||||
|
||||
$PCRE/.libs/libpcre.a: $PCRE/Makefile
|
||||
cd $PCRE \\
|
||||
&& \$(MAKE) libpcre.la
|
||||
|
||||
END
|
||||
|
||||
fi
|
|
@ -1,27 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM -w-8004 $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
|
||||
bcc32 -c $(CFLAGS) -I. $(PCREFLAGS) pcre_*.c
|
||||
|
||||
copy /y nul pcre.lst
|
||||
for %n in (*.obj) do @echo +%n ^^& >> pcre.lst
|
||||
echo + >> pcre.lst
|
||||
|
||||
tlib pcre.lib @pcre.lst
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 \
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
|
||||
cl -nologo -c $(CFLAGS) -I . $(PCREFLAGS) pcre_*.c
|
||||
|
||||
link -lib -out:pcre.lib -verbose:lib pcre_*.obj
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
|
||||
PCREFLAGS = -DHAVE_CONFIG_H -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 &
|
||||
-DSUPPORT_PCRE8 -DHAVE_MEMMOVE
|
||||
|
||||
|
||||
pcre.lib:
|
||||
cd $(PCRE)
|
||||
|
||||
wcl386 $(CFLAGS) -i=. $(PCREFLAGS) pcre_*.c
|
||||
|
||||
dir /b *.obj > pcre.lst
|
||||
|
||||
wlib -n pcre.lib @pcre.lst
|
||||
|
||||
pcre.h:
|
||||
cd $(PCRE)
|
||||
|
||||
copy /y pcre.h.generic pcre.h
|
||||
copy /y config.h.generic config.h
|
||||
copy /y pcre_chartables.c.dist pcre_chartables.c
|
|
@ -1,78 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo "checking for perl"
|
||||
|
||||
|
||||
NGX_PERL_VER=`$NGX_PERL -v 2>&1 | grep '^This is perl' 2>&1 \
|
||||
| sed -e 's/^This is perl, \(.*\)/\1/'`
|
||||
|
||||
if test -n "$NGX_PERL_VER"; then
|
||||
echo " + perl version: $NGX_PERL_VER"
|
||||
|
||||
if [ "`$NGX_PERL -e 'use 5.006001; print "OK"'`" != "OK" ]; then
|
||||
echo
|
||||
echo "$0: error: perl 5.6.1 or higher is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
if [ "`$NGX_PERL -MExtUtils::Embed -e 'print "OK"'`" != "OK" ]; then
|
||||
echo
|
||||
echo "$0: error: perl module ExtUtils::Embed is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
NGX_PERL_CFLAGS="$CFLAGS `$NGX_PERL -MExtUtils::Embed -e ccopts`"
|
||||
NGX_PM_CFLAGS=`$NGX_PERL -MExtUtils::Embed -e ccopts`
|
||||
|
||||
# gcc 4.1/4.2 warn about unused values in pTHX_
|
||||
NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
|
||||
| sed -e 's/-Wunused-value/-Wno-unused-value/'`
|
||||
# icc8 warns 'declaration hides parameter "my_perl"' in ENTER and LEAVE
|
||||
NGX_PERL_CFLAGS=`echo $NGX_PERL_CFLAGS \
|
||||
| sed -e 's/-wd171/-wd171 -wd1599/'`
|
||||
|
||||
ngx_perl_ldopts=`$NGX_PERL -MExtUtils::Embed -e ldopts`
|
||||
|
||||
ngx_perl_dlext=`$NGX_PERL -MConfig -e 'print $Config{dlext}'`
|
||||
ngx_perl_libdir="src/http/modules/perl/blib/arch/auto"
|
||||
ngx_perl_module="$ngx_perl_libdir/nginx/nginx.$ngx_perl_dlext"
|
||||
|
||||
if $NGX_PERL -V:usemultiplicity | grep define > /dev/null; then
|
||||
have=NGX_HAVE_PERL_MULTIPLICITY . auto/have
|
||||
echo " + perl interpreter multiplicity found"
|
||||
fi
|
||||
|
||||
if $NGX_PERL -V:useithreads | grep undef > /dev/null; then
|
||||
# FreeBSD port wants to link with -pthread non-threaded perl
|
||||
ngx_perl_ldopts=`echo $ngx_perl_ldopts | sed 's/ -pthread//'`
|
||||
fi
|
||||
|
||||
if [ "$NGX_SYSTEM" = "Darwin" ]; then
|
||||
# OS X system perl wants to link universal binaries
|
||||
ngx_perl_ldopts=`echo $ngx_perl_ldopts \
|
||||
| sed -e 's/-arch x86_64 -arch i386//'`
|
||||
fi
|
||||
|
||||
CORE_LINK="$CORE_LINK $ngx_perl_ldopts"
|
||||
LINK_DEPS="$LINK_DEPS $NGX_OBJS/$ngx_perl_module"
|
||||
|
||||
if test -n "$NGX_PERL_MODULES"; then
|
||||
have=NGX_PERL_MODULES value="(u_char *) \"$NGX_PERL_MODULES\""
|
||||
. auto/define
|
||||
NGX_PERL_MODULES_MAN=$NGX_PERL_MODULES/man3
|
||||
fi
|
||||
|
||||
else
|
||||
echo
|
||||
echo "$0: error: perl 5.6.1 or higher is required"
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
fi
|
|
@ -1,41 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
v=`grep 'define NGINX_VERSION' src/core/nginx.h | sed -e 's/^.*"\(.*\)".*/\1/'`
|
||||
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_OBJS/src/http/modules/perl/blib/arch/auto/nginx/nginx.$ngx_perl_dlext: \\
|
||||
\$(CORE_DEPS) \$(HTTP_DEPS) \\
|
||||
src/http/modules/perl/ngx_http_perl_module.h \\
|
||||
$NGX_OBJS/src/http/modules/perl/Makefile
|
||||
cd $NGX_OBJS/src/http/modules/perl && \$(MAKE)
|
||||
|
||||
rm -rf $NGX_OBJS/install_perl
|
||||
|
||||
|
||||
$NGX_OBJS/src/http/modules/perl/Makefile: \\
|
||||
$NGX_AUTO_CONFIG_H \\
|
||||
src/core/nginx.h \\
|
||||
src/http/modules/perl/Makefile.PL \\
|
||||
src/http/modules/perl/nginx.pm \\
|
||||
src/http/modules/perl/nginx.xs \\
|
||||
src/http/modules/perl/typemap
|
||||
sed "s/%%VERSION%%/$v/" src/http/modules/perl/nginx.pm > \\
|
||||
$NGX_OBJS/src/http/modules/perl/nginx.pm
|
||||
cp -p src/http/modules/perl/nginx.xs $NGX_OBJS/src/http/modules/perl/
|
||||
cp -p src/http/modules/perl/typemap $NGX_OBJS/src/http/modules/perl/
|
||||
cp -p src/http/modules/perl/Makefile.PL $NGX_OBJS/src/http/modules/perl/
|
||||
|
||||
cd $NGX_OBJS/src/http/modules/perl \\
|
||||
&& NGX_PM_CFLAGS="\$(NGX_PM_CFLAGS) -g $NGX_CC_OPT" \\
|
||||
NGX_INCS="$CORE_INCS $NGX_OBJS $HTTP_INCS" \\
|
||||
NGX_DEPS="\$(CORE_DEPS) \$(HTTP_DEPS)" \\
|
||||
$NGX_PERL Makefile.PL \\
|
||||
LIB=$NGX_PERL_MODULES \\
|
||||
INSTALLSITEMAN3DIR=$NGX_PERL_MODULES_MAN
|
||||
|
||||
END
|
|
@ -1,79 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $SHA1 != NONE ]; then
|
||||
|
||||
have=NGX_HAVE_SHA1 . auto/have
|
||||
CORE_INCS="$CORE_INCS $SHA1"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc* | owc* | bcc)
|
||||
LINK_DEPS="$LINK_DEPS $SHA1/sha1.lib"
|
||||
CORE_LIBS="$CORE_LIBS $SHA1/sha1.lib"
|
||||
;;
|
||||
|
||||
icc*)
|
||||
LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
CORE_LIBS="$CORE_LIBS $SHA1/sha1_dgst.o"
|
||||
|
||||
if [ $SHA1_ASM = YES ]; then
|
||||
CORE_LIBS="$CORE_LIBS $SHA1/asm/sx86-elf.o"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
LINK_DEPS="$LINK_DEPS $SHA1/libsha.a"
|
||||
CORE_LIBS="$CORE_LIBS $SHA1/libsha.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $SHA1 -lsha"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
|
||||
SHA1=NO
|
||||
|
||||
# FreeBSD
|
||||
|
||||
ngx_feature="sha1 in system md library"
|
||||
ngx_feature_name=NGX_HAVE_SHA1
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sha.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lmd"
|
||||
ngx_feature_test="SHA_CTX sha1; SHA1_Init(&sha1)"
|
||||
. auto/feature
|
||||
|
||||
ngx_sha1_lib="system md"
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# OpenSSL crypto library
|
||||
|
||||
ngx_feature="sha1 in system OpenSSL crypto library"
|
||||
ngx_feature_incs="#include <openssl/sha.h>"
|
||||
ngx_feature_libs="-lcrypto"
|
||||
. auto/feature
|
||||
|
||||
ngx_sha1_lib="system crypto"
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_OPENSSL_SHA1_H . auto/have
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
SHA1=YES
|
||||
SHA1_LIB=$ngx_sha1_lib
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,96 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc*)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC SHA1_ASM=$SHA1_ASM"
|
||||
ngx_sha1="SHA1=\"$SHA1\""
|
||||
;;
|
||||
|
||||
owc*)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_sha1=`echo SHA1=\"$SHA1\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\" -DSHA1_ASM=$SHA1_ASM"
|
||||
ngx_sha1=`echo \-DSHA1=\"$SHA1\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
done=NO
|
||||
|
||||
|
||||
case "$NGX_PLATFORM" in
|
||||
|
||||
win32)
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$SHA1/sha1.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/sha1/$ngx_makefile $ngx_opt $ngx_sha1
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
SunOS:*:i86pc)
|
||||
if [ $SHA1_ASM = YES ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$SHA1/libsha.a: $NGX_MAKEFILE
|
||||
cd $SHA1 \\
|
||||
&& \$(MAKE) CFLAGS="$SHA1_OPT -DSOL -DSHA1_ASM -DL_ENDIAN" \\
|
||||
CC="\$(CC)" CPP="\$(CPP)" \\
|
||||
SHA_ASM_OBJ=asm/sx86-sol.o clean libsha.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
# FreeBSD: i386
|
||||
# Linux: i686
|
||||
|
||||
*:i386 | *:i686)
|
||||
if [ $SHA1_ASM = YES ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$SHA1/libsha.a: $NGX_MAKEFILE
|
||||
cd $SHA1 \\
|
||||
&& \$(MAKE) CFLAGS="$SHA1_OPT -DELF -DSHA1_ASM -DL_ENDIAN" \\
|
||||
CC="\$(CC)" CPP="\$(CPP)" \\
|
||||
SHA_ASM_OBJ=asm/sx86-elf.o clean libsha.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $done = NO ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$SHA1/libsha.a: $NGX_MAKEFILE
|
||||
cd $SHA1 \\
|
||||
&& \$(MAKE) CFLAGS="$SHA1_OPT" \\
|
||||
CC="\$(CC)" SHA_ASM_OBJ= clean libsha.a
|
||||
|
||||
END
|
||||
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN
|
||||
|
||||
!if "$(SHA1_ASM)" == "YES"
|
||||
|
||||
sha1.lib:
|
||||
cd $(SHA1)
|
||||
bcc32 -c $(CFLAGS) -DSHA1_ASM sha1dgst.c
|
||||
tlib sha1.lib +sha1dgst.obj +"asm\s-win32.obj"
|
||||
|
||||
!else
|
||||
|
||||
sha1.lib:
|
||||
cd $(SHA1)
|
||||
bcc32 -c $(CFLAGS) sha1dgst.c
|
||||
tlib sha1.lib +sha1dgst.obj
|
||||
|
||||
!endif
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN
|
||||
|
||||
!IF "$(SHA1_ASM)" == "YES"
|
||||
|
||||
sha1.lib:
|
||||
cd $(SHA1)
|
||||
cl -c $(CFLAGS) -D SHA1_ASM sha1dgst.c
|
||||
link -lib -out:sha1.lib sha1dgst.obj asm/s-win32.obj
|
||||
|
||||
!ELSE
|
||||
|
||||
sha1.lib:
|
||||
cd $(SHA1)
|
||||
cl -c $(CFLAGS) sha1dgst.c
|
||||
link -lib -out:sha1.lib sha1dgst.obj
|
||||
|
||||
!ENDIF
|
|
@ -1,11 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT)
|
||||
|
||||
sha1.lib:
|
||||
cd $(SHA1)
|
||||
wcl386 -c $(CFLAGS) -dL_ENDIAN sha1dgst.c
|
||||
wlib -n sha1.lib sha1dgst.obj
|
|
@ -1,40 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_lib ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_lib
|
||||
|
||||
END
|
||||
|
||||
ngx_found=no
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
$ngx_lib_incs
|
||||
|
||||
int main() {
|
||||
$ngx_lib_test;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
eval "$CC $cc_test_flags $ngx_lib_cflags \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $ngx_libs \
|
||||
>> $NGX_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
echo " found"
|
||||
|
||||
ngx_found=yes
|
||||
|
||||
else
|
||||
echo " not found"
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
|
@ -1,79 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $ZLIB != NONE ]; then
|
||||
CORE_INCS="$CORE_INCS $ZLIB"
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc* | owc* | bcc)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/zlib.lib"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/zlib.lib"
|
||||
;;
|
||||
|
||||
icc*)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
|
||||
# to allow -ipo optimization we link with the *.o but not library
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/adler32.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/crc32.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/deflate.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/trees.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/zutil.o"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/compress.o"
|
||||
|
||||
if [ $ZLIB_ASM != NO ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/match.o"
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
have=NGX_ZLIB . auto/have
|
||||
LINK_DEPS="$LINK_DEPS $ZLIB/libz.a"
|
||||
CORE_LIBS="$CORE_LIBS $ZLIB/libz.a"
|
||||
#CORE_LIBS="$CORE_LIBS -L $ZLIB -lz"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
else
|
||||
|
||||
if [ "$NGX_PLATFORM" != win32 ]; then
|
||||
ZLIB=NO
|
||||
|
||||
# FreeBSD, Solaris, Linux
|
||||
|
||||
ngx_feature="zlib library"
|
||||
ngx_feature_name="NGX_ZLIB"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <zlib.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs="-lz"
|
||||
ngx_feature_test="z_stream z; deflate(&z, Z_NO_FLUSH)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS $ngx_feature_libs"
|
||||
ZLIB=YES
|
||||
ngx_found=no
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ZLIB != YES ]; then
|
||||
cat << END
|
||||
|
||||
$0: error: the HTTP gzip module requires the zlib library.
|
||||
You can either disable the module by using --without-http_gzip_module
|
||||
option, or install the zlib library into the system, or build the zlib library
|
||||
statically from the source with nginx by using --with-zlib=<path> option.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
|
@ -1,135 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
msvc*)
|
||||
ngx_makefile=makefile.msvc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\" LIBC=$LIBC"
|
||||
ngx_zlib="ZLIB=\"$ZLIB\""
|
||||
|
||||
;;
|
||||
|
||||
owc*)
|
||||
ngx_makefile=makefile.owc
|
||||
ngx_opt="CPU_OPT=\"$CPU_OPT\""
|
||||
ngx_zlib=`echo ZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
bcc)
|
||||
ngx_makefile=makefile.bcc
|
||||
ngx_opt="-DCPU_OPT=\"$CPU_OPT\""
|
||||
ngx_zlib=`echo \-DZLIB=\"$ZLIB\" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
;;
|
||||
|
||||
*)
|
||||
ngx_makefile=
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
done=NO
|
||||
|
||||
|
||||
case "$NGX_PLATFORM" in
|
||||
|
||||
win32)
|
||||
|
||||
if [ -n "$ngx_makefile" ]; then
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
`echo "$ZLIB/zlib.lib: $NGX_MAKEFILE" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
\$(MAKE) -f auto/lib/zlib/$ngx_makefile $ngx_opt $ngx_zlib
|
||||
|
||||
END
|
||||
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& \$(MAKE) -f win32/Makefile.gcc \\
|
||||
CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
||||
libz.a
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
# FreeBSD: i386
|
||||
# Linux: i686
|
||||
|
||||
*:i386 | *:i686)
|
||||
case $ZLIB_ASM in
|
||||
pentium)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& cp contrib/asm586/match.S . \\
|
||||
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) OBJA=match.o libz.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
pentiumpro)
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& cp contrib/asm686/match.S . \\
|
||||
&& CFLAGS="$ZLIB_OPT -DASMV" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) OBJA=match.o libz.a
|
||||
|
||||
END
|
||||
|
||||
done=YES
|
||||
;;
|
||||
|
||||
NO)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "$0: error: invalid --with-zlib-asm=$ZLIB_ASM option."
|
||||
echo "The valid values are \"pentium\" and \"pentiumpro\" only".
|
||||
echo
|
||||
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
|
||||
if [ $done = NO ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ZLIB/libz.a: $NGX_MAKEFILE
|
||||
cd $ZLIB \\
|
||||
&& \$(MAKE) distclean \\
|
||||
&& CFLAGS="$ZLIB_OPT" CC="\$(CC)" \\
|
||||
./configure \\
|
||||
&& \$(MAKE) libz.a
|
||||
|
||||
END
|
||||
|
||||
fi
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -q -O2 -tWM -w-8004 -w-8012 $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
bcc32 -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
||||
trees.c zutil.c compress.c \
|
||||
inflate.c inffast.c inftrees.c
|
||||
|
||||
tlib zlib.lib +adler32.obj +crc32.obj +deflate.obj \
|
||||
+trees.obj +zutil.obj +compress.obj \
|
||||
+inflate.obj +inffast.obj +inftrees.obj
|
|
@ -1,17 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
cl -c $(CFLAGS) adler32.c crc32.c deflate.c \
|
||||
trees.c zutil.c compress.c \
|
||||
inflate.c inffast.c inftrees.c
|
||||
|
||||
link -lib -out:zlib.lib adler32.obj crc32.obj deflate.obj \
|
||||
trees.obj zutil.obj compress.obj \
|
||||
inflate.obj inffast.obj inftrees.obj
|
|
@ -1,14 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CFLAGS = -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT)
|
||||
|
||||
zlib.lib:
|
||||
cd $(ZLIB)
|
||||
|
||||
wcl386 -c $(CFLAGS) adler32.c crc32.c deflate.c trees.c zutil.c &
|
||||
compress.c inflate.c inffast.c inftrees.c
|
||||
wlib -n zlib.lib adler32.obj crc32.obj deflate.obj trees.obj &
|
||||
zutil.obj compress.obj inflate.obj inffast.obj inftrees.obj
|
|
@ -1,417 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo "creating $NGX_MAKEFILE"
|
||||
|
||||
mkdir -p $NGX_OBJS/src/core $NGX_OBJS/src/event $NGX_OBJS/src/event/modules \
|
||||
$NGX_OBJS/src/os/unix $NGX_OBJS/src/os/win32 \
|
||||
$NGX_OBJS/src/http $NGX_OBJS/src/http/modules \
|
||||
$NGX_OBJS/src/http/modules/perl \
|
||||
$NGX_OBJS/src/mail \
|
||||
$NGX_OBJS/src/misc
|
||||
|
||||
|
||||
ngx_objs_dir=$NGX_OBJS$ngx_regex_dirsep
|
||||
ngx_use_pch=`echo $NGX_USE_PCH | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
|
||||
cat << END > $NGX_MAKEFILE
|
||||
|
||||
CC = $CC
|
||||
CFLAGS = $CFLAGS
|
||||
CPP = $CPP
|
||||
LINK = $LINK
|
||||
|
||||
END
|
||||
|
||||
|
||||
if test -n "$NGX_PERL_CFLAGS"; then
|
||||
echo NGX_PERL_CFLAGS = $NGX_PERL_CFLAGS >> $NGX_MAKEFILE
|
||||
echo NGX_PM_CFLAGS = $NGX_PM_CFLAGS >> $NGX_MAKEFILE
|
||||
fi
|
||||
|
||||
|
||||
# ALL_INCS, required by the addons and by OpenWatcom C precompiled headers
|
||||
|
||||
ngx_incs=`echo $CORE_INCS $NGX_OBJS $HTTP_INCS $MAIL_INCS\
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
ALL_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_all_srcs="$CORE_SRCS"
|
||||
|
||||
|
||||
# the core dependences and include paths
|
||||
|
||||
ngx_deps=`echo $CORE_DEPS $NGX_AUTO_CONFIG_H $NGX_PCH \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $CORE_INCS $NGX_OBJS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
CORE_DEPS = $ngx_deps
|
||||
|
||||
|
||||
CORE_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
|
||||
# the http dependences and include paths
|
||||
|
||||
if [ $HTTP = YES ]; then
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $HTTP_SRCS"
|
||||
|
||||
ngx_deps=`echo $HTTP_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $HTTP_INCS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
HTTP_DEPS = $ngx_deps
|
||||
|
||||
|
||||
HTTP_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the mail dependences and include paths
|
||||
|
||||
if [ $MAIL = YES ]; then
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $MAIL_SRCS"
|
||||
|
||||
ngx_deps=`echo $MAIL_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_incs=`echo $MAIL_INCS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont$ngx_include_opt\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
MAIL_DEPS = $ngx_deps
|
||||
|
||||
|
||||
MAIL_INCS = $ngx_include_opt$ngx_incs
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $NGX_MISC_SRCS"
|
||||
|
||||
|
||||
if test -n "$NGX_ADDON_SRCS"; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
ADDON_DEPS = \$(CORE_DEPS) $NGX_ADDON_DEPS
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# nginx
|
||||
|
||||
ngx_all_srcs=`echo $ngx_all_srcs | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
for ngx_src in $NGX_ADDON_SRCS
|
||||
do
|
||||
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||
|
||||
test -d $NGX_OBJS/$ngx_obj || mkdir -p $NGX_OBJS/$ngx_obj
|
||||
|
||||
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_all_srcs="$ngx_all_srcs $ngx_obj"
|
||||
done
|
||||
|
||||
ngx_all_objs=`echo $ngx_all_srcs \
|
||||
| sed -e "s#\([^ ]*\.\)cpp#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)cc#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)c#$NGX_OBJS\/\1$ngx_objext#g" \
|
||||
-e "s#\([^ ]*\.\)S#$NGX_OBJS\/\1$ngx_objext#g"`
|
||||
|
||||
ngx_modules_c=`echo $NGX_MODULES_C | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_modules_obj=`echo $ngx_modules_c | sed -e "s/\(.*\.\)c/\1$ngx_objext/"`
|
||||
|
||||
|
||||
if test -n "$NGX_RES"; then
|
||||
ngx_res=$NGX_RES
|
||||
else
|
||||
ngx_res="$NGX_RC $NGX_ICONS"
|
||||
ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
fi
|
||||
|
||||
ngx_deps=`echo $ngx_all_objs $ngx_modules_obj $ngx_res $LINK_DEPS \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_objs=`echo $ngx_all_objs $ngx_modules_obj \
|
||||
| sed -e "s/ *\([^ ][^ ]*\)/$ngx_long_regex_cont\1/g" \
|
||||
-e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
if test -n "$NGX_LD_OPT$CORE_LIBS"; then
|
||||
ngx_libs=`echo $NGX_LD_OPT $CORE_LIBS \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`
|
||||
fi
|
||||
|
||||
ngx_link=${CORE_LINK:+`echo $CORE_LINK \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g" -e "s/^/$ngx_long_regex_cont/"`}
|
||||
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$NGX_OBJS${ngx_dirsep}nginx${ngx_binext}: $ngx_deps$ngx_spacer
|
||||
\$(LINK) ${ngx_long_start}${ngx_binout}$NGX_OBJS${ngx_dirsep}nginx$ngx_long_cont$ngx_objs$ngx_libs$ngx_link
|
||||
$ngx_rcc
|
||||
${ngx_long_end}
|
||||
END
|
||||
|
||||
|
||||
# ngx_modules.c
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS)"
|
||||
fi
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_modules_obj: \$(CORE_DEPS)$ngx_cont$ngx_modules_c
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_modules_obj$ngx_tab$ngx_modules_c$NGX_AUX
|
||||
|
||||
END
|
||||
|
||||
|
||||
# the core sources
|
||||
|
||||
for ngx_src in $CORE_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
|
||||
done
|
||||
|
||||
|
||||
# the http sources
|
||||
|
||||
if [ $HTTP = YES ]; then
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(HTTP_INCS)"
|
||||
ngx_perl_cc="\$(CC) $ngx_compile_opt \$(NGX_PERL_CFLAGS) "
|
||||
ngx_perl_cc="$ngx_perl_cc \$(CORE_INCS) \$(HTTP_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_source in $HTTP_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_source | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
if [ $ngx_source = src/http/modules/perl/ngx_http_perl_module.c ]; then
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_perl_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
else
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(HTTP_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the mail sources
|
||||
|
||||
if [ $MAIL = YES ]; then
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
else
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) \$(CORE_INCS) \$(MAIL_INCS)"
|
||||
fi
|
||||
|
||||
for ngx_src in $MAIL_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) \$(MAIL_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the misc sources
|
||||
|
||||
if test -n "$NGX_MISC_SRCS"; then
|
||||
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
|
||||
for ngx_src in $NGX_MISC_SRCS
|
||||
do
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_obj=`echo $ngx_src \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(CORE_DEPS) $ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the addons sources
|
||||
|
||||
if test -n "$NGX_ADDON_SRCS"; then
|
||||
|
||||
ngx_cc="\$(CC) $ngx_compile_opt \$(CFLAGS) $ngx_use_pch \$(ALL_INCS)"
|
||||
|
||||
for ngx_src in $NGX_ADDON_SRCS
|
||||
do
|
||||
ngx_obj="addon/`basename \`dirname $ngx_src\``"
|
||||
|
||||
ngx_obj=`echo $ngx_obj/\`basename $ngx_src\` \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_obj=`echo $ngx_obj \
|
||||
| sed -e "s#^\(.*\.\)cpp\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)cc\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)c\\$#$ngx_objs_dir\1$ngx_objext#g" \
|
||||
-e "s#^\(.*\.\)S\\$#$ngx_objs_dir\1$ngx_objext#g"`
|
||||
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_obj: \$(ADDON_DEPS)$ngx_cont$ngx_src
|
||||
$ngx_cc$ngx_tab$ngx_objout$ngx_obj$ngx_tab$ngx_src$NGX_AUX
|
||||
|
||||
END
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the addons config.make
|
||||
|
||||
if test -n "$NGX_ADDONS"; then
|
||||
|
||||
for ngx_addon_dir in $NGX_ADDONS
|
||||
do
|
||||
if test -f $ngx_addon_dir/config.make; then
|
||||
. $ngx_addon_dir/config.make
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Win32 resource file
|
||||
|
||||
if test -n "$NGX_RES"; then
|
||||
|
||||
ngx_res=`echo "$NGX_RES: $NGX_RC $NGX_ICONS" \
|
||||
| sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
ngx_rcc=`echo $NGX_RCC | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_res
|
||||
$ngx_rcc
|
||||
|
||||
END
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# the precompiled headers
|
||||
|
||||
if test -n "$NGX_PCH"; then
|
||||
echo "#include <ngx_config.h>" > $NGX_OBJS/ngx_pch.c
|
||||
|
||||
ngx_pch="src/core/ngx_config.h $OS_CONFIG $NGX_OBJS/ngx_auto_config.h"
|
||||
ngx_pch=`echo "$NGX_PCH: $ngx_pch" | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
ngx_src="\$(CC) \$(CFLAGS) $NGX_BUILD_PCH $ngx_compile_opt \$(ALL_INCS)"
|
||||
ngx_src="$ngx_src $ngx_objout$NGX_OBJS/ngx_pch.obj $NGX_OBJS/ngx_pch.c"
|
||||
ngx_src=`echo $ngx_src | sed -e "s/\//$ngx_regex_dirsep/g"`
|
||||
|
||||
cat << END >> $NGX_MAKEFILE
|
||||
|
||||
$ngx_pch
|
||||
$ngx_src
|
||||
|
||||
END
|
||||
|
||||
fi
|
|
@ -1,534 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
if [ $EVENT_SELECT = NO -a $EVENT_FOUND = NO ]; then
|
||||
EVENT_SELECT=YES
|
||||
fi
|
||||
|
||||
if [ $EVENT_SELECT = YES ]; then
|
||||
have=NGX_HAVE_SELECT . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $SELECT_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $SELECT_MODULE"
|
||||
fi
|
||||
|
||||
|
||||
if [ $EVENT_POLL = NO -a $EVENT_FOUND = NO ]; then
|
||||
EVENT_POLL=YES
|
||||
fi
|
||||
|
||||
if [ $EVENT_POLL = YES ]; then
|
||||
have=NGX_HAVE_POLL . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $POLL_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $POLL_MODULE"
|
||||
fi
|
||||
|
||||
|
||||
if [ $NGX_TEST_BUILD_DEVPOLL = YES ]; then
|
||||
have=NGX_HAVE_DEVPOLL . auto/have
|
||||
have=NGX_TEST_BUILD_DEVPOLL . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $DEVPOLL_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $DEVPOLL_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $NGX_TEST_BUILD_EVENTPORT = YES ]; then
|
||||
have=NGX_HAVE_EVENTPORT . auto/have
|
||||
have=NGX_TEST_BUILD_EVENTPORT . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $EVENTPORT_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $EVENTPORT_SRCS"
|
||||
fi
|
||||
|
||||
if [ $NGX_TEST_BUILD_EPOLL = YES ]; then
|
||||
have=NGX_HAVE_EPOLL . auto/have
|
||||
have=NGX_HAVE_EPOLLRDHUP . auto/have
|
||||
have=NGX_HAVE_EVENTFD . auto/have
|
||||
have=NGX_TEST_BUILD_EPOLL . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $EPOLL_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $EPOLL_SRCS"
|
||||
fi
|
||||
|
||||
if [ $NGX_TEST_BUILD_RTSIG = YES ]; then
|
||||
have=NGX_HAVE_RTSIG . auto/have
|
||||
have=NGX_TEST_BUILD_RTSIG . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
|
||||
fi
|
||||
|
||||
if [ $NGX_TEST_BUILD_SOLARIS_SENDFILEV = YES ]; then
|
||||
have=NGX_TEST_BUILD_SOLARIS_SENDFILEV . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $SOLARIS_SENDFILEV_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP != YES ]; then
|
||||
have=NGX_CRYPT . auto/nohave
|
||||
CRYPT_LIB=
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP_CACHE = YES ]; then
|
||||
USE_MD5=YES
|
||||
have=NGX_HTTP_CACHE . auto/have
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_FILE_CACHE_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP_SSI = YES ]; then
|
||||
HTTP_POSTPONE=YES
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP_ADDITION = YES ]; then
|
||||
HTTP_POSTPONE=YES
|
||||
fi
|
||||
|
||||
|
||||
# the module order is important
|
||||
# ngx_http_static_module
|
||||
# ngx_http_gzip_static_module
|
||||
# ngx_http_dav_module
|
||||
# ngx_http_autoindex_module
|
||||
# ngx_http_index_module
|
||||
# ngx_http_random_index_module
|
||||
#
|
||||
# ngx_http_access_module
|
||||
# ngx_http_realip_module
|
||||
#
|
||||
#
|
||||
# the filter order is important
|
||||
# ngx_http_write_filter
|
||||
# ngx_http_header_filter
|
||||
# ngx_http_chunked_filter
|
||||
# ngx_http_spdy_filter
|
||||
# ngx_http_range_header_filter
|
||||
# ngx_http_gzip_filter
|
||||
# ngx_http_postpone_filter
|
||||
# ngx_http_ssi_filter
|
||||
# ngx_http_charset_filter
|
||||
# ngx_http_xslt_filter
|
||||
# ngx_http_image_filter
|
||||
# ngx_http_sub_filter
|
||||
# ngx_http_addition_filter
|
||||
# ngx_http_gunzip_filter
|
||||
# ngx_http_userid_filter
|
||||
# ngx_http_headers_filter
|
||||
# ngx_http_copy_filter
|
||||
# ngx_http_range_body_filter
|
||||
# ngx_http_not_modified_filter
|
||||
|
||||
HTTP_FILTER_MODULES="$HTTP_WRITE_FILTER_MODULE \
|
||||
$HTTP_HEADER_FILTER_MODULE \
|
||||
$HTTP_CHUNKED_FILTER_MODULE"
|
||||
|
||||
if [ $HTTP_SPDY = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SPDY_FILTER_MODULE"
|
||||
fi
|
||||
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_RANGE_HEADER_FILTER_MODULE"
|
||||
|
||||
if [ $HTTP_GZIP = YES ]; then
|
||||
have=NGX_HTTP_GZIP . auto/have
|
||||
USE_ZLIB=YES
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_GZIP_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_GZIP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_POSTPONE = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_POSTPONE_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_POSTPONE_FILTER_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SSI = YES ]; then
|
||||
have=NGX_HTTP_SSI . auto/have
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SSI_FILTER_MODULE"
|
||||
HTTP_DEPS="$HTTP_DEPS $HTTP_SSI_DEPS"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SSI_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_CHARSET = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_CHARSET_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_CHARSET_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_XSLT = YES ]; then
|
||||
USE_LIBXSLT=YES
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_XSLT_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_XSLT_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_IMAGE_FILTER = YES ]; then
|
||||
USE_LIBGD=YES
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_IMAGE_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_IMAGE_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SUB = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_SUB_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SUB_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_ADDITION = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_ADDITION_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_ADDITION_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_GUNZIP = YES ]; then
|
||||
have=NGX_HTTP_GZIP . auto/have
|
||||
USE_ZLIB=YES
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_GUNZIP_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_GUNZIP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_USERID = YES ]; then
|
||||
HTTP_FILTER_MODULES="$HTTP_FILTER_MODULES $HTTP_USERID_FILTER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_USERID_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP_SPDY = YES ]; then
|
||||
have=NGX_HTTP_SPDY . auto/have
|
||||
USE_ZLIB=YES
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_SPDY_MODULE"
|
||||
HTTP_DEPS="$HTTP_DEPS $HTTP_SPDY_DEPS"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SPDY_SRCS"
|
||||
fi
|
||||
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_STATIC_MODULE"
|
||||
|
||||
if [ $HTTP_GZIP_STATIC = YES ]; then
|
||||
have=NGX_HTTP_GZIP . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_GZIP_STATIC_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_GZIP_STATIC_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_DAV = YES ]; then
|
||||
have=NGX_HTTP_DAV . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_DAV_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_DAV_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_AUTOINDEX = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTOINDEX_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTOINDEX_SRCS"
|
||||
fi
|
||||
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_INDEX_MODULE"
|
||||
|
||||
if [ $HTTP_RANDOM_INDEX = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_RANDOM_INDEX_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_RANDOM_INDEX_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_AUTH_REQUEST = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTH_REQUEST_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTH_REQUEST_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_AUTH_BASIC = YES ]; then
|
||||
USE_MD5=YES
|
||||
USE_SHA1=YES
|
||||
have=NGX_CRYPT . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_AUTH_BASIC_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_AUTH_BASIC_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS $CRYPT_LIB"
|
||||
fi
|
||||
|
||||
if [ $HTTP_ACCESS = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_ACCESS_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_ACCESS_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_LIMIT_CONN = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_LIMIT_CONN_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_LIMIT_CONN_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_LIMIT_REQ = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_LIMIT_REQ_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_LIMIT_REQ_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_REALIP = YES ]; then
|
||||
have=NGX_HTTP_REALIP . auto/have
|
||||
have=NGX_HTTP_X_FORWARDED_FOR . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_REALIP_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_REALIP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_STATUS = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_STATUS_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_STATUS_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_GEO = YES ]; then
|
||||
have=NGX_HTTP_X_FORWARDED_FOR . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_GEO_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_GEO_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_GEOIP = YES ]; then
|
||||
have=NGX_HTTP_X_FORWARDED_FOR . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_GEOIP_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_GEOIP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_MAP = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_MAP_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_MAP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SPLIT_CLIENTS = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_SPLIT_CLIENTS_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SPLIT_CLIENTS_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_REFERER = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_REFERER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_REFERER_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_REWRITE = YES -a $USE_PCRE != DISABLED ]; then
|
||||
USE_PCRE=YES
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_REWRITE_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_REWRITE_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SSL = YES ]; then
|
||||
USE_OPENSSL=YES
|
||||
have=NGX_HTTP_SSL . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_SSL_MODULE"
|
||||
HTTP_DEPS="$HTTP_DEPS $HTTP_SSL_DEPS"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SSL_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_PROXY = YES ]; then
|
||||
have=NGX_HTTP_X_FORWARDED_FOR . auto/have
|
||||
#USE_MD5=YES
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_PROXY_MODULE"
|
||||
HTTP_DEPS="$HTTP_DEPS $HTTP_PROXY_DEPS"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_PROXY_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_FASTCGI = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_FASTCGI_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_FASTCGI_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_UWSGI = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_UWSGI_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_UWSGI_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SCGI = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_SCGI_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SCGI_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_PERL = YES ]; then
|
||||
USE_PERL=YES
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_PERL_MODULE"
|
||||
HTTP_INCS="$HTTP_INCS $HTTP_PERL_INCS"
|
||||
HTTP_DEPS="$HTTP_DEPS $HTTP_PERL_DEPS"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_PERL_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_MEMCACHED = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_MEMCACHED_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_MEMCACHED_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_EMPTY_GIF = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_EMPTY_GIF_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_EMPTY_GIF_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_BROWSER = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_BROWSER_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_BROWSER_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_SECURE_LINK = YES ]; then
|
||||
USE_MD5=YES
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_SECURE_LINK_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_SECURE_LINK_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_DEGRADATION = YES ]; then
|
||||
have=NGX_HTTP_DEGRADATION . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_DEGRADATION_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_DEGRADATION_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_FLV = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_FLV_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_FLV_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_MP4 = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_MP4_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_MP4_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_UPSTREAM_HASH = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_UPSTREAM_HASH_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_HASH_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_UPSTREAM_IP_HASH = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_UPSTREAM_IP_HASH_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_IP_HASH_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_UPSTREAM_LEAST_CONN = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_UPSTREAM_LEAST_CONN_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_LEAST_CONN_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_UPSTREAM_KEEPALIVE = YES ]; then
|
||||
HTTP_MODULES="$HTTP_MODULES $HTTP_UPSTREAM_KEEPALIVE_MODULE"
|
||||
HTTP_SRCS="$HTTP_SRCS $HTTP_UPSTREAM_KEEPALIVE_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP_STUB_STATUS = YES ]; then
|
||||
have=NGX_STAT_STUB . auto/have
|
||||
HTTP_MODULES="$HTTP_MODULES ngx_http_stub_status_module"
|
||||
HTTP_SRCS="$HTTP_SRCS src/http/modules/ngx_http_stub_status_module.c"
|
||||
fi
|
||||
|
||||
#if [ -r $NGX_OBJS/auto ]; then
|
||||
# . $NGX_OBJS/auto
|
||||
#fi
|
||||
|
||||
|
||||
if test -n "$NGX_ADDONS"; then
|
||||
|
||||
echo configuring additional modules
|
||||
|
||||
for ngx_addon_dir in $NGX_ADDONS
|
||||
do
|
||||
echo "adding module in $ngx_addon_dir"
|
||||
|
||||
if test -f $ngx_addon_dir/config; then
|
||||
. $ngx_addon_dir/config
|
||||
|
||||
echo " + $ngx_addon_name was configured"
|
||||
|
||||
else
|
||||
echo "$0: error: no $ngx_addon_dir/config was found"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
if [ $MAIL_SSL = YES ]; then
|
||||
have=NGX_MAIL_SSL . auto/have
|
||||
USE_OPENSSL=YES
|
||||
fi
|
||||
|
||||
|
||||
modules="$CORE_MODULES $EVENT_MODULES"
|
||||
|
||||
|
||||
if [ $USE_OPENSSL = YES ]; then
|
||||
modules="$modules $OPENSSL_MODULE"
|
||||
CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $OPENSSL_SRCS"
|
||||
fi
|
||||
|
||||
if [ $USE_PCRE = YES ]; then
|
||||
modules="$modules $REGEX_MODULE"
|
||||
CORE_DEPS="$CORE_DEPS $REGEX_DEPS"
|
||||
CORE_SRCS="$CORE_SRCS $REGEX_SRCS"
|
||||
fi
|
||||
|
||||
if [ $HTTP = YES ]; then
|
||||
modules="$modules $HTTP_MODULES $HTTP_FILTER_MODULES \
|
||||
$HTTP_HEADERS_FILTER_MODULE \
|
||||
$HTTP_AUX_FILTER_MODULES \
|
||||
$HTTP_COPY_FILTER_MODULE \
|
||||
$HTTP_RANGE_BODY_FILTER_MODULE \
|
||||
$HTTP_NOT_MODIFIED_FILTER_MODULE"
|
||||
|
||||
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(HTTP_DEPS)"
|
||||
fi
|
||||
|
||||
|
||||
if [ $MAIL = YES ]; then
|
||||
modules="$modules $MAIL_MODULES"
|
||||
|
||||
if [ $MAIL_SSL = YES ]; then
|
||||
modules="$modules $MAIL_SSL_MODULE"
|
||||
MAIL_DEPS="$MAIL_DEPS $MAIL_SSL_DEPS"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_SSL_SRCS"
|
||||
fi
|
||||
|
||||
if [ $MAIL_POP3 = YES ]; then
|
||||
modules="$modules $MAIL_POP3_MODULE"
|
||||
MAIL_DEPS="$MAIL_DEPS $MAIL_POP3_DEPS"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_POP3_SRCS"
|
||||
fi
|
||||
|
||||
if [ $MAIL_IMAP = YES ]; then
|
||||
modules="$modules $MAIL_IMAP_MODULE"
|
||||
MAIL_DEPS="$MAIL_DEPS $MAIL_IMAP_DEPS"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_IMAP_SRCS"
|
||||
fi
|
||||
|
||||
if [ $MAIL_SMTP = YES ]; then
|
||||
modules="$modules $MAIL_SMTP_MODULE"
|
||||
MAIL_DEPS="$MAIL_DEPS $MAIL_SMTP_DEPS"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_SMTP_SRCS"
|
||||
fi
|
||||
|
||||
modules="$modules $MAIL_AUTH_HTTP_MODULE"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_AUTH_HTTP_SRCS"
|
||||
|
||||
modules="$modules $MAIL_PROXY_MODULE"
|
||||
MAIL_SRCS="$MAIL_SRCS $MAIL_PROXY_SRCS"
|
||||
|
||||
NGX_ADDON_DEPS="$NGX_ADDON_DEPS \$(MAIL_DEPS)"
|
||||
fi
|
||||
|
||||
|
||||
if [ $NGX_GOOGLE_PERFTOOLS = YES ]; then
|
||||
modules="$modules $NGX_GOOGLE_PERFTOOLS_MODULE"
|
||||
NGX_MISC_SRCS="$NGX_MISC_SRCS $NGX_GOOGLE_PERFTOOLS_SRCS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $NGX_CPP_TEST = YES ]; then
|
||||
NGX_MISC_SRCS="$NGX_MISC_SRCS $NGX_CPP_TEST_SRCS"
|
||||
CORE_LIBS="$CORE_LIBS -lstdc++"
|
||||
fi
|
||||
|
||||
|
||||
cat << END > $NGX_MODULES_C
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
|
||||
$NGX_PRAGMA
|
||||
|
||||
END
|
||||
|
||||
for mod in $modules
|
||||
do
|
||||
echo "extern ngx_module_t $mod;" >> $NGX_MODULES_C
|
||||
done
|
||||
|
||||
echo >> $NGX_MODULES_C
|
||||
echo 'ngx_module_t *ngx_modules[] = {' >> $NGX_MODULES_C
|
||||
|
||||
for mod in $modules
|
||||
do
|
||||
echo " &$mod," >> $NGX_MODULES_C
|
||||
done
|
||||
|
||||
cat << END >> $NGX_MODULES_C
|
||||
NULL
|
||||
};
|
||||
|
||||
END
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $have
|
||||
#define $have 0
|
||||
#endif
|
||||
|
||||
END
|
|
@ -1,527 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
help=no
|
||||
|
||||
NGX_PREFIX=
|
||||
NGX_SBIN_PATH=
|
||||
NGX_CONF_PREFIX=
|
||||
NGX_CONF_PATH=
|
||||
NGX_ERROR_LOG_PATH=
|
||||
NGX_PID_PATH=
|
||||
NGX_LOCK_PATH=
|
||||
NGX_USER=
|
||||
NGX_GROUP=
|
||||
NGX_BUILD=
|
||||
|
||||
CC=${CC:-cc}
|
||||
CPP=
|
||||
NGX_OBJS=objs
|
||||
|
||||
NGX_DEBUG=NO
|
||||
NGX_CC_OPT=
|
||||
NGX_LD_OPT=
|
||||
CPU=NO
|
||||
|
||||
NGX_RPATH=NO
|
||||
|
||||
NGX_TEST_BUILD_DEVPOLL=NO
|
||||
NGX_TEST_BUILD_EVENTPORT=NO
|
||||
NGX_TEST_BUILD_EPOLL=NO
|
||||
NGX_TEST_BUILD_RTSIG=NO
|
||||
NGX_TEST_BUILD_SOLARIS_SENDFILEV=NO
|
||||
|
||||
NGX_PLATFORM=
|
||||
NGX_WINE=
|
||||
|
||||
EVENT_FOUND=NO
|
||||
|
||||
EVENT_RTSIG=NO
|
||||
EVENT_SELECT=NO
|
||||
EVENT_POLL=NO
|
||||
EVENT_AIO=NO
|
||||
|
||||
USE_THREADS=NO
|
||||
|
||||
NGX_FILE_AIO=NO
|
||||
NGX_IPV6=NO
|
||||
|
||||
HTTP=YES
|
||||
|
||||
NGX_HTTP_LOG_PATH=
|
||||
NGX_HTTP_CLIENT_TEMP_PATH=
|
||||
NGX_HTTP_PROXY_TEMP_PATH=
|
||||
NGX_HTTP_FASTCGI_TEMP_PATH=
|
||||
NGX_HTTP_UWSGI_TEMP_PATH=
|
||||
NGX_HTTP_SCGI_TEMP_PATH=
|
||||
|
||||
HTTP_CACHE=YES
|
||||
HTTP_CHARSET=YES
|
||||
HTTP_GZIP=YES
|
||||
HTTP_SSL=NO
|
||||
HTTP_SPDY=NO
|
||||
HTTP_SSI=YES
|
||||
HTTP_POSTPONE=NO
|
||||
HTTP_REALIP=NO
|
||||
HTTP_XSLT=NO
|
||||
HTTP_IMAGE_FILTER=NO
|
||||
HTTP_SUB=NO
|
||||
HTTP_ADDITION=NO
|
||||
HTTP_DAV=NO
|
||||
HTTP_ACCESS=YES
|
||||
HTTP_AUTH_BASIC=YES
|
||||
HTTP_AUTH_REQUEST=NO
|
||||
HTTP_USERID=YES
|
||||
HTTP_AUTOINDEX=YES
|
||||
HTTP_RANDOM_INDEX=NO
|
||||
HTTP_STATUS=NO
|
||||
HTTP_GEO=YES
|
||||
HTTP_GEOIP=NO
|
||||
HTTP_MAP=YES
|
||||
HTTP_SPLIT_CLIENTS=YES
|
||||
HTTP_REFERER=YES
|
||||
HTTP_REWRITE=YES
|
||||
HTTP_PROXY=YES
|
||||
HTTP_FASTCGI=YES
|
||||
HTTP_UWSGI=YES
|
||||
HTTP_SCGI=YES
|
||||
HTTP_PERL=NO
|
||||
HTTP_MEMCACHED=YES
|
||||
HTTP_LIMIT_CONN=YES
|
||||
HTTP_LIMIT_REQ=YES
|
||||
HTTP_EMPTY_GIF=YES
|
||||
HTTP_BROWSER=YES
|
||||
HTTP_SECURE_LINK=NO
|
||||
HTTP_DEGRADATION=NO
|
||||
HTTP_FLV=NO
|
||||
HTTP_MP4=NO
|
||||
HTTP_GUNZIP=NO
|
||||
HTTP_GZIP_STATIC=NO
|
||||
HTTP_UPSTREAM_HASH=YES
|
||||
HTTP_UPSTREAM_IP_HASH=YES
|
||||
HTTP_UPSTREAM_LEAST_CONN=YES
|
||||
HTTP_UPSTREAM_KEEPALIVE=YES
|
||||
|
||||
# STUB
|
||||
HTTP_STUB_STATUS=NO
|
||||
|
||||
MAIL=NO
|
||||
MAIL_SSL=NO
|
||||
MAIL_POP3=YES
|
||||
MAIL_IMAP=YES
|
||||
MAIL_SMTP=YES
|
||||
|
||||
NGX_ADDONS=
|
||||
|
||||
USE_PCRE=NO
|
||||
PCRE=NONE
|
||||
PCRE_OPT=
|
||||
PCRE_CONF_OPT=
|
||||
PCRE_JIT=NO
|
||||
|
||||
USE_OPENSSL=NO
|
||||
OPENSSL=NONE
|
||||
|
||||
USE_MD5=NO
|
||||
MD5=NONE
|
||||
MD5_OPT=
|
||||
MD5_ASM=NO
|
||||
|
||||
USE_SHA1=NO
|
||||
SHA1=NONE
|
||||
SHA1_OPT=
|
||||
SHA1_ASM=NO
|
||||
|
||||
USE_ZLIB=NO
|
||||
ZLIB=NONE
|
||||
ZLIB_OPT=
|
||||
ZLIB_ASM=NO
|
||||
|
||||
USE_PERL=NO
|
||||
NGX_PERL=perl
|
||||
|
||||
USE_LIBXSLT=NO
|
||||
USE_LIBGD=NO
|
||||
|
||||
NGX_GOOGLE_PERFTOOLS=NO
|
||||
NGX_CPP_TEST=NO
|
||||
|
||||
NGX_LIBATOMIC=NO
|
||||
|
||||
NGX_CPU_CACHE_LINE=
|
||||
|
||||
NGX_POST_CONF_MSG=
|
||||
|
||||
opt=
|
||||
|
||||
for option
|
||||
do
|
||||
opt="$opt `echo $option | sed -e \"s/\(--[^=]*=\)\(.* .*\)/\1'\2'/\"`"
|
||||
|
||||
case "$option" in
|
||||
-*=*) value=`echo "$option" | sed -e 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
*) value="" ;;
|
||||
esac
|
||||
|
||||
case "$option" in
|
||||
--help) help=yes ;;
|
||||
|
||||
--prefix=) NGX_PREFIX="!" ;;
|
||||
--prefix=*) NGX_PREFIX="$value" ;;
|
||||
--sbin-path=*) NGX_SBIN_PATH="$value" ;;
|
||||
--conf-path=*) NGX_CONF_PATH="$value" ;;
|
||||
--error-log-path=*) NGX_ERROR_LOG_PATH="$value";;
|
||||
--pid-path=*) NGX_PID_PATH="$value" ;;
|
||||
--lock-path=*) NGX_LOCK_PATH="$value" ;;
|
||||
--user=*) NGX_USER="$value" ;;
|
||||
--group=*) NGX_GROUP="$value" ;;
|
||||
|
||||
--crossbuild=*) NGX_PLATFORM="$value" ;;
|
||||
|
||||
--build=*) NGX_BUILD="$value" ;;
|
||||
--builddir=*) NGX_OBJS="$value" ;;
|
||||
|
||||
--with-rtsig_module) EVENT_RTSIG=YES ;;
|
||||
--with-select_module) EVENT_SELECT=YES ;;
|
||||
--without-select_module) EVENT_SELECT=NONE ;;
|
||||
--with-poll_module) EVENT_POLL=YES ;;
|
||||
--without-poll_module) EVENT_POLL=NONE ;;
|
||||
--with-aio_module) EVENT_AIO=YES ;;
|
||||
|
||||
#--with-threads=*) USE_THREADS="$value" ;;
|
||||
#--with-threads) USE_THREADS="pthreads" ;;
|
||||
|
||||
--with-file-aio) NGX_FILE_AIO=YES ;;
|
||||
--with-ipv6) NGX_IPV6=YES ;;
|
||||
|
||||
--without-http) HTTP=NO ;;
|
||||
--without-http-cache) HTTP_CACHE=NO ;;
|
||||
|
||||
--http-log-path=*) NGX_HTTP_LOG_PATH="$value" ;;
|
||||
--http-client-body-temp-path=*) NGX_HTTP_CLIENT_TEMP_PATH="$value" ;;
|
||||
--http-proxy-temp-path=*) NGX_HTTP_PROXY_TEMP_PATH="$value" ;;
|
||||
--http-fastcgi-temp-path=*) NGX_HTTP_FASTCGI_TEMP_PATH="$value" ;;
|
||||
--http-uwsgi-temp-path=*) NGX_HTTP_UWSGI_TEMP_PATH="$value" ;;
|
||||
--http-scgi-temp-path=*) NGX_HTTP_SCGI_TEMP_PATH="$value" ;;
|
||||
|
||||
--with-http_ssl_module) HTTP_SSL=YES ;;
|
||||
--with-http_spdy_module) HTTP_SPDY=YES ;;
|
||||
--with-http_realip_module) HTTP_REALIP=YES ;;
|
||||
--with-http_addition_module) HTTP_ADDITION=YES ;;
|
||||
--with-http_xslt_module) HTTP_XSLT=YES ;;
|
||||
--with-http_image_filter_module) HTTP_IMAGE_FILTER=YES ;;
|
||||
--with-http_geoip_module) HTTP_GEOIP=YES ;;
|
||||
--with-http_sub_module) HTTP_SUB=YES ;;
|
||||
--with-http_dav_module) HTTP_DAV=YES ;;
|
||||
--with-http_flv_module) HTTP_FLV=YES ;;
|
||||
--with-http_mp4_module) HTTP_MP4=YES ;;
|
||||
--with-http_gunzip_module) HTTP_GUNZIP=YES ;;
|
||||
--with-http_gzip_static_module) HTTP_GZIP_STATIC=YES ;;
|
||||
--with-http_auth_request_module) HTTP_AUTH_REQUEST=YES ;;
|
||||
--with-http_random_index_module) HTTP_RANDOM_INDEX=YES ;;
|
||||
--with-http_secure_link_module) HTTP_SECURE_LINK=YES ;;
|
||||
--with-http_degradation_module) HTTP_DEGRADATION=YES ;;
|
||||
|
||||
--without-http_charset_module) HTTP_CHARSET=NO ;;
|
||||
--without-http_gzip_module) HTTP_GZIP=NO ;;
|
||||
--without-http_ssi_module) HTTP_SSI=NO ;;
|
||||
--without-http_userid_module) HTTP_USERID=NO ;;
|
||||
--without-http_access_module) HTTP_ACCESS=NO ;;
|
||||
--without-http_auth_basic_module) HTTP_AUTH_BASIC=NO ;;
|
||||
--without-http_autoindex_module) HTTP_AUTOINDEX=NO ;;
|
||||
--without-http_status_module) HTTP_STATUS=NO ;;
|
||||
--without-http_geo_module) HTTP_GEO=NO ;;
|
||||
--without-http_map_module) HTTP_MAP=NO ;;
|
||||
--without-http_split_clients_module) HTTP_SPLIT_CLIENTS=NO ;;
|
||||
--without-http_referer_module) HTTP_REFERER=NO ;;
|
||||
--without-http_rewrite_module) HTTP_REWRITE=NO ;;
|
||||
--without-http_proxy_module) HTTP_PROXY=NO ;;
|
||||
--without-http_fastcgi_module) HTTP_FASTCGI=NO ;;
|
||||
--without-http_uwsgi_module) HTTP_UWSGI=NO ;;
|
||||
--without-http_scgi_module) HTTP_SCGI=NO ;;
|
||||
--without-http_memcached_module) HTTP_MEMCACHED=NO ;;
|
||||
--without-http_limit_zone_module)
|
||||
HTTP_LIMIT_CONN=NO
|
||||
NGX_POST_CONF_MSG="$NGX_POST_CONF_MSG
|
||||
$0: warning: the \"--without-http_limit_zone_module\" option is deprecated, \
|
||||
use the \"--without-http_limit_conn_module\" option instead"
|
||||
;;
|
||||
--without-http_limit_conn_module) HTTP_LIMIT_CONN=NO ;;
|
||||
--without-http_limit_req_module) HTTP_LIMIT_REQ=NO ;;
|
||||
--without-http_empty_gif_module) HTTP_EMPTY_GIF=NO ;;
|
||||
--without-http_browser_module) HTTP_BROWSER=NO ;;
|
||||
--without-http_upstream_hash_module) HTTP_UPSTREAM_HASH=NO ;;
|
||||
--without-http_upstream_ip_hash_module) HTTP_UPSTREAM_IP_HASH=NO ;;
|
||||
--without-http_upstream_least_conn_module)
|
||||
HTTP_UPSTREAM_LEAST_CONN=NO ;;
|
||||
--without-http_upstream_keepalive_module) HTTP_UPSTREAM_KEEPALIVE=NO ;;
|
||||
|
||||
--with-http_perl_module) HTTP_PERL=YES ;;
|
||||
--with-perl_modules_path=*) NGX_PERL_MODULES="$value" ;;
|
||||
--with-perl=*) NGX_PERL="$value" ;;
|
||||
|
||||
# STUB
|
||||
--with-http_stub_status_module) HTTP_STUB_STATUS=YES ;;
|
||||
|
||||
--with-mail) MAIL=YES ;;
|
||||
--with-mail_ssl_module) MAIL_SSL=YES ;;
|
||||
# STUB
|
||||
--with-imap) MAIL=YES ;;
|
||||
--with-imap_ssl_module) MAIL_SSL=YES ;;
|
||||
--without-mail_pop3_module) MAIL_POP3=NO ;;
|
||||
--without-mail_imap_module) MAIL_IMAP=NO ;;
|
||||
--without-mail_smtp_module) MAIL_SMTP=NO ;;
|
||||
|
||||
--with-google_perftools_module) NGX_GOOGLE_PERFTOOLS=YES ;;
|
||||
--with-cpp_test_module) NGX_CPP_TEST=YES ;;
|
||||
|
||||
--add-module=*) NGX_ADDONS="$NGX_ADDONS $value" ;;
|
||||
|
||||
--with-cc=*) CC="$value" ;;
|
||||
--with-cpp=*) CPP="$value" ;;
|
||||
--with-cc-opt=*) NGX_CC_OPT="$value" ;;
|
||||
--with-ld-opt=*) NGX_LD_OPT="$value" ;;
|
||||
--with-cpu-opt=*) CPU="$value" ;;
|
||||
--with-debug) NGX_DEBUG=YES ;;
|
||||
|
||||
--without-pcre) USE_PCRE=DISABLED ;;
|
||||
--with-pcre) USE_PCRE=YES ;;
|
||||
--with-pcre=*) PCRE="$value" ;;
|
||||
--with-pcre-opt=*) PCRE_OPT="$value" ;;
|
||||
--with-pcre-jit) PCRE_JIT=YES ;;
|
||||
|
||||
--with-openssl=*) OPENSSL="$value" ;;
|
||||
--with-openssl-opt=*) OPENSSL_OPT="$value" ;;
|
||||
|
||||
--with-md5=*) MD5="$value" ;;
|
||||
--with-md5-opt=*) MD5_OPT="$value" ;;
|
||||
--with-md5-asm) MD5_ASM=YES ;;
|
||||
|
||||
--with-sha1=*) SHA1="$value" ;;
|
||||
--with-sha1-opt=*) SHA1_OPT="$value" ;;
|
||||
--with-sha1-asm) SHA1_ASM=YES ;;
|
||||
|
||||
--with-zlib=*) ZLIB="$value" ;;
|
||||
--with-zlib-opt=*) ZLIB_OPT="$value" ;;
|
||||
--with-zlib-asm=*) ZLIB_ASM="$value" ;;
|
||||
|
||||
--with-libatomic) NGX_LIBATOMIC=YES ;;
|
||||
--with-libatomic=*) NGX_LIBATOMIC="$value" ;;
|
||||
|
||||
--test-build-devpoll) NGX_TEST_BUILD_DEVPOLL=YES ;;
|
||||
--test-build-eventport) NGX_TEST_BUILD_EVENTPORT=YES ;;
|
||||
--test-build-epoll) NGX_TEST_BUILD_EPOLL=YES ;;
|
||||
--test-build-rtsig) NGX_TEST_BUILD_RTSIG=YES ;;
|
||||
--test-build-solaris-sendfilev) NGX_TEST_BUILD_SOLARIS_SENDFILEV=YES ;;
|
||||
|
||||
*)
|
||||
echo "$0: error: invalid option \"$option\""
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
NGX_CONFIGURE="$opt"
|
||||
|
||||
|
||||
if [ $help = yes ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
--help print this message
|
||||
|
||||
--prefix=PATH set installation prefix
|
||||
--sbin-path=PATH set nginx binary pathname
|
||||
--conf-path=PATH set nginx.conf pathname
|
||||
--error-log-path=PATH set error log pathname
|
||||
--pid-path=PATH set nginx.pid pathname
|
||||
--lock-path=PATH set nginx.lock pathname
|
||||
|
||||
--user=USER set non-privileged user for
|
||||
worker processes
|
||||
--group=GROUP set non-privileged group for
|
||||
worker processes
|
||||
|
||||
--build=NAME set build name
|
||||
--builddir=DIR set build directory
|
||||
|
||||
--with-rtsig_module enable rtsig module
|
||||
--with-select_module enable select module
|
||||
--without-select_module disable select module
|
||||
--with-poll_module enable poll module
|
||||
--without-poll_module disable poll module
|
||||
|
||||
--with-file-aio enable file AIO support
|
||||
--with-ipv6 enable IPv6 support
|
||||
|
||||
--with-http_ssl_module enable ngx_http_ssl_module
|
||||
--with-http_spdy_module enable ngx_http_spdy_module
|
||||
--with-http_realip_module enable ngx_http_realip_module
|
||||
--with-http_addition_module enable ngx_http_addition_module
|
||||
--with-http_xslt_module enable ngx_http_xslt_module
|
||||
--with-http_image_filter_module enable ngx_http_image_filter_module
|
||||
--with-http_geoip_module enable ngx_http_geoip_module
|
||||
--with-http_sub_module enable ngx_http_sub_module
|
||||
--with-http_dav_module enable ngx_http_dav_module
|
||||
--with-http_flv_module enable ngx_http_flv_module
|
||||
--with-http_mp4_module enable ngx_http_mp4_module
|
||||
--with-http_gunzip_module enable ngx_http_gunzip_module
|
||||
--with-http_gzip_static_module enable ngx_http_gzip_static_module
|
||||
--with-http_auth_request_module enable ngx_http_auth_request_module
|
||||
--with-http_random_index_module enable ngx_http_random_index_module
|
||||
--with-http_secure_link_module enable ngx_http_secure_link_module
|
||||
--with-http_degradation_module enable ngx_http_degradation_module
|
||||
--with-http_stub_status_module enable ngx_http_stub_status_module
|
||||
|
||||
--without-http_charset_module disable ngx_http_charset_module
|
||||
--without-http_gzip_module disable ngx_http_gzip_module
|
||||
--without-http_ssi_module disable ngx_http_ssi_module
|
||||
--without-http_userid_module disable ngx_http_userid_module
|
||||
--without-http_access_module disable ngx_http_access_module
|
||||
--without-http_auth_basic_module disable ngx_http_auth_basic_module
|
||||
--without-http_autoindex_module disable ngx_http_autoindex_module
|
||||
--without-http_geo_module disable ngx_http_geo_module
|
||||
--without-http_map_module disable ngx_http_map_module
|
||||
--without-http_split_clients_module disable ngx_http_split_clients_module
|
||||
--without-http_referer_module disable ngx_http_referer_module
|
||||
--without-http_rewrite_module disable ngx_http_rewrite_module
|
||||
--without-http_proxy_module disable ngx_http_proxy_module
|
||||
--without-http_fastcgi_module disable ngx_http_fastcgi_module
|
||||
--without-http_uwsgi_module disable ngx_http_uwsgi_module
|
||||
--without-http_scgi_module disable ngx_http_scgi_module
|
||||
--without-http_memcached_module disable ngx_http_memcached_module
|
||||
--without-http_limit_conn_module disable ngx_http_limit_conn_module
|
||||
--without-http_limit_req_module disable ngx_http_limit_req_module
|
||||
--without-http_empty_gif_module disable ngx_http_empty_gif_module
|
||||
--without-http_browser_module disable ngx_http_browser_module
|
||||
--without-http_upstream_hash_module
|
||||
disable ngx_http_upstream_hash_module
|
||||
--without-http_upstream_ip_hash_module
|
||||
disable ngx_http_upstream_ip_hash_module
|
||||
--without-http_upstream_least_conn_module
|
||||
disable ngx_http_upstream_least_conn_module
|
||||
--without-http_upstream_keepalive_module
|
||||
disable ngx_http_upstream_keepalive_module
|
||||
|
||||
--with-http_perl_module enable ngx_http_perl_module
|
||||
--with-perl_modules_path=PATH set Perl modules path
|
||||
--with-perl=PATH set perl binary pathname
|
||||
|
||||
--http-log-path=PATH set http access log pathname
|
||||
--http-client-body-temp-path=PATH set path to store
|
||||
http client request body temporary files
|
||||
--http-proxy-temp-path=PATH set path to store
|
||||
http proxy temporary files
|
||||
--http-fastcgi-temp-path=PATH set path to store
|
||||
http fastcgi temporary files
|
||||
--http-uwsgi-temp-path=PATH set path to store
|
||||
http uwsgi temporary files
|
||||
--http-scgi-temp-path=PATH set path to store
|
||||
http scgi temporary files
|
||||
|
||||
--without-http disable HTTP server
|
||||
--without-http-cache disable HTTP cache
|
||||
|
||||
--with-mail enable POP3/IMAP4/SMTP proxy module
|
||||
--with-mail_ssl_module enable ngx_mail_ssl_module
|
||||
--without-mail_pop3_module disable ngx_mail_pop3_module
|
||||
--without-mail_imap_module disable ngx_mail_imap_module
|
||||
--without-mail_smtp_module disable ngx_mail_smtp_module
|
||||
|
||||
--with-google_perftools_module enable ngx_google_perftools_module
|
||||
--with-cpp_test_module enable ngx_cpp_test_module
|
||||
|
||||
--add-module=PATH enable an external module
|
||||
|
||||
--with-cc=PATH set C compiler pathname
|
||||
--with-cpp=PATH set C preprocessor pathname
|
||||
--with-cc-opt=OPTIONS set additional C compiler options
|
||||
--with-ld-opt=OPTIONS set additional linker options
|
||||
--with-cpu-opt=CPU build for the specified CPU, valid values:
|
||||
pentium, pentiumpro, pentium3, pentium4,
|
||||
athlon, opteron, sparc32, sparc64, ppc64
|
||||
|
||||
--without-pcre disable PCRE library usage
|
||||
--with-pcre force PCRE library usage
|
||||
--with-pcre=DIR set path to PCRE library sources
|
||||
--with-pcre-opt=OPTIONS set additional build options for PCRE
|
||||
--with-pcre-jit build PCRE with JIT compilation support
|
||||
|
||||
--with-md5=DIR set path to md5 library sources
|
||||
--with-md5-opt=OPTIONS set additional build options for md5
|
||||
--with-md5-asm use md5 assembler sources
|
||||
|
||||
--with-sha1=DIR set path to sha1 library sources
|
||||
--with-sha1-opt=OPTIONS set additional build options for sha1
|
||||
--with-sha1-asm use sha1 assembler sources
|
||||
|
||||
--with-zlib=DIR set path to zlib library sources
|
||||
--with-zlib-opt=OPTIONS set additional build options for zlib
|
||||
--with-zlib-asm=CPU use zlib assembler sources optimized
|
||||
for the specified CPU, valid values:
|
||||
pentium, pentiumpro
|
||||
|
||||
--with-libatomic force libatomic_ops library usage
|
||||
--with-libatomic=DIR set path to libatomic_ops library sources
|
||||
|
||||
--with-openssl=DIR set path to OpenSSL library sources
|
||||
--with-openssl-opt=OPTIONS set additional build options for OpenSSL
|
||||
|
||||
--with-debug enable debug logging
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if [ $HTTP = NO ]; then
|
||||
HTTP_CHARSET=NO
|
||||
HTTP_GZIP=NO
|
||||
HTTP_SSI=NO
|
||||
HTTP_USERID=NO
|
||||
HTTP_ACCESS=NO
|
||||
HTTP_STATUS=NO
|
||||
HTTP_REWRITE=NO
|
||||
HTTP_PROXY=NO
|
||||
HTTP_FASTCGI=NO
|
||||
fi
|
||||
|
||||
|
||||
if [ ".$NGX_PLATFORM" = ".win32" ]; then
|
||||
NGX_WINE=$WINE
|
||||
fi
|
||||
|
||||
|
||||
NGX_CONF_PATH=${NGX_CONF_PATH:-conf/nginx.conf}
|
||||
NGX_CONF_PREFIX=`dirname $NGX_CONF_PATH`
|
||||
NGX_PID_PATH=${NGX_PID_PATH:-logs/nginx.pid}
|
||||
NGX_LOCK_PATH=${NGX_LOCK_PATH:-logs/nginx.lock}
|
||||
|
||||
if [ ".$NGX_ERROR_LOG_PATH" = ".stderr" ]; then
|
||||
NGX_ERROR_LOG_PATH=
|
||||
else
|
||||
NGX_ERROR_LOG_PATH=${NGX_ERROR_LOG_PATH:-logs/error.log}
|
||||
fi
|
||||
|
||||
NGX_HTTP_LOG_PATH=${NGX_HTTP_LOG_PATH:-logs/access.log}
|
||||
NGX_HTTP_CLIENT_TEMP_PATH=${NGX_HTTP_CLIENT_TEMP_PATH:-client_body_temp}
|
||||
NGX_HTTP_PROXY_TEMP_PATH=${NGX_HTTP_PROXY_TEMP_PATH:-proxy_temp}
|
||||
NGX_HTTP_FASTCGI_TEMP_PATH=${NGX_HTTP_FASTCGI_TEMP_PATH:-fastcgi_temp}
|
||||
NGX_HTTP_UWSGI_TEMP_PATH=${NGX_HTTP_UWSGI_TEMP_PATH:-uwsgi_temp}
|
||||
NGX_HTTP_SCGI_TEMP_PATH=${NGX_HTTP_SCGI_TEMP_PATH:-scgi_temp}
|
||||
|
||||
case ".$NGX_PERL_MODULES" in
|
||||
./*)
|
||||
;;
|
||||
|
||||
.)
|
||||
;;
|
||||
|
||||
*)
|
||||
NGX_PERL_MODULES=$NGX_PREFIX/$NGX_PERL_MODULES
|
||||
;;
|
||||
esac
|
|
@ -1,107 +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"
|
||||
;;
|
||||
|
||||
*)
|
||||
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
|
|
@ -1,116 +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='
|
||||
'
|
||||
|
||||
# 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
|
||||
have=NGX_HAVE_SENDFILE . auto/have
|
||||
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, n;
|
||||
n = OSAtomicCompareAndSwap32Barrier(0, 1, &lock)"
|
||||
. auto/feature
|
|
@ -1,144 +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 [ $osreldate -gt 502103 ]; then
|
||||
echo " + sendfile()'s SF_NODISKIO found"
|
||||
|
||||
have=NGX_HAVE_AIO_SENDFILE . auto/have
|
||||
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_LAWAT
|
||||
|
||||
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
|
||||
|
||||
|
||||
if [ $USE_THREADS = "rfork" ]; then
|
||||
|
||||
echo " + using rfork()"
|
||||
|
||||
# # kqueue's EVFILT_SIGNAL is safe
|
||||
#
|
||||
# if [ $version -gt 460101 ]; then
|
||||
# echo " + kqueue's EVFILT_SIGNAL is safe"
|
||||
# have=NGX_HAVE_SAFE_EVFILT_SIGNAL . auto/have
|
||||
# else
|
||||
# echo "$0: error: the kqueue's EVFILT_SIGNAL is unsafe on this"
|
||||
# echo "FreeBSD version, so --with-threads=rfork could not be used"
|
||||
# echo
|
||||
#
|
||||
# exit 1
|
||||
# fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $EVENT_AIO = YES ]; then
|
||||
if [ \( $version -lt 500000 -a $version -ge 430000 \) \
|
||||
-o $version -ge 500014 ]
|
||||
then
|
||||
have=NGX_HAVE_AIO . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $AIO_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $AIO_SRCS"
|
||||
else
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the kqueue does not support AIO on this FreeBSD version
|
||||
|
||||
END
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# cpuset_setaffinity()
|
||||
|
||||
if [ $version -ge 701000 ]; then
|
||||
echo " + cpuset_setaffinity() found"
|
||||
have=NGX_HAVE_CPUSET_SETAFFINITY . auto/have
|
||||
fi
|
|
@ -1,185 +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}
|
||||
|
||||
|
||||
# enable the rt signals on Linux between 2.2.19 and 2.6.17
|
||||
|
||||
if [ \( $version -ge 131603 -a $version -lt 132626 \) -o $EVENT_RTSIG = YES ]
|
||||
then
|
||||
echo " + rt signals found"
|
||||
have=NGX_HAVE_RTSIG . auto/have
|
||||
EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
|
||||
CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
|
||||
EVENT_FOUND=YES
|
||||
fi
|
||||
|
||||
|
||||
# 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;
|
||||
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
|
||||
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"
|
|
@ -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="int n = port_create()"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_SRCS="$CORE_SRCS $EVENTPORT_SRCS"
|
||||
EVENT_MODULES="$EVENT_MODULES $EVENTPORT_MODULE"
|
||||
fi
|
|
@ -1,40 +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
|
||||
|
||||
case "$NGX_CC_NAME" in
|
||||
|
||||
gcc)
|
||||
CORE_LIBS="$CORE_LIBS -ladvapi32 -lws2_32"
|
||||
;;
|
||||
|
||||
*)
|
||||
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
|
||||
|
||||
if [ $NGX_IPV6 = YES ]; then
|
||||
have=NGX_HAVE_INET6 . auto/have
|
||||
fi
|
||||
|
||||
have=NGX_HAVE_AIO . auto/have
|
||||
have=NGX_HAVE_IOCP . auto/have
|
|
@ -1,557 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module"
|
||||
|
||||
CORE_INCS="src/core"
|
||||
|
||||
CORE_DEPS="src/core/nginx.h \
|
||||
src/core/ngx_config.h \
|
||||
src/core/ngx_core.h \
|
||||
src/core/ngx_log.h \
|
||||
src/core/ngx_palloc.h \
|
||||
src/core/ngx_array.h \
|
||||
src/core/ngx_list.h \
|
||||
src/core/ngx_hash.h \
|
||||
src/core/ngx_buf.h \
|
||||
src/core/ngx_queue.h \
|
||||
src/core/ngx_string.h \
|
||||
src/core/ngx_parse.h \
|
||||
src/core/ngx_inet.h \
|
||||
src/core/ngx_file.h \
|
||||
src/core/ngx_crc.h \
|
||||
src/core/ngx_crc32.h \
|
||||
src/core/ngx_murmurhash.h \
|
||||
src/core/ngx_md5.h \
|
||||
src/core/ngx_sha1.h \
|
||||
src/core/ngx_rbtree.h \
|
||||
src/core/ngx_radix_tree.h \
|
||||
src/core/ngx_slab.h \
|
||||
src/core/ngx_times.h \
|
||||
src/core/ngx_shmtx.h \
|
||||
src/core/ngx_connection.h \
|
||||
src/core/ngx_cycle.h \
|
||||
src/core/ngx_conf_file.h \
|
||||
src/core/ngx_resolver.h \
|
||||
src/core/ngx_open_file_cache.h \
|
||||
src/core/ngx_crypt.h \
|
||||
src/core/ngx_proxy_protocol.h \
|
||||
src/core/ngx_syslog.h"
|
||||
|
||||
|
||||
CORE_SRCS="src/core/nginx.c \
|
||||
src/core/ngx_log.c \
|
||||
src/core/ngx_palloc.c \
|
||||
src/core/ngx_array.c \
|
||||
src/core/ngx_list.c \
|
||||
src/core/ngx_hash.c \
|
||||
src/core/ngx_buf.c \
|
||||
src/core/ngx_queue.c \
|
||||
src/core/ngx_output_chain.c \
|
||||
src/core/ngx_string.c \
|
||||
src/core/ngx_parse.c \
|
||||
src/core/ngx_inet.c \
|
||||
src/core/ngx_file.c \
|
||||
src/core/ngx_crc32.c \
|
||||
src/core/ngx_murmurhash.c \
|
||||
src/core/ngx_md5.c \
|
||||
src/core/ngx_rbtree.c \
|
||||
src/core/ngx_radix_tree.c \
|
||||
src/core/ngx_slab.c \
|
||||
src/core/ngx_times.c \
|
||||
src/core/ngx_shmtx.c \
|
||||
src/core/ngx_connection.c \
|
||||
src/core/ngx_cycle.c \
|
||||
src/core/ngx_spinlock.c \
|
||||
src/core/ngx_cpuinfo.c \
|
||||
src/core/ngx_conf_file.c \
|
||||
src/core/ngx_resolver.c \
|
||||
src/core/ngx_open_file_cache.c \
|
||||
src/core/ngx_crypt.c \
|
||||
src/core/ngx_proxy_protocol.c \
|
||||
src/core/ngx_syslog.c"
|
||||
|
||||
|
||||
REGEX_MODULE=ngx_regex_module
|
||||
REGEX_DEPS=src/core/ngx_regex.h
|
||||
REGEX_SRCS=src/core/ngx_regex.c
|
||||
|
||||
|
||||
OPENSSL_MODULE=ngx_openssl_module
|
||||
OPENSSL_DEPS=src/event/ngx_event_openssl.h
|
||||
OPENSSL_SRCS="src/event/ngx_event_openssl.c \
|
||||
src/event/ngx_event_openssl_stapling.c"
|
||||
|
||||
|
||||
EVENT_MODULES="ngx_events_module ngx_event_core_module"
|
||||
|
||||
EVENT_INCS="src/event src/event/modules"
|
||||
|
||||
EVENT_DEPS="src/event/ngx_event.h \
|
||||
src/event/ngx_event_timer.h \
|
||||
src/event/ngx_event_posted.h \
|
||||
src/event/ngx_event_busy_lock.h \
|
||||
src/event/ngx_event_connect.h \
|
||||
src/event/ngx_event_pipe.h"
|
||||
|
||||
EVENT_SRCS="src/event/ngx_event.c \
|
||||
src/event/ngx_event_timer.c \
|
||||
src/event/ngx_event_posted.c \
|
||||
src/event/ngx_event_busy_lock.c \
|
||||
src/event/ngx_event_accept.c \
|
||||
src/event/ngx_event_connect.c \
|
||||
src/event/ngx_event_pipe.c"
|
||||
|
||||
|
||||
SELECT_MODULE=ngx_select_module
|
||||
SELECT_SRCS=src/event/modules/ngx_select_module.c
|
||||
WIN32_SELECT_SRCS=src/event/modules/ngx_win32_select_module.c
|
||||
|
||||
POLL_MODULE=ngx_poll_module
|
||||
POLL_SRCS=src/event/modules/ngx_poll_module.c
|
||||
|
||||
KQUEUE_MODULE=ngx_kqueue_module
|
||||
KQUEUE_SRCS=src/event/modules/ngx_kqueue_module.c
|
||||
|
||||
DEVPOLL_MODULE=ngx_devpoll_module
|
||||
DEVPOLL_SRCS=src/event/modules/ngx_devpoll_module.c
|
||||
|
||||
EVENTPORT_MODULE=ngx_eventport_module
|
||||
EVENTPORT_SRCS=src/event/modules/ngx_eventport_module.c
|
||||
|
||||
EPOLL_MODULE=ngx_epoll_module
|
||||
EPOLL_SRCS=src/event/modules/ngx_epoll_module.c
|
||||
|
||||
RTSIG_MODULE=ngx_rtsig_module
|
||||
RTSIG_SRCS=src/event/modules/ngx_rtsig_module.c
|
||||
|
||||
IOCP_MODULE=ngx_iocp_module
|
||||
IOCP_SRCS=src/event/modules/ngx_iocp_module.c
|
||||
|
||||
AIO_MODULE=ngx_aio_module
|
||||
AIO_SRCS="src/event/modules/ngx_aio_module.c \
|
||||
src/os/unix/ngx_aio_read.c \
|
||||
src/os/unix/ngx_aio_write.c \
|
||||
src/os/unix/ngx_aio_read_chain.c \
|
||||
src/os/unix/ngx_aio_write_chain.c"
|
||||
|
||||
FILE_AIO_SRCS="src/os/unix/ngx_file_aio_read.c"
|
||||
LINUX_AIO_SRCS="src/os/unix/ngx_linux_aio_read.c"
|
||||
|
||||
UNIX_INCS="$CORE_INCS $EVENT_INCS src/os/unix"
|
||||
|
||||
UNIX_DEPS="$CORE_DEPS $EVENT_DEPS \
|
||||
src/os/unix/ngx_time.h \
|
||||
src/os/unix/ngx_errno.h \
|
||||
src/os/unix/ngx_alloc.h \
|
||||
src/os/unix/ngx_files.h \
|
||||
src/os/unix/ngx_channel.h \
|
||||
src/os/unix/ngx_shmem.h \
|
||||
src/os/unix/ngx_process.h \
|
||||
src/os/unix/ngx_setaffinity.h \
|
||||
src/os/unix/ngx_setproctitle.h \
|
||||
src/os/unix/ngx_atomic.h \
|
||||
src/os/unix/ngx_gcc_atomic_x86.h \
|
||||
src/os/unix/ngx_thread.h \
|
||||
src/os/unix/ngx_socket.h \
|
||||
src/os/unix/ngx_os.h \
|
||||
src/os/unix/ngx_user.h \
|
||||
src/os/unix/ngx_process_cycle.h"
|
||||
|
||||
# add to UNIX_DEPS
|
||||
# src/os/unix/ngx_gcc_atomic_amd64.h \
|
||||
# src/os/unix/ngx_gcc_atomic_sparc64.h \
|
||||
# src/os/unix/ngx_gcc_atomic_ppc.h \
|
||||
# src/os/unix/ngx_sunpro_atomic_sparc64.h \
|
||||
# src/os/unix/ngx_sunpro_x86.il \
|
||||
# src/os/unix/ngx_sunpro_amd64.il \
|
||||
# src/os/unix/ngx_sunpro_sparc64.il \
|
||||
|
||||
|
||||
UNIX_SRCS="$CORE_SRCS $EVENT_SRCS \
|
||||
src/os/unix/ngx_time.c \
|
||||
src/os/unix/ngx_errno.c \
|
||||
src/os/unix/ngx_alloc.c \
|
||||
src/os/unix/ngx_files.c \
|
||||
src/os/unix/ngx_socket.c \
|
||||
src/os/unix/ngx_recv.c \
|
||||
src/os/unix/ngx_readv_chain.c \
|
||||
src/os/unix/ngx_udp_recv.c \
|
||||
src/os/unix/ngx_send.c \
|
||||
src/os/unix/ngx_writev_chain.c \
|
||||
src/os/unix/ngx_channel.c \
|
||||
src/os/unix/ngx_shmem.c \
|
||||
src/os/unix/ngx_process.c \
|
||||
src/os/unix/ngx_daemon.c \
|
||||
src/os/unix/ngx_setaffinity.c \
|
||||
src/os/unix/ngx_setproctitle.c \
|
||||
src/os/unix/ngx_posix_init.c \
|
||||
src/os/unix/ngx_user.c \
|
||||
src/os/unix/ngx_process_cycle.c"
|
||||
|
||||
POSIX_DEPS=src/os/unix/ngx_posix_config.h
|
||||
|
||||
FREEBSD_DEPS="src/os/unix/ngx_freebsd_config.h src/os/unix/ngx_freebsd.h"
|
||||
FREEBSD_SRCS=src/os/unix/ngx_freebsd_init.c
|
||||
FREEBSD_SENDFILE_SRCS=src/os/unix/ngx_freebsd_sendfile_chain.c
|
||||
FREEBSD_RFORK_DEPS="src/os/unix/ngx_freebsd_rfork_thread.h"
|
||||
FREEBSD_RFORK_SRCS="src/os/unix/ngx_freebsd_rfork_thread.c"
|
||||
FREEBSD_RFORK_THREAD_SRCS="src/os/unix/rfork_thread.S"
|
||||
|
||||
PTHREAD_SRCS="src/os/unix/ngx_pthread_thread.c"
|
||||
|
||||
LINUX_DEPS="src/os/unix/ngx_linux_config.h src/os/unix/ngx_linux.h"
|
||||
LINUX_SRCS=src/os/unix/ngx_linux_init.c
|
||||
LINUX_SENDFILE_SRCS=src/os/unix/ngx_linux_sendfile_chain.c
|
||||
|
||||
|
||||
SOLARIS_DEPS="src/os/unix/ngx_solaris_config.h src/os/unix/ngx_solaris.h"
|
||||
SOLARIS_SRCS=src/os/unix/ngx_solaris_init.c
|
||||
SOLARIS_SENDFILEV_SRCS=src/os/unix/ngx_solaris_sendfilev_chain.c
|
||||
|
||||
|
||||
DARWIN_DEPS="src/os/unix/ngx_darwin_config.h src/os/unix/ngx_darwin.h"
|
||||
DARWIN_SRCS=src/os/unix/ngx_darwin_init.c
|
||||
DARWIN_SENDFILE_SRCS=src/os/unix/ngx_darwin_sendfile_chain.c
|
||||
|
||||
|
||||
WIN32_INCS="$CORE_INCS $EVENT_INCS src/os/win32"
|
||||
|
||||
WIN32_DEPS="$CORE_DEPS $EVENT_DEPS \
|
||||
src/os/win32/ngx_win32_config.h \
|
||||
src/os/win32/ngx_time.h \
|
||||
src/os/win32/ngx_errno.h \
|
||||
src/os/win32/ngx_alloc.h \
|
||||
src/os/win32/ngx_files.h \
|
||||
src/os/win32/ngx_shmem.h \
|
||||
src/os/win32/ngx_process.h \
|
||||
src/os/win32/ngx_atomic.h \
|
||||
src/os/win32/ngx_thread.h \
|
||||
src/os/win32/ngx_socket.h \
|
||||
src/os/win32/ngx_os.h \
|
||||
src/os/win32/ngx_user.h \
|
||||
src/os/win32/ngx_process_cycle.h"
|
||||
|
||||
WIN32_CONFIG=src/os/win32/ngx_win32_config.h
|
||||
|
||||
WIN32_SRCS="$CORE_SRCS $EVENT_SRCS \
|
||||
src/os/win32/ngx_errno.c \
|
||||
src/os/win32/ngx_alloc.c \
|
||||
src/os/win32/ngx_files.c \
|
||||
src/os/win32/ngx_shmem.c \
|
||||
src/os/win32/ngx_time.c \
|
||||
src/os/win32/ngx_process.c \
|
||||
src/os/win32/ngx_thread.c \
|
||||
src/os/win32/ngx_socket.c \
|
||||
src/os/win32/ngx_wsarecv.c \
|
||||
src/os/win32/ngx_wsarecv_chain.c \
|
||||
src/os/win32/ngx_udp_wsarecv.c \
|
||||
src/os/win32/ngx_wsasend.c \
|
||||
src/os/win32/ngx_wsasend_chain.c \
|
||||
src/os/win32/ngx_win32_init.c \
|
||||
src/os/win32/ngx_user.c \
|
||||
src/os/win32/ngx_event_log.c \
|
||||
src/os/win32/ngx_process_cycle.c \
|
||||
src/event/ngx_event_acceptex.c"
|
||||
|
||||
NGX_WIN32_ICONS="src/os/win32/nginx.ico"
|
||||
NGX_WIN32_RC="src/os/win32/nginx.rc"
|
||||
|
||||
|
||||
# the http modules that have their logging formats
|
||||
# must be after ngx_http_log_module
|
||||
|
||||
HTTP_MODULES="ngx_http_module \
|
||||
ngx_http_core_module \
|
||||
ngx_http_log_module \
|
||||
ngx_http_upstream_module"
|
||||
|
||||
HTTP_WRITE_FILTER_MODULE="ngx_http_write_filter_module"
|
||||
HTTP_HEADER_FILTER_MODULE="ngx_http_header_filter_module"
|
||||
|
||||
HTTP_POSTPONE_FILTER_MODULE=ngx_http_postpone_filter_module
|
||||
HTTP_COPY_FILTER_MODULE=ngx_http_copy_filter_module
|
||||
|
||||
HTTP_CHUNKED_FILTER_MODULE=ngx_http_chunked_filter_module
|
||||
HTTP_HEADERS_FILTER_MODULE=ngx_http_headers_filter_module
|
||||
|
||||
HTTP_RANGE_HEADER_FILTER_MODULE=ngx_http_range_header_filter_module
|
||||
HTTP_RANGE_BODY_FILTER_MODULE=ngx_http_range_body_filter_module
|
||||
|
||||
HTTP_NOT_MODIFIED_FILTER_MODULE=ngx_http_not_modified_filter_module
|
||||
|
||||
HTTP_STATIC_MODULE=ngx_http_static_module
|
||||
HTTP_INDEX_MODULE=ngx_http_index_module
|
||||
|
||||
HTTP_INCS="src/http src/http/modules"
|
||||
|
||||
HTTP_DEPS="src/http/ngx_http.h \
|
||||
src/http/ngx_http_request.h \
|
||||
src/http/ngx_http_config.h \
|
||||
src/http/ngx_http_core_module.h \
|
||||
src/http/ngx_http_cache.h \
|
||||
src/http/ngx_http_variables.h \
|
||||
src/http/ngx_http_script.h \
|
||||
src/http/ngx_http_upstream.h \
|
||||
src/http/ngx_http_upstream_round_robin.h \
|
||||
src/http/ngx_http_busy_lock.h"
|
||||
|
||||
HTTP_SRCS="src/http/ngx_http.c \
|
||||
src/http/ngx_http_core_module.c \
|
||||
src/http/ngx_http_special_response.c \
|
||||
src/http/ngx_http_request.c \
|
||||
src/http/ngx_http_parse.c \
|
||||
src/http/ngx_http_header_filter_module.c \
|
||||
src/http/ngx_http_write_filter_module.c \
|
||||
src/http/ngx_http_copy_filter_module.c \
|
||||
src/http/modules/ngx_http_log_module.c \
|
||||
src/http/ngx_http_request_body.c \
|
||||
src/http/ngx_http_variables.c \
|
||||
src/http/ngx_http_script.c \
|
||||
src/http/ngx_http_upstream.c \
|
||||
src/http/ngx_http_upstream_round_robin.c \
|
||||
src/http/ngx_http_parse_time.c \
|
||||
src/http/modules/ngx_http_static_module.c \
|
||||
src/http/modules/ngx_http_index_module.c \
|
||||
src/http/modules/ngx_http_chunked_filter_module.c \
|
||||
src/http/modules/ngx_http_range_filter_module.c \
|
||||
src/http/modules/ngx_http_headers_filter_module.c \
|
||||
src/http/modules/ngx_http_not_modified_filter_module.c"
|
||||
|
||||
# STUB
|
||||
HTTP_SRCS="$HTTP_SRCS src/http/ngx_http_busy_lock.c"
|
||||
|
||||
HTTP_POSTPONE_FILTER_SRCS=src/http/ngx_http_postpone_filter_module.c
|
||||
|
||||
HTTP_FILE_CACHE_SRCS=src/http/ngx_http_file_cache.c
|
||||
|
||||
|
||||
HTTP_SPDY_MODULE=ngx_http_spdy_module
|
||||
HTTP_SPDY_FILTER_MODULE=ngx_http_spdy_filter_module
|
||||
HTTP_SPDY_DEPS="src/http/ngx_http_spdy.h \
|
||||
src/http/ngx_http_spdy_module.h"
|
||||
HTTP_SPDY_SRCS="src/http/ngx_http_spdy.c \
|
||||
src/http/ngx_http_spdy_module.c \
|
||||
src/http/ngx_http_spdy_filter_module.c"
|
||||
|
||||
|
||||
HTTP_CHARSET_FILTER_MODULE=ngx_http_charset_filter_module
|
||||
HTTP_CHARSET_SRCS=src/http/modules/ngx_http_charset_filter_module.c
|
||||
|
||||
|
||||
HTTP_GZIP_FILTER_MODULE=ngx_http_gzip_filter_module
|
||||
HTTP_GZIP_SRCS=src/http/modules/ngx_http_gzip_filter_module.c
|
||||
|
||||
|
||||
HTTP_GUNZIP_FILTER_MODULE=ngx_http_gunzip_filter_module
|
||||
HTTP_GUNZIP_SRCS=src/http/modules/ngx_http_gunzip_filter_module.c
|
||||
|
||||
|
||||
HTTP_SSI_FILTER_MODULE=ngx_http_ssi_filter_module
|
||||
HTTP_SSI_DEPS=src/http/modules/ngx_http_ssi_filter_module.h
|
||||
HTTP_SSI_SRCS=src/http/modules/ngx_http_ssi_filter_module.c
|
||||
|
||||
|
||||
HTTP_XSLT_FILTER_MODULE=ngx_http_xslt_filter_module
|
||||
HTTP_XSLT_SRCS=src/http/modules/ngx_http_xslt_filter_module.c
|
||||
|
||||
|
||||
HTTP_IMAGE_FILTER_MODULE=ngx_http_image_filter_module
|
||||
HTTP_IMAGE_SRCS=src/http/modules/ngx_http_image_filter_module.c
|
||||
|
||||
|
||||
HTTP_SUB_FILTER_MODULE=ngx_http_sub_filter_module
|
||||
HTTP_SUB_SRCS=src/http/modules/ngx_http_sub_filter_module.c
|
||||
|
||||
|
||||
HTTP_USERID_FILTER_MODULE=ngx_http_userid_filter_module
|
||||
HTTP_USERID_SRCS=src/http/modules/ngx_http_userid_filter_module.c
|
||||
|
||||
|
||||
HTTP_REALIP_MODULE=ngx_http_realip_module
|
||||
HTTP_REALIP_SRCS=src/http/modules/ngx_http_realip_module.c
|
||||
|
||||
|
||||
HTTP_ADDITION_FILTER_MODULE=ngx_http_addition_filter_module
|
||||
HTTP_ADDITION_SRCS=src/http/modules/ngx_http_addition_filter_module.c
|
||||
|
||||
|
||||
HTTP_DAV_MODULE=ngx_http_dav_module
|
||||
HTTP_DAV_SRCS=src/http/modules/ngx_http_dav_module.c
|
||||
|
||||
|
||||
HTTP_ACCESS_MODULE=ngx_http_access_module
|
||||
HTTP_ACCESS_SRCS=src/http/modules/ngx_http_access_module.c
|
||||
|
||||
|
||||
HTTP_AUTH_BASIC_MODULE=ngx_http_auth_basic_module
|
||||
HTTP_AUTH_BASIC_SRCS=src/http/modules/ngx_http_auth_basic_module.c
|
||||
|
||||
|
||||
HTTP_AUTH_REQUEST_MODULE=ngx_http_auth_request_module
|
||||
HTTP_AUTH_REQUEST_SRCS=src/http/modules/ngx_http_auth_request_module.c
|
||||
|
||||
|
||||
HTTP_AUTOINDEX_MODULE=ngx_http_autoindex_module
|
||||
HTTP_AUTOINDEX_SRCS=src/http/modules/ngx_http_autoindex_module.c
|
||||
|
||||
|
||||
HTTP_RANDOM_INDEX_MODULE=ngx_http_random_index_module
|
||||
HTTP_RANDOM_INDEX_SRCS=src/http/modules/ngx_http_random_index_module.c
|
||||
|
||||
|
||||
HTTP_STATUS_MODULE=ngx_http_status_module
|
||||
HTTP_STATUS_SRCS=src/http/modules/ngx_http_status_module.c
|
||||
|
||||
|
||||
HTTP_GEO_MODULE=ngx_http_geo_module
|
||||
HTTP_GEO_SRCS=src/http/modules/ngx_http_geo_module.c
|
||||
|
||||
|
||||
HTTP_GEOIP_MODULE=ngx_http_geoip_module
|
||||
HTTP_GEOIP_SRCS=src/http/modules/ngx_http_geoip_module.c
|
||||
|
||||
|
||||
HTTP_MAP_MODULE=ngx_http_map_module
|
||||
HTTP_MAP_SRCS=src/http/modules/ngx_http_map_module.c
|
||||
|
||||
|
||||
HTTP_SPLIT_CLIENTS_MODULE=ngx_http_split_clients_module
|
||||
HTTP_SPLIT_CLIENTS_SRCS=src/http/modules/ngx_http_split_clients_module.c
|
||||
|
||||
|
||||
HTTP_REFERER_MODULE=ngx_http_referer_module
|
||||
HTTP_REFERER_SRCS=src/http/modules/ngx_http_referer_module.c
|
||||
|
||||
|
||||
HTTP_REWRITE_MODULE=ngx_http_rewrite_module
|
||||
HTTP_REWRITE_SRCS=src/http/modules/ngx_http_rewrite_module.c
|
||||
|
||||
|
||||
HTTP_SSL_MODULE=ngx_http_ssl_module
|
||||
HTTP_SSL_DEPS=src/http/modules/ngx_http_ssl_module.h
|
||||
HTTP_SSL_SRCS=src/http/modules/ngx_http_ssl_module.c
|
||||
|
||||
|
||||
HTTP_PROXY_MODULE=ngx_http_proxy_module
|
||||
HTTP_PROXY_SRCS=src/http/modules/ngx_http_proxy_module.c
|
||||
|
||||
|
||||
HTTP_FASTCGI_MODULE=ngx_http_fastcgi_module
|
||||
HTTP_FASTCGI_SRCS=src/http/modules/ngx_http_fastcgi_module.c
|
||||
|
||||
|
||||
HTTP_UWSGI_MODULE=ngx_http_uwsgi_module
|
||||
HTTP_UWSGI_SRCS=src/http/modules/ngx_http_uwsgi_module.c
|
||||
|
||||
|
||||
HTTP_SCGI_MODULE=ngx_http_scgi_module
|
||||
HTTP_SCGI_SRCS=src/http/modules/ngx_http_scgi_module.c
|
||||
|
||||
|
||||
HTTP_PERL_MODULE=ngx_http_perl_module
|
||||
HTTP_PERL_INCS=src/http/modules/perl
|
||||
HTTP_PERL_DEPS=src/http/modules/perl/ngx_http_perl_module.h
|
||||
HTTP_PERL_SRCS=src/http/modules/perl/ngx_http_perl_module.c
|
||||
|
||||
|
||||
HTTP_MEMCACHED_MODULE=ngx_http_memcached_module
|
||||
HTTP_MEMCACHED_SRCS=src/http/modules/ngx_http_memcached_module.c
|
||||
|
||||
|
||||
HTTP_LIMIT_CONN_MODULE=ngx_http_limit_conn_module
|
||||
HTTP_LIMIT_CONN_SRCS=src/http/modules/ngx_http_limit_conn_module.c
|
||||
|
||||
|
||||
HTTP_LIMIT_REQ_MODULE=ngx_http_limit_req_module
|
||||
HTTP_LIMIT_REQ_SRCS=src/http/modules/ngx_http_limit_req_module.c
|
||||
|
||||
|
||||
HTTP_EMPTY_GIF_MODULE=ngx_http_empty_gif_module
|
||||
HTTP_EMPTY_GIF_SRCS=src/http/modules/ngx_http_empty_gif_module.c
|
||||
|
||||
|
||||
HTTP_BROWSER_MODULE=ngx_http_browser_module
|
||||
HTTP_BROWSER_SRCS=src/http/modules/ngx_http_browser_module.c
|
||||
|
||||
|
||||
HTTP_SECURE_LINK_MODULE=ngx_http_secure_link_module
|
||||
HTTP_SECURE_LINK_SRCS=src/http/modules/ngx_http_secure_link_module.c
|
||||
|
||||
|
||||
HTTP_DEGRADATION_MODULE=ngx_http_degradation_module
|
||||
HTTP_DEGRADATION_SRCS=src/http/modules/ngx_http_degradation_module.c
|
||||
|
||||
|
||||
HTTP_FLV_MODULE=ngx_http_flv_module
|
||||
HTTP_FLV_SRCS=src/http/modules/ngx_http_flv_module.c
|
||||
|
||||
|
||||
HTTP_MP4_MODULE=ngx_http_mp4_module
|
||||
HTTP_MP4_SRCS=src/http/modules/ngx_http_mp4_module.c
|
||||
|
||||
|
||||
HTTP_GZIP_STATIC_MODULE=ngx_http_gzip_static_module
|
||||
HTTP_GZIP_STATIC_SRCS=src/http/modules/ngx_http_gzip_static_module.c
|
||||
|
||||
|
||||
HTTP_UPSTREAM_HASH_MODULE=ngx_http_upstream_hash_module
|
||||
HTTP_UPSTREAM_HASH_SRCS=src/http/modules/ngx_http_upstream_hash_module.c
|
||||
|
||||
|
||||
HTTP_UPSTREAM_IP_HASH_MODULE=ngx_http_upstream_ip_hash_module
|
||||
HTTP_UPSTREAM_IP_HASH_SRCS=src/http/modules/ngx_http_upstream_ip_hash_module.c
|
||||
|
||||
|
||||
HTTP_UPSTREAM_LEAST_CONN_MODULE=ngx_http_upstream_least_conn_module
|
||||
HTTP_UPSTREAM_LEAST_CONN_SRCS=" \
|
||||
src/http/modules/ngx_http_upstream_least_conn_module.c"
|
||||
|
||||
|
||||
HTTP_UPSTREAM_KEEPALIVE_MODULE=ngx_http_upstream_keepalive_module
|
||||
HTTP_UPSTREAM_KEEPALIVE_SRCS=" \
|
||||
src/http/modules/ngx_http_upstream_keepalive_module.c"
|
||||
|
||||
|
||||
MAIL_INCS="src/mail"
|
||||
|
||||
MAIL_DEPS="src/mail/ngx_mail.h"
|
||||
|
||||
MAIL_MODULES="ngx_mail_module ngx_mail_core_module"
|
||||
|
||||
MAIL_SRCS="src/mail/ngx_mail.c \
|
||||
src/mail/ngx_mail_core_module.c \
|
||||
src/mail/ngx_mail_handler.c \
|
||||
src/mail/ngx_mail_parse.c"
|
||||
|
||||
MAIL_POP3_MODULE="ngx_mail_pop3_module"
|
||||
MAIL_POP3_DEPS="src/mail/ngx_mail_pop3_module.h"
|
||||
MAIL_POP3_SRCS="src/mail/ngx_mail_pop3_module.c \
|
||||
src/mail/ngx_mail_pop3_handler.c"
|
||||
|
||||
MAIL_IMAP_MODULE="ngx_mail_imap_module"
|
||||
MAIL_IMAP_DEPS="src/mail/ngx_mail_imap_module.h"
|
||||
MAIL_IMAP_SRCS="src/mail/ngx_mail_imap_module.c \
|
||||
src/mail/ngx_mail_imap_handler.c"
|
||||
|
||||
MAIL_SMTP_MODULE="ngx_mail_smtp_module"
|
||||
MAIL_SMTP_DEPS="src/mail/ngx_mail_smtp_module.h"
|
||||
MAIL_SMTP_SRCS="src/mail/ngx_mail_smtp_module.c \
|
||||
src/mail/ngx_mail_smtp_handler.c"
|
||||
|
||||
MAIL_SSL_MODULE="ngx_mail_ssl_module"
|
||||
MAIL_SSL_DEPS="src/mail/ngx_mail_ssl_module.h"
|
||||
MAIL_SSL_SRCS="src/mail/ngx_mail_ssl_module.c"
|
||||
|
||||
MAIL_AUTH_HTTP_MODULE="ngx_mail_auth_http_module"
|
||||
MAIL_AUTH_HTTP_SRCS="src/mail/ngx_mail_auth_http_module.c"
|
||||
|
||||
MAIL_PROXY_MODULE="ngx_mail_proxy_module"
|
||||
MAIL_PROXY_SRCS="src/mail/ngx_mail_proxy_module.c"
|
||||
|
||||
NGX_GOOGLE_PERFTOOLS_MODULE=ngx_google_perftools_module
|
||||
NGX_GOOGLE_PERFTOOLS_SRCS=src/misc/ngx_google_perftools_module.c
|
||||
|
||||
NGX_CPP_TEST_SRCS=src/misc/ngx_cpp_test_module.cpp
|
|
@ -1,8 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
have=NGX_SUPPRESS_WARN . auto/have
|
||||
|
||||
have=NGX_SMP . auto/have
|
|
@ -1,116 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
### STUB
|
||||
|
||||
if [ $USE_THREADS != NO ]; then
|
||||
|
||||
cat << END
|
||||
|
||||
$0: error: the threads support is broken now.
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
|
||||
###
|
||||
|
||||
|
||||
echo
|
||||
echo "Configuration summary"
|
||||
|
||||
|
||||
#case $USE_THREADS in
|
||||
# rfork) echo " + using rfork()ed threads" ;;
|
||||
# pthreads) echo " + using libpthread threads library" ;;
|
||||
# libthr) echo " + using FreeBSD libthr threads library" ;;
|
||||
# libc_r) echo " + using FreeBSD libc_r threads library" ;;
|
||||
# linuxthreads) echo " + using FreeBSD LinuxThreads port library" ;;
|
||||
# NO) echo " + threads are not used" ;;
|
||||
# *) echo " + using lib$USE_THREADS threads library" ;;
|
||||
#esac
|
||||
|
||||
if [ $USE_PCRE = DISABLED ]; then
|
||||
echo " + PCRE library is disabled"
|
||||
|
||||
else
|
||||
case $PCRE in
|
||||
YES) echo " + using system PCRE library" ;;
|
||||
NONE) echo " + PCRE library is not used" ;;
|
||||
*) echo " + using PCRE library: $PCRE" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
case $OPENSSL in
|
||||
YES) echo " + using system OpenSSL library" ;;
|
||||
NONE) echo " + OpenSSL library is not used" ;;
|
||||
*) echo " + using OpenSSL library: $OPENSSL" ;;
|
||||
esac
|
||||
|
||||
case $MD5 in
|
||||
YES) echo " + md5: using $MD5_LIB library" ;;
|
||||
NONE) echo " + md5 library is not used" ;;
|
||||
NO) echo " + using builtin md5 code" ;;
|
||||
*) echo " + using md5 library: $MD5" ;;
|
||||
esac
|
||||
|
||||
case $SHA1 in
|
||||
YES) echo " + sha1: using $SHA1_LIB library" ;;
|
||||
NONE) echo " + sha1 library is not used" ;;
|
||||
NO) echo " + sha1 library is not found" ;;
|
||||
*) echo " + using sha1 library: $SHA1" ;;
|
||||
esac
|
||||
|
||||
case $ZLIB in
|
||||
YES) echo " + using system zlib library" ;;
|
||||
NONE) echo " + zlib library is not used" ;;
|
||||
*) echo " + using zlib library: $ZLIB" ;;
|
||||
esac
|
||||
|
||||
case $NGX_LIBATOMIC in
|
||||
YES) echo " + using system libatomic_ops library" ;;
|
||||
NO) ;; # not used
|
||||
*) echo " + using libatomic_ops library: $NGX_LIBATOMIC" ;;
|
||||
esac
|
||||
|
||||
echo
|
||||
|
||||
|
||||
cat << END
|
||||
nginx path prefix: "$NGX_PREFIX"
|
||||
nginx binary file: "$NGX_SBIN_PATH"
|
||||
nginx configuration prefix: "$NGX_CONF_PREFIX"
|
||||
nginx configuration file: "$NGX_CONF_PATH"
|
||||
nginx pid file: "$NGX_PID_PATH"
|
||||
END
|
||||
|
||||
if test -n "$NGX_ERROR_LOG_PATH"; then
|
||||
echo " nginx error log file: \"$NGX_ERROR_LOG_PATH\""
|
||||
else
|
||||
echo " nginx logs errors to stderr"
|
||||
fi
|
||||
|
||||
cat << END
|
||||
nginx http access log file: "$NGX_HTTP_LOG_PATH"
|
||||
nginx http client request body temporary files: "$NGX_HTTP_CLIENT_TEMP_PATH"
|
||||
END
|
||||
|
||||
if [ $HTTP_PROXY = YES ]; then
|
||||
echo " nginx http proxy temporary files: \"$NGX_HTTP_PROXY_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_FASTCGI = YES ]; then
|
||||
echo " nginx http fastcgi temporary files: \"$NGX_HTTP_FASTCGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_UWSGI = YES ]; then
|
||||
echo " nginx http uwsgi temporary files: \"$NGX_HTTP_UWSGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
if [ $HTTP_SCGI = YES ]; then
|
||||
echo " nginx http scgi temporary files: \"$NGX_HTTP_SCGI_TEMP_PATH\""
|
||||
fi
|
||||
|
||||
echo "$NGX_POST_CONF_MSG"
|
|
@ -1,84 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type size ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_type size
|
||||
|
||||
END
|
||||
|
||||
ngx_size=
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
$NGX_INCLUDE_UNISTD_H
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/resource.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
$NGX_INCLUDE_AUTO_CONFIG_H
|
||||
|
||||
int main() {
|
||||
printf("%d", (int) sizeof($ngx_type));
|
||||
return 0;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
ngx_size=`$NGX_AUTOTEST`
|
||||
echo " $ngx_size bytes"
|
||||
fi
|
||||
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
|
||||
case $ngx_size in
|
||||
4)
|
||||
if [ "$ngx_type"="long" ]; then
|
||||
ngx_max_value=2147483647L
|
||||
else
|
||||
ngx_max_value=2147483647
|
||||
fi
|
||||
|
||||
ngx_max_len='(sizeof("-2147483648") - 1)'
|
||||
;;
|
||||
|
||||
8)
|
||||
if [ "$ngx_type"="long long" ]; then
|
||||
ngx_max_value=9223372036854775807LL
|
||||
else
|
||||
ngx_max_value=9223372036854775807L
|
||||
fi
|
||||
|
||||
ngx_max_len='(sizeof("-9223372036854775808") - 1)'
|
||||
;;
|
||||
|
||||
*)
|
||||
echo
|
||||
echo "$0: error: can not detect $ngx_type size"
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
|
||||
exit 1
|
||||
esac
|
||||
|
|
@ -1,77 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for $ngx_type ...$ngx_c"
|
||||
|
||||
cat << END >> $NGX_AUTOCONF_ERR
|
||||
|
||||
----------------------------------------
|
||||
checking for $ngx_type
|
||||
|
||||
END
|
||||
|
||||
ngx_found=no
|
||||
|
||||
for ngx_try in $ngx_type $ngx_types
|
||||
do
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#include <netinet/in.h>
|
||||
$NGX_INCLUDE_INTTYPES_H
|
||||
|
||||
int main() {
|
||||
$ngx_try i = 0;
|
||||
return (int) i;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
if [ $ngx_try = $ngx_type ]; then
|
||||
echo " found"
|
||||
ngx_found=yes
|
||||
else
|
||||
echo ", $ngx_try used"
|
||||
ngx_found=$ngx_try
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo $ngx_n " $ngx_try not found$ngx_c"
|
||||
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
cat $NGX_AUTOTEST.c >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
echo $ngx_test >> $NGX_AUTOCONF_ERR
|
||||
echo "----------" >> $NGX_AUTOCONF_ERR
|
||||
|
||||
else
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
echo
|
||||
echo "$0: error: can not define $ngx_type"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $ngx_found != yes ]; then
|
||||
echo "typedef $ngx_found $ngx_type;" >> $NGX_AUTO_CONFIG_H
|
||||
fi
|
|
@ -1,45 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
echo $ngx_n "checking for uintptr_t ...$ngx_c"
|
||||
echo >> $NGX_AUTOCONF_ERR
|
||||
echo "checking for uintptr_t" >> $NGX_AUTOCONF_ERR
|
||||
|
||||
found=no
|
||||
|
||||
cat << END > $NGX_AUTOTEST.c
|
||||
|
||||
#include <sys/types.h>
|
||||
$NGX_INTTYPES_H
|
||||
|
||||
int main() {
|
||||
uintptr_t i = 0;
|
||||
return (int) i;
|
||||
}
|
||||
|
||||
END
|
||||
|
||||
ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \
|
||||
-o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT"
|
||||
|
||||
eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1"
|
||||
|
||||
if [ -x $NGX_AUTOTEST ]; then
|
||||
echo " uintptr_t found"
|
||||
found=yes
|
||||
else
|
||||
echo $ngx_n " uintptr_t not found" $ngx_c
|
||||
fi
|
||||
|
||||
rm -rf $NGX_AUTOTEST*
|
||||
|
||||
|
||||
if [ $found = no ]; then
|
||||
found="uint`expr 8 \* $ngx_ptr_size`_t"
|
||||
echo ", $found used"
|
||||
|
||||
echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
|
||||
echo "typedef $found intptr_t;" | sed -e 's/u//g' >> $NGX_AUTO_CONFIG_H
|
||||
fi
|
|
@ -1,12 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
cat << END >> $NGX_AUTO_CONFIG_H
|
||||
|
||||
#ifndef $ngx_param
|
||||
#define $ngx_param $ngx_value
|
||||
#endif
|
||||
|
||||
END
|
|
@ -1,827 +0,0 @@
|
|||
|
||||
# Copyright (C) Igor Sysoev
|
||||
# Copyright (C) Nginx, Inc.
|
||||
|
||||
|
||||
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; struct pollfd pl;
|
||||
pl.fd = 0;
|
||||
pl.events = 0;
|
||||
pl.revents = 0;
|
||||
n = poll(&pl, 1, 0);
|
||||
if (n == -1) return 1"
|
||||
. 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);
|
||||
if (n == -1) return 1"
|
||||
. 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
|
||||
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
|
||||
|
||||
|
||||
ngx_feature="F_READAHEAD"
|
||||
ngx_feature_name="NGX_HAVE_F_READAHEAD"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="fcntl(0, F_READAHEAD, 1);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="posix_fadvise()"
|
||||
ngx_feature_name="NGX_HAVE_POSIX_FADVISE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="O_DIRECT"
|
||||
ngx_feature_name="NGX_HAVE_O_DIRECT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="fcntl(0, F_SETFL, O_DIRECT);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = yes -a "$NGX_SYSTEM" = "Linux" ]; then
|
||||
have=NGX_HAVE_ALIGNED_DIRECTIO . auto/have
|
||||
fi
|
||||
|
||||
ngx_feature="F_NOCACHE"
|
||||
ngx_feature_name="NGX_HAVE_F_NOCACHE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="fcntl(0, F_NOCACHE, 1);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="directio()"
|
||||
ngx_feature_name="NGX_HAVE_DIRECTIO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/types.h>
|
||||
#include <sys/fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="directio(0, DIRECTIO_ON);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="statfs()"
|
||||
ngx_feature_name="NGX_HAVE_STATFS"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="$NGX_INCLUDE_SYS_PARAM_H
|
||||
$NGX_INCLUDE_SYS_MOUNT_H
|
||||
$NGX_INCLUDE_SYS_VFS_H"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct statfs fs;
|
||||
statfs(\".\", &fs);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="statvfs()"
|
||||
ngx_feature_name="NGX_HAVE_STATVFS"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/types.h>
|
||||
#include <sys/statvfs.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct statvfs fs;
|
||||
statvfs(\".\", &fs);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="dlopen()"
|
||||
ngx_feature_name=
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <dlfcn.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="dlopen(NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found != yes ]; then
|
||||
|
||||
ngx_feature="dlopen() in libdl"
|
||||
ngx_feature_libs="-ldl"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
NGX_LIBDL="-ldl"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="sched_yield()"
|
||||
ngx_feature_name="NGX_HAVE_SCHED_YIELD"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sched.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="sched_yield()"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found != yes ]; then
|
||||
|
||||
ngx_feature="sched_yield() in librt"
|
||||
ngx_feature_libs="-lrt"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lrt"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="SO_SETFIB"
|
||||
ngx_feature_name="NGX_HAVE_SETFIB"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_SETFIB, NULL, 4)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="SO_ACCEPTFILTER"
|
||||
ngx_feature_name="NGX_HAVE_DEFERRED_ACCEPT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, SOL_SOCKET, SO_ACCEPTFILTER, NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="TCP_DEFER_ACCEPT"
|
||||
ngx_feature_name="NGX_HAVE_DEFERRED_ACCEPT"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, IPPROTO_TCP, TCP_DEFER_ACCEPT, NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="TCP_KEEPIDLE"
|
||||
ngx_feature_name="NGX_HAVE_KEEPALIVE_TUNABLE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, IPPROTO_TCP, TCP_KEEPIDLE, NULL, 0);
|
||||
setsockopt(0, IPPROTO_TCP, TCP_KEEPINTVL, NULL, 0);
|
||||
setsockopt(0, IPPROTO_TCP, TCP_KEEPCNT, NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="TCP_FASTOPEN"
|
||||
ngx_feature_name="NGX_HAVE_TCP_FASTOPEN"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="setsockopt(0, IPPROTO_TCP, TCP_FASTOPEN, NULL, 0)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="TCP_INFO"
|
||||
ngx_feature_name="NGX_HAVE_TCP_INFO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="socklen_t optlen = sizeof(struct tcp_info);
|
||||
struct tcp_info ti;
|
||||
ti.tcpi_rtt = 0;
|
||||
ti.tcpi_rttvar = 0;
|
||||
ti.tcpi_snd_cwnd = 0;
|
||||
ti.tcpi_rcv_space = 0;
|
||||
getsockopt(0, IPPROTO_TCP, TCP_INFO, &ti, &optlen)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="accept4()"
|
||||
ngx_feature_name="NGX_HAVE_ACCEPT4"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="accept4(0, NULL, NULL, SOCK_NONBLOCK)"
|
||||
. auto/feature
|
||||
|
||||
if [ $NGX_FILE_AIO = YES ]; then
|
||||
|
||||
ngx_feature="kqueue AIO support"
|
||||
ngx_feature_name="NGX_HAVE_FILE_AIO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <aio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int n; struct aiocb iocb;
|
||||
iocb.aio_sigevent.sigev_notify = SIGEV_KEVENT;
|
||||
n = aio_read(&iocb)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_SRCS="$CORE_SRCS $FILE_AIO_SRCS"
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
ngx_feature="Linux AIO support"
|
||||
ngx_feature_name="NGX_HAVE_FILE_AIO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <linux/aio_abi.h>
|
||||
#include <sys/eventfd.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct iocb iocb;
|
||||
iocb.aio_lio_opcode = IOCB_CMD_PREAD;
|
||||
iocb.aio_flags = IOCB_FLAG_RESFD;
|
||||
iocb.aio_resfd = -1;
|
||||
(void) eventfd(0, 0)"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_EVENTFD . auto/have
|
||||
have=NGX_HAVE_SYS_EVENTFD_H . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
ngx_feature="Linux AIO support (SYS_eventfd)"
|
||||
ngx_feature_incs="#include <linux/aio_abi.h>
|
||||
#include <sys/syscall.h>"
|
||||
ngx_feature_test="int n = SYS_eventfd;
|
||||
struct iocb iocb;
|
||||
iocb.aio_lio_opcode = IOCB_CMD_PREAD;
|
||||
iocb.aio_flags = IOCB_FLAG_RESFD;
|
||||
iocb.aio_resfd = -1;"
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
have=NGX_HAVE_EVENTFD . auto/have
|
||||
CORE_SRCS="$CORE_SRCS $LINUX_AIO_SRCS"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
cat << END
|
||||
|
||||
$0: no supported file AIO was found
|
||||
Currently file AIO is supported on FreeBSD 4.3+ and Linux 2.6.22+ only
|
||||
|
||||
END
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
have=NGX_HAVE_UNIX_DOMAIN . auto/have
|
||||
|
||||
ngx_feature_libs=
|
||||
|
||||
|
||||
# C types
|
||||
|
||||
ngx_type="int"; . auto/types/sizeof
|
||||
|
||||
ngx_type="long"; . auto/types/sizeof
|
||||
|
||||
ngx_type="long long"; . auto/types/sizeof
|
||||
|
||||
ngx_type="void *"; . auto/types/sizeof; ngx_ptr_size=$ngx_size
|
||||
ngx_param=NGX_PTR_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
|
||||
|
||||
# POSIX types
|
||||
|
||||
case "$NGX_AUTO_CONFIG_H" in
|
||||
/*)
|
||||
NGX_INCLUDE_AUTO_CONFIG_H="#include \"$NGX_AUTO_CONFIG_H\""
|
||||
;;
|
||||
*)
|
||||
NGX_INCLUDE_AUTO_CONFIG_H="#include \"../$NGX_AUTO_CONFIG_H\""
|
||||
;;
|
||||
esac
|
||||
|
||||
ngx_type="uint64_t"; ngx_types="u_int64_t"; . auto/types/typedef
|
||||
|
||||
ngx_type="sig_atomic_t"; ngx_types="int"; . auto/types/typedef
|
||||
. auto/types/sizeof
|
||||
ngx_param=NGX_SIG_ATOMIC_T_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
|
||||
ngx_type="socklen_t"; ngx_types="int"; . auto/types/typedef
|
||||
|
||||
ngx_type="in_addr_t"; ngx_types="uint32_t"; . auto/types/typedef
|
||||
|
||||
ngx_type="in_port_t"; ngx_types="u_short"; . auto/types/typedef
|
||||
|
||||
ngx_type="rlim_t"; ngx_types="int"; . auto/types/typedef
|
||||
|
||||
. auto/types/uintptr_t
|
||||
|
||||
. auto/endianness
|
||||
|
||||
ngx_type="size_t"; . auto/types/sizeof
|
||||
ngx_param=NGX_MAX_SIZE_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
||||
ngx_param=NGX_SIZE_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
|
||||
ngx_type="off_t"; . auto/types/sizeof
|
||||
ngx_param=NGX_MAX_OFF_T_VALUE; ngx_value=$ngx_max_value; . auto/types/value
|
||||
ngx_param=NGX_OFF_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
|
||||
ngx_type="time_t"; . auto/types/sizeof
|
||||
ngx_param=NGX_TIME_T_SIZE; ngx_value=$ngx_size; . auto/types/value
|
||||
ngx_param=NGX_TIME_T_LEN; ngx_value=$ngx_max_len; . auto/types/value
|
||||
|
||||
|
||||
# syscalls, libc calls and some features
|
||||
|
||||
|
||||
if [ $NGX_IPV6 = YES ]; then
|
||||
ngx_feature="AF_INET6"
|
||||
ngx_feature_name="NGX_HAVE_INET6"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct sockaddr_in6 sin6;
|
||||
sin6.sin6_family = AF_INET6;"
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="setproctitle()"
|
||||
ngx_feature_name="NGX_HAVE_SETPROCTITLE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <stdlib.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=$NGX_SETPROCTITLE_LIB
|
||||
ngx_feature_test="setproctitle(\"test\");"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="pread()"
|
||||
ngx_feature_name="NGX_HAVE_PREAD"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[1]; ssize_t n; n = pread(0, buf, 1, 0);
|
||||
if (n == -1) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="pwrite()"
|
||||
ngx_feature_name="NGX_HAVE_PWRITE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0);
|
||||
if (n == -1) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="sys_nerr"
|
||||
ngx_feature_name="NGX_SYS_NERR"
|
||||
ngx_feature_run=value
|
||||
ngx_feature_incs='#include <errno.h>
|
||||
#include <stdio.h>'
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test='printf("%d", sys_nerr);'
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Cygiwn defines _sys_nerr
|
||||
ngx_feature="_sys_nerr"
|
||||
ngx_feature_name="NGX_SYS_NERR"
|
||||
ngx_feature_run=value
|
||||
ngx_feature_incs='#include <errno.h>
|
||||
#include <stdio.h>'
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test='printf("%d", _sys_nerr);'
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Solaris has no sys_nerr
|
||||
ngx_feature='maximum errno'
|
||||
ngx_feature_name=NGX_SYS_NERR
|
||||
ngx_feature_run=value
|
||||
ngx_feature_incs='#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>'
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test='int n;
|
||||
char *p;
|
||||
for (n = 1; n < 1000; n++) {
|
||||
errno = 0;
|
||||
p = strerror(n);
|
||||
if (errno == EINVAL
|
||||
|| p == NULL
|
||||
|| strncmp(p, "Unknown error", 13) == 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
printf("%d", n);'
|
||||
. auto/feature
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="localtime_r()"
|
||||
ngx_feature_name="NGX_HAVE_LOCALTIME_R"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <time.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct tm t; time_t c=0; localtime_r(&c, &t)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="posix_memalign()"
|
||||
ngx_feature_name="NGX_HAVE_POSIX_MEMALIGN"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <stdlib.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="void *p; int n; n = posix_memalign(&p, 4096, 4096);
|
||||
if (n != 0) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="memalign()"
|
||||
ngx_feature_name="NGX_HAVE_MEMALIGN"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <stdlib.h>
|
||||
#include <malloc.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="void *p; p = memalign(4096, 4096);
|
||||
if (p == NULL) return 1"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="mmap(MAP_ANON|MAP_SHARED)"
|
||||
ngx_feature_name="NGX_HAVE_MAP_ANON"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/mman.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="void *p;
|
||||
p = mmap(NULL, 4096, PROT_READ|PROT_WRITE,
|
||||
MAP_ANON|MAP_SHARED, -1, 0);
|
||||
if (p == MAP_FAILED) return 1;"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature='mmap("/dev/zero", MAP_SHARED)'
|
||||
ngx_feature_name="NGX_HAVE_MAP_DEVZERO"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test='void *p; int fd;
|
||||
fd = open("/dev/zero", O_RDWR);
|
||||
p = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
|
||||
if (p == MAP_FAILED) return 1;'
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="System V shared memory"
|
||||
ngx_feature_name="NGX_HAVE_SYSVSHM"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <sys/ipc.h>
|
||||
#include <sys/shm.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int id;
|
||||
id = shmget(IPC_PRIVATE, 4096, (SHM_R|SHM_W|IPC_CREAT));
|
||||
if (id == -1) return 1;
|
||||
shmctl(id, IPC_RMID, NULL);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="POSIX semaphores"
|
||||
ngx_feature_name="NGX_HAVE_POSIX_SEM"
|
||||
ngx_feature_run=yes
|
||||
ngx_feature_incs="#include <semaphore.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="sem_t sem;
|
||||
if (sem_init(&sem, 1, 0) == -1) return 1;
|
||||
sem_destroy(&sem);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Linux has POSIX semaphores in libpthread
|
||||
ngx_feature="POSIX semaphores in libpthread"
|
||||
ngx_feature_libs=-lpthread
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lpthread"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ $ngx_found = no ]; then
|
||||
|
||||
# Solaris has POSIX semaphores in librt
|
||||
ngx_feature="POSIX semaphores in librt"
|
||||
ngx_feature_libs=-lrt
|
||||
. auto/feature
|
||||
|
||||
if [ $ngx_found = yes ]; then
|
||||
CORE_LIBS="$CORE_LIBS -lrt"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
ngx_feature="struct msghdr.msg_control"
|
||||
ngx_feature_name="NGX_HAVE_MSGHDR_MSG_CONTROL"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/socket.h>
|
||||
#include <stdio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct msghdr msg;
|
||||
printf(\"%d\", (int) sizeof(msg.msg_control))"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="ioctl(FIONBIO)"
|
||||
ngx_feature_name="NGX_HAVE_FIONBIO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/ioctl.h>
|
||||
#include <stdio.h>
|
||||
$NGX_INCLUDE_SYS_FILIO_H"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="int i = FIONBIO; printf(\"%d\", i)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="struct tm.tm_gmtoff"
|
||||
ngx_feature_name="NGX_HAVE_GMTOFF"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <time.h>
|
||||
#include <stdio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct tm tm; tm.tm_gmtoff = 0;
|
||||
printf(\"%d\", (int) tm.tm_gmtoff)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="struct dirent.d_namlen"
|
||||
ngx_feature_name="NGX_HAVE_D_NAMLEN"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <dirent.h>
|
||||
#include <stdio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct dirent dir; dir.d_namlen = 0;
|
||||
printf(\"%d\", (int) dir.d_namlen)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="struct dirent.d_type"
|
||||
ngx_feature_name="NGX_HAVE_D_TYPE"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <dirent.h>
|
||||
#include <stdio.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="struct dirent dir; dir.d_type = DT_REG;
|
||||
printf(\"%d\", (int) dir.d_type)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="sysconf(_SC_NPROCESSORS_ONLN)"
|
||||
ngx_feature_name="NGX_HAVE_SC_NPROCESSORS_ONLN"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs=
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test="sysconf(_SC_NPROCESSORS_ONLN)"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="openat(), fstatat()"
|
||||
ngx_feature_name="NGX_HAVE_OPENAT"
|
||||
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="struct stat sb;
|
||||
openat(AT_FDCWD, \".\", O_RDONLY|O_NOFOLLOW);
|
||||
fstatat(AT_FDCWD, \".\", &sb, AT_SYMLINK_NOFOLLOW);"
|
||||
. auto/feature
|
||||
|
||||
|
||||
ngx_feature="getaddrinfo()"
|
||||
ngx_feature_name="NGX_HAVE_GETADDRINFO"
|
||||
ngx_feature_run=no
|
||||
ngx_feature_incs="#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netdb.h>"
|
||||
ngx_feature_path=
|
||||
ngx_feature_libs=
|
||||
ngx_feature_test='struct addrinfo *res;
|
||||
if (getaddrinfo("localhost", NULL, NULL, &res) != 0) return 1;
|
||||
freeaddrinfo(res)'
|
||||
. auto/feature
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
|
@ -1,24 +0,0 @@
|
|||
|
||||
fastcgi_param QUERY_STRING $query_string;
|
||||
fastcgi_param REQUEST_METHOD $request_method;
|
||||
fastcgi_param CONTENT_TYPE $content_type;
|
||||
fastcgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
|
||||
fastcgi_param REQUEST_URI $request_uri;
|
||||
fastcgi_param DOCUMENT_URI $document_uri;
|
||||
fastcgi_param DOCUMENT_ROOT $document_root;
|
||||
fastcgi_param SERVER_PROTOCOL $server_protocol;
|
||||
fastcgi_param HTTPS $https if_not_empty;
|
||||
|
||||
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
|
||||
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
|
||||
|
||||
fastcgi_param REMOTE_ADDR $remote_addr;
|
||||
fastcgi_param REMOTE_PORT $remote_port;
|
||||
fastcgi_param SERVER_ADDR $server_addr;
|
||||
fastcgi_param SERVER_PORT $server_port;
|
||||
fastcgi_param SERVER_NAME $server_name;
|
||||
|
||||
# PHP only, required if PHP was built with --enable-force-cgi-redirect
|
||||
fastcgi_param REDIRECT_STATUS 200;
|
|
@ -1,109 +0,0 @@
|
|||
|
||||
# This map is not a full koi8-r <> utf8 map: it does not contain
|
||||
# box-drawing and some other characters. Besides this map contains
|
||||
# several koi8-u and Byelorussian letters which are not in koi8-r.
|
||||
# If you need a full and standard map, use contrib/unicode2nginx/koi-utf
|
||||
# map instead.
|
||||
|
||||
charset_map koi8-r utf-8 {
|
||||
|
||||
80 E282AC ; # euro
|
||||
|
||||
95 E280A2 ; # bullet
|
||||
|
||||
9A C2A0 ; #
|
||||
|
||||
9E C2B7 ; # ·
|
||||
|
||||
A3 D191 ; # small yo
|
||||
A4 D194 ; # small Ukrainian ye
|
||||
|
||||
A6 D196 ; # small Ukrainian i
|
||||
A7 D197 ; # small Ukrainian yi
|
||||
|
||||
AD D291 ; # small Ukrainian soft g
|
||||
AE D19E ; # small Byelorussian short u
|
||||
|
||||
B0 C2B0 ; # °
|
||||
|
||||
B3 D081 ; # capital YO
|
||||
B4 D084 ; # capital Ukrainian YE
|
||||
|
||||
B6 D086 ; # capital Ukrainian I
|
||||
B7 D087 ; # capital Ukrainian YI
|
||||
|
||||
B9 E28496 ; # numero sign
|
||||
|
||||
BD D290 ; # capital Ukrainian soft G
|
||||
BE D18E ; # capital Byelorussian short U
|
||||
|
||||
BF C2A9 ; # (C)
|
||||
|
||||
C0 D18E ; # small yu
|
||||
C1 D0B0 ; # small a
|
||||
C2 D0B1 ; # small b
|
||||
C3 D186 ; # small ts
|
||||
C4 D0B4 ; # small d
|
||||
C5 D0B5 ; # small ye
|
||||
C6 D184 ; # small f
|
||||
C7 D0B3 ; # small g
|
||||
C8 D185 ; # small kh
|
||||
C9 D0B8 ; # small i
|
||||
CA D0B9 ; # small j
|
||||
CB D0BA ; # small k
|
||||
CC D0BB ; # small l
|
||||
CD D0BC ; # small m
|
||||
CE D0BD ; # small n
|
||||
CF D0BE ; # small o
|
||||
|
||||
D0 D0BF ; # small p
|
||||
D1 D18F ; # small ya
|
||||
D2 D180 ; # small r
|
||||
D3 D181 ; # small s
|
||||
D4 D182 ; # small t
|
||||
D5 D183 ; # small u
|
||||
D6 D0B6 ; # small zh
|
||||
D7 D0B2 ; # small v
|
||||
D8 D18C ; # small soft sign
|
||||
D9 D18B ; # small y
|
||||
DA D0B7 ; # small z
|
||||
DB D188 ; # small sh
|
||||
DC D18D ; # small e
|
||||
DD D189 ; # small shch
|
||||
DE D187 ; # small ch
|
||||
DF D18A ; # small hard sign
|
||||
|
||||
E0 D0AE ; # capital YU
|
||||
E1 D090 ; # capital A
|
||||
E2 D091 ; # capital B
|
||||
E3 D0A6 ; # capital TS
|
||||
E4 D094 ; # capital D
|
||||
E5 D095 ; # capital YE
|
||||
E6 D0A4 ; # capital F
|
||||
E7 D093 ; # capital G
|
||||
E8 D0A5 ; # capital KH
|
||||
E9 D098 ; # capital I
|
||||
EA D099 ; # capital J
|
||||
EB D09A ; # capital K
|
||||
EC D09B ; # capital L
|
||||
ED D09C ; # capital M
|
||||
EE D09D ; # capital N
|
||||
EF D09E ; # capital O
|
||||
|
||||
F0 D09F ; # capital P
|
||||
F1 D0AF ; # capital YA
|
||||
F2 D0A0 ; # capital R
|
||||
F3 D0A1 ; # capital S
|
||||
F4 D0A2 ; # capital T
|
||||
F5 D0A3 ; # capital U
|
||||
F6 D096 ; # capital ZH
|
||||
F7 D092 ; # capital V
|
||||
F8 D0AC ; # capital soft sign
|
||||
F9 D0AB ; # capital Y
|
||||
FA D097 ; # capital Z
|
||||
FB D0A8 ; # capital SH
|
||||
FC D0AD ; # capital E
|
||||
FD D0A9 ; # capital SHCH
|
||||
FE D0A7 ; # capital CH
|
||||
FF D0AA ; # capital hard sign
|
||||
}
|
|
@ -1,103 +0,0 @@
|
|||
|
||||
charset_map koi8-r windows-1251 {
|
||||
|
||||
80 88 ; # euro
|
||||
|
||||
95 95 ; # bullet
|
||||
|
||||
9A A0 ; #
|
||||
|
||||
9E B7 ; # ·
|
||||
|
||||
A3 B8 ; # small yo
|
||||
A4 BA ; # small Ukrainian ye
|
||||
|
||||
A6 B3 ; # small Ukrainian i
|
||||
A7 BF ; # small Ukrainian yi
|
||||
|
||||
AD B4 ; # small Ukrainian soft g
|
||||
AE A2 ; # small Byelorussian short u
|
||||
|
||||
B0 B0 ; # °
|
||||
|
||||
B3 A8 ; # capital YO
|
||||
B4 AA ; # capital Ukrainian YE
|
||||
|
||||
B6 B2 ; # capital Ukrainian I
|
||||
B7 AF ; # capital Ukrainian YI
|
||||
|
||||
B9 B9 ; # numero sign
|
||||
|
||||
BD A5 ; # capital Ukrainian soft G
|
||||
BE A1 ; # capital Byelorussian short U
|
||||
|
||||
BF A9 ; # (C)
|
||||
|
||||
C0 FE ; # small yu
|
||||
C1 E0 ; # small a
|
||||
C2 E1 ; # small b
|
||||
C3 F6 ; # small ts
|
||||
C4 E4 ; # small d
|
||||
C5 E5 ; # small ye
|
||||
C6 F4 ; # small f
|
||||
C7 E3 ; # small g
|
||||
C8 F5 ; # small kh
|
||||
C9 E8 ; # small i
|
||||
CA E9 ; # small j
|
||||
CB EA ; # small k
|
||||
CC EB ; # small l
|
||||
CD EC ; # small m
|
||||
CE ED ; # small n
|
||||
CF EE ; # small o
|
||||
|
||||
D0 EF ; # small p
|
||||
D1 FF ; # small ya
|
||||
D2 F0 ; # small r
|
||||
D3 F1 ; # small s
|
||||
D4 F2 ; # small t
|
||||
D5 F3 ; # small u
|
||||
D6 E6 ; # small zh
|
||||
D7 E2 ; # small v
|
||||
D8 FC ; # small soft sign
|
||||
D9 FB ; # small y
|
||||
DA E7 ; # small z
|
||||
DB F8 ; # small sh
|
||||
DC FD ; # small e
|
||||
DD F9 ; # small shch
|
||||
DE F7 ; # small ch
|
||||
DF FA ; # small hard sign
|
||||
|
||||
E0 DE ; # capital YU
|
||||
E1 C0 ; # capital A
|
||||
E2 C1 ; # capital B
|
||||
E3 D6 ; # capital TS
|
||||
E4 C4 ; # capital D
|
||||
E5 C5 ; # capital YE
|
||||
E6 D4 ; # capital F
|
||||
E7 C3 ; # capital G
|
||||
E8 D5 ; # capital KH
|
||||
E9 C8 ; # capital I
|
||||
EA C9 ; # capital J
|
||||
EB CA ; # capital K
|
||||
EC CB ; # capital L
|
||||
ED CC ; # capital M
|
||||
EE CD ; # capital N
|
||||
EF CE ; # capital O
|
||||
|
||||
F0 CF ; # capital P
|
||||
F1 DF ; # capital YA
|
||||
F2 D0 ; # capital R
|
||||
F3 D1 ; # capital S
|
||||
F4 D2 ; # capital T
|
||||
F5 D3 ; # capital U
|
||||
F6 C6 ; # capital ZH
|
||||
F7 C2 ; # capital V
|
||||
F8 DC ; # capital soft sign
|
||||
F9 DB ; # capital Y
|
||||
FA C7 ; # capital Z
|
||||
FB D8 ; # capital SH
|
||||
FC DD ; # capital E
|
||||
FD D9 ; # capital SHCH
|
||||
FE D7 ; # capital CH
|
||||
FF DA ; # capital hard sign
|
||||
}
|
|
@ -1,89 +0,0 @@
|
|||
|
||||
types {
|
||||
text/html html htm shtml;
|
||||
text/css css;
|
||||
text/xml xml;
|
||||
image/gif gif;
|
||||
image/jpeg jpeg jpg;
|
||||
application/javascript js;
|
||||
application/atom+xml atom;
|
||||
application/rss+xml rss;
|
||||
|
||||
text/mathml mml;
|
||||
text/plain txt;
|
||||
text/vnd.sun.j2me.app-descriptor jad;
|
||||
text/vnd.wap.wml wml;
|
||||
text/x-component htc;
|
||||
|
||||
image/png png;
|
||||
image/tiff tif tiff;
|
||||
image/vnd.wap.wbmp wbmp;
|
||||
image/x-icon ico;
|
||||
image/x-jng jng;
|
||||
image/x-ms-bmp bmp;
|
||||
image/svg+xml svg svgz;
|
||||
image/webp webp;
|
||||
|
||||
application/font-woff woff;
|
||||
application/java-archive jar war ear;
|
||||
application/json json;
|
||||
application/mac-binhex40 hqx;
|
||||
application/msword doc;
|
||||
application/pdf pdf;
|
||||
application/postscript ps eps ai;
|
||||
application/rtf rtf;
|
||||
application/vnd.apple.mpegurl m3u8;
|
||||
application/vnd.ms-excel xls;
|
||||
application/vnd.ms-fontobject eot;
|
||||
application/vnd.ms-powerpoint ppt;
|
||||
application/vnd.wap.wmlc wmlc;
|
||||
application/vnd.google-earth.kml+xml kml;
|
||||
application/vnd.google-earth.kmz kmz;
|
||||
application/x-7z-compressed 7z;
|
||||
application/x-cocoa cco;
|
||||
application/x-java-archive-diff jardiff;
|
||||
application/x-java-jnlp-file jnlp;
|
||||
application/x-makeself run;
|
||||
application/x-perl pl pm;
|
||||
application/x-pilot prc pdb;
|
||||
application/x-rar-compressed rar;
|
||||
application/x-redhat-package-manager rpm;
|
||||
application/x-sea sea;
|
||||
application/x-shockwave-flash swf;
|
||||
application/x-stuffit sit;
|
||||
application/x-tcl tcl tk;
|
||||
application/x-x509-ca-cert der pem crt;
|
||||
application/x-xpinstall xpi;
|
||||
application/xhtml+xml xhtml;
|
||||
application/xspf+xml xspf;
|
||||
application/zip zip;
|
||||
|
||||
application/octet-stream bin exe dll;
|
||||
application/octet-stream deb;
|
||||
application/octet-stream dmg;
|
||||
application/octet-stream iso img;
|
||||
application/octet-stream msi msp msm;
|
||||
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx;
|
||||
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx;
|
||||
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx;
|
||||
|
||||
audio/midi mid midi kar;
|
||||
audio/mpeg mp3;
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
video/mp4 mp4;
|
||||
video/mpeg mpeg mpg;
|
||||
video/quicktime mov;
|
||||
video/webm webm;
|
||||
video/x-flv flv;
|
||||
video/x-m4v m4v;
|
||||
video/x-mng mng;
|
||||
video/x-ms-asf asx asf;
|
||||
video/x-ms-wmv wmv;
|
||||
video/x-msvideo avi;
|
||||
}
|
|
@ -1,117 +0,0 @@
|
|||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
#error_log logs/error.log;
|
||||
#error_log logs/error.log notice;
|
||||
#error_log logs/error.log info;
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location / {
|
||||
root html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
||||
#
|
||||
#server {
|
||||
# listen 8000;
|
||||
# listen somename:8080;
|
||||
# server_name somename alias another.alias;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
|
||||
# ssl_session_cache shared:SSL:1m;
|
||||
# ssl_session_timeout 5m;
|
||||
|
||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
scgi_param REQUEST_METHOD $request_method;
|
||||
scgi_param REQUEST_URI $request_uri;
|
||||
scgi_param QUERY_STRING $query_string;
|
||||
scgi_param CONTENT_TYPE $content_type;
|
||||
|
||||
scgi_param DOCUMENT_URI $document_uri;
|
||||
scgi_param DOCUMENT_ROOT $document_root;
|
||||
scgi_param SCGI 1;
|
||||
scgi_param SERVER_PROTOCOL $server_protocol;
|
||||
scgi_param HTTPS $https if_not_empty;
|
||||
|
||||
scgi_param REMOTE_ADDR $remote_addr;
|
||||
scgi_param REMOTE_PORT $remote_port;
|
||||
scgi_param SERVER_PORT $server_port;
|
||||
scgi_param SERVER_NAME $server_name;
|
|
@ -1,16 +0,0 @@
|
|||
|
||||
uwsgi_param QUERY_STRING $query_string;
|
||||
uwsgi_param REQUEST_METHOD $request_method;
|
||||
uwsgi_param CONTENT_TYPE $content_type;
|
||||
uwsgi_param CONTENT_LENGTH $content_length;
|
||||
|
||||
uwsgi_param REQUEST_URI $request_uri;
|
||||
uwsgi_param PATH_INFO $document_uri;
|
||||
uwsgi_param DOCUMENT_ROOT $document_root;
|
||||
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
||||
uwsgi_param HTTPS $https if_not_empty;
|
||||
|
||||
uwsgi_param REMOTE_ADDR $remote_addr;
|
||||
uwsgi_param REMOTE_PORT $remote_port;
|
||||
uwsgi_param SERVER_PORT $server_port;
|
||||
uwsgi_param SERVER_NAME $server_name;
|
|
@ -1,126 +0,0 @@
|
|||
|
||||
# This map is not a full windows-1251 <> utf8 map: it does not
|
||||
# contain Serbian and Macedonian letters. If you need a full map,
|
||||
# use contrib/unicode2nginx/win-utf map instead.
|
||||
|
||||
charset_map windows-1251 utf-8 {
|
||||
|
||||
82 E2809A ; # single low-9 quotation mark
|
||||
|
||||
84 E2809E ; # double low-9 quotation mark
|
||||
85 E280A6 ; # ellipsis
|
||||
86 E280A0 ; # dagger
|
||||
87 E280A1 ; # double dagger
|
||||
88 E282AC ; # euro
|
||||
89 E280B0 ; # per mille
|
||||
|
||||
91 E28098 ; # left single quotation mark
|
||||
92 E28099 ; # right single quotation mark
|
||||
93 E2809C ; # left double quotation mark
|
||||
94 E2809D ; # right double quotation mark
|
||||
95 E280A2 ; # bullet
|
||||
96 E28093 ; # en dash
|
||||
97 E28094 ; # em dash
|
||||
|
||||
99 E284A2 ; # trade mark sign
|
||||
|
||||
A0 C2A0 ; #
|
||||
A1 D18E ; # capital Byelorussian short U
|
||||
A2 D19E ; # small Byelorussian short u
|
||||
|
||||
A4 C2A4 ; # currency sign
|
||||
A5 D290 ; # capital Ukrainian soft G
|
||||
A6 C2A6 ; # borken bar
|
||||
A7 C2A7 ; # section sign
|
||||
A8 D081 ; # capital YO
|
||||
A9 C2A9 ; # (C)
|
||||
AA D084 ; # capital Ukrainian YE
|
||||
AB C2AB ; # left-pointing double angle quotation mark
|
||||
AC C2AC ; # not sign
|
||||
AD C2AD ; # soft hypen
|
||||
AE C2AE ; # (R)
|
||||
AF D087 ; # capital Ukrainian YI
|
||||
|
||||
B0 C2B0 ; # °
|
||||
B1 C2B1 ; # plus-minus sign
|
||||
B2 D086 ; # capital Ukrainian I
|
||||
B3 D196 ; # small Ukrainian i
|
||||
B4 D291 ; # small Ukrainian soft g
|
||||
B5 C2B5 ; # micro sign
|
||||
B6 C2B6 ; # pilcrow sign
|
||||
B7 C2B7 ; # ·
|
||||
B8 D191 ; # small yo
|
||||
B9 E28496 ; # numero sign
|
||||
BA D194 ; # small Ukrainian ye
|
||||
BB C2BB ; # right-pointing double angle quotation mark
|
||||
|
||||
BF D197 ; # small Ukrainian yi
|
||||
|
||||
C0 D090 ; # capital A
|
||||
C1 D091 ; # capital B
|
||||
C2 D092 ; # capital V
|
||||
C3 D093 ; # capital G
|
||||
C4 D094 ; # capital D
|
||||
C5 D095 ; # capital YE
|
||||
C6 D096 ; # capital ZH
|
||||
C7 D097 ; # capital Z
|
||||
C8 D098 ; # capital I
|
||||
C9 D099 ; # capital J
|
||||
CA D09A ; # capital K
|
||||
CB D09B ; # capital L
|
||||
CC D09C ; # capital M
|
||||
CD D09D ; # capital N
|
||||
CE D09E ; # capital O
|
||||
CF D09F ; # capital P
|
||||
|
||||
D0 D0A0 ; # capital R
|
||||
D1 D0A1 ; # capital S
|
||||
D2 D0A2 ; # capital T
|
||||
D3 D0A3 ; # capital U
|
||||
D4 D0A4 ; # capital F
|
||||
D5 D0A5 ; # capital KH
|
||||
D6 D0A6 ; # capital TS
|
||||
D7 D0A7 ; # capital CH
|
||||
D8 D0A8 ; # capital SH
|
||||
D9 D0A9 ; # capital SHCH
|
||||
DA D0AA ; # capital hard sign
|
||||
DB D0AB ; # capital Y
|
||||
DC D0AC ; # capital soft sign
|
||||
DD D0AD ; # capital E
|
||||
DE D0AE ; # capital YU
|
||||
DF D0AF ; # capital YA
|
||||
|
||||
E0 D0B0 ; # small a
|
||||
E1 D0B1 ; # small b
|
||||
E2 D0B2 ; # small v
|
||||
E3 D0B3 ; # small g
|
||||
E4 D0B4 ; # small d
|
||||
E5 D0B5 ; # small ye
|
||||
E6 D0B6 ; # small zh
|
||||
E7 D0B7 ; # small z
|
||||
E8 D0B8 ; # small i
|
||||
E9 D0B9 ; # small j
|
||||
EA D0BA ; # small k
|
||||
EB D0BB ; # small l
|
||||
EC D0BC ; # small m
|
||||
ED D0BD ; # small n
|
||||
EE D0BE ; # small o
|
||||
EF D0BF ; # small p
|
||||
|
||||
F0 D180 ; # small r
|
||||
F1 D181 ; # small s
|
||||
F2 D182 ; # small t
|
||||
F3 D183 ; # small u
|
||||
F4 D184 ; # small f
|
||||
F5 D185 ; # small kh
|
||||
F6 D186 ; # small ts
|
||||
F7 D187 ; # small ch
|
||||
F8 D188 ; # small sh
|
||||
F9 D189 ; # small shch
|
||||
FA D18A ; # small hard sign
|
||||
FB D18B ; # small y
|
||||
FC D18C ; # small soft sign
|
||||
FD D18D ; # small e
|
||||
FE D18E ; # small yu
|
||||
FF D18F ; # small ya
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
|
||||
geo2nginx.pl by Andrei Nigmatulin
|
||||
|
||||
The perl script to convert CSV geoip database ( free download
|
||||
at http://www.maxmind.com/app/geoip_country ) to format, suitable
|
||||
for use by the ngx_http_geo_module.
|
||||
|
||||
|
||||
unicode2nginx by Maxim Dounin
|
||||
|
||||
The perl script to convert unicode mappings ( available
|
||||
at http://www.unicode.org/Public/MAPPINGS/ ) to the nginx
|
||||
configuration file format.
|
||||
Two generated full maps for windows-1251 and koi8-r.
|
||||
|
||||
|
||||
vim by Evan Miller
|
||||
|
||||
Syntax highlighting of nginx configuration for vim, to be
|
||||
placed into ~/.vim/.
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# (c) Andrei Nigmatulin, 2005
|
||||
#
|
||||
# this script provided "as is", without any warranties. use it at your own risk.
|
||||
#
|
||||
# special thanx to Andrew Sitnikov for perl port
|
||||
#
|
||||
# this script converts CSV geoip database (free download at http://www.maxmind.com/app/geoip_country)
|
||||
# to format, suitable for use with nginx_http_geo module (http://sysoev.ru/nginx)
|
||||
#
|
||||
# for example, line with ip range
|
||||
#
|
||||
# "62.16.68.0","62.16.127.255","1041253376","1041268735","RU","Russian Federation"
|
||||
#
|
||||
# will be converted to four subnetworks:
|
||||
#
|
||||
# 62.16.68.0/22 RU;
|
||||
# 62.16.72.0/21 RU;
|
||||
# 62.16.80.0/20 RU;
|
||||
# 62.16.96.0/19 RU;
|
||||
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
while( <STDIN> ){
|
||||
if (/"[^"]+","[^"]+","([^"]+)","([^"]+)","([^"]+)"/){
|
||||
print_subnets($1, $2, $3);
|
||||
}
|
||||
}
|
||||
|
||||
sub print_subnets {
|
||||
my ($a1, $a2, $c) = @_;
|
||||
my $l;
|
||||
while ($a1 <= $a2) {
|
||||
for ($l = 0; ($a1 & (1 << $l)) == 0 && ($a1 + ((1 << ($l + 1)) - 1)) <= $a2; $l++){};
|
||||
print long2ip($a1) . "/" . (32 - $l) . " " . $c . ";\n";
|
||||
$a1 += (1 << $l);
|
||||
}
|
||||
}
|
||||
|
||||
sub long2ip {
|
||||
my $ip = shift;
|
||||
|
||||
my $str = 0;
|
||||
|
||||
$str = ($ip & 255);
|
||||
|
||||
$ip >>= 8;
|
||||
$str = ($ip & 255).".$str";
|
||||
|
||||
$ip >>= 8;
|
||||
$str = ($ip & 255).".$str";
|
||||
|
||||
$ip >>= 8;
|
||||
$str = ($ip & 255).".$str";
|
||||
}
|
|
@ -1,131 +0,0 @@
|
|||
charset_map koi8-r utf-8 {
|
||||
|
||||
80 E29480 ; # BOX DRAWINGS LIGHT HORIZONTAL
|
||||
81 E29482 ; # BOX DRAWINGS LIGHT VERTICAL
|
||||
82 E2948C ; # BOX DRAWINGS LIGHT DOWN AND RIGHT
|
||||
83 E29490 ; # BOX DRAWINGS LIGHT DOWN AND LEFT
|
||||
84 E29494 ; # BOX DRAWINGS LIGHT UP AND RIGHT
|
||||
85 E29498 ; # BOX DRAWINGS LIGHT UP AND LEFT
|
||||
86 E2949C ; # BOX DRAWINGS LIGHT VERTICAL AND RIGHT
|
||||
87 E294A4 ; # BOX DRAWINGS LIGHT VERTICAL AND LEFT
|
||||
88 E294AC ; # BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
|
||||
89 E294B4 ; # BOX DRAWINGS LIGHT UP AND HORIZONTAL
|
||||
8A E294BC ; # BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
|
||||
8B E29680 ; # UPPER HALF BLOCK
|
||||
8C E29684 ; # LOWER HALF BLOCK
|
||||
8D E29688 ; # FULL BLOCK
|
||||
8E E2968C ; # LEFT HALF BLOCK
|
||||
8F E29690 ; # RIGHT HALF BLOCK
|
||||
90 E29691 ; # LIGHT SHADE
|
||||
91 E29692 ; # MEDIUM SHADE
|
||||
92 E29693 ; # DARK SHADE
|
||||
93 E28CA0 ; # TOP HALF INTEGRAL
|
||||
94 E296A0 ; # BLACK SQUARE
|
||||
95 E28899 ; # BULLET OPERATOR
|
||||
96 E2889A ; # SQUARE ROOT
|
||||
97 E28988 ; # ALMOST EQUAL TO
|
||||
98 E289A4 ; # LESS-THAN OR EQUAL TO
|
||||
99 E289A5 ; # GREATER-THAN OR EQUAL TO
|
||||
9A C2A0 ; # NO-BREAK SPACE
|
||||
9B E28CA1 ; # BOTTOM HALF INTEGRAL
|
||||
9C C2B0 ; # DEGREE SIGN
|
||||
9D C2B2 ; # SUPERSCRIPT TWO
|
||||
9E C2B7 ; # MIDDLE DOT
|
||||
9F C3B7 ; # DIVISION SIGN
|
||||
A0 E29590 ; # BOX DRAWINGS DOUBLE HORIZONTAL
|
||||
A1 E29591 ; # BOX DRAWINGS DOUBLE VERTICAL
|
||||
A2 E29592 ; # BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
|
||||
A3 D191 ; # CYRILLIC SMALL LETTER IO
|
||||
A4 E29593 ; # BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
|
||||
A5 E29594 ; # BOX DRAWINGS DOUBLE DOWN AND RIGHT
|
||||
A6 E29595 ; # BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
|
||||
A7 E29596 ; # BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
|
||||
A8 E29597 ; # BOX DRAWINGS DOUBLE DOWN AND LEFT
|
||||
A9 E29598 ; # BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
|
||||
AA E29599 ; # BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
|
||||
AB E2959A ; # BOX DRAWINGS DOUBLE UP AND RIGHT
|
||||
AC E2959B ; # BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
|
||||
AD E2959C ; # BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
|
||||
AE E2959D ; # BOX DRAWINGS DOUBLE UP AND LEFT
|
||||
AF E2959E ; # BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
|
||||
B0 E2959F ; # BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
|
||||
B1 E295A0 ; # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
|
||||
B2 E295A1 ; # BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
|
||||
B3 D081 ; # CYRILLIC CAPITAL LETTER IO
|
||||
B4 E295A2 ; # BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
|
||||
B5 E295A3 ; # BOX DRAWINGS DOUBLE VERTICAL AND LEFT
|
||||
B6 E295A4 ; # BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
|
||||
B7 E295A5 ; # BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
|
||||
B8 E295A6 ; # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
|
||||
B9 E295A7 ; # BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
|
||||
BA E295A8 ; # BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
|
||||
BB E295A9 ; # BOX DRAWINGS DOUBLE UP AND HORIZONTAL
|
||||
BC E295AA ; # BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
|
||||
BD E295AB ; # BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
|
||||
BE E295AC ; # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
|
||||
BF C2A9 ; # COPYRIGHT SIGN
|
||||
C0 D18E ; # CYRILLIC SMALL LETTER YU
|
||||
C1 D0B0 ; # CYRILLIC SMALL LETTER A
|
||||
C2 D0B1 ; # CYRILLIC SMALL LETTER BE
|
||||
C3 D186 ; # CYRILLIC SMALL LETTER TSE
|
||||
C4 D0B4 ; # CYRILLIC SMALL LETTER DE
|
||||
C5 D0B5 ; # CYRILLIC SMALL LETTER IE
|
||||
C6 D184 ; # CYRILLIC SMALL LETTER EF
|
||||
C7 D0B3 ; # CYRILLIC SMALL LETTER GHE
|
||||
C8 D185 ; # CYRILLIC SMALL LETTER HA
|
||||
C9 D0B8 ; # CYRILLIC SMALL LETTER I
|
||||
CA D0B9 ; # CYRILLIC SMALL LETTER SHORT I
|
||||
CB D0BA ; # CYRILLIC SMALL LETTER KA
|
||||
CC D0BB ; # CYRILLIC SMALL LETTER EL
|
||||
CD D0BC ; # CYRILLIC SMALL LETTER EM
|
||||
CE D0BD ; # CYRILLIC SMALL LETTER EN
|
||||
CF D0BE ; # CYRILLIC SMALL LETTER O
|
||||
D0 D0BF ; # CYRILLIC SMALL LETTER PE
|
||||
D1 D18F ; # CYRILLIC SMALL LETTER YA
|
||||
D2 D180 ; # CYRILLIC SMALL LETTER ER
|
||||
D3 D181 ; # CYRILLIC SMALL LETTER ES
|
||||
D4 D182 ; # CYRILLIC SMALL LETTER TE
|
||||
D5 D183 ; # CYRILLIC SMALL LETTER U
|
||||
D6 D0B6 ; # CYRILLIC SMALL LETTER ZHE
|
||||
D7 D0B2 ; # CYRILLIC SMALL LETTER VE
|
||||
D8 D18C ; # CYRILLIC SMALL LETTER SOFT SIGN
|
||||
D9 D18B ; # CYRILLIC SMALL LETTER YERU
|
||||
DA D0B7 ; # CYRILLIC SMALL LETTER ZE
|
||||
DB D188 ; # CYRILLIC SMALL LETTER SHA
|
||||
DC D18D ; # CYRILLIC SMALL LETTER E
|
||||
DD D189 ; # CYRILLIC SMALL LETTER SHCHA
|
||||
DE D187 ; # CYRILLIC SMALL LETTER CHE
|
||||
DF D18A ; # CYRILLIC SMALL LETTER HARD SIGN
|
||||
E0 D0AE ; # CYRILLIC CAPITAL LETTER YU
|
||||
E1 D090 ; # CYRILLIC CAPITAL LETTER A
|
||||
E2 D091 ; # CYRILLIC CAPITAL LETTER BE
|
||||
E3 D0A6 ; # CYRILLIC CAPITAL LETTER TSE
|
||||
E4 D094 ; # CYRILLIC CAPITAL LETTER DE
|
||||
E5 D095 ; # CYRILLIC CAPITAL LETTER IE
|
||||
E6 D0A4 ; # CYRILLIC CAPITAL LETTER EF
|
||||
E7 D093 ; # CYRILLIC CAPITAL LETTER GHE
|
||||
E8 D0A5 ; # CYRILLIC CAPITAL LETTER HA
|
||||
E9 D098 ; # CYRILLIC CAPITAL LETTER I
|
||||
EA D099 ; # CYRILLIC CAPITAL LETTER SHORT I
|
||||
EB D09A ; # CYRILLIC CAPITAL LETTER KA
|
||||
EC D09B ; # CYRILLIC CAPITAL LETTER EL
|
||||
ED D09C ; # CYRILLIC CAPITAL LETTER EM
|
||||
EE D09D ; # CYRILLIC CAPITAL LETTER EN
|
||||
EF D09E ; # CYRILLIC CAPITAL LETTER O
|
||||
F0 D09F ; # CYRILLIC CAPITAL LETTER PE
|
||||
F1 D0AF ; # CYRILLIC CAPITAL LETTER YA
|
||||
F2 D0A0 ; # CYRILLIC CAPITAL LETTER ER
|
||||
F3 D0A1 ; # CYRILLIC CAPITAL LETTER ES
|
||||
F4 D0A2 ; # CYRILLIC CAPITAL LETTER TE
|
||||
F5 D0A3 ; # CYRILLIC CAPITAL LETTER U
|
||||
F6 D096 ; # CYRILLIC CAPITAL LETTER ZHE
|
||||
F7 D092 ; # CYRILLIC CAPITAL LETTER VE
|
||||
F8 D0AC ; # CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
F9 D0AB ; # CYRILLIC CAPITAL LETTER YERU
|
||||
FA D097 ; # CYRILLIC CAPITAL LETTER ZE
|
||||
FB D0A8 ; # CYRILLIC CAPITAL LETTER SHA
|
||||
FC D0AD ; # CYRILLIC CAPITAL LETTER E
|
||||
FD D0A9 ; # CYRILLIC CAPITAL LETTER SHCHA
|
||||
FE D0A7 ; # CYRILLIC CAPITAL LETTER CHE
|
||||
FF D0AA ; # CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# Convert unicode mappings to nginx configuration file format.
|
||||
|
||||
# You may find useful mappings in various places, including
|
||||
# unicode.org official site:
|
||||
#
|
||||
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1251.TXT
|
||||
# http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT
|
||||
|
||||
# Needs perl 5.6 or later.
|
||||
|
||||
# Written by Maxim Dounin, mdounin@rambler-co.ru
|
||||
|
||||
###############################################################################
|
||||
|
||||
require 5.006;
|
||||
|
||||
while (<>) {
|
||||
# Skip comments and empty lines
|
||||
|
||||
next if /^#/;
|
||||
next if /^\s*$/;
|
||||
chomp;
|
||||
|
||||
# Convert mappings
|
||||
|
||||
if (/^\s*0x(..)\s*0x(....)\s*(#.*)/) {
|
||||
# Mapping <from-code> <unicode-code> "#" <unicode-name>
|
||||
my $cs_code = $1;
|
||||
my $un_code = $2;
|
||||
my $un_name = $3;
|
||||
|
||||
# Produce UTF-8 sequence from character code;
|
||||
|
||||
my $un_utf8 = join('', map { sprintf("%02X", $_) } unpack("C*", pack("U", hex($un_code))));
|
||||
|
||||
print " $cs_code $un_utf8 ; $un_name\n";
|
||||
|
||||
} else {
|
||||
warn "Unrecognized line: '$_'";
|
||||
}
|
||||
}
|
||||
|
||||
###############################################################################
|
|
@ -1,130 +0,0 @@
|
|||
charset_map windows-1251 utf-8 {
|
||||
|
||||
80 D082 ; #CYRILLIC CAPITAL LETTER DJE
|
||||
81 D083 ; #CYRILLIC CAPITAL LETTER GJE
|
||||
82 E2809A ; #SINGLE LOW-9 QUOTATION MARK
|
||||
83 D193 ; #CYRILLIC SMALL LETTER GJE
|
||||
84 E2809E ; #DOUBLE LOW-9 QUOTATION MARK
|
||||
85 E280A6 ; #HORIZONTAL ELLIPSIS
|
||||
86 E280A0 ; #DAGGER
|
||||
87 E280A1 ; #DOUBLE DAGGER
|
||||
88 E282AC ; #EURO SIGN
|
||||
89 E280B0 ; #PER MILLE SIGN
|
||||
8A D089 ; #CYRILLIC CAPITAL LETTER LJE
|
||||
8B E280B9 ; #SINGLE LEFT-POINTING ANGLE QUOTATION MARK
|
||||
8C D08A ; #CYRILLIC CAPITAL LETTER NJE
|
||||
8D D08C ; #CYRILLIC CAPITAL LETTER KJE
|
||||
8E D08B ; #CYRILLIC CAPITAL LETTER TSHE
|
||||
8F D08F ; #CYRILLIC CAPITAL LETTER DZHE
|
||||
90 D192 ; #CYRILLIC SMALL LETTER DJE
|
||||
91 E28098 ; #LEFT SINGLE QUOTATION MARK
|
||||
92 E28099 ; #RIGHT SINGLE QUOTATION MARK
|
||||
93 E2809C ; #LEFT DOUBLE QUOTATION MARK
|
||||
94 E2809D ; #RIGHT DOUBLE QUOTATION MARK
|
||||
95 E280A2 ; #BULLET
|
||||
96 E28093 ; #EN DASH
|
||||
97 E28094 ; #EM DASH
|
||||
99 E284A2 ; #TRADE MARK SIGN
|
||||
9A D199 ; #CYRILLIC SMALL LETTER LJE
|
||||
9B E280BA ; #SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
|
||||
9C D19A ; #CYRILLIC SMALL LETTER NJE
|
||||
9D D19C ; #CYRILLIC SMALL LETTER KJE
|
||||
9E D19B ; #CYRILLIC SMALL LETTER TSHE
|
||||
9F D19F ; #CYRILLIC SMALL LETTER DZHE
|
||||
A0 C2A0 ; #NO-BREAK SPACE
|
||||
A1 D08E ; #CYRILLIC CAPITAL LETTER SHORT U
|
||||
A2 D19E ; #CYRILLIC SMALL LETTER SHORT U
|
||||
A3 D088 ; #CYRILLIC CAPITAL LETTER JE
|
||||
A4 C2A4 ; #CURRENCY SIGN
|
||||
A5 D290 ; #CYRILLIC CAPITAL LETTER GHE WITH UPTURN
|
||||
A6 C2A6 ; #BROKEN BAR
|
||||
A7 C2A7 ; #SECTION SIGN
|
||||
A8 D081 ; #CYRILLIC CAPITAL LETTER IO
|
||||
A9 C2A9 ; #COPYRIGHT SIGN
|
||||
AA D084 ; #CYRILLIC CAPITAL LETTER UKRAINIAN IE
|
||||
AB C2AB ; #LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
AC C2AC ; #NOT SIGN
|
||||
AD C2AD ; #SOFT HYPHEN
|
||||
AE C2AE ; #REGISTERED SIGN
|
||||
AF D087 ; #CYRILLIC CAPITAL LETTER YI
|
||||
B0 C2B0 ; #DEGREE SIGN
|
||||
B1 C2B1 ; #PLUS-MINUS SIGN
|
||||
B2 D086 ; #CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
B3 D196 ; #CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
B4 D291 ; #CYRILLIC SMALL LETTER GHE WITH UPTURN
|
||||
B5 C2B5 ; #MICRO SIGN
|
||||
B6 C2B6 ; #PILCROW SIGN
|
||||
B7 C2B7 ; #MIDDLE DOT
|
||||
B8 D191 ; #CYRILLIC SMALL LETTER IO
|
||||
B9 E28496 ; #NUMERO SIGN
|
||||
BA D194 ; #CYRILLIC SMALL LETTER UKRAINIAN IE
|
||||
BB C2BB ; #RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
|
||||
BC D198 ; #CYRILLIC SMALL LETTER JE
|
||||
BD D085 ; #CYRILLIC CAPITAL LETTER DZE
|
||||
BE D195 ; #CYRILLIC SMALL LETTER DZE
|
||||
BF D197 ; #CYRILLIC SMALL LETTER YI
|
||||
C0 D090 ; #CYRILLIC CAPITAL LETTER A
|
||||
C1 D091 ; #CYRILLIC CAPITAL LETTER BE
|
||||
C2 D092 ; #CYRILLIC CAPITAL LETTER VE
|
||||
C3 D093 ; #CYRILLIC CAPITAL LETTER GHE
|
||||
C4 D094 ; #CYRILLIC CAPITAL LETTER DE
|
||||
C5 D095 ; #CYRILLIC CAPITAL LETTER IE
|
||||
C6 D096 ; #CYRILLIC CAPITAL LETTER ZHE
|
||||
C7 D097 ; #CYRILLIC CAPITAL LETTER ZE
|
||||
C8 D098 ; #CYRILLIC CAPITAL LETTER I
|
||||
C9 D099 ; #CYRILLIC CAPITAL LETTER SHORT I
|
||||
CA D09A ; #CYRILLIC CAPITAL LETTER KA
|
||||
CB D09B ; #CYRILLIC CAPITAL LETTER EL
|
||||
CC D09C ; #CYRILLIC CAPITAL LETTER EM
|
||||
CD D09D ; #CYRILLIC CAPITAL LETTER EN
|
||||
CE D09E ; #CYRILLIC CAPITAL LETTER O
|
||||
CF D09F ; #CYRILLIC CAPITAL LETTER PE
|
||||
D0 D0A0 ; #CYRILLIC CAPITAL LETTER ER
|
||||
D1 D0A1 ; #CYRILLIC CAPITAL LETTER ES
|
||||
D2 D0A2 ; #CYRILLIC CAPITAL LETTER TE
|
||||
D3 D0A3 ; #CYRILLIC CAPITAL LETTER U
|
||||
D4 D0A4 ; #CYRILLIC CAPITAL LETTER EF
|
||||
D5 D0A5 ; #CYRILLIC CAPITAL LETTER HA
|
||||
D6 D0A6 ; #CYRILLIC CAPITAL LETTER TSE
|
||||
D7 D0A7 ; #CYRILLIC CAPITAL LETTER CHE
|
||||
D8 D0A8 ; #CYRILLIC CAPITAL LETTER SHA
|
||||
D9 D0A9 ; #CYRILLIC CAPITAL LETTER SHCHA
|
||||
DA D0AA ; #CYRILLIC CAPITAL LETTER HARD SIGN
|
||||
DB D0AB ; #CYRILLIC CAPITAL LETTER YERU
|
||||
DC D0AC ; #CYRILLIC CAPITAL LETTER SOFT SIGN
|
||||
DD D0AD ; #CYRILLIC CAPITAL LETTER E
|
||||
DE D0AE ; #CYRILLIC CAPITAL LETTER YU
|
||||
DF D0AF ; #CYRILLIC CAPITAL LETTER YA
|
||||
E0 D0B0 ; #CYRILLIC SMALL LETTER A
|
||||
E1 D0B1 ; #CYRILLIC SMALL LETTER BE
|
||||
E2 D0B2 ; #CYRILLIC SMALL LETTER VE
|
||||
E3 D0B3 ; #CYRILLIC SMALL LETTER GHE
|
||||
E4 D0B4 ; #CYRILLIC SMALL LETTER DE
|
||||
E5 D0B5 ; #CYRILLIC SMALL LETTER IE
|
||||
E6 D0B6 ; #CYRILLIC SMALL LETTER ZHE
|
||||
E7 D0B7 ; #CYRILLIC SMALL LETTER ZE
|
||||
E8 D0B8 ; #CYRILLIC SMALL LETTER I
|
||||
E9 D0B9 ; #CYRILLIC SMALL LETTER SHORT I
|
||||
EA D0BA ; #CYRILLIC SMALL LETTER KA
|
||||
EB D0BB ; #CYRILLIC SMALL LETTER EL
|
||||
EC D0BC ; #CYRILLIC SMALL LETTER EM
|
||||
ED D0BD ; #CYRILLIC SMALL LETTER EN
|
||||
EE D0BE ; #CYRILLIC SMALL LETTER O
|
||||
EF D0BF ; #CYRILLIC SMALL LETTER PE
|
||||
F0 D180 ; #CYRILLIC SMALL LETTER ER
|
||||
F1 D181 ; #CYRILLIC SMALL LETTER ES
|
||||
F2 D182 ; #CYRILLIC SMALL LETTER TE
|
||||
F3 D183 ; #CYRILLIC SMALL LETTER U
|
||||
F4 D184 ; #CYRILLIC SMALL LETTER EF
|
||||
F5 D185 ; #CYRILLIC SMALL LETTER HA
|
||||
F6 D186 ; #CYRILLIC SMALL LETTER TSE
|
||||
F7 D187 ; #CYRILLIC SMALL LETTER CHE
|
||||
F8 D188 ; #CYRILLIC SMALL LETTER SHA
|
||||
F9 D189 ; #CYRILLIC SMALL LETTER SHCHA
|
||||
FA D18A ; #CYRILLIC SMALL LETTER HARD SIGN
|
||||
FB D18B ; #CYRILLIC SMALL LETTER YERU
|
||||
FC D18C ; #CYRILLIC SMALL LETTER SOFT SIGN
|
||||
FD D18D ; #CYRILLIC SMALL LETTER E
|
||||
FE D18E ; #CYRILLIC SMALL LETTER YU
|
||||
FF D18F ; #CYRILLIC SMALL LETTER YA
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
au BufRead,BufNewFile *.nginx set ft=nginx
|
||||
au BufRead,BufNewFile */etc/nginx/* set ft=nginx
|
||||
au BufRead,BufNewFile */usr/local/nginx/conf/* set ft=nginx
|
||||
au BufRead,BufNewFile nginx.conf set ft=nginx
|
|
@ -1,11 +0,0 @@
|
|||
if exists("b:did_indent")
|
||||
finish
|
||||
endif
|
||||
let b:did_indent = 1
|
||||
|
||||
setlocal indentexpr=
|
||||
|
||||
" cindent actually works for nginx' simple file structure
|
||||
setlocal cindent
|
||||
" Just make sure that the comments are not reset as defs would be.
|
||||
setlocal cinkeys-=0#
|
|
@ -1,703 +0,0 @@
|
|||
" Vim syntax file
|
||||
" Language: nginx.conf
|
||||
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
end
|
||||
|
||||
setlocal iskeyword+=.
|
||||
setlocal iskeyword+=/
|
||||
setlocal iskeyword+=:
|
||||
|
||||
syn match ngxVariable '\$\(\w\+\|{\w\+}\)'
|
||||
syn match ngxVariableBlock '\$\(\w\+\|{\w\+}\)' contained
|
||||
syn match ngxVariableString '\$\(\w\+\|{\w\+}\)' contained
|
||||
syn region ngxBlock start=+^+ end=+{+ skip=+\${+ contains=ngxComment,ngxDirectiveBlock,ngxVariableBlock,ngxString oneline
|
||||
syn region ngxString start=+\z(["']\)+ end=+\z1+ skip=+\\\\\|\\\z1+ contains=ngxVariableString
|
||||
syn match ngxComment ' *#.*$'
|
||||
|
||||
syn keyword ngxBoolean on
|
||||
syn keyword ngxBoolean off
|
||||
|
||||
syn keyword ngxDirectiveBlock http contained
|
||||
syn keyword ngxDirectiveBlock mail contained
|
||||
syn keyword ngxDirectiveBlock events contained
|
||||
syn keyword ngxDirectiveBlock server contained
|
||||
syn keyword ngxDirectiveBlock types contained
|
||||
syn keyword ngxDirectiveBlock location contained
|
||||
syn keyword ngxDirectiveBlock upstream contained
|
||||
syn keyword ngxDirectiveBlock charset_map contained
|
||||
syn keyword ngxDirectiveBlock limit_except contained
|
||||
syn keyword ngxDirectiveBlock if contained
|
||||
syn keyword ngxDirectiveBlock geo contained
|
||||
syn keyword ngxDirectiveBlock map contained
|
||||
|
||||
syn keyword ngxDirectiveImportant include
|
||||
syn keyword ngxDirectiveImportant root
|
||||
syn keyword ngxDirectiveImportant server
|
||||
syn keyword ngxDirectiveImportant server_name
|
||||
syn keyword ngxDirectiveImportant listen
|
||||
syn keyword ngxDirectiveImportant internal
|
||||
syn keyword ngxDirectiveImportant proxy_pass
|
||||
syn keyword ngxDirectiveImportant memcached_pass
|
||||
syn keyword ngxDirectiveImportant fastcgi_pass
|
||||
syn keyword ngxDirectiveImportant try_files
|
||||
|
||||
syn keyword ngxDirectiveControl break
|
||||
syn keyword ngxDirectiveControl return
|
||||
syn keyword ngxDirectiveControl rewrite
|
||||
syn keyword ngxDirectiveControl set
|
||||
|
||||
syn keyword ngxDirectiveError error_page
|
||||
syn keyword ngxDirectiveError post_action
|
||||
|
||||
syn keyword ngxDirectiveDeprecated connections
|
||||
syn keyword ngxDirectiveDeprecated imap
|
||||
syn keyword ngxDirectiveDeprecated open_file_cache_retest
|
||||
syn keyword ngxDirectiveDeprecated optimize_server_names
|
||||
syn keyword ngxDirectiveDeprecated satisfy_any
|
||||
|
||||
syn keyword ngxDirective accept_mutex
|
||||
syn keyword ngxDirective accept_mutex_delay
|
||||
syn keyword ngxDirective access_log
|
||||
syn keyword ngxDirective add_after_body
|
||||
syn keyword ngxDirective add_before_body
|
||||
syn keyword ngxDirective add_header
|
||||
syn keyword ngxDirective addition_types
|
||||
syn keyword ngxDirective aio
|
||||
syn keyword ngxDirective alias
|
||||
syn keyword ngxDirective allow
|
||||
syn keyword ngxDirective ancient_browser
|
||||
syn keyword ngxDirective ancient_browser_value
|
||||
syn keyword ngxDirective auth_basic
|
||||
syn keyword ngxDirective auth_basic_user_file
|
||||
syn keyword ngxDirective auth_http
|
||||
syn keyword ngxDirective auth_http_header
|
||||
syn keyword ngxDirective auth_http_timeout
|
||||
syn keyword ngxDirective autoindex
|
||||
syn keyword ngxDirective autoindex_exact_size
|
||||
syn keyword ngxDirective autoindex_localtime
|
||||
syn keyword ngxDirective charset
|
||||
syn keyword ngxDirective charset_types
|
||||
syn keyword ngxDirective client_body_buffer_size
|
||||
syn keyword ngxDirective client_body_in_file_only
|
||||
syn keyword ngxDirective client_body_in_single_buffer
|
||||
syn keyword ngxDirective client_body_temp_path
|
||||
syn keyword ngxDirective client_body_timeout
|
||||
syn keyword ngxDirective client_header_buffer_size
|
||||
syn keyword ngxDirective client_header_timeout
|
||||
syn keyword ngxDirective client_max_body_size
|
||||
syn keyword ngxDirective connection_pool_size
|
||||
syn keyword ngxDirective create_full_put_path
|
||||
syn keyword ngxDirective daemon
|
||||
syn keyword ngxDirective dav_access
|
||||
syn keyword ngxDirective dav_methods
|
||||
syn keyword ngxDirective debug_connection
|
||||
syn keyword ngxDirective debug_points
|
||||
syn keyword ngxDirective default_type
|
||||
syn keyword ngxDirective degradation
|
||||
syn keyword ngxDirective degrade
|
||||
syn keyword ngxDirective deny
|
||||
syn keyword ngxDirective devpoll_changes
|
||||
syn keyword ngxDirective devpoll_events
|
||||
syn keyword ngxDirective directio
|
||||
syn keyword ngxDirective directio_alignment
|
||||
syn keyword ngxDirective empty_gif
|
||||
syn keyword ngxDirective env
|
||||
syn keyword ngxDirective epoll_events
|
||||
syn keyword ngxDirective error_log
|
||||
syn keyword ngxDirective eventport_events
|
||||
syn keyword ngxDirective expires
|
||||
syn keyword ngxDirective fastcgi_bind
|
||||
syn keyword ngxDirective fastcgi_buffer_size
|
||||
syn keyword ngxDirective fastcgi_buffers
|
||||
syn keyword ngxDirective fastcgi_busy_buffers_size
|
||||
syn keyword ngxDirective fastcgi_cache
|
||||
syn keyword ngxDirective fastcgi_cache_key
|
||||
syn keyword ngxDirective fastcgi_cache_methods
|
||||
syn keyword ngxDirective fastcgi_cache_min_uses
|
||||
syn keyword ngxDirective fastcgi_cache_path
|
||||
syn keyword ngxDirective fastcgi_cache_use_stale
|
||||
syn keyword ngxDirective fastcgi_cache_valid
|
||||
syn keyword ngxDirective fastcgi_catch_stderr
|
||||
syn keyword ngxDirective fastcgi_connect_timeout
|
||||
syn keyword ngxDirective fastcgi_hide_header
|
||||
syn keyword ngxDirective fastcgi_ignore_client_abort
|
||||
syn keyword ngxDirective fastcgi_ignore_headers
|
||||
syn keyword ngxDirective fastcgi_index
|
||||
syn keyword ngxDirective fastcgi_intercept_errors
|
||||
syn keyword ngxDirective fastcgi_max_temp_file_size
|
||||
syn keyword ngxDirective fastcgi_next_upstream
|
||||
syn keyword ngxDirective fastcgi_param
|
||||
syn keyword ngxDirective fastcgi_pass_header
|
||||
syn keyword ngxDirective fastcgi_pass_request_body
|
||||
syn keyword ngxDirective fastcgi_pass_request_headers
|
||||
syn keyword ngxDirective fastcgi_read_timeout
|
||||
syn keyword ngxDirective fastcgi_send_lowat
|
||||
syn keyword ngxDirective fastcgi_send_timeout
|
||||
syn keyword ngxDirective fastcgi_split_path_info
|
||||
syn keyword ngxDirective fastcgi_store
|
||||
syn keyword ngxDirective fastcgi_store_access
|
||||
syn keyword ngxDirective fastcgi_temp_file_write_size
|
||||
syn keyword ngxDirective fastcgi_temp_path
|
||||
syn keyword ngxDirective fastcgi_upstream_fail_timeout
|
||||
syn keyword ngxDirective fastcgi_upstream_max_fails
|
||||
syn keyword ngxDirective flv
|
||||
syn keyword ngxDirective geoip_city
|
||||
syn keyword ngxDirective geoip_country
|
||||
syn keyword ngxDirective google_perftools_profiles
|
||||
syn keyword ngxDirective gzip
|
||||
syn keyword ngxDirective gzip_buffers
|
||||
syn keyword ngxDirective gzip_comp_level
|
||||
syn keyword ngxDirective gzip_disable
|
||||
syn keyword ngxDirective gzip_hash
|
||||
syn keyword ngxDirective gzip_http_version
|
||||
syn keyword ngxDirective gzip_min_length
|
||||
syn keyword ngxDirective gzip_no_buffer
|
||||
syn keyword ngxDirective gzip_proxied
|
||||
syn keyword ngxDirective gzip_static
|
||||
syn keyword ngxDirective gzip_types
|
||||
syn keyword ngxDirective gzip_vary
|
||||
syn keyword ngxDirective gzip_window
|
||||
syn keyword ngxDirective if_modified_since
|
||||
syn keyword ngxDirective ignore_invalid_headers
|
||||
syn keyword ngxDirective image_filter
|
||||
syn keyword ngxDirective image_filter_buffer
|
||||
syn keyword ngxDirective image_filter_jpeg_quality
|
||||
syn keyword ngxDirective image_filter_transparency
|
||||
syn keyword ngxDirective imap_auth
|
||||
syn keyword ngxDirective imap_capabilities
|
||||
syn keyword ngxDirective imap_client_buffer
|
||||
syn keyword ngxDirective index
|
||||
syn keyword ngxDirective ip_hash
|
||||
syn keyword ngxDirective keepalive_requests
|
||||
syn keyword ngxDirective keepalive_timeout
|
||||
syn keyword ngxDirective kqueue_changes
|
||||
syn keyword ngxDirective kqueue_events
|
||||
syn keyword ngxDirective large_client_header_buffers
|
||||
syn keyword ngxDirective limit_conn
|
||||
syn keyword ngxDirective limit_conn_log_level
|
||||
syn keyword ngxDirective limit_rate
|
||||
syn keyword ngxDirective limit_rate_after
|
||||
syn keyword ngxDirective limit_req
|
||||
syn keyword ngxDirective limit_req_log_level
|
||||
syn keyword ngxDirective limit_req_zone
|
||||
syn keyword ngxDirective limit_zone
|
||||
syn keyword ngxDirective lingering_time
|
||||
syn keyword ngxDirective lingering_timeout
|
||||
syn keyword ngxDirective lock_file
|
||||
syn keyword ngxDirective log_format
|
||||
syn keyword ngxDirective log_not_found
|
||||
syn keyword ngxDirective log_subrequest
|
||||
syn keyword ngxDirective map_hash_bucket_size
|
||||
syn keyword ngxDirective map_hash_max_size
|
||||
syn keyword ngxDirective master_process
|
||||
syn keyword ngxDirective memcached_bind
|
||||
syn keyword ngxDirective memcached_buffer_size
|
||||
syn keyword ngxDirective memcached_connect_timeout
|
||||
syn keyword ngxDirective memcached_next_upstream
|
||||
syn keyword ngxDirective memcached_read_timeout
|
||||
syn keyword ngxDirective memcached_send_timeout
|
||||
syn keyword ngxDirective memcached_upstream_fail_timeout
|
||||
syn keyword ngxDirective memcached_upstream_max_fails
|
||||
syn keyword ngxDirective merge_slashes
|
||||
syn keyword ngxDirective min_delete_depth
|
||||
syn keyword ngxDirective modern_browser
|
||||
syn keyword ngxDirective modern_browser_value
|
||||
syn keyword ngxDirective msie_padding
|
||||
syn keyword ngxDirective msie_refresh
|
||||
syn keyword ngxDirective multi_accept
|
||||
syn keyword ngxDirective open_file_cache
|
||||
syn keyword ngxDirective open_file_cache_errors
|
||||
syn keyword ngxDirective open_file_cache_events
|
||||
syn keyword ngxDirective open_file_cache_min_uses
|
||||
syn keyword ngxDirective open_file_cache_valid
|
||||
syn keyword ngxDirective open_log_file_cache
|
||||
syn keyword ngxDirective output_buffers
|
||||
syn keyword ngxDirective override_charset
|
||||
syn keyword ngxDirective perl
|
||||
syn keyword ngxDirective perl_modules
|
||||
syn keyword ngxDirective perl_require
|
||||
syn keyword ngxDirective perl_set
|
||||
syn keyword ngxDirective pid
|
||||
syn keyword ngxDirective pop3_auth
|
||||
syn keyword ngxDirective pop3_capabilities
|
||||
syn keyword ngxDirective port_in_redirect
|
||||
syn keyword ngxDirective postpone_gzipping
|
||||
syn keyword ngxDirective postpone_output
|
||||
syn keyword ngxDirective protocol
|
||||
syn keyword ngxDirective proxy
|
||||
syn keyword ngxDirective proxy_bind
|
||||
syn keyword ngxDirective proxy_buffer
|
||||
syn keyword ngxDirective proxy_buffer_size
|
||||
syn keyword ngxDirective proxy_buffering
|
||||
syn keyword ngxDirective proxy_buffers
|
||||
syn keyword ngxDirective proxy_busy_buffers_size
|
||||
syn keyword ngxDirective proxy_cache
|
||||
syn keyword ngxDirective proxy_cache_key
|
||||
syn keyword ngxDirective proxy_cache_methods
|
||||
syn keyword ngxDirective proxy_cache_min_uses
|
||||
syn keyword ngxDirective proxy_cache_path
|
||||
syn keyword ngxDirective proxy_cache_use_stale
|
||||
syn keyword ngxDirective proxy_cache_valid
|
||||
syn keyword ngxDirective proxy_connect_timeout
|
||||
syn keyword ngxDirective proxy_headers_hash_bucket_size
|
||||
syn keyword ngxDirective proxy_headers_hash_max_size
|
||||
syn keyword ngxDirective proxy_hide_header
|
||||
syn keyword ngxDirective proxy_ignore_client_abort
|
||||
syn keyword ngxDirective proxy_ignore_headers
|
||||
syn keyword ngxDirective proxy_intercept_errors
|
||||
syn keyword ngxDirective proxy_max_temp_file_size
|
||||
syn keyword ngxDirective proxy_method
|
||||
syn keyword ngxDirective proxy_next_upstream
|
||||
syn keyword ngxDirective proxy_pass_error_message
|
||||
syn keyword ngxDirective proxy_pass_header
|
||||
syn keyword ngxDirective proxy_pass_request_body
|
||||
syn keyword ngxDirective proxy_pass_request_headers
|
||||
syn keyword ngxDirective proxy_read_timeout
|
||||
syn keyword ngxDirective proxy_redirect
|
||||
syn keyword ngxDirective proxy_send_lowat
|
||||
syn keyword ngxDirective proxy_send_timeout
|
||||
syn keyword ngxDirective proxy_set_body
|
||||
syn keyword ngxDirective proxy_set_header
|
||||
syn keyword ngxDirective proxy_ssl_session_reuse
|
||||
syn keyword ngxDirective proxy_store
|
||||
syn keyword ngxDirective proxy_store_access
|
||||
syn keyword ngxDirective proxy_temp_file_write_size
|
||||
syn keyword ngxDirective proxy_temp_path
|
||||
syn keyword ngxDirective proxy_timeout
|
||||
syn keyword ngxDirective proxy_upstream_fail_timeout
|
||||
syn keyword ngxDirective proxy_upstream_max_fails
|
||||
syn keyword ngxDirective random_index
|
||||
syn keyword ngxDirective read_ahead
|
||||
syn keyword ngxDirective real_ip_header
|
||||
syn keyword ngxDirective recursive_error_pages
|
||||
syn keyword ngxDirective request_pool_size
|
||||
syn keyword ngxDirective reset_timedout_connection
|
||||
syn keyword ngxDirective resolver
|
||||
syn keyword ngxDirective resolver_timeout
|
||||
syn keyword ngxDirective rewrite_log
|
||||
syn keyword ngxDirective rtsig_overflow_events
|
||||
syn keyword ngxDirective rtsig_overflow_test
|
||||
syn keyword ngxDirective rtsig_overflow_threshold
|
||||
syn keyword ngxDirective rtsig_signo
|
||||
syn keyword ngxDirective satisfy
|
||||
syn keyword ngxDirective secure_link_secret
|
||||
syn keyword ngxDirective send_lowat
|
||||
syn keyword ngxDirective send_timeout
|
||||
syn keyword ngxDirective sendfile
|
||||
syn keyword ngxDirective sendfile_max_chunk
|
||||
syn keyword ngxDirective server_name_in_redirect
|
||||
syn keyword ngxDirective server_names_hash_bucket_size
|
||||
syn keyword ngxDirective server_names_hash_max_size
|
||||
syn keyword ngxDirective server_tokens
|
||||
syn keyword ngxDirective set_real_ip_from
|
||||
syn keyword ngxDirective smtp_auth
|
||||
syn keyword ngxDirective smtp_capabilities
|
||||
syn keyword ngxDirective smtp_client_buffer
|
||||
syn keyword ngxDirective smtp_greeting_delay
|
||||
syn keyword ngxDirective so_keepalive
|
||||
syn keyword ngxDirective source_charset
|
||||
syn keyword ngxDirective ssi
|
||||
syn keyword ngxDirective ssi_ignore_recycled_buffers
|
||||
syn keyword ngxDirective ssi_min_file_chunk
|
||||
syn keyword ngxDirective ssi_silent_errors
|
||||
syn keyword ngxDirective ssi_types
|
||||
syn keyword ngxDirective ssi_value_length
|
||||
syn keyword ngxDirective ssl
|
||||
syn keyword ngxDirective ssl_certificate
|
||||
syn keyword ngxDirective ssl_certificate_key
|
||||
syn keyword ngxDirective ssl_ciphers
|
||||
syn keyword ngxDirective ssl_client_certificate
|
||||
syn keyword ngxDirective ssl_crl
|
||||
syn keyword ngxDirective ssl_dhparam
|
||||
syn keyword ngxDirective ssl_engine
|
||||
syn keyword ngxDirective ssl_prefer_server_ciphers
|
||||
syn keyword ngxDirective ssl_protocols
|
||||
syn keyword ngxDirective ssl_session_cache
|
||||
syn keyword ngxDirective ssl_session_timeout
|
||||
syn keyword ngxDirective ssl_verify_client
|
||||
syn keyword ngxDirective ssl_verify_depth
|
||||
syn keyword ngxDirective starttls
|
||||
syn keyword ngxDirective stub_status
|
||||
syn keyword ngxDirective sub_filter
|
||||
syn keyword ngxDirective sub_filter_once
|
||||
syn keyword ngxDirective sub_filter_types
|
||||
syn keyword ngxDirective tcp_nodelay
|
||||
syn keyword ngxDirective tcp_nopush
|
||||
syn keyword ngxDirective thread_stack_size
|
||||
syn keyword ngxDirective timeout
|
||||
syn keyword ngxDirective timer_resolution
|
||||
syn keyword ngxDirective types_hash_bucket_size
|
||||
syn keyword ngxDirective types_hash_max_size
|
||||
syn keyword ngxDirective underscores_in_headers
|
||||
syn keyword ngxDirective uninitialized_variable_warn
|
||||
syn keyword ngxDirective use
|
||||
syn keyword ngxDirective user
|
||||
syn keyword ngxDirective userid
|
||||
syn keyword ngxDirective userid_domain
|
||||
syn keyword ngxDirective userid_expires
|
||||
syn keyword ngxDirective userid_mark
|
||||
syn keyword ngxDirective userid_name
|
||||
syn keyword ngxDirective userid_p3p
|
||||
syn keyword ngxDirective userid_path
|
||||
syn keyword ngxDirective userid_service
|
||||
syn keyword ngxDirective valid_referers
|
||||
syn keyword ngxDirective variables_hash_bucket_size
|
||||
syn keyword ngxDirective variables_hash_max_size
|
||||
syn keyword ngxDirective worker_connections
|
||||
syn keyword ngxDirective worker_cpu_affinity
|
||||
syn keyword ngxDirective worker_priority
|
||||
syn keyword ngxDirective worker_processes
|
||||
syn keyword ngxDirective worker_rlimit_core
|
||||
syn keyword ngxDirective worker_rlimit_nofile
|
||||
syn keyword ngxDirective worker_rlimit_sigpending
|
||||
syn keyword ngxDirective worker_threads
|
||||
syn keyword ngxDirective working_directory
|
||||
syn keyword ngxDirective xclient
|
||||
syn keyword ngxDirective xml_entities
|
||||
syn keyword ngxDirective xslt_stylesheet
|
||||
syn keyword ngxDirective xslt_types
|
||||
|
||||
" 3rd party module list:
|
||||
" http://wiki.nginx.org/Nginx3rdPartyModules
|
||||
|
||||
" Accept Language Module <http://wiki.nginx.org/NginxAcceptLanguageModule>
|
||||
" Parses the Accept-Language header and gives the most suitable locale from a list of supported locales.
|
||||
syn keyword ngxDirectiveThirdParty set_from_accept_language
|
||||
|
||||
" Access Key Module <http://wiki.nginx.org/NginxHttpAccessKeyModule>
|
||||
" Denies access unless the request URL contains an access key.
|
||||
syn keyword ngxDirectiveThirdParty accesskey
|
||||
syn keyword ngxDirectiveThirdParty accesskey_arg
|
||||
syn keyword ngxDirectiveThirdParty accesskey_hashmethod
|
||||
syn keyword ngxDirectiveThirdParty accesskey_signature
|
||||
|
||||
" Auth PAM Module <http://web.iti.upv.es/~sto/nginx/>
|
||||
" HTTP Basic Authentication using PAM.
|
||||
syn keyword ngxDirectiveThirdParty auth_pam
|
||||
syn keyword ngxDirectiveThirdParty auth_pam_service_name
|
||||
|
||||
" Cache Purge Module <http://labs.frickle.com/nginx_ngx_cache_purge/>
|
||||
" Module adding ability to purge content from FastCGI and proxy caches.
|
||||
syn keyword ngxDirectiveThirdParty fastcgi_cache_purge
|
||||
syn keyword ngxDirectiveThirdParty proxy_cache_purge
|
||||
|
||||
" Chunkin Module <http://wiki.nginx.org/NginxHttpChunkinModule>
|
||||
" HTTP 1.1 chunked-encoding request body support for Nginx.
|
||||
syn keyword ngxDirectiveThirdParty chunkin
|
||||
syn keyword ngxDirectiveThirdParty chunkin_keepalive
|
||||
syn keyword ngxDirectiveThirdParty chunkin_max_chunks_per_buf
|
||||
syn keyword ngxDirectiveThirdParty chunkin_resume
|
||||
|
||||
" Circle GIF Module <http://wiki.nginx.org/NginxHttpCircleGifModule>
|
||||
" Generates simple circle images with the colors and size specified in the URL.
|
||||
syn keyword ngxDirectiveThirdParty circle_gif
|
||||
syn keyword ngxDirectiveThirdParty circle_gif_max_radius
|
||||
syn keyword ngxDirectiveThirdParty circle_gif_min_radius
|
||||
syn keyword ngxDirectiveThirdParty circle_gif_step_radius
|
||||
|
||||
" Drizzle Module <http://github.com/chaoslawful/drizzle-nginx-module>
|
||||
" Make nginx talk directly to mysql, drizzle, and sqlite3 by libdrizzle.
|
||||
syn keyword ngxDirectiveThirdParty drizzle_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_dbname
|
||||
syn keyword ngxDirectiveThirdParty drizzle_keepalive
|
||||
syn keyword ngxDirectiveThirdParty drizzle_module_header
|
||||
syn keyword ngxDirectiveThirdParty drizzle_pass
|
||||
syn keyword ngxDirectiveThirdParty drizzle_query
|
||||
syn keyword ngxDirectiveThirdParty drizzle_recv_cols_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_recv_rows_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_send_query_timeout
|
||||
syn keyword ngxDirectiveThirdParty drizzle_server
|
||||
|
||||
" Echo Module <http://wiki.nginx.org/NginxHttpEchoModule>
|
||||
" Brings 'echo', 'sleep', 'time', 'exec' and more shell-style goodies to Nginx config file.
|
||||
syn keyword ngxDirectiveThirdParty echo
|
||||
syn keyword ngxDirectiveThirdParty echo_after_body
|
||||
syn keyword ngxDirectiveThirdParty echo_before_body
|
||||
syn keyword ngxDirectiveThirdParty echo_blocking_sleep
|
||||
syn keyword ngxDirectiveThirdParty echo_duplicate
|
||||
syn keyword ngxDirectiveThirdParty echo_end
|
||||
syn keyword ngxDirectiveThirdParty echo_exec
|
||||
syn keyword ngxDirectiveThirdParty echo_flush
|
||||
syn keyword ngxDirectiveThirdParty echo_foreach_split
|
||||
syn keyword ngxDirectiveThirdParty echo_location
|
||||
syn keyword ngxDirectiveThirdParty echo_location_async
|
||||
syn keyword ngxDirectiveThirdParty echo_read_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_request_body
|
||||
syn keyword ngxDirectiveThirdParty echo_reset_timer
|
||||
syn keyword ngxDirectiveThirdParty echo_sleep
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest
|
||||
syn keyword ngxDirectiveThirdParty echo_subrequest_async
|
||||
|
||||
" Events Module <http://docs.dutov.org/nginx_modules_events_en.html>
|
||||
" Privides options for start/stop events.
|
||||
syn keyword ngxDirectiveThirdParty on_start
|
||||
syn keyword ngxDirectiveThirdParty on_stop
|
||||
|
||||
" EY Balancer Module <http://github.com/ry/nginx-ey-balancer>
|
||||
" Adds a request queue to Nginx that allows the limiting of concurrent requests passed to the upstream.
|
||||
syn keyword ngxDirectiveThirdParty max_connections
|
||||
syn keyword ngxDirectiveThirdParty max_connections_max_queue_length
|
||||
syn keyword ngxDirectiveThirdParty max_connections_queue_timeout
|
||||
|
||||
" Fancy Indexes Module <https://connectical.com/projects/ngx-fancyindex/wiki>
|
||||
" Like the built-in autoindex module, but fancier.
|
||||
syn keyword ngxDirectiveThirdParty fancyindex
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_exact_size
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_footer
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_header
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_localtime
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_readme
|
||||
syn keyword ngxDirectiveThirdParty fancyindex_readme_mode
|
||||
|
||||
" GeoIP Module (DEPRECATED) <http://wiki.nginx.org/NginxHttp3rdPartyGeoIPModule>
|
||||
" Country code lookups via the MaxMind GeoIP API.
|
||||
syn keyword ngxDirectiveThirdParty geoip_country_file
|
||||
|
||||
" Headers More Module <http://wiki.nginx.org/NginxHttpHeadersMoreModule>
|
||||
" Set and clear input and output headers...more than "add"!
|
||||
syn keyword ngxDirectiveThirdParty more_clear_headers
|
||||
syn keyword ngxDirectiveThirdParty more_clear_input_headers
|
||||
syn keyword ngxDirectiveThirdParty more_set_headers
|
||||
syn keyword ngxDirectiveThirdParty more_set_input_headers
|
||||
|
||||
" HTTP Push Module <http://pushmodule.slact.net/>
|
||||
" Turn Nginx into an adept long-polling HTTP Push (Comet) server.
|
||||
syn keyword ngxDirectiveThirdParty push_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty push_listener
|
||||
syn keyword ngxDirectiveThirdParty push_message_timeout
|
||||
syn keyword ngxDirectiveThirdParty push_queue_messages
|
||||
syn keyword ngxDirectiveThirdParty push_sender
|
||||
|
||||
" HTTP Redis Module <http://people.FreeBSD.ORG/~osa/ngx_http_redis-0.3.1.tar.gz>>
|
||||
" Redis <http://code.google.com/p/redis/> support.>
|
||||
syn keyword ngxDirectiveThirdParty redis_bind
|
||||
syn keyword ngxDirectiveThirdParty redis_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty redis_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty redis_next_upstream
|
||||
syn keyword ngxDirectiveThirdParty redis_pass
|
||||
syn keyword ngxDirectiveThirdParty redis_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty redis_send_timeout
|
||||
|
||||
" HTTP JavaScript Module <http://wiki.github.com/kung-fu-tzu/ngx_http_js_module>
|
||||
" Embedding SpiderMonkey. Nearly full port on Perl module.
|
||||
syn keyword ngxDirectiveThirdParty js
|
||||
syn keyword ngxDirectiveThirdParty js_filter
|
||||
syn keyword ngxDirectiveThirdParty js_filter_types
|
||||
syn keyword ngxDirectiveThirdParty js_load
|
||||
syn keyword ngxDirectiveThirdParty js_maxmem
|
||||
syn keyword ngxDirectiveThirdParty js_require
|
||||
syn keyword ngxDirectiveThirdParty js_set
|
||||
syn keyword ngxDirectiveThirdParty js_utf8
|
||||
|
||||
" Log Request Speed <http://wiki.nginx.org/NginxHttpLogRequestSpeed>
|
||||
" Log the time it took to process each request.
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter
|
||||
syn keyword ngxDirectiveThirdParty log_request_speed_filter_timeout
|
||||
|
||||
" Memc Module <http://wiki.nginx.org/NginxHttpMemcModule>
|
||||
" An extended version of the standard memcached module that supports set, add, delete, and many more memcached commands.
|
||||
syn keyword ngxDirectiveThirdParty memc_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty memc_cmds_allowed
|
||||
syn keyword ngxDirectiveThirdParty memc_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty memc_flags_to_last_modified
|
||||
syn keyword ngxDirectiveThirdParty memc_next_upstream
|
||||
syn keyword ngxDirectiveThirdParty memc_pass
|
||||
syn keyword ngxDirectiveThirdParty memc_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty memc_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty memc_upstream_fail_timeout
|
||||
syn keyword ngxDirectiveThirdParty memc_upstream_max_fails
|
||||
|
||||
" Mogilefs Module <http://www.grid.net.ru/nginx/mogilefs.en.html>
|
||||
" Implements a MogileFS client, provides a replace to the Perlbal reverse proxy of the original MogileFS.
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_domain
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_methods
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_noverify
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_pass
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty mogilefs_tracker
|
||||
|
||||
" MP4 Streaming Lite Module <http://wiki.nginx.org/NginxMP4StreamingLite>
|
||||
" Will seek to a certain time within H.264/MP4 files when provided with a 'start' parameter in the URL.
|
||||
syn keyword ngxDirectiveThirdParty mp4
|
||||
|
||||
" Nginx Notice Module <http://xph.us/software/nginx-notice/>
|
||||
" Serve static file to POST requests.
|
||||
syn keyword ngxDirectiveThirdParty notice
|
||||
syn keyword ngxDirectiveThirdParty notice_type
|
||||
|
||||
" Phusion Passenger <http://www.modrails.com/documentation.html>
|
||||
" Easy and robust deployment of Ruby on Rails application on Apache and Nginx webservers.
|
||||
syn keyword ngxDirectiveThirdParty passenger_base_uri
|
||||
syn keyword ngxDirectiveThirdParty passenger_default_user
|
||||
syn keyword ngxDirectiveThirdParty passenger_enabled
|
||||
syn keyword ngxDirectiveThirdParty passenger_log_level
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_instances_per_app
|
||||
syn keyword ngxDirectiveThirdParty passenger_max_pool_size
|
||||
syn keyword ngxDirectiveThirdParty passenger_pool_idle_time
|
||||
syn keyword ngxDirectiveThirdParty passenger_root
|
||||
syn keyword ngxDirectiveThirdParty passenger_ruby
|
||||
syn keyword ngxDirectiveThirdParty passenger_use_global_queue
|
||||
syn keyword ngxDirectiveThirdParty passenger_user_switching
|
||||
syn keyword ngxDirectiveThirdParty rack_env
|
||||
syn keyword ngxDirectiveThirdParty rails_app_spawner_idle_time
|
||||
syn keyword ngxDirectiveThirdParty rails_env
|
||||
syn keyword ngxDirectiveThirdParty rails_framework_spawner_idle_time
|
||||
syn keyword ngxDirectiveThirdParty rails_spawn_method
|
||||
|
||||
" RDS JSON Module <http://github.com/agentzh/rds-json-nginx-module>
|
||||
" Help ngx_drizzle and other DBD modules emit JSON data.
|
||||
syn keyword ngxDirectiveThirdParty rds_json
|
||||
syn keyword ngxDirectiveThirdParty rds_json_content_type
|
||||
syn keyword ngxDirectiveThirdParty rds_json_format
|
||||
syn keyword ngxDirectiveThirdParty rds_json_ret
|
||||
|
||||
" RRD Graph Module <http://wiki.nginx.org/NginxNgx_rrd_graph>
|
||||
" This module provides an HTTP interface to RRDtool's graphing facilities.
|
||||
syn keyword ngxDirectiveThirdParty rrd_graph
|
||||
syn keyword ngxDirectiveThirdParty rrd_graph_root
|
||||
|
||||
" Secure Download <http://wiki.nginx.org/NginxHttpSecureDownload>
|
||||
" Create expiring links.
|
||||
syn keyword ngxDirectiveThirdParty secure_download
|
||||
syn keyword ngxDirectiveThirdParty secure_download_fail_location
|
||||
syn keyword ngxDirectiveThirdParty secure_download_path_mode
|
||||
syn keyword ngxDirectiveThirdParty secure_download_secret
|
||||
|
||||
" SlowFS Cache Module <http://labs.frickle.com/nginx_ngx_slowfs_cache/>
|
||||
" Module adding ability to cache static files.
|
||||
syn keyword ngxDirectiveThirdParty slowfs_big_file_size
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache_key
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache_min_uses
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache_path
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache_purge
|
||||
syn keyword ngxDirectiveThirdParty slowfs_cache_valid
|
||||
syn keyword ngxDirectiveThirdParty slowfs_temp_path
|
||||
|
||||
" Strip Module <http://wiki.nginx.org/NginxHttpStripModule>
|
||||
" Whitespace remover.
|
||||
syn keyword ngxDirectiveThirdParty strip
|
||||
|
||||
" Substitutions Module <http://wiki.nginx.org/NginxHttpSubsModule>
|
||||
" A filter module which can do both regular expression and fixed string substitutions on response bodies.
|
||||
syn keyword ngxDirectiveThirdParty subs_filter
|
||||
syn keyword ngxDirectiveThirdParty subs_filter_types
|
||||
|
||||
" Supervisord Module <http://labs.frickle.com/nginx_ngx_supervisord/>
|
||||
" Module providing nginx with API to communicate with supervisord and manage (start/stop) backends on-demand.
|
||||
syn keyword ngxDirectiveThirdParty supervisord
|
||||
syn keyword ngxDirectiveThirdParty supervisord_inherit_backend_status
|
||||
syn keyword ngxDirectiveThirdParty supervisord_name
|
||||
syn keyword ngxDirectiveThirdParty supervisord_start
|
||||
syn keyword ngxDirectiveThirdParty supervisord_stop
|
||||
|
||||
" Upload Module <http://www.grid.net.ru/nginx/upload.en.html>
|
||||
" Parses multipart/form-data allowing arbitrary handling of uploaded files.
|
||||
syn keyword ngxDirectiveThirdParty upload_aggregate_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty upload_cleanup
|
||||
syn keyword ngxDirectiveThirdParty upload_limit_rate
|
||||
syn keyword ngxDirectiveThirdParty upload_max_file_size
|
||||
syn keyword ngxDirectiveThirdParty upload_max_output_body_len
|
||||
syn keyword ngxDirectiveThirdParty upload_max_part_header_len
|
||||
syn keyword ngxDirectiveThirdParty upload_pass
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_args
|
||||
syn keyword ngxDirectiveThirdParty upload_pass_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_set_form_field
|
||||
syn keyword ngxDirectiveThirdParty upload_store
|
||||
syn keyword ngxDirectiveThirdParty upload_store_access
|
||||
|
||||
" Upload Progress Module <http://wiki.nginx.org/NginxHttpUploadProgressModule>
|
||||
" Tracks and reports upload progress.
|
||||
syn keyword ngxDirectiveThirdParty report_uploads
|
||||
syn keyword ngxDirectiveThirdParty track_uploads
|
||||
syn keyword ngxDirectiveThirdParty upload_progress
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_content_type
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_header
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_json_output
|
||||
syn keyword ngxDirectiveThirdParty upload_progress_template
|
||||
|
||||
" Upstream Fair Balancer <http://wiki.nginx.org/NginxHttpUpstreamFairModule>
|
||||
" Sends an incoming request to the least-busy backend server, rather than distributing requests round-robin.
|
||||
syn keyword ngxDirectiveThirdParty fair
|
||||
syn keyword ngxDirectiveThirdParty upstream_fair_shm_size
|
||||
|
||||
" Upstream Consistent Hash <http://wiki.nginx.org/NginxHttpUpstreamConsistentHash>
|
||||
" Select backend based on Consistent hash ring.
|
||||
syn keyword ngxDirectiveThirdParty consistent_hash
|
||||
|
||||
" Upstream Hash Module <http://wiki.nginx.org/NginxHttpUpstreamRequestHashModule>
|
||||
" Provides simple upstream load distribution by hashing a configurable variable.
|
||||
syn keyword ngxDirectiveThirdParty hash
|
||||
syn keyword ngxDirectiveThirdParty hash_again
|
||||
|
||||
" XSS Module <http://github.com/agentzh/xss-nginx-module>
|
||||
" Native support for cross-site scripting (XSS) in an nginx.
|
||||
syn keyword ngxDirectiveThirdParty xss_callback_arg
|
||||
syn keyword ngxDirectiveThirdParty xss_get
|
||||
syn keyword ngxDirectiveThirdParty xss_input_types
|
||||
syn keyword ngxDirectiveThirdParty xss_output_type
|
||||
|
||||
" uWSGI Module <http://wiki.nginx.org/HttpUwsgiModule>
|
||||
" Allows Nginx to interact with uWSGI processes and control what parameters are passed to the process.
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_bind
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_buffer_size
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_buffering
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_buffers
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_busy_buffers_size
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_bypass
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_key
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_lock
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_lock_timeout
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_methods
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_min_uses
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_path
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_use_stale
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_cache_valid
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_connect_timeout
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_hide_header
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_ignore_client_abort
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_ignore_headers
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_intercept_errors
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_max_temp_file_size
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_modifier1
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_modifier2
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_next_upstream
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_no_cache
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_param
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_pass
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_pass_header
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_pass_request_body
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_pass_request_headers
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_read_timeout
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_send_timeout
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_store
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_store_access
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_string
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_temp_file_write_size
|
||||
syn keyword ngxDirectiveThirdParty uwsgi_temp_path
|
||||
|
||||
" highlight
|
||||
|
||||
hi link ngxComment Comment
|
||||
hi link ngxVariable Identifier
|
||||
hi link ngxVariableBlock Identifier
|
||||
hi link ngxVariableString PreProc
|
||||
hi link ngxBlock Normal
|
||||
hi link ngxString String
|
||||
|
||||
hi link ngxBoolean Boolean
|
||||
hi link ngxDirectiveBlock Statement
|
||||
hi link ngxDirectiveImportant Type
|
||||
hi link ngxDirectiveControl Keyword
|
||||
hi link ngxDirectiveError Constant
|
||||
hi link ngxDirectiveDeprecated Error
|
||||
hi link ngxDirective Identifier
|
||||
hi link ngxDirectiveThirdParty Special
|
||||
|
||||
let b:current_syntax = "nginx"
|
|
@ -1,21 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Error</title>
|
||||
<style>
|
||||
body {
|
||||
width: 35em;
|
||||
margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>An error occurred.</h1>
|
||||
<p>Sorry, the page you are looking for is currently unavailable.<br/>
|
||||
Please try again later.</p>
|
||||
<p>If you are the system administrator of this resource then you should check
|
||||
the <a href="http://nginx.org/r/error_log">error log</a> for details.</p>
|
||||
<p><em>Faithfully yours, nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,25 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Welcome to nginx!</title>
|
||||
<style>
|
||||
body {
|
||||
width: 35em;
|
||||
margin: 0 auto;
|
||||
font-family: Tahoma, Verdana, Arial, sans-serif;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Welcome to nginx!</h1>
|
||||
<p>If you see this page, the nginx web server is successfully installed and
|
||||
working. Further configuration is required.</p>
|
||||
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="http://nginx.org/">nginx.org</a>.<br/>
|
||||
Commercial support is available at
|
||||
<a href="http://nginx.com/">nginx.com</a>.</p>
|
||||
|
||||
<p><em>Thank you for using nginx.</em></p>
|
||||
</body>
|
||||
</html>
|
|
@ -1,202 +0,0 @@
|
|||
.\"
|
||||
.\" Copyright (C) 2010 Sergey A. Osokin
|
||||
.\" Copyright (C) Nginx, Inc.
|
||||
.\" All rights reserved.
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\"
|
||||
.Dd March 6, 2012
|
||||
.Dt NGINX 8
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm nginx
|
||||
.Nd "HTTP and reverse proxy server, mail proxy server"
|
||||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl ?hqtVv
|
||||
.Op Fl c Ar file
|
||||
.Op Fl g Ar directives
|
||||
.Op Fl p Ar prefix
|
||||
.Op Fl s Ar signal
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
(pronounced
|
||||
.Dq engine x )
|
||||
is an HTTP and reverse proxy server, as well as a mail proxy server.
|
||||
It is known for its high performance, stability, rich feature set, simple
|
||||
configuration, and low resource consumption.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width ".Fl d Ar directives"
|
||||
.It Fl ?\& , h
|
||||
Print help.
|
||||
.It Fl c Ar file
|
||||
Use an alternative configuration
|
||||
.Ar file .
|
||||
.It Fl g Ar directives
|
||||
Set global configuration directives.
|
||||
See
|
||||
.Sx EXAMPLES
|
||||
for details.
|
||||
.It Fl p Ar prefix
|
||||
Set the prefix path.
|
||||
The default value is
|
||||
.Pa %%PREFIX%% .
|
||||
.It Fl q
|
||||
Suppress non-error messages during configuration testing.
|
||||
.It Fl s Ar signal
|
||||
Send a signal to the master process.
|
||||
The argument
|
||||
.Ar signal
|
||||
can be one of:
|
||||
.Cm stop , quit , reopen , reload .
|
||||
The following table shows the corresponding system signals:
|
||||
.Pp
|
||||
.Bl -tag -width ".Cm reopen" -compact
|
||||
.It Cm stop
|
||||
.Dv SIGTERM
|
||||
.It Cm quit
|
||||
.Dv SIGQUIT
|
||||
.It Cm reopen
|
||||
.Dv SIGUSR1
|
||||
.It Cm reload
|
||||
.Dv SIGHUP
|
||||
.El
|
||||
.It Fl t
|
||||
Do not run, just test the configuration file.
|
||||
.Nm
|
||||
checks the configuration file syntax and then tries to open files
|
||||
referenced in the configuration file.
|
||||
.It Fl V
|
||||
Print the
|
||||
.Nm
|
||||
version, compiler version, and
|
||||
.Pa configure
|
||||
script parameters.
|
||||
.It Fl v
|
||||
Print the
|
||||
.Nm
|
||||
version.
|
||||
.El
|
||||
.Sh SIGNALS
|
||||
The master process of
|
||||
.Nm
|
||||
can handle the following signals:
|
||||
.Pp
|
||||
.Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
|
||||
.It Dv SIGINT , SIGTERM
|
||||
Shut down quickly.
|
||||
.It Dv SIGHUP
|
||||
Reload configuration, start the new worker process with a new
|
||||
configuration, and gracefully shut down old worker processes.
|
||||
.It Dv SIGQUIT
|
||||
Shut down gracefully.
|
||||
.It Dv SIGUSR1
|
||||
Reopen log files.
|
||||
.It Dv SIGUSR2
|
||||
Upgrade the
|
||||
.Nm
|
||||
executable on the fly.
|
||||
.It Dv SIGWINCH
|
||||
Shut down worker processes gracefully.
|
||||
.El
|
||||
.Pp
|
||||
While there is no need to explicitly control worker processes normally,
|
||||
they support some signals too:
|
||||
.Pp
|
||||
.Bl -tag -width ".Dv SIGINT , SIGTERM" -compact
|
||||
.It Dv SIGTERM
|
||||
Shut down quickly.
|
||||
.It Dv SIGQUIT
|
||||
Shut down gracefully.
|
||||
.It Dv SIGUSR1
|
||||
Reopen log files.
|
||||
.El
|
||||
.Sh DEBUGGING LOG
|
||||
To enable a debugging log, reconfigure
|
||||
.Nm
|
||||
to build with debugging:
|
||||
.Pp
|
||||
.Dl "./configure --with-debug ..."
|
||||
.Pp
|
||||
and then set the
|
||||
.Cm debug
|
||||
level of the
|
||||
.Va error_log :
|
||||
.Pp
|
||||
.Dl "error_log /path/to/log debug;"
|
||||
.Pp
|
||||
It is also possible to enable the debugging for a particular IP address:
|
||||
.Bd -literal -offset indent
|
||||
events {
|
||||
debug_connection 127.0.0.1;
|
||||
}
|
||||
.Ed
|
||||
.Sh ENVIRONMENT
|
||||
The
|
||||
.Ev NGINX
|
||||
environment variable is used internally by
|
||||
.Nm
|
||||
and should not be set directly by the user.
|
||||
.Sh FILES
|
||||
.Bl -tag -width indent
|
||||
.It Pa %%PID_PATH%%
|
||||
Contains the process ID of
|
||||
.Nm .
|
||||
The contents of this file are not sensitive, so it can be world-readable.
|
||||
.It Pa %%CONF_PATH%%
|
||||
The main configuration file.
|
||||
.It Pa %%ERROR_LOG_PATH%%
|
||||
Error log file.
|
||||
.El
|
||||
.Sh EXIT STATUS
|
||||
Exit status is 0 on success, or 1 if the command fails.
|
||||
.Sh EXAMPLES
|
||||
Test configuration file
|
||||
.Pa ~/mynginx.conf
|
||||
with global directives for PID and quantity of worker processes:
|
||||
.Bd -literal -offset indent
|
||||
nginx -t -c ~/mynginx.conf \e
|
||||
-g "pid /var/run/mynginx.pid; worker_processes 2;"
|
||||
.Ed
|
||||
.Sh SEE ALSO
|
||||
.\"Xr nginx.conf 5
|
||||
.\"Pp
|
||||
Documentation at
|
||||
.Pa http://nginx.org/en/docs/ .
|
||||
.Pp
|
||||
For questions and technical support, please refer to
|
||||
.Pa http://nginx.org/en/support.html .
|
||||
.Sh HISTORY
|
||||
Development of
|
||||
.Nm
|
||||
started in 2002, with the first public release on October 4, 2004.
|
||||
.Sh AUTHORS
|
||||
.An -nosplit
|
||||
.An Igor Sysoev Aq igor@sysoev.ru .
|
||||
.Pp
|
||||
This manual page was originally written by
|
||||
.An Sergey A. Osokin Aq osa@FreeBSD.org.ru
|
||||
as a result of compiling many
|
||||
.Nm
|
||||
documents from all over the world.
|
|
@ -1,171 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) Igor Sysoev
|
||||
* Copyright (C) Nginx, Inc.
|
||||
*/
|
||||
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
extern ngx_event_module_t ngx_kqueue_module_ctx;
|
||||
|
||||
|
||||
static ngx_int_t ngx_aio_init(ngx_cycle_t *cycle, ngx_msec_t timer);
|
||||
static void ngx_aio_done(ngx_cycle_t *cycle);
|
||||
static ngx_int_t ngx_aio_add_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_aio_del_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_aio_del_connection(ngx_connection_t *c, ngx_uint_t flags);
|
||||
static ngx_int_t ngx_aio_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
||||
ngx_uint_t flags);
|
||||
|
||||
|
||||
ngx_os_io_t ngx_os_aio = {
|
||||
ngx_aio_read,
|
||||
ngx_aio_read_chain,
|
||||
NULL,
|
||||
ngx_aio_write,
|
||||
ngx_aio_write_chain,
|
||||
0
|
||||
};
|
||||
|
||||
|
||||
static ngx_str_t aio_name = ngx_string("aio");
|
||||
|
||||
ngx_event_module_t ngx_aio_module_ctx = {
|
||||
&aio_name,
|
||||
NULL, /* create configuration */
|
||||
NULL, /* init configuration */
|
||||
|
||||
{
|
||||
ngx_aio_add_event, /* add an event */
|
||||
ngx_aio_del_event, /* delete an event */
|
||||
NULL, /* enable an event */
|
||||
NULL, /* disable an event */
|
||||
NULL, /* add an connection */
|
||||
ngx_aio_del_connection, /* delete an connection */
|
||||
NULL, /* process the changes */
|
||||
ngx_aio_process_events, /* process the events */
|
||||
ngx_aio_init, /* init the events */
|
||||
ngx_aio_done /* done the events */
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
ngx_module_t ngx_aio_module = {
|
||||
NGX_MODULE_V1,
|
||||
&ngx_aio_module_ctx, /* module context */
|
||||
NULL, /* module directives */
|
||||
NGX_EVENT_MODULE, /* module type */
|
||||
NULL, /* init master */
|
||||
NULL, /* init module */
|
||||
NULL, /* init process */
|
||||
NULL, /* init thread */
|
||||
NULL, /* exit thread */
|
||||
NULL, /* exit process */
|
||||
NULL, /* exit master */
|
||||
NGX_MODULE_V1_PADDING
|
||||
};
|
||||
|
||||
|
||||
#if (NGX_HAVE_KQUEUE)
|
||||
|
||||
static ngx_int_t
|
||||
ngx_aio_init(ngx_cycle_t *cycle, ngx_msec_t timer)
|
||||
{
|
||||
if (ngx_kqueue_module_ctx.actions.init(cycle, timer) == NGX_ERROR) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_io = ngx_os_aio;
|
||||
|
||||
ngx_event_flags = NGX_USE_AIO_EVENT;
|
||||
ngx_event_actions = ngx_aio_module_ctx.actions;
|
||||
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_aio_done(ngx_cycle_t *cycle)
|
||||
{
|
||||
ngx_kqueue_module_ctx.actions.done(cycle);
|
||||
}
|
||||
|
||||
|
||||
/* the event adding and deleting are needed for the listening sockets */
|
||||
|
||||
static ngx_int_t
|
||||
ngx_aio_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
return ngx_kqueue_module_ctx.actions.add(ev, event, flags);
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_aio_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
return ngx_kqueue_module_ctx.actions.del(ev, event, flags);
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_aio_del_connection(ngx_connection_t *c, ngx_uint_t flags)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (c->read->active == 0 && c->write->active == 0) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
rc = aio_cancel(c->fd, NULL);
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "aio_cancel: %d", rc);
|
||||
|
||||
if (rc == AIO_CANCELED) {
|
||||
c->read->active = 0;
|
||||
c->write->active = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (rc == AIO_ALLDONE) {
|
||||
c->read->active = 0;
|
||||
c->write->active = 0;
|
||||
ngx_log_error(NGX_LOG_ALERT, c->log, 0,
|
||||
"aio_cancel() returned AIO_ALLDONE");
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
if (rc == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
|
||||
"aio_cancel() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (rc == AIO_NOTCANCELED) {
|
||||
ngx_log_error(NGX_LOG_ALERT, c->log, 0,
|
||||
"aio_cancel() returned AIO_NOTCANCELED");
|
||||
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_aio_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
||||
{
|
||||
return ngx_kqueue_module_ctx.actions.process_events(cycle, timer, flags);
|
||||
}
|
||||
|
||||
#endif /* NGX_HAVE_KQUEUE */
|
|
@ -1,560 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) Igor Sysoev
|
||||
* Copyright (C) Nginx, Inc.
|
||||
*/
|
||||
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
#if (NGX_TEST_BUILD_DEVPOLL)
|
||||
|
||||
/* Solaris declarations */
|
||||
|
||||
#define POLLREMOVE 0x0800
|
||||
#define DP_POLL 0xD001
|
||||
#define DP_ISPOLLED 0xD002
|
||||
|
||||
struct dvpoll {
|
||||
struct pollfd *dp_fds;
|
||||
int dp_nfds;
|
||||
int dp_timeout;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
ngx_uint_t changes;
|
||||
ngx_uint_t events;
|
||||
} ngx_devpoll_conf_t;
|
||||
|
||||
|
||||
static ngx_int_t ngx_devpoll_init(ngx_cycle_t *cycle, ngx_msec_t timer);
|
||||
static void ngx_devpoll_done(ngx_cycle_t *cycle);
|
||||
static ngx_int_t ngx_devpoll_add_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_devpoll_del_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_devpoll_set_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_devpoll_process_events(ngx_cycle_t *cycle,
|
||||
ngx_msec_t timer, ngx_uint_t flags);
|
||||
|
||||
static void *ngx_devpoll_create_conf(ngx_cycle_t *cycle);
|
||||
static char *ngx_devpoll_init_conf(ngx_cycle_t *cycle, void *conf);
|
||||
|
||||
static int dp = -1;
|
||||
static struct pollfd *change_list, *event_list;
|
||||
static ngx_uint_t nchanges, max_changes, nevents;
|
||||
|
||||
static ngx_event_t **change_index;
|
||||
|
||||
|
||||
static ngx_str_t devpoll_name = ngx_string("/dev/poll");
|
||||
|
||||
static ngx_command_t ngx_devpoll_commands[] = {
|
||||
|
||||
{ ngx_string("devpoll_changes"),
|
||||
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_num_slot,
|
||||
0,
|
||||
offsetof(ngx_devpoll_conf_t, changes),
|
||||
NULL },
|
||||
|
||||
{ ngx_string("devpoll_events"),
|
||||
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_num_slot,
|
||||
0,
|
||||
offsetof(ngx_devpoll_conf_t, events),
|
||||
NULL },
|
||||
|
||||
ngx_null_command
|
||||
};
|
||||
|
||||
|
||||
ngx_event_module_t ngx_devpoll_module_ctx = {
|
||||
&devpoll_name,
|
||||
ngx_devpoll_create_conf, /* create configuration */
|
||||
ngx_devpoll_init_conf, /* init configuration */
|
||||
|
||||
{
|
||||
ngx_devpoll_add_event, /* add an event */
|
||||
ngx_devpoll_del_event, /* delete an event */
|
||||
ngx_devpoll_add_event, /* enable an event */
|
||||
ngx_devpoll_del_event, /* disable an event */
|
||||
NULL, /* add an connection */
|
||||
NULL, /* delete an connection */
|
||||
NULL, /* process the changes */
|
||||
ngx_devpoll_process_events, /* process the events */
|
||||
ngx_devpoll_init, /* init the events */
|
||||
ngx_devpoll_done, /* done the events */
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
ngx_module_t ngx_devpoll_module = {
|
||||
NGX_MODULE_V1,
|
||||
&ngx_devpoll_module_ctx, /* module context */
|
||||
ngx_devpoll_commands, /* module directives */
|
||||
NGX_EVENT_MODULE, /* module type */
|
||||
NULL, /* init master */
|
||||
NULL, /* init module */
|
||||
NULL, /* init process */
|
||||
NULL, /* init thread */
|
||||
NULL, /* exit thread */
|
||||
NULL, /* exit process */
|
||||
NULL, /* exit master */
|
||||
NGX_MODULE_V1_PADDING
|
||||
};
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_devpoll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
|
||||
{
|
||||
size_t n;
|
||||
ngx_devpoll_conf_t *dpcf;
|
||||
|
||||
dpcf = ngx_event_get_conf(cycle->conf_ctx, ngx_devpoll_module);
|
||||
|
||||
if (dp == -1) {
|
||||
dp = open("/dev/poll", O_RDWR);
|
||||
|
||||
if (dp == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"open(/dev/poll) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (max_changes < dpcf->changes) {
|
||||
if (nchanges) {
|
||||
n = nchanges * sizeof(struct pollfd);
|
||||
if (write(dp, change_list, n) != (ssize_t) n) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"write(/dev/poll) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
nchanges = 0;
|
||||
}
|
||||
|
||||
if (change_list) {
|
||||
ngx_free(change_list);
|
||||
}
|
||||
|
||||
change_list = ngx_alloc(sizeof(struct pollfd) * dpcf->changes,
|
||||
cycle->log);
|
||||
if (change_list == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (change_index) {
|
||||
ngx_free(change_index);
|
||||
}
|
||||
|
||||
change_index = ngx_alloc(sizeof(ngx_event_t *) * dpcf->changes,
|
||||
cycle->log);
|
||||
if (change_index == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
max_changes = dpcf->changes;
|
||||
|
||||
if (nevents < dpcf->events) {
|
||||
if (event_list) {
|
||||
ngx_free(event_list);
|
||||
}
|
||||
|
||||
event_list = ngx_alloc(sizeof(struct pollfd) * dpcf->events,
|
||||
cycle->log);
|
||||
if (event_list == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
nevents = dpcf->events;
|
||||
|
||||
ngx_io = ngx_os_io;
|
||||
|
||||
ngx_event_actions = ngx_devpoll_module_ctx.actions;
|
||||
|
||||
ngx_event_flags = NGX_USE_LEVEL_EVENT|NGX_USE_FD_EVENT;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_devpoll_done(ngx_cycle_t *cycle)
|
||||
{
|
||||
if (close(dp) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"close(/dev/poll) failed");
|
||||
}
|
||||
|
||||
dp = -1;
|
||||
|
||||
ngx_free(change_list);
|
||||
ngx_free(event_list);
|
||||
ngx_free(change_index);
|
||||
|
||||
change_list = NULL;
|
||||
event_list = NULL;
|
||||
change_index = NULL;
|
||||
max_changes = 0;
|
||||
nchanges = 0;
|
||||
nevents = 0;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_devpoll_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
#if (NGX_DEBUG)
|
||||
ngx_connection_t *c;
|
||||
#endif
|
||||
|
||||
#if (NGX_READ_EVENT != POLLIN)
|
||||
event = (event == NGX_READ_EVENT) ? POLLIN : POLLOUT;
|
||||
#endif
|
||||
|
||||
#if (NGX_DEBUG)
|
||||
c = ev->data;
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"devpoll add event: fd:%d ev:%04Xi", c->fd, event);
|
||||
#endif
|
||||
|
||||
ev->active = 1;
|
||||
|
||||
return ngx_devpoll_set_event(ev, event, 0);
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_devpoll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
ngx_event_t *e;
|
||||
ngx_connection_t *c;
|
||||
|
||||
c = ev->data;
|
||||
|
||||
#if (NGX_READ_EVENT != POLLIN)
|
||||
event = (event == NGX_READ_EVENT) ? POLLIN : POLLOUT;
|
||||
#endif
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"devpoll del event: fd:%d ev:%04Xi", c->fd, event);
|
||||
|
||||
if (ngx_devpoll_set_event(ev, POLLREMOVE, flags) == NGX_ERROR) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ev->active = 0;
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
e = (event == POLLIN) ? c->write : c->read;
|
||||
|
||||
if (e) {
|
||||
e->active = 0;
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
/* restore the pair event if it exists */
|
||||
|
||||
if (event == POLLIN) {
|
||||
e = c->write;
|
||||
event = POLLOUT;
|
||||
|
||||
} else {
|
||||
e = c->read;
|
||||
event = POLLIN;
|
||||
}
|
||||
|
||||
if (e && e->active) {
|
||||
return ngx_devpoll_set_event(e, event, 0);
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_devpoll_set_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
size_t n;
|
||||
ngx_connection_t *c;
|
||||
|
||||
c = ev->data;
|
||||
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"devpoll fd:%d ev:%04Xi fl:%04Xi", c->fd, event, flags);
|
||||
|
||||
if (nchanges >= max_changes) {
|
||||
ngx_log_error(NGX_LOG_WARN, ev->log, 0,
|
||||
"/dev/pool change list is filled up");
|
||||
|
||||
n = nchanges * sizeof(struct pollfd);
|
||||
if (write(dp, change_list, n) != (ssize_t) n) {
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"write(/dev/poll) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
nchanges = 0;
|
||||
}
|
||||
|
||||
change_list[nchanges].fd = c->fd;
|
||||
change_list[nchanges].events = (short) event;
|
||||
change_list[nchanges].revents = 0;
|
||||
|
||||
change_index[nchanges] = ev;
|
||||
ev->index = nchanges;
|
||||
|
||||
nchanges++;
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
n = nchanges * sizeof(struct pollfd);
|
||||
if (write(dp, change_list, n) != (ssize_t) n) {
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"write(/dev/poll) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
nchanges = 0;
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
ngx_int_t
|
||||
ngx_devpoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
||||
ngx_uint_t flags)
|
||||
{
|
||||
int events, revents, rc;
|
||||
size_t n;
|
||||
ngx_fd_t fd;
|
||||
ngx_err_t err;
|
||||
ngx_int_t i;
|
||||
ngx_uint_t level, instance;
|
||||
ngx_event_t *rev, *wev;
|
||||
ngx_queue_t *queue;
|
||||
ngx_connection_t *c;
|
||||
struct pollfd pfd;
|
||||
struct dvpoll dvp;
|
||||
|
||||
/* NGX_TIMER_INFINITE == INFTIM */
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"devpoll timer: %M", timer);
|
||||
|
||||
if (nchanges) {
|
||||
n = nchanges * sizeof(struct pollfd);
|
||||
if (write(dp, change_list, n) != (ssize_t) n) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"write(/dev/poll) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
nchanges = 0;
|
||||
}
|
||||
|
||||
dvp.dp_fds = event_list;
|
||||
dvp.dp_nfds = (int) nevents;
|
||||
dvp.dp_timeout = timer;
|
||||
events = ioctl(dp, DP_POLL, &dvp);
|
||||
|
||||
err = (events == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update();
|
||||
}
|
||||
|
||||
if (err) {
|
||||
if (err == NGX_EINTR) {
|
||||
|
||||
if (ngx_event_timer_alarm) {
|
||||
ngx_event_timer_alarm = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
level = NGX_LOG_INFO;
|
||||
|
||||
} else {
|
||||
level = NGX_LOG_ALERT;
|
||||
}
|
||||
|
||||
ngx_log_error(level, cycle->log, err, "ioctl(DP_POLL) failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (events == 0) {
|
||||
if (timer != NGX_TIMER_INFINITE) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"ioctl(DP_POLL) returned no events without timeout");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
for (i = 0; i < events; i++) {
|
||||
|
||||
fd = event_list[i].fd;
|
||||
revents = event_list[i].revents;
|
||||
|
||||
c = ngx_cycle->files[fd];
|
||||
|
||||
if (c == NULL || c->fd == -1) {
|
||||
|
||||
pfd.fd = fd;
|
||||
pfd.events = 0;
|
||||
pfd.revents = 0;
|
||||
|
||||
rc = ioctl(dp, DP_ISPOLLED, &pfd);
|
||||
|
||||
switch (rc) {
|
||||
|
||||
case -1:
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"ioctl(DP_ISPOLLED) failed for socket %d, event %04Xd",
|
||||
fd, revents);
|
||||
break;
|
||||
|
||||
case 0:
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"phantom event %04Xd for closed and removed socket %d",
|
||||
revents, fd);
|
||||
break;
|
||||
|
||||
default:
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"unexpected event %04Xd for closed and removed socket %d, ",
|
||||
"ioctl(DP_ISPOLLED) returned rc:%d, fd:%d, event %04Xd",
|
||||
revents, fd, rc, pfd.fd, pfd.revents);
|
||||
|
||||
pfd.fd = fd;
|
||||
pfd.events = POLLREMOVE;
|
||||
pfd.revents = 0;
|
||||
|
||||
if (write(dp, &pfd, sizeof(struct pollfd))
|
||||
!= (ssize_t) sizeof(struct pollfd))
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"write(/dev/poll) for %d failed", fd);
|
||||
}
|
||||
|
||||
if (close(fd) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"close(%d) failed", fd);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"devpoll: fd:%d, ev:%04Xd, rev:%04Xd",
|
||||
fd, event_list[i].events, revents);
|
||||
|
||||
if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"ioctl(DP_POLL) error fd:%d ev:%04Xd rev:%04Xd",
|
||||
fd, event_list[i].events, revents);
|
||||
}
|
||||
|
||||
if (revents & ~(POLLIN|POLLOUT|POLLERR|POLLHUP|POLLNVAL)) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"strange ioctl(DP_POLL) events "
|
||||
"fd:%d ev:%04Xd rev:%04Xd",
|
||||
fd, event_list[i].events, revents);
|
||||
}
|
||||
|
||||
if ((revents & (POLLERR|POLLHUP|POLLNVAL))
|
||||
&& (revents & (POLLIN|POLLOUT)) == 0)
|
||||
{
|
||||
/*
|
||||
* if the error events were returned without POLLIN or POLLOUT,
|
||||
* then add these flags to handle the events at least in one
|
||||
* active handler
|
||||
*/
|
||||
|
||||
revents |= POLLIN|POLLOUT;
|
||||
}
|
||||
|
||||
rev = c->read;
|
||||
|
||||
if ((revents & POLLIN) && rev->active) {
|
||||
rev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
queue = rev->accept ? &ngx_posted_accept_events
|
||||
: &ngx_posted_events;
|
||||
|
||||
ngx_post_event(rev, queue);
|
||||
|
||||
} else {
|
||||
instance = rev->instance;
|
||||
|
||||
rev->handler(rev);
|
||||
|
||||
if (c->fd == -1 || rev->instance != instance) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wev = c->write;
|
||||
|
||||
if ((revents & POLLOUT) && wev->active) {
|
||||
wev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
ngx_post_event(wev, &ngx_posted_events);
|
||||
|
||||
} else {
|
||||
wev->handler(wev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
ngx_devpoll_create_conf(ngx_cycle_t *cycle)
|
||||
{
|
||||
ngx_devpoll_conf_t *dpcf;
|
||||
|
||||
dpcf = ngx_palloc(cycle->pool, sizeof(ngx_devpoll_conf_t));
|
||||
if (dpcf == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dpcf->changes = NGX_CONF_UNSET;
|
||||
dpcf->events = NGX_CONF_UNSET;
|
||||
|
||||
return dpcf;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
ngx_devpoll_init_conf(ngx_cycle_t *cycle, void *conf)
|
||||
{
|
||||
ngx_devpoll_conf_t *dpcf = conf;
|
||||
|
||||
ngx_conf_init_uint_value(dpcf->changes, 32);
|
||||
ngx_conf_init_uint_value(dpcf->events, 32);
|
||||
|
||||
return NGX_CONF_OK;
|
||||
}
|
|
@ -1,832 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) Igor Sysoev
|
||||
* Copyright (C) Nginx, Inc.
|
||||
*/
|
||||
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
#if (NGX_TEST_BUILD_EPOLL)
|
||||
|
||||
/* epoll declarations */
|
||||
|
||||
#define EPOLLIN 0x001
|
||||
#define EPOLLPRI 0x002
|
||||
#define EPOLLOUT 0x004
|
||||
#define EPOLLRDNORM 0x040
|
||||
#define EPOLLRDBAND 0x080
|
||||
#define EPOLLWRNORM 0x100
|
||||
#define EPOLLWRBAND 0x200
|
||||
#define EPOLLMSG 0x400
|
||||
#define EPOLLERR 0x008
|
||||
#define EPOLLHUP 0x010
|
||||
|
||||
#define EPOLLRDHUP 0x2000
|
||||
|
||||
#define EPOLLET 0x80000000
|
||||
#define EPOLLONESHOT 0x40000000
|
||||
|
||||
#define EPOLL_CTL_ADD 1
|
||||
#define EPOLL_CTL_DEL 2
|
||||
#define EPOLL_CTL_MOD 3
|
||||
|
||||
typedef union epoll_data {
|
||||
void *ptr;
|
||||
int fd;
|
||||
uint32_t u32;
|
||||
uint64_t u64;
|
||||
} epoll_data_t;
|
||||
|
||||
struct epoll_event {
|
||||
uint32_t events;
|
||||
epoll_data_t data;
|
||||
};
|
||||
|
||||
|
||||
int epoll_create(int size);
|
||||
|
||||
int epoll_create(int size)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
|
||||
|
||||
int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout);
|
||||
|
||||
int epoll_wait(int epfd, struct epoll_event *events, int nevents, int timeout)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
#define SYS_io_setup 245
|
||||
#define SYS_io_destroy 246
|
||||
#define SYS_io_getevents 247
|
||||
#define SYS_eventfd 323
|
||||
|
||||
typedef u_int aio_context_t;
|
||||
|
||||
struct io_event {
|
||||
uint64_t data; /* the data field from the iocb */
|
||||
uint64_t obj; /* what iocb this event came from */
|
||||
int64_t res; /* result code for this event */
|
||||
int64_t res2; /* secondary result */
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
ngx_uint_t events;
|
||||
ngx_uint_t aio_requests;
|
||||
} ngx_epoll_conf_t;
|
||||
|
||||
|
||||
static ngx_int_t ngx_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer);
|
||||
static void ngx_epoll_done(ngx_cycle_t *cycle);
|
||||
static ngx_int_t ngx_epoll_add_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_epoll_del_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_epoll_add_connection(ngx_connection_t *c);
|
||||
static ngx_int_t ngx_epoll_del_connection(ngx_connection_t *c,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
||||
ngx_uint_t flags);
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
static void ngx_epoll_eventfd_handler(ngx_event_t *ev);
|
||||
#endif
|
||||
|
||||
static void *ngx_epoll_create_conf(ngx_cycle_t *cycle);
|
||||
static char *ngx_epoll_init_conf(ngx_cycle_t *cycle, void *conf);
|
||||
|
||||
static int ep = -1;
|
||||
static struct epoll_event *event_list;
|
||||
static ngx_uint_t nevents;
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
int ngx_eventfd = -1;
|
||||
aio_context_t ngx_aio_ctx = 0;
|
||||
|
||||
static ngx_event_t ngx_eventfd_event;
|
||||
static ngx_connection_t ngx_eventfd_conn;
|
||||
|
||||
#endif
|
||||
|
||||
static ngx_str_t epoll_name = ngx_string("epoll");
|
||||
|
||||
static ngx_command_t ngx_epoll_commands[] = {
|
||||
|
||||
{ ngx_string("epoll_events"),
|
||||
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_num_slot,
|
||||
0,
|
||||
offsetof(ngx_epoll_conf_t, events),
|
||||
NULL },
|
||||
|
||||
{ ngx_string("worker_aio_requests"),
|
||||
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_num_slot,
|
||||
0,
|
||||
offsetof(ngx_epoll_conf_t, aio_requests),
|
||||
NULL },
|
||||
|
||||
ngx_null_command
|
||||
};
|
||||
|
||||
|
||||
ngx_event_module_t ngx_epoll_module_ctx = {
|
||||
&epoll_name,
|
||||
ngx_epoll_create_conf, /* create configuration */
|
||||
ngx_epoll_init_conf, /* init configuration */
|
||||
|
||||
{
|
||||
ngx_epoll_add_event, /* add an event */
|
||||
ngx_epoll_del_event, /* delete an event */
|
||||
ngx_epoll_add_event, /* enable an event */
|
||||
ngx_epoll_del_event, /* disable an event */
|
||||
ngx_epoll_add_connection, /* add an connection */
|
||||
ngx_epoll_del_connection, /* delete an connection */
|
||||
NULL, /* process the changes */
|
||||
ngx_epoll_process_events, /* process the events */
|
||||
ngx_epoll_init, /* init the events */
|
||||
ngx_epoll_done, /* done the events */
|
||||
}
|
||||
};
|
||||
|
||||
ngx_module_t ngx_epoll_module = {
|
||||
NGX_MODULE_V1,
|
||||
&ngx_epoll_module_ctx, /* module context */
|
||||
ngx_epoll_commands, /* module directives */
|
||||
NGX_EVENT_MODULE, /* module type */
|
||||
NULL, /* init master */
|
||||
NULL, /* init module */
|
||||
NULL, /* init process */
|
||||
NULL, /* init thread */
|
||||
NULL, /* exit thread */
|
||||
NULL, /* exit process */
|
||||
NULL, /* exit master */
|
||||
NGX_MODULE_V1_PADDING
|
||||
};
|
||||
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
/*
|
||||
* We call io_setup(), io_destroy() io_submit(), and io_getevents() directly
|
||||
* as syscalls instead of libaio usage, because the library header file
|
||||
* supports eventfd() since 0.3.107 version only.
|
||||
*/
|
||||
|
||||
static int
|
||||
io_setup(u_int nr_reqs, aio_context_t *ctx)
|
||||
{
|
||||
return syscall(SYS_io_setup, nr_reqs, ctx);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
io_destroy(aio_context_t ctx)
|
||||
{
|
||||
return syscall(SYS_io_destroy, ctx);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
io_getevents(aio_context_t ctx, long min_nr, long nr, struct io_event *events,
|
||||
struct timespec *tmo)
|
||||
{
|
||||
return syscall(SYS_io_getevents, ctx, min_nr, nr, events, tmo);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_epoll_aio_init(ngx_cycle_t *cycle, ngx_epoll_conf_t *epcf)
|
||||
{
|
||||
int n;
|
||||
struct epoll_event ee;
|
||||
|
||||
#if (NGX_HAVE_SYS_EVENTFD_H)
|
||||
ngx_eventfd = eventfd(0, 0);
|
||||
#else
|
||||
ngx_eventfd = syscall(SYS_eventfd, 0);
|
||||
#endif
|
||||
|
||||
if (ngx_eventfd == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"eventfd() failed");
|
||||
ngx_file_aio = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"eventfd: %d", ngx_eventfd);
|
||||
|
||||
n = 1;
|
||||
|
||||
if (ioctl(ngx_eventfd, FIONBIO, &n) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"ioctl(eventfd, FIONBIO) failed");
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (io_setup(epcf->aio_requests, &ngx_aio_ctx) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"io_setup() failed");
|
||||
goto failed;
|
||||
}
|
||||
|
||||
ngx_eventfd_event.data = &ngx_eventfd_conn;
|
||||
ngx_eventfd_event.handler = ngx_epoll_eventfd_handler;
|
||||
ngx_eventfd_event.log = cycle->log;
|
||||
ngx_eventfd_event.active = 1;
|
||||
ngx_eventfd_conn.fd = ngx_eventfd;
|
||||
ngx_eventfd_conn.read = &ngx_eventfd_event;
|
||||
ngx_eventfd_conn.log = cycle->log;
|
||||
|
||||
ee.events = EPOLLIN|EPOLLET;
|
||||
ee.data.ptr = &ngx_eventfd_conn;
|
||||
|
||||
if (epoll_ctl(ep, EPOLL_CTL_ADD, ngx_eventfd, &ee) != -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"epoll_ctl(EPOLL_CTL_ADD, eventfd) failed");
|
||||
|
||||
if (io_destroy(ngx_aio_ctx) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"io_destroy() failed");
|
||||
}
|
||||
|
||||
failed:
|
||||
|
||||
if (close(ngx_eventfd) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"eventfd close() failed");
|
||||
}
|
||||
|
||||
ngx_eventfd = -1;
|
||||
ngx_aio_ctx = 0;
|
||||
ngx_file_aio = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
|
||||
{
|
||||
ngx_epoll_conf_t *epcf;
|
||||
|
||||
epcf = ngx_event_get_conf(cycle->conf_ctx, ngx_epoll_module);
|
||||
|
||||
if (ep == -1) {
|
||||
ep = epoll_create(cycle->connection_n / 2);
|
||||
|
||||
if (ep == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"epoll_create() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
ngx_epoll_aio_init(cycle, epcf);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (nevents < epcf->events) {
|
||||
if (event_list) {
|
||||
ngx_free(event_list);
|
||||
}
|
||||
|
||||
event_list = ngx_alloc(sizeof(struct epoll_event) * epcf->events,
|
||||
cycle->log);
|
||||
if (event_list == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
nevents = epcf->events;
|
||||
|
||||
ngx_io = ngx_os_io;
|
||||
|
||||
ngx_event_actions = ngx_epoll_module_ctx.actions;
|
||||
|
||||
#if (NGX_HAVE_CLEAR_EVENT)
|
||||
ngx_event_flags = NGX_USE_CLEAR_EVENT
|
||||
#else
|
||||
ngx_event_flags = NGX_USE_LEVEL_EVENT
|
||||
#endif
|
||||
|NGX_USE_GREEDY_EVENT
|
||||
|NGX_USE_EPOLL_EVENT;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_epoll_done(ngx_cycle_t *cycle)
|
||||
{
|
||||
if (close(ep) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"epoll close() failed");
|
||||
}
|
||||
|
||||
ep = -1;
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
if (ngx_eventfd != -1) {
|
||||
|
||||
if (io_destroy(ngx_aio_ctx) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"io_destroy() failed");
|
||||
}
|
||||
|
||||
if (close(ngx_eventfd) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"eventfd close() failed");
|
||||
}
|
||||
|
||||
ngx_eventfd = -1;
|
||||
}
|
||||
|
||||
ngx_aio_ctx = 0;
|
||||
|
||||
#endif
|
||||
|
||||
ngx_free(event_list);
|
||||
|
||||
event_list = NULL;
|
||||
nevents = 0;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
int op;
|
||||
uint32_t events, prev;
|
||||
ngx_event_t *e;
|
||||
ngx_connection_t *c;
|
||||
struct epoll_event ee;
|
||||
|
||||
c = ev->data;
|
||||
|
||||
events = (uint32_t) event;
|
||||
|
||||
if (event == NGX_READ_EVENT) {
|
||||
e = c->write;
|
||||
prev = EPOLLOUT;
|
||||
#if (NGX_READ_EVENT != EPOLLIN|EPOLLRDHUP)
|
||||
events = EPOLLIN|EPOLLRDHUP;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
e = c->read;
|
||||
prev = EPOLLIN|EPOLLRDHUP;
|
||||
#if (NGX_WRITE_EVENT != EPOLLOUT)
|
||||
events = EPOLLOUT;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (e->active) {
|
||||
op = EPOLL_CTL_MOD;
|
||||
events |= prev;
|
||||
|
||||
} else {
|
||||
op = EPOLL_CTL_ADD;
|
||||
}
|
||||
|
||||
ee.events = events | (uint32_t) flags;
|
||||
ee.data.ptr = (void *) ((uintptr_t) c | ev->instance);
|
||||
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"epoll add event: fd:%d op:%d ev:%08XD",
|
||||
c->fd, op, ee.events);
|
||||
|
||||
if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"epoll_ctl(%d, %d) failed", op, c->fd);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ev->active = 1;
|
||||
#if 0
|
||||
ev->oneshot = (flags & NGX_ONESHOT_EVENT) ? 1 : 0;
|
||||
#endif
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
int op;
|
||||
uint32_t prev;
|
||||
ngx_event_t *e;
|
||||
ngx_connection_t *c;
|
||||
struct epoll_event ee;
|
||||
|
||||
/*
|
||||
* when the file descriptor is closed, the epoll automatically deletes
|
||||
* it from its queue, so we do not need to delete explicitly the event
|
||||
* before the closing the file descriptor
|
||||
*/
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
ev->active = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
c = ev->data;
|
||||
|
||||
if (event == NGX_READ_EVENT) {
|
||||
e = c->write;
|
||||
prev = EPOLLOUT;
|
||||
|
||||
} else {
|
||||
e = c->read;
|
||||
prev = EPOLLIN|EPOLLRDHUP;
|
||||
}
|
||||
|
||||
if (e->active) {
|
||||
op = EPOLL_CTL_MOD;
|
||||
ee.events = prev | (uint32_t) flags;
|
||||
ee.data.ptr = (void *) ((uintptr_t) c | ev->instance);
|
||||
|
||||
} else {
|
||||
op = EPOLL_CTL_DEL;
|
||||
ee.events = 0;
|
||||
ee.data.ptr = NULL;
|
||||
}
|
||||
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"epoll del event: fd:%d op:%d ev:%08XD",
|
||||
c->fd, op, ee.events);
|
||||
|
||||
if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"epoll_ctl(%d, %d) failed", op, c->fd);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ev->active = 0;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_add_connection(ngx_connection_t *c)
|
||||
{
|
||||
struct epoll_event ee;
|
||||
|
||||
ee.events = EPOLLIN|EPOLLOUT|EPOLLET|EPOLLRDHUP;
|
||||
ee.data.ptr = (void *) ((uintptr_t) c | c->read->instance);
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||
"epoll add connection: fd:%d ev:%08XD", c->fd, ee.events);
|
||||
|
||||
if (epoll_ctl(ep, EPOLL_CTL_ADD, c->fd, &ee) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
|
||||
"epoll_ctl(EPOLL_CTL_ADD, %d) failed", c->fd);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
c->read->active = 1;
|
||||
c->write->active = 1;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_del_connection(ngx_connection_t *c, ngx_uint_t flags)
|
||||
{
|
||||
int op;
|
||||
struct epoll_event ee;
|
||||
|
||||
/*
|
||||
* when the file descriptor is closed the epoll automatically deletes
|
||||
* it from its queue so we do not need to delete explicitly the event
|
||||
* before the closing the file descriptor
|
||||
*/
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
c->read->active = 0;
|
||||
c->write->active = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0,
|
||||
"epoll del connection: fd:%d", c->fd);
|
||||
|
||||
op = EPOLL_CTL_DEL;
|
||||
ee.events = 0;
|
||||
ee.data.ptr = NULL;
|
||||
|
||||
if (epoll_ctl(ep, op, c->fd, &ee) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, c->log, ngx_errno,
|
||||
"epoll_ctl(%d, %d) failed", op, c->fd);
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
c->read->active = 0;
|
||||
c->write->active = 0;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_epoll_process_events(ngx_cycle_t *cycle, ngx_msec_t timer, ngx_uint_t flags)
|
||||
{
|
||||
int events;
|
||||
uint32_t revents;
|
||||
ngx_int_t instance, i;
|
||||
ngx_uint_t level;
|
||||
ngx_err_t err;
|
||||
ngx_event_t *rev, *wev;
|
||||
ngx_queue_t *queue;
|
||||
ngx_connection_t *c;
|
||||
|
||||
/* NGX_TIMER_INFINITE == INFTIM */
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"epoll timer: %M", timer);
|
||||
|
||||
events = epoll_wait(ep, event_list, (int) nevents, timer);
|
||||
|
||||
err = (events == -1) ? ngx_errno : 0;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME || ngx_event_timer_alarm) {
|
||||
ngx_time_update();
|
||||
}
|
||||
|
||||
if (err) {
|
||||
if (err == NGX_EINTR) {
|
||||
|
||||
if (ngx_event_timer_alarm) {
|
||||
ngx_event_timer_alarm = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
level = NGX_LOG_INFO;
|
||||
|
||||
} else {
|
||||
level = NGX_LOG_ALERT;
|
||||
}
|
||||
|
||||
ngx_log_error(level, cycle->log, err, "epoll_wait() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (events == 0) {
|
||||
if (timer != NGX_TIMER_INFINITE) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"epoll_wait() returned no events without timeout");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
for (i = 0; i < events; i++) {
|
||||
c = event_list[i].data.ptr;
|
||||
|
||||
instance = (uintptr_t) c & 1;
|
||||
c = (ngx_connection_t *) ((uintptr_t) c & (uintptr_t) ~1);
|
||||
|
||||
rev = c->read;
|
||||
|
||||
if (c->fd == -1 || rev->instance != instance) {
|
||||
|
||||
/*
|
||||
* the stale event from a file descriptor
|
||||
* that was just closed in this iteration
|
||||
*/
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"epoll: stale event %p", c);
|
||||
continue;
|
||||
}
|
||||
|
||||
revents = event_list[i].events;
|
||||
|
||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"epoll: fd:%d ev:%04XD d:%p",
|
||||
c->fd, revents, event_list[i].data.ptr);
|
||||
|
||||
if (revents & (EPOLLERR|EPOLLHUP)) {
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"epoll_wait() error on fd:%d ev:%04XD",
|
||||
c->fd, revents);
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (revents & ~(EPOLLIN|EPOLLOUT|EPOLLERR|EPOLLHUP)) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"strange epoll_wait() events fd:%d ev:%04XD",
|
||||
c->fd, revents);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((revents & (EPOLLERR|EPOLLHUP))
|
||||
&& (revents & (EPOLLIN|EPOLLOUT)) == 0)
|
||||
{
|
||||
/*
|
||||
* if the error events were returned without EPOLLIN or EPOLLOUT,
|
||||
* then add these flags to handle the events at least in one
|
||||
* active handler
|
||||
*/
|
||||
|
||||
revents |= EPOLLIN|EPOLLOUT;
|
||||
}
|
||||
|
||||
if ((revents & EPOLLIN) && rev->active) {
|
||||
|
||||
#if (NGX_HAVE_EPOLLRDHUP)
|
||||
if (revents & EPOLLRDHUP) {
|
||||
rev->pending_eof = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
rev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
queue = rev->accept ? &ngx_posted_accept_events
|
||||
: &ngx_posted_events;
|
||||
|
||||
ngx_post_event(rev, queue);
|
||||
|
||||
} else {
|
||||
rev->handler(rev);
|
||||
}
|
||||
}
|
||||
|
||||
wev = c->write;
|
||||
|
||||
if ((revents & EPOLLOUT) && wev->active) {
|
||||
|
||||
if (c->fd == -1 || wev->instance != instance) {
|
||||
|
||||
/*
|
||||
* the stale event from a file descriptor
|
||||
* that was just closed in this iteration
|
||||
*/
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"epoll: stale event %p", c);
|
||||
continue;
|
||||
}
|
||||
|
||||
wev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
ngx_post_event(wev, &ngx_posted_events);
|
||||
|
||||
} else {
|
||||
wev->handler(wev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
#if (NGX_HAVE_FILE_AIO)
|
||||
|
||||
static void
|
||||
ngx_epoll_eventfd_handler(ngx_event_t *ev)
|
||||
{
|
||||
int n, events;
|
||||
long i;
|
||||
uint64_t ready;
|
||||
ngx_err_t err;
|
||||
ngx_event_t *e;
|
||||
ngx_event_aio_t *aio;
|
||||
struct io_event event[64];
|
||||
struct timespec ts;
|
||||
|
||||
ngx_log_debug0(NGX_LOG_DEBUG_EVENT, ev->log, 0, "eventfd handler");
|
||||
|
||||
n = read(ngx_eventfd, &ready, 8);
|
||||
|
||||
err = ngx_errno;
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0, "eventfd: %d", n);
|
||||
|
||||
if (n != 8) {
|
||||
if (n == -1) {
|
||||
if (err == NGX_EAGAIN) {
|
||||
return;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, err, "read(eventfd) failed");
|
||||
return;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, 0,
|
||||
"read(eventfd) returned only %d bytes", n);
|
||||
return;
|
||||
}
|
||||
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 0;
|
||||
|
||||
while (ready) {
|
||||
|
||||
events = io_getevents(ngx_aio_ctx, 1, 64, event, &ts);
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"io_getevents: %l", events);
|
||||
|
||||
if (events > 0) {
|
||||
ready -= events;
|
||||
|
||||
for (i = 0; i < events; i++) {
|
||||
|
||||
ngx_log_debug4(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"io_event: %uXL %uXL %L %L",
|
||||
event[i].data, event[i].obj,
|
||||
event[i].res, event[i].res2);
|
||||
|
||||
e = (ngx_event_t *) (uintptr_t) event[i].data;
|
||||
|
||||
e->complete = 1;
|
||||
e->active = 0;
|
||||
e->ready = 1;
|
||||
|
||||
aio = e->data;
|
||||
aio->res = event[i].res;
|
||||
|
||||
ngx_post_event(e, &ngx_posted_events);
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (events == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* events == -1 */
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"io_getevents() failed");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static void *
|
||||
ngx_epoll_create_conf(ngx_cycle_t *cycle)
|
||||
{
|
||||
ngx_epoll_conf_t *epcf;
|
||||
|
||||
epcf = ngx_palloc(cycle->pool, sizeof(ngx_epoll_conf_t));
|
||||
if (epcf == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
epcf->events = NGX_CONF_UNSET;
|
||||
epcf->aio_requests = NGX_CONF_UNSET;
|
||||
|
||||
return epcf;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
ngx_epoll_init_conf(ngx_cycle_t *cycle, void *conf)
|
||||
{
|
||||
ngx_epoll_conf_t *epcf = conf;
|
||||
|
||||
ngx_conf_init_uint_value(epcf->events, 512);
|
||||
ngx_conf_init_uint_value(epcf->aio_requests, 32);
|
||||
|
||||
return NGX_CONF_OK;
|
||||
}
|
|
@ -1,618 +0,0 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) Igor Sysoev
|
||||
* Copyright (C) Nginx, Inc.
|
||||
*/
|
||||
|
||||
|
||||
#include <ngx_config.h>
|
||||
#include <ngx_core.h>
|
||||
#include <ngx_event.h>
|
||||
|
||||
|
||||
#if (NGX_TEST_BUILD_EVENTPORT)
|
||||
|
||||
#define ushort_t u_short
|
||||
#define uint_t u_int
|
||||
|
||||
#ifndef CLOCK_REALTIME
|
||||
#define CLOCK_REALTIME 0
|
||||
typedef int clockid_t;
|
||||
typedef void * timer_t;
|
||||
#endif
|
||||
|
||||
/* Solaris declarations */
|
||||
|
||||
#define PORT_SOURCE_AIO 1
|
||||
#define PORT_SOURCE_TIMER 2
|
||||
#define PORT_SOURCE_USER 3
|
||||
#define PORT_SOURCE_FD 4
|
||||
#define PORT_SOURCE_ALERT 5
|
||||
#define PORT_SOURCE_MQ 6
|
||||
|
||||
#ifndef ETIME
|
||||
#define ETIME 64
|
||||
#endif
|
||||
|
||||
#define SIGEV_PORT 4
|
||||
|
||||
typedef struct {
|
||||
int portev_events; /* event data is source specific */
|
||||
ushort_t portev_source; /* event source */
|
||||
ushort_t portev_pad; /* port internal use */
|
||||
uintptr_t portev_object; /* source specific object */
|
||||
void *portev_user; /* user cookie */
|
||||
} port_event_t;
|
||||
|
||||
typedef struct port_notify {
|
||||
int portnfy_port; /* bind request(s) to port */
|
||||
void *portnfy_user; /* user defined */
|
||||
} port_notify_t;
|
||||
|
||||
#if (__FreeBSD_version < 700005)
|
||||
|
||||
typedef struct itimerspec { /* definition per POSIX.4 */
|
||||
struct timespec it_interval;/* timer period */
|
||||
struct timespec it_value; /* timer expiration */
|
||||
} itimerspec_t;
|
||||
|
||||
#endif
|
||||
|
||||
int port_create(void);
|
||||
|
||||
int port_create(void)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int port_associate(int port, int source, uintptr_t object, int events,
|
||||
void *user);
|
||||
|
||||
int port_associate(int port, int source, uintptr_t object, int events,
|
||||
void *user)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int port_dissociate(int port, int source, uintptr_t object);
|
||||
|
||||
int port_dissociate(int port, int source, uintptr_t object)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
|
||||
struct timespec *timeout);
|
||||
|
||||
int port_getn(int port, port_event_t list[], uint_t max, uint_t *nget,
|
||||
struct timespec *timeout)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid);
|
||||
|
||||
int timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
|
||||
struct itimerspec *ovalue);
|
||||
|
||||
int timer_settime(timer_t timerid, int flags, const struct itimerspec *value,
|
||||
struct itimerspec *ovalue)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int timer_delete(timer_t timerid);
|
||||
|
||||
int timer_delete(timer_t timerid)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
ngx_uint_t events;
|
||||
} ngx_eventport_conf_t;
|
||||
|
||||
|
||||
static ngx_int_t ngx_eventport_init(ngx_cycle_t *cycle, ngx_msec_t timer);
|
||||
static void ngx_eventport_done(ngx_cycle_t *cycle);
|
||||
static ngx_int_t ngx_eventport_add_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_eventport_del_event(ngx_event_t *ev, ngx_int_t event,
|
||||
ngx_uint_t flags);
|
||||
static ngx_int_t ngx_eventport_process_events(ngx_cycle_t *cycle,
|
||||
ngx_msec_t timer, ngx_uint_t flags);
|
||||
|
||||
static void *ngx_eventport_create_conf(ngx_cycle_t *cycle);
|
||||
static char *ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf);
|
||||
|
||||
static int ep = -1;
|
||||
static port_event_t *event_list;
|
||||
static ngx_uint_t nevents;
|
||||
static timer_t event_timer = (timer_t) -1;
|
||||
|
||||
static ngx_str_t eventport_name = ngx_string("eventport");
|
||||
|
||||
|
||||
static ngx_command_t ngx_eventport_commands[] = {
|
||||
|
||||
{ ngx_string("eventport_events"),
|
||||
NGX_EVENT_CONF|NGX_CONF_TAKE1,
|
||||
ngx_conf_set_num_slot,
|
||||
0,
|
||||
offsetof(ngx_eventport_conf_t, events),
|
||||
NULL },
|
||||
|
||||
ngx_null_command
|
||||
};
|
||||
|
||||
|
||||
ngx_event_module_t ngx_eventport_module_ctx = {
|
||||
&eventport_name,
|
||||
ngx_eventport_create_conf, /* create configuration */
|
||||
ngx_eventport_init_conf, /* init configuration */
|
||||
|
||||
{
|
||||
ngx_eventport_add_event, /* add an event */
|
||||
ngx_eventport_del_event, /* delete an event */
|
||||
ngx_eventport_add_event, /* enable an event */
|
||||
ngx_eventport_del_event, /* disable an event */
|
||||
NULL, /* add an connection */
|
||||
NULL, /* delete an connection */
|
||||
NULL, /* process the changes */
|
||||
ngx_eventport_process_events, /* process the events */
|
||||
ngx_eventport_init, /* init the events */
|
||||
ngx_eventport_done, /* done the events */
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
ngx_module_t ngx_eventport_module = {
|
||||
NGX_MODULE_V1,
|
||||
&ngx_eventport_module_ctx, /* module context */
|
||||
ngx_eventport_commands, /* module directives */
|
||||
NGX_EVENT_MODULE, /* module type */
|
||||
NULL, /* init master */
|
||||
NULL, /* init module */
|
||||
NULL, /* init process */
|
||||
NULL, /* init thread */
|
||||
NULL, /* exit thread */
|
||||
NULL, /* exit process */
|
||||
NULL, /* exit master */
|
||||
NGX_MODULE_V1_PADDING
|
||||
};
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_eventport_init(ngx_cycle_t *cycle, ngx_msec_t timer)
|
||||
{
|
||||
port_notify_t pn;
|
||||
struct itimerspec its;
|
||||
struct sigevent sev;
|
||||
ngx_eventport_conf_t *epcf;
|
||||
|
||||
epcf = ngx_event_get_conf(cycle->conf_ctx, ngx_eventport_module);
|
||||
|
||||
if (ep == -1) {
|
||||
ep = port_create();
|
||||
|
||||
if (ep == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"port_create() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (nevents < epcf->events) {
|
||||
if (event_list) {
|
||||
ngx_free(event_list);
|
||||
}
|
||||
|
||||
event_list = ngx_alloc(sizeof(port_event_t) * epcf->events,
|
||||
cycle->log);
|
||||
if (event_list == NULL) {
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
ngx_event_flags = NGX_USE_EVENTPORT_EVENT;
|
||||
|
||||
if (timer) {
|
||||
ngx_memzero(&pn, sizeof(port_notify_t));
|
||||
pn.portnfy_port = ep;
|
||||
|
||||
ngx_memzero(&sev, sizeof(struct sigevent));
|
||||
sev.sigev_notify = SIGEV_PORT;
|
||||
#if !(NGX_TEST_BUILD_EVENTPORT)
|
||||
sev.sigev_value.sival_ptr = &pn;
|
||||
#endif
|
||||
|
||||
if (timer_create(CLOCK_REALTIME, &sev, &event_timer) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"timer_create() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
its.it_interval.tv_sec = timer / 1000;
|
||||
its.it_interval.tv_nsec = (timer % 1000) * 1000000;
|
||||
its.it_value.tv_sec = timer / 1000;
|
||||
its.it_value.tv_nsec = (timer % 1000) * 1000000;
|
||||
|
||||
if (timer_settime(event_timer, 0, &its, NULL) == -1) {
|
||||
ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
|
||||
"timer_settime() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ngx_event_flags |= NGX_USE_TIMER_EVENT;
|
||||
}
|
||||
|
||||
nevents = epcf->events;
|
||||
|
||||
ngx_io = ngx_os_io;
|
||||
|
||||
ngx_event_actions = ngx_eventport_module_ctx.actions;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
ngx_eventport_done(ngx_cycle_t *cycle)
|
||||
{
|
||||
if (event_timer != (timer_t) -1) {
|
||||
if (timer_delete(event_timer) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"timer_delete() failed");
|
||||
}
|
||||
|
||||
event_timer = (timer_t) -1;
|
||||
}
|
||||
|
||||
if (close(ep) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, ngx_errno,
|
||||
"close() event port failed");
|
||||
}
|
||||
|
||||
ep = -1;
|
||||
|
||||
ngx_free(event_list);
|
||||
|
||||
event_list = NULL;
|
||||
nevents = 0;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_eventport_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
ngx_int_t events, prev;
|
||||
ngx_event_t *e;
|
||||
ngx_connection_t *c;
|
||||
|
||||
c = ev->data;
|
||||
|
||||
events = event;
|
||||
|
||||
if (event == NGX_READ_EVENT) {
|
||||
e = c->write;
|
||||
prev = POLLOUT;
|
||||
#if (NGX_READ_EVENT != POLLIN)
|
||||
events = POLLIN;
|
||||
#endif
|
||||
|
||||
} else {
|
||||
e = c->read;
|
||||
prev = POLLIN;
|
||||
#if (NGX_WRITE_EVENT != POLLOUT)
|
||||
events = POLLOUT;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (e->oneshot) {
|
||||
events |= prev;
|
||||
}
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"eventport add event: fd:%d ev:%04Xi", c->fd, events);
|
||||
|
||||
if (port_associate(ep, PORT_SOURCE_FD, c->fd, events,
|
||||
(void *) ((uintptr_t) ev | ev->instance))
|
||||
== -1)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"port_associate() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
ev->active = 1;
|
||||
ev->oneshot = 1;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static ngx_int_t
|
||||
ngx_eventport_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags)
|
||||
{
|
||||
ngx_event_t *e;
|
||||
ngx_connection_t *c;
|
||||
|
||||
/*
|
||||
* when the file descriptor is closed, the event port automatically
|
||||
* dissociates it from the port, so we do not need to dissociate explicitly
|
||||
* the event before the closing the file descriptor
|
||||
*/
|
||||
|
||||
if (flags & NGX_CLOSE_EVENT) {
|
||||
ev->active = 0;
|
||||
ev->oneshot = 0;
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
c = ev->data;
|
||||
|
||||
if (event == NGX_READ_EVENT) {
|
||||
e = c->write;
|
||||
event = POLLOUT;
|
||||
|
||||
} else {
|
||||
e = c->read;
|
||||
event = POLLIN;
|
||||
}
|
||||
|
||||
if (e->oneshot) {
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"eventport change event: fd:%d ev:%04Xi", c->fd, event);
|
||||
|
||||
if (port_associate(ep, PORT_SOURCE_FD, c->fd, event,
|
||||
(void *) ((uintptr_t) ev | ev->instance))
|
||||
== -1)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"port_associate() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
} else {
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, ev->log, 0,
|
||||
"eventport del event: fd:%d", c->fd);
|
||||
|
||||
if (port_dissociate(ep, PORT_SOURCE_FD, c->fd) == -1) {
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"port_dissociate() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
ev->active = 0;
|
||||
ev->oneshot = 0;
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
ngx_int_t
|
||||
ngx_eventport_process_events(ngx_cycle_t *cycle, ngx_msec_t timer,
|
||||
ngx_uint_t flags)
|
||||
{
|
||||
int n, revents;
|
||||
u_int events;
|
||||
ngx_err_t err;
|
||||
ngx_int_t instance;
|
||||
ngx_uint_t i, level;
|
||||
ngx_event_t *ev, *rev, *wev;
|
||||
ngx_queue_t *queue;
|
||||
ngx_connection_t *c;
|
||||
struct timespec ts, *tp;
|
||||
|
||||
if (timer == NGX_TIMER_INFINITE) {
|
||||
tp = NULL;
|
||||
|
||||
} else {
|
||||
ts.tv_sec = timer / 1000;
|
||||
ts.tv_nsec = (timer % 1000) * 1000000;
|
||||
tp = &ts;
|
||||
}
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"eventport timer: %M", timer);
|
||||
|
||||
events = 1;
|
||||
|
||||
n = port_getn(ep, event_list, (u_int) nevents, &events, tp);
|
||||
|
||||
err = ngx_errno;
|
||||
|
||||
if (flags & NGX_UPDATE_TIME) {
|
||||
ngx_time_update();
|
||||
}
|
||||
|
||||
if (n == -1) {
|
||||
if (err == ETIME) {
|
||||
if (timer != NGX_TIMER_INFINITE) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"port_getn() returned no events without timeout");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
level = (err == NGX_EINTR) ? NGX_LOG_INFO : NGX_LOG_ALERT;
|
||||
ngx_log_error(level, cycle->log, err, "port_getn() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
if (events == 0) {
|
||||
if (timer != NGX_TIMER_INFINITE) {
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"port_getn() returned no events without timeout");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
|
||||
for (i = 0; i < events; i++) {
|
||||
|
||||
if (event_list[i].portev_source == PORT_SOURCE_TIMER) {
|
||||
ngx_time_update();
|
||||
continue;
|
||||
}
|
||||
|
||||
ev = event_list[i].portev_user;
|
||||
|
||||
switch (event_list[i].portev_source) {
|
||||
|
||||
case PORT_SOURCE_FD:
|
||||
|
||||
instance = (uintptr_t) ev & 1;
|
||||
ev = (ngx_event_t *) ((uintptr_t) ev & (uintptr_t) ~1);
|
||||
|
||||
if (ev->closed || ev->instance != instance) {
|
||||
|
||||
/*
|
||||
* the stale event from a file descriptor
|
||||
* that was just closed in this iteration
|
||||
*/
|
||||
|
||||
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"eventport: stale event %p", ev);
|
||||
continue;
|
||||
}
|
||||
|
||||
revents = event_list[i].portev_events;
|
||||
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"eventport: fd:%d, ev:%04Xd",
|
||||
event_list[i].portev_object, revents);
|
||||
|
||||
if (revents & (POLLERR|POLLHUP|POLLNVAL)) {
|
||||
ngx_log_debug2(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||
"port_getn() error fd:%d ev:%04Xd",
|
||||
event_list[i].portev_object, revents);
|
||||
}
|
||||
|
||||
if (revents & ~(POLLIN|POLLOUT|POLLERR|POLLHUP|POLLNVAL)) {
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"strange port_getn() events fd:%d ev:%04Xd",
|
||||
event_list[i].portev_object, revents);
|
||||
}
|
||||
|
||||
if ((revents & (POLLERR|POLLHUP|POLLNVAL))
|
||||
&& (revents & (POLLIN|POLLOUT)) == 0)
|
||||
{
|
||||
/*
|
||||
* if the error events were returned without POLLIN or POLLOUT,
|
||||
* then add these flags to handle the events at least in one
|
||||
* active handler
|
||||
*/
|
||||
|
||||
revents |= POLLIN|POLLOUT;
|
||||
}
|
||||
|
||||
c = ev->data;
|
||||
rev = c->read;
|
||||
wev = c->write;
|
||||
|
||||
rev->active = 0;
|
||||
wev->active = 0;
|
||||
|
||||
if (revents & POLLIN) {
|
||||
rev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
queue = rev->accept ? &ngx_posted_accept_events
|
||||
: &ngx_posted_events;
|
||||
|
||||
ngx_post_event(rev, queue);
|
||||
|
||||
} else {
|
||||
rev->handler(rev);
|
||||
|
||||
if (ev->closed || ev->instance != instance) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (rev->accept) {
|
||||
if (ngx_use_accept_mutex) {
|
||||
ngx_accept_events = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (port_associate(ep, PORT_SOURCE_FD, c->fd, POLLIN,
|
||||
(void *) ((uintptr_t) ev | ev->instance))
|
||||
== -1)
|
||||
{
|
||||
ngx_log_error(NGX_LOG_ALERT, ev->log, ngx_errno,
|
||||
"port_associate() failed");
|
||||
return NGX_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (revents & POLLOUT) {
|
||||
wev->ready = 1;
|
||||
|
||||
if (flags & NGX_POST_EVENTS) {
|
||||
ngx_post_event(wev, &ngx_posted_events);
|
||||
|
||||
} else {
|
||||
wev->handler(wev);
|
||||
}
|
||||
}
|
||||
|
||||
continue;
|
||||
|
||||
default:
|
||||
ngx_log_error(NGX_LOG_ALERT, cycle->log, 0,
|
||||
"unexpected even_port object %d",
|
||||
event_list[i].portev_object);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return NGX_OK;
|
||||
}
|
||||
|
||||
|
||||
static void *
|
||||
ngx_eventport_create_conf(ngx_cycle_t *cycle)
|
||||
{
|
||||
ngx_eventport_conf_t *epcf;
|
||||
|
||||
epcf = ngx_palloc(cycle->pool, sizeof(ngx_eventport_conf_t));
|
||||
if (epcf == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
epcf->events = NGX_CONF_UNSET;
|
||||
|
||||
return epcf;
|
||||
}
|
||||
|
||||
|
||||
static char *
|
||||
ngx_eventport_init_conf(ngx_cycle_t *cycle, void *conf)
|
||||
{
|
||||
ngx_eventport_conf_t *epcf = conf;
|
||||
|
||||
ngx_conf_init_uint_value(epcf->events, 32);
|
||||
|
||||
return NGX_CONF_OK;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue