diff options
Diffstat (limited to 'auto')
50 files changed, 190 insertions, 16 deletions
@@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS="$CFLAGS $CC_OPT" case $CC in @@ -25,6 +28,12 @@ case $CC in # optimize for Pentium 4, gcc 3.x CPU_OPT="-march=pentium4" ;; + + sparc64) + # build 64-bit binary, sparcv9 only + CPU_OPT="-m64" + ;; + esac # STUB for batch builds diff --git a/auto/configure b/auto/configure index dba10b363..786f4f837 100755 --- a/auto/configure +++ b/auto/configure @@ -1,5 +1,8 @@ #!/bin/sh +# Copyright (C) Igor Sysoev + + . auto/options . auto/init . auto/sources @@ -43,7 +46,9 @@ have=NGX_PREFIX value="\"$PREFIX/\"" . auto/define have=NGX_SBIN_PATH value="\"$SBIN_PATH\"" . auto/define have=NGX_CONF_PATH value="\"$CONF_PATH\"" . auto/define have=NGX_PID_PATH value="\"$PID_PATH\"" . auto/define -have=NGX_ERROR_LOG_PATH value="\"$ERROR_LOG_PATH\"" . auto/define +if [ ".$NGX_ERROR_LOG_PATH" != "." ]; then + have=NGX_ERROR_LOG_PATH value="\"$ERROR_LOG_PATH\"" . auto/define +fi have=NGX_HTTP_LOG_PATH value="\"$HTTP_LOG_PATH\"" . auto/define . auto/summary diff --git a/auto/define b/auto/define index d872fc3e1..971f99df2 100644 --- a/auto/define +++ b/auto/define @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END >> $NGX_AUTO_CONFIG_H #ifndef $have diff --git a/auto/endianess b/auto/endianess index fb9e25547..4df7d01f1 100644 --- a/auto/endianess +++ b/auto/endianess @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for system endianess ..." $ngx_c echo >> $NGX_ERR echo "checking for system endianess" >> $NGX_ERR diff --git a/auto/feature b/auto/feature index 32a103d15..bd5b08158 100644 --- a/auto/feature +++ b/auto/feature @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_feature ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_feature" >> $NGX_ERR diff --git a/auto/fmt/fmt b/auto/fmt/fmt index daca06900..980641ffa 100644 --- a/auto/fmt/fmt +++ b/auto/fmt/fmt @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_type printf() format ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_type printf() format" >> $NGX_ERR diff --git a/auto/fmt/ptrfmt b/auto/fmt/ptrfmt index 20f0d320c..163ca59e2 100644 --- a/auto/fmt/ptrfmt +++ b/auto/fmt/ptrfmt @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_type printf() format ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_type printf() format" >> $NGX_ERR diff --git a/auto/fmt/xfmt b/auto/fmt/xfmt index 2509f3ffb..957e59030 100644 --- a/auto/fmt/xfmt +++ b/auto/fmt/xfmt @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END | sed -e 's/d"$/x"/' >> $NGX_AUTO_CONFIG_H #ifndef $ngx_fmt_name @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_func ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_func" >> $NGX_ERR @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END >> $NGX_AUTO_CONFIG_H #ifndef $have diff --git a/auto/headers b/auto/headers index 9c9ac5102..2bfa685c9 100644 --- a/auto/headers +++ b/auto/headers @@ -1,3 +1,6 @@ +# Copyright (C) Igor Sysoev + + ngx_inc="unistd.h"; . auto/inc ngx_inc="inttypes.h"; . auto/inc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_inc ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_inc" >> $NGX_ERR @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + MAKEFILE=$OBJS/Makefile NGX_AUTO_CONFIG_H=$OBJS/ngx_auto_config.h diff --git a/auto/install b/auto/install index 1ecf5a753..d1d608c98 100644 --- a/auto/install +++ b/auto/install @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END >> $MAKEFILE install: test -d $PREFIX || mkdir -p $PREFIX @@ -18,7 +21,7 @@ install: cp conf/nginx.conf `dirname $CONF_PATH`/nginx.conf.default test -d `dirname $PID_PATH` || mkdir -p `dirname $PID_PATH` - test -d `dirname $ERROR_LOG_PATH` || mkdir -p `dirname $ERROR_LOG_PATH` + test -d `dirname $HTTP_LOG_PATH` || mkdir -p `dirname $HTTP_LOG_PATH` test -d $PREFIX/html || cp -r html $PREFIX @@ -27,6 +30,15 @@ install: END +if [ ".$ERROR_LOG_PATH" != "." ]; then + cat << END >> $MAKEFILE + + test -d `dirname $ERROR_LOG_PATH` || mkdir -p `dirname $ERROR_LOG_PATH` +END + +fi + + if test ! -f Makefile; then cat << END > Makefile diff --git a/auto/lib/conf b/auto/lib/conf index af2e9d7f8..275bea9cf 100644 --- a/auto/lib/conf +++ b/auto/lib/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $USE_PCRE = YES ]; then . auto/lib/pcre/conf fi diff --git a/auto/lib/make b/auto/lib/make index 377fc7aa7..ef571c5b8 100644 --- a/auto/lib/make +++ b/auto/lib/make @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $PCRE != NONE -a $PCRE != NO -a $PCRE != YES ]; then . auto/lib/pcre/make fi diff --git a/auto/lib/md5/conf b/auto/lib/md5/conf index 383821e79..748bea450 100644 --- a/auto/lib/md5/conf +++ b/auto/lib/md5/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $MD5 != NONE ]; then if grep MD5_Init $MD5/md5.h >/dev/null; then diff --git a/auto/lib/md5/make b/auto/lib/md5/make index 2632c9b1f..f718e6c2c 100644 --- a/auto/lib/md5/make +++ b/auto/lib/md5/make @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + case "$CC" in cl) diff --git a/auto/lib/md5/makefile.bcc b/auto/lib/md5/makefile.bcc index e3dd8aa22..837f2dff7 100644 --- a/auto/lib/md5/makefile.bcc +++ b/auto/lib/md5/makefile.bcc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -q -O2 -tWM $(CPU_OPT) -DL_ENDIAN !if "$(MD5_ASM)" == "YES" diff --git a/auto/lib/md5/makefile.msvc b/auto/lib/md5/makefile.msvc index c497c39ae..68f5cc49b 100644 --- a/auto/lib/md5/makefile.msvc +++ b/auto/lib/md5/makefile.msvc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -nologo -MT -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) -D L_ENDIAN !if "$(MD5_ASM)" == "YES" diff --git a/auto/lib/md5/makefile.owc b/auto/lib/md5/makefile.owc index 917acba30..5fffa1707 100644 --- a/auto/lib/md5/makefile.owc +++ b/auto/lib/md5/makefile.owc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -zq -bt=nt -bm -ot -op -oi -oe -s $(CPU_OPT) md5.lib: diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf index 28dbf665d..37c084f00 100644 --- a/auto/lib/openssl/conf +++ b/auto/lib/openssl/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $OPENSSL != NONE ]; then CORE_INCS="$CORE_INCS $OPENSSL/include" CORE_DEPS="$CORE_DEPS $OPENSSL_DEPS" diff --git a/auto/lib/openssl/make b/auto/lib/openssl/make index 8631ff345..5e931cbbe 100644 --- a/auto/lib/openssl/make +++ b/auto/lib/openssl/make @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + case $PLATFORM in *) echo "$OPENSSL/libssl.a:" >> $MAKEFILE diff --git a/auto/lib/pcre/conf b/auto/lib/pcre/conf index 29c561b81..16feffa6b 100644 --- a/auto/lib/pcre/conf +++ b/auto/lib/pcre/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $PCRE != NONE ]; then CORE_INCS="$CORE_INCS $PCRE" CORE_DEPS="$CORE_DEPS $REGEX_DEPS" diff --git a/auto/lib/pcre/make b/auto/lib/pcre/make index 3a42eaba8..fa7bf27d0 100644 --- a/auto/lib/pcre/make +++ b/auto/lib/pcre/make @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + case "$CC" in cl) diff --git a/auto/lib/pcre/makefile.bcc b/auto/lib/pcre/makefile.bcc index 5744b90b5..411945260 100644 --- a/auto/lib/pcre/makefile.bcc +++ b/auto/lib/pcre/makefile.bcc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -q -O2 -tWM $(CPU_OPT) PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 diff --git a/auto/lib/pcre/makefile.msvc b/auto/lib/pcre/makefile.msvc index 31921240c..7c61d31f7 100644 --- a/auto/lib/pcre/makefile.msvc +++ b/auto/lib/pcre/makefile.msvc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 diff --git a/auto/lib/pcre/makefile.owc b/auto/lib/pcre/makefile.owc index 41194f55f..227fd90af 100644 --- a/auto/lib/pcre/makefile.owc +++ b/auto/lib/pcre/makefile.owc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -c -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) PCREFLAGS = -DPCRE_STATIC -DPOSIX_MALLOC_THRESHOLD=10 diff --git a/auto/lib/test b/auto/lib/test index 3519a6c5c..7dfaafef1 100644 --- a/auto/lib/test +++ b/auto/lib/test @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_lib ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_lib library" >> $NGX_ERR diff --git a/auto/lib/zlib/conf b/auto/lib/zlib/conf index 37c1fa7ef..a01eebe71 100644 --- a/auto/lib/zlib/conf +++ b/auto/lib/zlib/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $ZLIB != NONE ]; then CORE_INCS="$CORE_INCS $ZLIB" diff --git a/auto/lib/zlib/make b/auto/lib/zlib/make index d25642533..0ced9a25c 100644 --- a/auto/lib/zlib/make +++ b/auto/lib/zlib/make @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + case "$CC" in cl) diff --git a/auto/lib/zlib/makefile.bcc b/auto/lib/zlib/makefile.bcc index 0ec4de835..95e8800ad 100644 --- a/auto/lib/zlib/makefile.bcc +++ b/auto/lib/zlib/makefile.bcc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -q -O2 -tWM $(CPU_OPT) zlib.lib: diff --git a/auto/lib/zlib/makefile.msvc b/auto/lib/zlib/makefile.msvc index a9983efdf..304b986cd 100644 --- a/auto/lib/zlib/makefile.msvc +++ b/auto/lib/zlib/makefile.msvc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -nologo -O2 -Ob1 -Oi -Gs $(LIBC) $(CPU_OPT) zlib.lib: diff --git a/auto/lib/zlib/makefile.owc b/auto/lib/zlib/makefile.owc index bc57d20cf..71ba512dc 100644 --- a/auto/lib/zlib/makefile.owc +++ b/auto/lib/zlib/makefile.owc @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CFLAGS = -zq -bt=nt -ot -op -oi -oe -s -bm $(CPU_OPT) zlib.lib: @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + mkdir -p $OBJS/src/core $OBJS/src/event $OBJS/src/event/modules \ $OBJS/src/os/unix $OBJS/src/os/win32 \ $OBJS/src/http $OBJS/src/http/modules $OBJS/src/http/modules/proxy \ diff --git a/auto/modules b/auto/modules index bfbab158e..7bb1eb9a3 100644 --- a/auto/modules +++ b/auto/modules @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ $EVENT_SELECT = NO -a $EVENT_FOUND = NO ]; then EVENT_SELECT=YES fi diff --git a/auto/nohave b/auto/nohave index 49bb7ceb8..bb5632aaf 100644 --- a/auto/nohave +++ b/auto/nohave @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END >> $NGX_AUTO_CONFIG_H #ifndef $have diff --git a/auto/options b/auto/options index 427610595..259c049ad 100644 --- a/auto/options +++ b/auto/options @@ -1,4 +1,6 @@ +# Copyright (C) Igor Sysoev + help=no PREFIX= @@ -234,6 +236,10 @@ case ".$ERROR_LOG_PATH" in ERROR_LOG_PATH=$PREFIX/logs/error.log ;; + .stderr) + ERROR_LOG_PATH= + ;; + *) ERROR_LOG_PATH=$PREFIX/$ERROR_LOG_PATH ;; diff --git a/auto/os/conf b/auto/os/conf index 623ba3129..abffbe3d8 100644 --- a/auto/os/conf +++ b/auto/os/conf @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + if [ ".$PLATFORM" = "." ]; then echo "checking for OS" diff --git a/auto/os/freebsd b/auto/os/freebsd index 2d3353e1e..90cb49702 100644 --- a/auto/os/freebsd +++ b/auto/os/freebsd @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CORE_INCS="$UNIX_INCS" CORE_DEPS="$UNIX_DEPS $FREEBSD_DEPS" CORE_SRCS="$UNIX_SRCS $FREEBSD_SRCS" @@ -62,18 +65,18 @@ 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=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 +# # kqueue's EVFILT_SIGNAL is safe +# +# if [ $version -gt 460101 ]; then +# echo " + kqueue's EVFILT_SIGNAL is safe" +# have=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 diff --git a/auto/os/linux b/auto/os/linux index c34fba1ac..8576ea680 100644 --- a/auto/os/linux +++ b/auto/os/linux @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CORE_INCS="$UNIX_INCS" CORE_DEPS="$UNIX_DEPS $LINUX_DEPS" CORE_SRCS="$UNIX_SRCS $LINUX_SRCS" @@ -15,7 +18,7 @@ version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \ | sed -e 's/^.* \(.*\)$/\1/'` -# enable rt signals on Linux 2.2.19 and onward +# enable the rt signals on Linux 2.2.19 and onward if [ $version -ge 131609 -o $EVENT_RTSIG = YES ]; then echo " + using rt signals" diff --git a/auto/os/solaris b/auto/os/solaris index bd6559a9f..6a4bd22b8 100644 --- a/auto/os/solaris +++ b/auto/os/solaris @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CORE_INCS="$UNIX_INCS" CORE_DEPS="$UNIX_DEPS $SOLARIS_DEPS" CORE_SRCS="$UNIX_SRCS $SOLARIS_SRCS " diff --git a/auto/sources b/auto/sources index 3cd02b151..40fbad223 100644 --- a/auto/sources +++ b/auto/sources @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CORE_MODULES="ngx_core_module ngx_errlog_module ngx_conf_module" CORE_INCS="src/core" diff --git a/auto/summary b/auto/summary index 4d37e8725..381754b50 100644 --- a/auto/summary +++ b/auto/summary @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo echo "Configuration summary" @@ -69,6 +72,10 @@ echo " nginx path prefix: $PREFIX" echo " nginx binary file: $SBIN_PATH" echo " nginx configuration file: $CONF_PATH" echo " nginx pid file: $PID_PATH" -echo " nginx error log file: $ERROR_LOG_PATH" +if [ ".$ERROR_LOG_PATH" != "." ]; then + echo " nginx error log file: $ERROR_LOG_PATH" +else + echo " nginx logs errors to stderr" +fi echo " nginx http access log file: $HTTP_LOG_PATH" echo diff --git a/auto/threads b/auto/threads index 301dacfe0..9aaea5158 100644 --- a/auto/threads +++ b/auto/threads @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + case $USE_THREADS in rfork) have=NGX_THREADS . auto/have diff --git a/auto/types/sizeof b/auto/types/sizeof index 102f343bc..ac22e759d 100644 --- a/auto/types/sizeof +++ b/auto/types/sizeof @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_type size ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_type size" >> $NGX_ERR diff --git a/auto/types/typedef b/auto/types/typedef index 2bf67cff2..9762f4812 100644 --- a/auto/types/typedef +++ b/auto/types/typedef @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for $ngx_type ..." $ngx_c echo >> $NGX_ERR echo "checking for $ngx_type" >> $NGX_ERR diff --git a/auto/types/uintptr_t b/auto/types/uintptr_t index cd2df8da5..a1bb78a89 100644 --- a/auto/types/uintptr_t +++ b/auto/types/uintptr_t @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + echo $ngx_n "checking for uintptr_t ... " $ngx_c echo >> $NGX_ERR echo "checking for uintptr_t" >> $NGX_ERR diff --git a/auto/types/value b/auto/types/value index c08012ce2..d823ab323 100644 --- a/auto/types/value +++ b/auto/types/value @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + cat << END >> $NGX_AUTO_CONFIG_H #ifndef $ngx_param @@ -1,4 +1,7 @@ +# Copyright (C) Igor Sysoev + + CC_WARN=$CC ngx_fmt_collect=yes |