| @@ -3979,564 +3979,202 @@ case `${MAKE-make} -f conftest.make 2>/d | | | @@ -3979,564 +3979,202 @@ case `${MAKE-make} -f conftest.make 2>/d |
3979 | esac | | 3979 | esac |
3980 | rm -f conftest.make | | 3980 | rm -f conftest.make |
3981 | fi | | 3981 | fi |
3982 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | | 3982 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then |
3983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | | 3983 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
3984 | $as_echo "yes" >&6; } | | 3984 | $as_echo "yes" >&6; } |
3985 | SET_MAKE= | | 3985 | SET_MAKE= |
3986 | else | | 3986 | else |
3987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | 3987 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
3988 | $as_echo "no" >&6; } | | 3988 | $as_echo "no" >&6; } |
3989 | SET_MAKE="MAKE=${MAKE-make}" | | 3989 | SET_MAKE="MAKE=${MAKE-make}" |
3990 | fi | | 3990 | fi |
3991 | | | 3991 | |
3992 | ac_ext=c | | 3992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 |
3993 | ac_cpp='$CPP $CPPFLAGS' | | 3993 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } |
3994 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | | 3994 | if ${ac_cv_prog_cc_c99+:} false; then : |
3995 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | | | |
3996 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | | | |
3997 | if test -n "$ac_tool_prefix"; then | | | |
3998 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | | | |
3999 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | | | |
4000 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4001 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4002 | if ${ac_cv_prog_CC+:} false; then : | | | |
4003 | $as_echo_n "(cached) " >&6 | | | |
4004 | else | | | |
4005 | if test -n "$CC"; then | | | |
4006 | ac_cv_prog_CC="$CC" # Let the user override the test. | | | |
4007 | else | | | |
4008 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4009 | for as_dir in $PATH | | | |
4010 | do | | | |
4011 | IFS=$as_save_IFS | | | |
4012 | test -z "$as_dir" && as_dir=. | | | |
4013 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4014 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4015 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | | | |
4016 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4017 | break 2 | | | |
4018 | fi | | | |
4019 | done | | | |
4020 | done | | | |
4021 | IFS=$as_save_IFS | | | |
4022 | | | | |
4023 | fi | | | |
4024 | fi | | | |
4025 | CC=$ac_cv_prog_CC | | | |
4026 | if test -n "$CC"; then | | | |
4027 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | | | |
4028 | $as_echo "$CC" >&6; } | | | |
4029 | else | | | |
4030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4031 | $as_echo "no" >&6; } | | | |
4032 | fi | | | |
4033 | | | | |
4034 | | | | |
4035 | fi | | | |
4036 | if test -z "$ac_cv_prog_CC"; then | | | |
4037 | ac_ct_CC=$CC | | | |
4038 | # Extract the first word of "gcc", so it can be a program name with args. | | | |
4039 | set dummy gcc; ac_word=$2 | | | |
4040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4041 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4042 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | | | |
4043 | $as_echo_n "(cached) " >&6 | | | |
4044 | else | | | |
4045 | if test -n "$ac_ct_CC"; then | | | |
4046 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | | | |
4047 | else | | | |
4048 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4049 | for as_dir in $PATH | | | |
4050 | do | | | |
4051 | IFS=$as_save_IFS | | | |
4052 | test -z "$as_dir" && as_dir=. | | | |
4053 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4054 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4055 | ac_cv_prog_ac_ct_CC="gcc" | | | |
4056 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4057 | break 2 | | | |
4058 | fi | | | |
4059 | done | | | |
4060 | done | | | |
4061 | IFS=$as_save_IFS | | | |
4062 | | | | |
4063 | fi | | | |
4064 | fi | | | |
4065 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | | | |
4066 | if test -n "$ac_ct_CC"; then | | | |
4067 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | | | |
4068 | $as_echo "$ac_ct_CC" >&6; } | | | |
4069 | else | | | |
4070 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4071 | $as_echo "no" >&6; } | | | |
4072 | fi | | | |
4073 | | | | |
4074 | if test "x$ac_ct_CC" = x; then | | | |
4075 | CC="" | | | |
4076 | else | | | |
4077 | case $cross_compiling:$ac_tool_warned in | | | |
4078 | yes:) | | | |
4079 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | | | |
4080 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | | | |
4081 | ac_tool_warned=yes ;; | | | |
4082 | esac | | | |
4083 | CC=$ac_ct_CC | | | |
4084 | fi | | | |
4085 | else | | | |
4086 | CC="$ac_cv_prog_CC" | | | |
4087 | fi | | | |
4088 | | | | |
4089 | if test -z "$CC"; then | | | |
4090 | if test -n "$ac_tool_prefix"; then | | | |
4091 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | | | |
4092 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | | | |
4093 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4094 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4095 | if ${ac_cv_prog_CC+:} false; then : | | | |
4096 | $as_echo_n "(cached) " >&6 | | | |
4097 | else | | | |
4098 | if test -n "$CC"; then | | | |
4099 | ac_cv_prog_CC="$CC" # Let the user override the test. | | | |
4100 | else | | | |
4101 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4102 | for as_dir in $PATH | | | |
4103 | do | | | |
4104 | IFS=$as_save_IFS | | | |
4105 | test -z "$as_dir" && as_dir=. | | | |
4106 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4107 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4108 | ac_cv_prog_CC="${ac_tool_prefix}cc" | | | |
4109 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4110 | break 2 | | | |
4111 | fi | | | |
4112 | done | | | |
4113 | done | | | |
4114 | IFS=$as_save_IFS | | | |
4115 | | | | |
4116 | fi | | | |
4117 | fi | | | |
4118 | CC=$ac_cv_prog_CC | | | |
4119 | if test -n "$CC"; then | | | |
4120 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | | | |
4121 | $as_echo "$CC" >&6; } | | | |
4122 | else | | | |
4123 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4124 | $as_echo "no" >&6; } | | | |
4125 | fi | | | |
4126 | | | | |
4127 | | | | |
4128 | fi | | | |
4129 | fi | | | |
4130 | if test -z "$CC"; then | | | |
4131 | # Extract the first word of "cc", so it can be a program name with args. | | | |
4132 | set dummy cc; ac_word=$2 | | | |
4133 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4134 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4135 | if ${ac_cv_prog_CC+:} false; then : | | | |
4136 | $as_echo_n "(cached) " >&6 | | 3995 | $as_echo_n "(cached) " >&6 |
4137 | else | | 3996 | else |
4138 | if test -n "$CC"; then | | 3997 | ac_cv_prog_cc_c99=no |
4139 | ac_cv_prog_CC="$CC" # Let the user override the test. | | 3998 | ac_save_CC=$CC |
4140 | else | | 3999 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
4141 | ac_prog_rejected=no | | | |
4142 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4143 | for as_dir in $PATH | | | |
4144 | do | | | |
4145 | IFS=$as_save_IFS | | | |
4146 | test -z "$as_dir" && as_dir=. | | | |
4147 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4148 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4149 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | | | |
4150 | ac_prog_rejected=yes | | | |
4151 | continue | | | |
4152 | fi | | | |
4153 | ac_cv_prog_CC="cc" | | | |
4154 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4155 | break 2 | | | |
4156 | fi | | | |
4157 | done | | | |
4158 | done | | | |
4159 | IFS=$as_save_IFS | | | |
4160 | | | | |
4161 | if test $ac_prog_rejected = yes; then | | | |
4162 | # We found a bogon in the path, so make sure we never use it. | | | |
4163 | set dummy $ac_cv_prog_CC | | | |
4164 | shift | | | |
4165 | if test $# != 0; then | | | |
4166 | # We chose a different compiler from the bogus one. | | | |
4167 | # However, it has the same basename, so the bogon will be chosen | | | |
4168 | # first if we set CC to just the basename; use the full file name. | | | |
4169 | shift | | | |
4170 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" | | | |
4171 | fi | | | |
4172 | fi | | | |
4173 | fi | | | |
4174 | fi | | | |
4175 | CC=$ac_cv_prog_CC | | | |
4176 | if test -n "$CC"; then | | | |
4177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | | | |
4178 | $as_echo "$CC" >&6; } | | | |
4179 | else | | | |
4180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4181 | $as_echo "no" >&6; } | | | |
4182 | fi | | | |
4183 | | | | |
4184 | | | | |
4185 | fi | | | |
4186 | if test -z "$CC"; then | | | |
4187 | if test -n "$ac_tool_prefix"; then | | | |
4188 | for ac_prog in cl.exe | | | |
4189 | do | | | |
4190 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | | | |
4191 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | | | |
4192 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4193 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4194 | if ${ac_cv_prog_CC+:} false; then : | | | |
4195 | $as_echo_n "(cached) " >&6 | | | |
4196 | else | | | |
4197 | if test -n "$CC"; then | | | |
4198 | ac_cv_prog_CC="$CC" # Let the user override the test. | | | |
4199 | else | | | |
4200 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4201 | for as_dir in $PATH | | | |
4202 | do | | | |
4203 | IFS=$as_save_IFS | | | |
4204 | test -z "$as_dir" && as_dir=. | | | |
4205 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4206 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4207 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | | | |
4208 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4209 | break 2 | | | |
4210 | fi | | | |
4211 | done | | | |
4212 | done | | | |
4213 | IFS=$as_save_IFS | | | |
4214 | | | | |
4215 | fi | | | |
4216 | fi | | | |
4217 | CC=$ac_cv_prog_CC | | | |
4218 | if test -n "$CC"; then | | | |
4219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | | | |
4220 | $as_echo "$CC" >&6; } | | | |
4221 | else | | | |
4222 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4223 | $as_echo "no" >&6; } | | | |
4224 | fi | | | |
4225 | | | | |
4226 | | | | |
4227 | test -n "$CC" && break | | | |
4228 | done | | | |
4229 | fi | | | |
4230 | if test -z "$CC"; then | | | |
4231 | ac_ct_CC=$CC | | | |
4232 | for ac_prog in cl.exe | | | |
4233 | do | | | |
4234 | # Extract the first word of "$ac_prog", so it can be a program name with args. | | | |
4235 | set dummy $ac_prog; ac_word=$2 | | | |
4236 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | | | |
4237 | $as_echo_n "checking for $ac_word... " >&6; } | | | |
4238 | if ${ac_cv_prog_ac_ct_CC+:} false; then : | | | |
4239 | $as_echo_n "(cached) " >&6 | | | |
4240 | else | | | |
4241 | if test -n "$ac_ct_CC"; then | | | |
4242 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | | | |
4243 | else | | | |
4244 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | | | |
4245 | for as_dir in $PATH | | | |
4246 | do | | | |
4247 | IFS=$as_save_IFS | | | |
4248 | test -z "$as_dir" && as_dir=. | | | |
4249 | for ac_exec_ext in '' $ac_executable_extensions; do | | | |
4250 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | | | |
4251 | ac_cv_prog_ac_ct_CC="$ac_prog" | | | |
4252 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | | | |
4253 | break 2 | | | |
4254 | fi | | | |
4255 | done | | | |
4256 | done | | | |
4257 | IFS=$as_save_IFS | | | |
4258 | | | | |
4259 | fi | | | |
4260 | fi | | | |
4261 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | | | |
4262 | if test -n "$ac_ct_CC"; then | | | |
4263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | | | |
4264 | $as_echo "$ac_ct_CC" >&6; } | | | |
4265 | else | | | |
4266 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | | | |
4267 | $as_echo "no" >&6; } | | | |
4268 | fi | | | |
4269 | | | | |
4270 | | | | |
4271 | test -n "$ac_ct_CC" && break | | | |
4272 | done | | | |
4273 | | | | |
4274 | if test "x$ac_ct_CC" = x; then | | | |
4275 | CC="" | | | |
4276 | else | | | |
4277 | case $cross_compiling:$ac_tool_warned in | | | |
4278 | yes:) | | | |
4279 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | | | |
4280 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | | | |
4281 | ac_tool_warned=yes ;; | | | |
4282 | esac | | | |
4283 | CC=$ac_ct_CC | | | |
4284 | fi | | | |
4285 | fi | | | |
4286 | | | | |
4287 | fi | | | |
4288 | | | | |
4289 | | | | |
4290 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 | | | |
4291 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} | | | |
4292 | as_fn_error $? "no acceptable C compiler found in \$PATH | | | |
4293 | See \`config.log' for more details" "$LINENO" 5; } | | | |
4294 | | | | |
4295 | # Provide some information about the compiler. | | | |
4296 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | | | |
4297 | set X $ac_compile | | | |
4298 | ac_compiler=$2 | | | |
4299 | for ac_option in --version -v -V -qversion; do | | | |
4300 | { { ac_try="$ac_compiler $ac_option >&5" | | | |
4301 | case "(($ac_try" in | | | |
4302 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | | | |
4303 | *) ac_try_echo=$ac_try;; | | | |
4304 | esac | | | |
4305 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | | | |
4306 | $as_echo "$ac_try_echo"; } >&5 | | | |
4307 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | | | |
4308 | ac_status=$? | | | |
4309 | if test -s conftest.err; then | | | |
4310 | sed '10a\ | | | |
4311 | ... rest of stderr output deleted ... | | | |
4312 | 10q' conftest.err >conftest.er1 | | | |
4313 | cat conftest.er1 >&5 | | | |
4314 | fi | | | |
4315 | rm -f conftest.er1 conftest.err | | | |
4316 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | | | |
4317 | test $ac_status = 0; } | | | |
4318 | done | | | |
4319 | | | | |
4320 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 | | | |
4321 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } | | | |
4322 | if ${ac_cv_c_compiler_gnu+:} false; then : | | | |
4323 | $as_echo_n "(cached) " >&6 | | | |
4324 | else | | | |
4325 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | | |
4326 | /* end confdefs.h. */ | | 4000 | /* end confdefs.h. */ |
| | | 4001 | #include <stdarg.h> |
| | | 4002 | #include <stdbool.h> |
| | | 4003 | #include <stdlib.h> |
| | | 4004 | #include <wchar.h> |
| | | 4005 | #include <stdio.h> |
4327 | | | 4006 | |
4328 | int | | 4007 | // Check varargs macros. These examples are taken from C99 6.10.3.5. |
4329 | main () | | 4008 | #define debug(...) fprintf (stderr, __VA_ARGS__) |
| | | 4009 | #define showlist(...) puts (#__VA_ARGS__) |
| | | 4010 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) |
| | | 4011 | static void |
| | | 4012 | test_varargs_macros (void) |
4330 | { | | 4013 | { |
4331 | #ifndef __GNUC__ | | 4014 | int x = 1234; |
4332 | choke me | | 4015 | int y = 5678; |
| | | 4016 | debug ("Flag"); |
| | | 4017 | debug ("X = %d\n", x); |
| | | 4018 | showlist (The first, second, and third items.); |
| | | 4019 | report (x>y, "x is %d but y is %d", x, y); |
| | | 4020 | } |
| | | 4021 | |
| | | 4022 | // Check long long types. |
| | | 4023 | #define BIG64 18446744073709551615ull |
| | | 4024 | #define BIG32 4294967295ul |
| | | 4025 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) |
| | | 4026 | #if !BIG_OK |
| | | 4027 | your preprocessor is broken; |
4333 | #endif | | 4028 | #endif |
| | | 4029 | #if BIG_OK |
| | | 4030 | #else |
| | | 4031 | your preprocessor is broken; |
| | | 4032 | #endif |
| | | 4033 | static long long int bignum = -9223372036854775807LL; |
| | | 4034 | static unsigned long long int ubignum = BIG64; |
4334 | | | 4035 | |
4335 | ; | | 4036 | struct incomplete_array |
| | | 4037 | { |
| | | 4038 | int datasize; |
| | | 4039 | double data[]; |
| | | 4040 | }; |
| | | 4041 | |
| | | 4042 | struct named_init { |
| | | 4043 | int number; |
| | | 4044 | const wchar_t *name; |
| | | 4045 | double average; |
| | | 4046 | }; |
| | | 4047 | |
| | | 4048 | typedef const char *ccp; |
| | | 4049 | |
| | | 4050 | static inline int |
| | | 4051 | test_restrict (ccp restrict text) |
| | | 4052 | { |
| | | 4053 | // See if C++-style comments work. |
| | | 4054 | // Iterate through items via the restricted pointer. |
| | | 4055 | // Also check for declarations in for loops. |
| | | 4056 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) |
| | | 4057 | continue; |
4336 | return 0; | | 4058 | return 0; |
4337 | } | | 4059 | } |
4338 | _ACEOF | | | |
4339 | if ac_fn_c_try_compile "$LINENO"; then : | | | |
4340 | ac_compiler_gnu=yes | | | |
4341 | else | | | |
4342 | ac_compiler_gnu=no | | | |
4343 | fi | | | |
4344 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | | | |
4345 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | | | |
4346 | | | | |
4347 | fi | | | |
4348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | | | |
4349 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } | | | |
4350 | if test $ac_compiler_gnu = yes; then | | | |
4351 | GCC=yes | | | |
4352 | else | | | |
4353 | GCC= | | | |
4354 | fi | | | |
4355 | ac_test_CFLAGS=${CFLAGS+set} | | | |
4356 | ac_save_CFLAGS=$CFLAGS | | | |
4357 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | | | |
4358 | $as_echo_n "checking whether $CC accepts -g... " >&6; } | | | |
4359 | if ${ac_cv_prog_cc_g+:} false; then : | | | |
4360 | $as_echo_n "(cached) " >&6 | | | |
4361 | else | | | |
4362 | ac_save_c_werror_flag=$ac_c_werror_flag | | | |
4363 | ac_c_werror_flag=yes | | | |
4364 | ac_cv_prog_cc_g=no | | | |
4365 | CFLAGS="-g" | | | |
4366 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | | |
4367 | /* end confdefs.h. */ | | | |
4368 | | | 4060 | |
4369 | int | | 4061 | // Check varargs and va_copy. |
4370 | main () | | 4062 | static void |
| | | 4063 | test_varargs (const char *format, ...) |
4371 | { | | 4064 | { |
| | | 4065 | va_list args; |
| | | 4066 | va_start (args, format); |
| | | 4067 | va_list args_copy; |
| | | 4068 | va_copy (args_copy, args); |
| | | 4069 | |
| | | 4070 | const char *str; |
| | | 4071 | int number; |
| | | 4072 | float fnumber; |
4372 | | | 4073 | |
4373 | ; | | 4074 | while (*format) |
4374 | return 0; | | 4075 | { |
| | | 4076 | switch (*format++) |
| | | 4077 | { |
| | | 4078 | case 's': // string |
| | | 4079 | str = va_arg (args_copy, const char *); |
| | | 4080 | break; |
| | | 4081 | case 'd': // int |
| | | 4082 | number = va_arg (args_copy, int); |
| | | 4083 | break; |
| | | 4084 | case 'f': // float |
| | | 4085 | fnumber = va_arg (args_copy, double); |
| | | 4086 | break; |
| | | 4087 | default: |
| | | 4088 | break; |
| | | 4089 | } |
| | | 4090 | } |
| | | 4091 | va_end (args_copy); |
| | | 4092 | va_end (args); |
4375 | } | | 4093 | } |
4376 | _ACEOF | | | |
4377 | if ac_fn_c_try_compile "$LINENO"; then : | | | |
4378 | ac_cv_prog_cc_g=yes | | | |
4379 | else | | | |
4380 | CFLAGS="" | | | |
4381 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | | |
4382 | /* end confdefs.h. */ | | | |
4383 | | | 4094 | |
4384 | int | | 4095 | int |
4385 | main () | | 4096 | main () |
4386 | { | | 4097 | { |
4387 | | | 4098 | |
4388 | ; | | 4099 | // Check bool. |
4389 | return 0; | | 4100 | _Bool success = false; |
4390 | } | | | |
4391 | _ACEOF | | | |
4392 | if ac_fn_c_try_compile "$LINENO"; then : | | | |
4393 | | | | |
4394 | else | | | |
4395 | ac_c_werror_flag=$ac_save_c_werror_flag | | | |
4396 | CFLAGS="-g" | | | |
4397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | | |
4398 | /* end confdefs.h. */ | | | |
4399 | | | 4101 | |
4400 | int | | 4102 | // Check restrict. |
4401 | main () | | 4103 | if (test_restrict ("String literal") == 0) |
4402 | { | | 4104 | success = true; |
| | | 4105 | char *restrict newvar = "Another string"; |
| | | 4106 | |
| | | 4107 | // Check varargs. |
| | | 4108 | test_varargs ("s, d' f .", "string", 65, 34.234); |
| | | 4109 | test_varargs_macros (); |
| | | 4110 | |
| | | 4111 | // Check flexible array members. |
| | | 4112 | struct incomplete_array *ia = |
| | | 4113 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); |
| | | 4114 | ia->datasize = 10; |
| | | 4115 | for (int i = 0; i < ia->datasize; ++i) |
| | | 4116 | ia->data[i] = i * 1.234; |
| | | 4117 | |
| | | 4118 | // Check named initializers. |
| | | 4119 | struct named_init ni = { |
| | | 4120 | .number = 34, |
| | | 4121 | .name = L"Test wide string", |
| | | 4122 | .average = 543.34343, |
| | | 4123 | }; |
| | | 4124 | |
| | | 4125 | ni.number = 58; |
| | | 4126 | |
| | | 4127 | int dynamic_array[ni.number]; |
| | | 4128 | dynamic_array[ni.number - 1] = 543; |
| | | 4129 | |
| | | 4130 | // work around unused variable warnings |
| | | 4131 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' |
| | | 4132 | || dynamic_array[ni.number - 1] != 543); |
4403 | | | 4133 | |
4404 | ; | | 4134 | ; |
4405 | return 0; | | 4135 | return 0; |
4406 | } | | 4136 | } |
4407 | _ACEOF | | 4137 | _ACEOF |
4408 | if ac_fn_c_try_compile "$LINENO"; then : | | 4138 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 |
4409 | ac_cv_prog_cc_g=yes | | | |
4410 | fi | | | |
4411 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | | | |
4412 | fi | | | |
4413 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | | | |
4414 | fi | | | |
4415 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext | | | |
4416 | ac_c_werror_flag=$ac_save_c_werror_flag | | | |
4417 | fi | | | |
4418 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | | | |
4419 | $as_echo "$ac_cv_prog_cc_g" >&6; } | | | |
4420 | if test "$ac_test_CFLAGS" = set; then | | | |
4421 | CFLAGS=$ac_save_CFLAGS | | | |
4422 | elif test $ac_cv_prog_cc_g = yes; then | | | |
4423 | if test "$GCC" = yes; then | | | |
4424 | CFLAGS="-g -O2" | | | |
4425 | else | | | |
4426 | CFLAGS="-g" | | | |
4427 | fi | | | |
4428 | else | | | |
4429 | if test "$GCC" = yes; then | | | |
4430 | CFLAGS="-O2" | | | |
4431 | else | | | |
4432 | CFLAGS= | | | |
4433 | fi | | | |
4434 | fi | | | |
4435 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 | | | |
4436 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } | | | |
4437 | if ${ac_cv_prog_cc_c89+:} false; then : | | | |
4438 | $as_echo_n "(cached) " >&6 | | | |
4439 | else | | | |
4440 | ac_cv_prog_cc_c89=no | | | |
4441 | ac_save_CC=$CC | | | |
4442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | | | |
4443 | /* end confdefs.h. */ | | | |
4444 | #include <stdarg.h> | | | |
4445 | #include <stdio.h> | | | |
4446 | struct stat; | | | |
4447 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ | | | |
4448 | struct buf { int x; }; | | | |
4449 | FILE * (*rcsopen) (struct buf *, struct stat *, int); | | | |
4450 | static char *e (p, i) | | | |
4451 | char **p; | | | |
4452 | int i; | | | |
4453 | { | | | |
4454 | return p[i]; | | | |
4455 | } | | | |
4456 | static char *f (char * (*g) (char **, int), char **p, ...) | | | |
4457 | { | | | |
4458 | char *s; | | | |
4459 | va_list v; | | | |
4460 | va_start (v,p); | | | |
4461 | s = g (p, va_arg (v,int)); | | | |
4462 | va_end (v); | | | |
4463 | return s; | | | |
4464 | } | | | |
4465 | | | | |
4466 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | | | |
4467 | function prototypes and stuff, but not '\xHH' hex character constants. | | | |
4468 | These don't provoke an error unfortunately, instead are silently treated | | | |
4469 | as 'x'. The following induces an error, until -std is added to get | | | |
4470 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an | | | |
4471 | array size at least. It's necessary to write '\x00'==0 to get something | | | |
4472 | that's true only with -std. */ | | | |
4473 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; | | | |
4474 | | | | |
4475 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | | | |
4476 | inside strings and character constants. */ | | | |
4477 | #define FOO(x) 'x' | | | |
4478 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; | | | |
4479 | | | | |
4480 | int test (int i, double x); | | | |
4481 | struct s1 {int (*f) (int a);}; | | | |
4482 | struct s2 {int (*f) (double a);}; | | | |
4483 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); | | | |
4484 | int argc; | | | |
4485 | char **argv; | | | |
4486 | int | | | |
4487 | main () | | | |
4488 | { | | | |
4489 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; | | | |
4490 | ; | | | |
4491 | return 0; | | | |
4492 | } | | | |
4493 | _ACEOF | | | |
4494 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ | | | |
4495 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | | | |
4496 | do | | 4139 | do |
4497 | CC="$ac_save_CC $ac_arg" | | 4140 | CC="$ac_save_CC $ac_arg" |
4498 | if ac_fn_c_try_compile "$LINENO"; then : | | 4141 | if ac_fn_c_try_compile "$LINENO"; then : |
4499 | ac_cv_prog_cc_c89=$ac_arg | | 4142 | ac_cv_prog_cc_c99=$ac_arg |
4500 | fi | | 4143 | fi |
4501 | rm -f core conftest.err conftest.$ac_objext | | 4144 | rm -f core conftest.err conftest.$ac_objext |
4502 | test "x$ac_cv_prog_cc_c89" != "xno" && break | | 4145 | test "x$ac_cv_prog_cc_c99" != "xno" && break |
4503 | done | | 4146 | done |
4504 | rm -f conftest.$ac_ext | | 4147 | rm -f conftest.$ac_ext |
4505 | CC=$ac_save_CC | | 4148 | CC=$ac_save_CC |
4506 | | | 4149 | |
4507 | fi | | 4150 | fi |
4508 | # AC_CACHE_VAL | | 4151 | # AC_CACHE_VAL |
4509 | case "x$ac_cv_prog_cc_c89" in | | 4152 | case "x$ac_cv_prog_cc_c99" in |
4510 | x) | | 4153 | x) |
4511 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | | 4154 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
4512 | $as_echo "none needed" >&6; } ;; | | 4155 | $as_echo "none needed" >&6; } ;; |
4513 | xno) | | 4156 | xno) |
4514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | | 4157 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
4515 | $as_echo "unsupported" >&6; } ;; | | 4158 | $as_echo "unsupported" >&6; } ;; |
4516 | *) | | 4159 | *) |
4517 | CC="$CC $ac_cv_prog_cc_c89" | | 4160 | CC="$CC $ac_cv_prog_cc_c99" |
4518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | | 4161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 |
4519 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; | | 4162 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; |
4520 | esac | | 4163 | esac |
4521 | if test "x$ac_cv_prog_cc_c89" != xno; then : | | 4164 | if test "x$ac_cv_prog_cc_c99" != xno; then : |
4522 | | | 4165 | |
4523 | fi | | 4166 | fi |
4524 | | | 4167 | |
4525 | ac_ext=c | | | |
4526 | ac_cpp='$CPP $CPPFLAGS' | | | |
4527 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | | | |
4528 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | | | |
4529 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | | | |
4530 | | | 4168 | |
4531 | # Find a good install program. We prefer a C program (faster), | | 4169 | # Find a good install program. We prefer a C program (faster), |
4532 | # so one script is as good as another. But avoid the broken or | | 4170 | # so one script is as good as another. But avoid the broken or |
4533 | # incompatible versions: | | 4171 | # incompatible versions: |
4534 | # SysV /etc/install, /usr/sbin/install | | 4172 | # SysV /etc/install, /usr/sbin/install |
4535 | # SunOS /usr/etc/install | | 4173 | # SunOS /usr/etc/install |
4536 | # IRIX /sbin/install | | 4174 | # IRIX /sbin/install |
4537 | # AIX /bin/install | | 4175 | # AIX /bin/install |
4538 | # AmigaOS /C/install, which installs bootblocks on floppy discs | | 4176 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
4539 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | | 4177 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
4540 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | | 4178 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
4541 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | | 4179 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
4542 | # OS/2's system install, which has a completely different semantic | | 4180 | # OS/2's system install, which has a completely different semantic |