2 # Copyright (C) Igor Sysoev
3 # Copyright (C) Nginx, Inc.
29 ngx_long_regex_cont=$ngx_regex_cont
30 ngx_long_cont=$ngx_cont
34 if test -n "$CFLAGS"; then
36 CC_TEST_FLAGS="$CFLAGS $NGX_CC_OPT"
48 case "$NGX_MACHINE" in
51 NGX_AUX=" src/os/unix/ngx_sunpro_x86.il"
55 NGX_AUX=" src/os/unix/ngx_sunpro_sparc64.il"
63 NGX_AUX=" src/os/unix/ngx_sunpro_amd64.il"
75 # gcc 2.7.2.3, 2.8.1, 2.95.4, egcs-1.1.2
76 # 3.0.4, 3.1.1, 3.2.3, 3.3.2, 3.3.3, 3.3.4, 3.4.0, 3.4.2
89 # Intel C++ compiler 7.1, 8.0, 8.1
95 # Sun C 5.7 Patch 117837-04 2005/05/11
107 # aCC: HP ANSI C++ B3910B A.03.55.02
113 # MSVC++ 6.0 SP2, MSVC++ Toolkit 2003
119 # Open Watcom C 1.0, 1.2
132 CC_TEST_FLAGS="$CC_TEST_FLAGS $NGX_CC_OPT"
136 CFLAGS="$CFLAGS $NGX_CC_OPT"
137 NGX_TEST_LD_OPT="$NGX_LD_OPT"
139 if [ "$NGX_PLATFORM" != win32 ]; then
141 if test -n "$NGX_LD_OPT"; then
142 ngx_feature=--with-ld-opt=\"$NGX_LD_OPT\"
151 if [ $ngx_found = no ]; then
152 echo $0: error: the invalid value in --with-ld-opt=\"$NGX_LD_OPT\"
159 ngx_feature="gcc builtin atomic operations"
160 ngx_feature_name=NGX_HAVE_GCC_ATOMIC
165 ngx_feature_test="long n = 0;
166 if (!__sync_bool_compare_and_swap(&n, 0, 1))
168 if (__sync_fetch_and_add(&n, 1) != 1)
172 __sync_synchronize();"
176 if [ "$NGX_CC_NAME" = "ccc" ]; then
177 echo "checking for C99 variadic macros ... disabled"
179 ngx_feature="C99 variadic macros"
180 ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS"
182 ngx_feature_incs="#include <stdio.h>
183 #define var(dummy, ...) sprintf(__VA_ARGS__)"
186 ngx_feature_test="char buf[30]; buf[0] = '0';
187 var(0, buf, \"%d\", 1);
188 if (buf[0] != '1') return 1"
193 ngx_feature="gcc variadic macros"
194 ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS"
196 ngx_feature_incs="#include <stdio.h>
197 #define var(dummy, args...) sprintf(args)"
200 ngx_feature_test="char buf[30]; buf[0] = '0';
201 var(0, buf, \"%d\", 1);
202 if (buf[0] != '1') return 1"
206 # ngx_feature="inline"
209 # ngx_feature_incs="int inline f(void) { return 1 }"
215 # if [ $ngx_found = yes ]; then