diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 15:34:38 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2004-10-21 15:34:38 +0000 |
| commit | c0edbcce58b03b89c70f1eb39cb44c74c4c7453a (patch) | |
| tree | 1ce72a5b51d724a0c054e079c2b1507ca85a145d /auto/cc | |
| parent | ac64333a44f39d5a658832517a106961f32f6aae (diff) | |
| download | nginx-release-0.1.2.tar.gz nginx-release-0.1.2.tar.bz2 | |
nginx-0.1.2-RELEASE importrelease-0.1.2
*) Feature: the --user=USER, --group=GROUP, and --with-ld-opt=OPTIONS
options in configure.
*) Feature: the server_name directive supports *.domain.tld.
*) Bugfix: the portability improvements.
*) Bugfix: if configuration file was set in command line, the
reconfiguration was impossible; the bug had appeared in 0.1.1.
*) Bugfix: proxy module may get caught in an endless loop when sendfile
is not used.
*) Bugfix: with sendfile the response was not recoded according to the
charset module directives; the bug had appeared in 0.1.1.
*) Bugfix: very seldom bug in the kqueue processing.
*) Bugfix: the gzip module compressed the proxied responses that was
already compressed.
Diffstat (limited to 'auto/cc')
| -rw-r--r-- | auto/cc/bcc | 48 | ||||
| -rw-r--r-- | auto/cc/conf | 119 | ||||
| -rw-r--r-- | auto/cc/gcc | 109 | ||||
| -rw-r--r-- | auto/cc/icc | 69 | ||||
| -rw-r--r-- | auto/cc/msvc | 81 | ||||
| -rw-r--r-- | auto/cc/name | 51 | ||||
| -rw-r--r-- | auto/cc/owc | 82 |
7 files changed, 559 insertions, 0 deletions
diff --git a/auto/cc/bcc b/auto/cc/bcc new file mode 100644 index 000000000..5765c4713 --- /dev/null +++ b/auto/cc/bcc @@ -0,0 +1,48 @@ + +# Copyright (C) Igor Sysoev + + +# 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 + +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 $OBJS/ngx_config.csm" +NGX_PCH="$OBJS/ngx_config.csm" +NGX_BUILD_PCH="-H=$OBJS/ngx_config.csm" +NGX_USE_PCH="-Hu -H=$OBJS/ngx_config.csm" + +LINK="\$(CC)" + +ngx_include_opt="-I" +ngx_objout="-o" +ngx_binout="-e" +ngx_objext="obj" +ngx_binext=".exe" +ngx_dirsep='\\' diff --git a/auto/cc/conf b/auto/cc/conf new file mode 100644 index 000000000..77eeda79e --- /dev/null +++ b/auto/cc/conf @@ -0,0 +1,119 @@ + +# Copyright (C) Igor Sysoev + + +ngx_include_opt="-I " +ngx_compile_opt="-c" +ngx_objout="-o " +ngx_binout="-o " +ngx_objext="o" +ngx_binext= + +ngx_regex_dirsep="\/" +ngx_dirsep='/' + +ngx_regex_cont=' \\\ + ' +ngx_cont=' \ + ' +ngx_tab=' \ + ' +ngx_spacer= + +. 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" + ;; + + esac + +else + + case $NGX_CC_NAME in + gcc) + # gcc 2.7.2.3, 2.8.1, 2.95.4, + # 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4 + + . auto/cc/gcc + ;; + + icc) + # Intel C++ compiler 7.1, 8.0 + + . auto/cc/icc + ;; + +# 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 + + . 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=$NGX_CC_OPT + +fi + +CFLAGS="$CFLAGS $NGX_CC_OPT" + + +if [ "$PLATFORM" != win32 ]; then + + ngx_feature="gcc variadic macros" + ngx_feature_name=HAVE_GCC_VARIADIC_MACROS + ngx_feature_run=yes + ngx_feature_incs="#include <stdio.h> +#define var(dummy, args...) sprintf(args)" + 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="C99 variadic macros" + ngx_feature_name=HAVE_C99_VARIADIC_MACROS + ngx_feature_run=yes + ngx_feature_incs="#include <stdio.h> +#define var(dummy, ...) sprintf(__VA_ARGS__)" + 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 diff --git a/auto/cc/gcc b/auto/cc/gcc new file mode 100644 index 000000000..61f048b7b --- /dev/null +++ b/auto/cc/gcc @@ -0,0 +1,109 @@ + +# Copyright (C) Igor Sysoev + + +# gcc 2.7.2.3, 2.8.1, 2.95.4, +# 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4 + + +# 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_libs= +ngx_feature_test= +. auto/feature + +CC_TEST_FLAGS= + +if [ $ngx_found = yes ]; then + PIPE="-pipe" +fi + + +# optimizations + +#CFLAGS="$CFLAGS -O2 -fomit-frame-pointer" + +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="-march=pentiumpro" + ;; + + pentium4) + # optimize for Pentium 4, gcc 3.x + CPU_OPT="-march=pentium4" + ;; + + sparc64) + # build 64-bit UltraSparc binary + CPU_OPT="-m64" + CORE_LINK="$CORE_LINK -m64" + CC_AUX_FLAGS="$CC_AUX_FLAGS -m64" + ;; + +esac + + +# STUB for batch builds +if [ $CC = gcc27 ]; then CPU_OPT=; fi + + +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 + +CFLAGS="$CFLAGS -O -W" +CFLAGS="$CFLAGS -Wall -Wpointer-arith" +#CFLAGS="$CFLAGS -Wconversion" +#CFLAGS="$CFLAGS -Winline" + +# we have a lot of the unused function arguments +CFLAGS="$CFLAGS -Wno-unused" + +# 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 + +LINK="\$(CC)" + + +CC_STRONG="-Wall -Werror" diff --git a/auto/cc/icc b/auto/cc/icc new file mode 100644 index 000000000..94d5cddc5 --- /dev/null +++ b/auto/cc/icc @@ -0,0 +1,69 @@ + +# Copyright (C) Igor Sysoev + + +# Intel C++ compiler 7.1, 8.0 + +# optimizations + +CFLAGS="$CFLAGS -O" +# inline functions declared with __inline +#CFLAGS="$CFLAGS -Ob1" +# inline any function, at the compiler's discretion +CFLAGS="$CFLAGS -Ob2" + +# single-file IP optimizations +#IPO="-ip" +# multi-file IP optimizations +IPO="-ipo -ipo_obj" +CFLAGS="$CFLAGS $IPO" +CORE_LINK="$CORE_LINK $IPO" +CORE_LINK="$CORE_LINK -opt_report_file=$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 $IPO $CPU_OPT" +fi + +if [ ".$MD5_OPT" = "." ]; then + MD5_OPT="-O $IPO $CPU_OPT" +fi + +if [ ".$ZLIB_OPT" = "." ]; then + ZLIB_OPT="-O $IPO $CPU_OPT" +fi + + +# warnings + +CFLAGS="$CFLAGS -w1" +#CFLAGS="$CFLAGS -w2" + +# stop on warning +CFLAGS="$CFLAGS -Werror" + +# debug +CFLAGS="$CFLAGS -g" + +LINK="\$(CC)" + + +CC_STRONG="-w1 -Werror" diff --git a/auto/cc/msvc b/auto/cc/msvc new file mode 100644 index 000000000..d47d4b2a0 --- /dev/null +++ b/auto/cc/msvc @@ -0,0 +1,81 @@ + +# Copyright (C) Igor Sysoev + + +# MSVC 6.0 SP2 + +# optimizations + +# maximize speed +CFLAGS="$CFLAGS -O2" +# enable global optimization +CFLAGS="$CFLAGS -Og" +# enable intrinsic functions +CFLAGS="$CFLAGS -Oi" +# inline expansion +CFLAGS="$CFLAGS -Ob1" +# enable frame pointer omission +CFLAGS="$CFLAGS -Oy" +# disable stack checking calls +CFLAGS="$CFLAGS -Gs" + +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 + #CPU_OPT="-G7" + ;; +esac + +CFLAGS="$CFLAGS $CPU_OPT" + + +# warnings + +#CFLAGS="$CFLAGS -W3" +CFLAGS="$CFLAGS -W4" + +# stop on warning +CFLAGS="$CFLAGS -WX" + +# link with libcmt.lib, multithreaded +#LIBC="-MT" +# link with msvcrt.dll +LIBC="-MD" + +CFLAGS="$CFLAGS $LIBC" + +# disable logo +CFLAGS="$CFLAGS -nologo" + +LINK="\$(CC)" + +# link flags +CORE_LINK="$CORE_LINK -link -verbose:lib" + +# debug +CFLAGS="$CFLAGS -Yd" +CORE_LINK="$CORE_LINK -debug -debugtype:coff" + +# precompiled headers +CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch" +NGX_PCH="$OBJS/ngx_config.pch" +NGX_BUILD_PCH="-Ycngx_config.h -Fp$OBJS/ngx_config.pch" +NGX_USE_PCH="-Yungx_config.h -Fp$OBJS/ngx_config.pch" + +ngx_objout="-Fo" +ngx_binout="-Fe" +ngx_objext="obj" +ngx_binext=".exe" + +#ngx_regex_dirsep='\\' +#ngx_dirsep="\\" diff --git a/auto/cc/name b/auto/cc/name new file mode 100644 index 000000000..b9744799c --- /dev/null +++ b/auto/cc/name @@ -0,0 +1,51 @@ + +# Copyright (C) Igor Sysoev + + +echo $ngx_n "checking for C compiler ...$ngx_c" + + +if [ $CC = cl ]; then + NGX_CC_NAME=msvc + echo " using Microsoft Visual C compiler" + +else +if [ $CC = wcl386 ]; then + NGX_CC_NAME=owc + echo " using Open Watcom C compiler" + +else +if [ $CC = bcc32 ]; then + NGX_CC_NAME=bcc + echo " using Borland C++ compiler" + +else +if `$CC -v 2>&1 | grep '^gcc version' 2>&1 >/dev/null`; then + NGX_CC_NAME=gcc + echo " using GNU C compiler" + +else +if `$CC -V 2>&1 | grep '^Intel(R) C++ Compiler' 2>&1 >/dev/null`; then + NGX_CC_NAME=icc + echo " using Intel C++ compiler" + +else +if `$CC -V 2>&1 | grep '^Compaq C' 2>&1 >/dev/null`; then + NGX_CC_NAME=ccc + echo " using Compaq C compiler" + +else +if `$CC -V 2>&1 | grep '^aCC: ' 2>&1 >/dev/null`; then + NGX_CC_NAME=acc + echo " using HP aC++ compiler" + +else + echo " unknown" + +fi # acc +fi # ccc +fi # icc +fi # gcc +fi # bcc +fi # owc +fi # msvc diff --git a/auto/cc/owc b/auto/cc/owc new file mode 100644 index 000000000..0c8194dbb --- /dev/null +++ b/auto/cc/owc @@ -0,0 +1,82 @@ + +# Copyright (C) Igor Sysoev + + +# Open Watcom C 1.0, 1.2 + +# 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 + +#CFLAGS="$CFLAGS -w3" +CFLAGS="$CFLAGS -wx" + +# 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=HAVE_C99_VARIADIC_MACROS . auto/have + +# precompiled headers +CORE_DEPS="$CORE_DEPS $OBJS/ngx_config.pch" +NGX_PCH="$OBJS/ngx_config.pch" +NGX_BUILD_PCH="-fhq=$OBJS/ngx_config.pch" +NGX_USE_PCH="-fh=$OBJS/ngx_config.pch" + +LINK="\$(CC)" + +# link flags +CORE_LINK="$CORE_LINK -l=nt" + +ngx_include_opt="-i=" +ngx_objout="-fo" +ngx_binout="-fe=" +ngx_objext="obj" +ngx_binext=".exe" + +ngx_regex_dirsep='\\' +ngx_dirsep="\\" |
