comparison configure @ 35910:a326bc4cec53

configure: Simplify some checks that set feature flags. The flags are now set globally, no need to set them in each test.
author diego
date Sun, 17 Mar 2013 22:47:48 +0000
parents bc57212092a8
children 9914889b8b68
comparison
equal deleted inserted replaced
35909:bc57212092a8 35910:a326bc4cec53
3277 3277
3278 3278
3279 for func in atanf cbrt cbrtf cosf expf exp2 exp2f isnan isinf llrint llrintf log2 log2f log10f lrint lrintf rint round roundf sinf trunc truncf; do 3279 for func in atanf cbrt cbrtf cosf expf exp2 exp2f isnan isinf llrint llrintf log2 log2f log10f lrint lrintf rint round roundf sinf trunc truncf; do
3280 echocheck $func 3280 echocheck $func
3281 eval _$func=no 3281 eval _$func=no
3282 statement_check math.h "${func}(2.0)" -D_ISOC99_SOURCE && eval _$func=yes 3282 statement_check math.h "${func}(2.0)" && eval _$func=yes
3283 if eval test "x\$_$func" = "xyes"; then 3283 if eval test "x\$_$func" = "xyes"; then
3284 eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\"" 3284 eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\""
3285 echores yes 3285 echores yes
3286 else 3286 else
3287 eval def_$func="\"#define HAVE_$(echo $func | toupper) 0\"" 3287 eval def_$func="\"#define HAVE_$(echo $func | toupper) 0\""
3291 3291
3292 3292
3293 for func in atan2f ldexpf powf; do 3293 for func in atan2f ldexpf powf; do
3294 echocheck $func 3294 echocheck $func
3295 eval _$func=no 3295 eval _$func=no
3296 statement_check math.h "${func}(1.0,1.0)" -D_ISOC99_SOURCE && eval _$func=yes 3296 statement_check math.h "${func}(1.0,1.0)" && eval _$func=yes
3297 if eval test "x\$_$func" = "xyes"; then 3297 if eval test "x\$_$func" = "xyes"; then
3298 eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\"" 3298 eval def_$func="\"#define HAVE_$(echo $func | toupper) 1\""
3299 echores yes 3299 echores yes
3300 else 3300 else
3301 eval def_$func="\"#define HAVE_$(echo $func | toupper) 0\"" 3301 eval def_$func="\"#define HAVE_$(echo $func | toupper) 0\""
3304 done 3304 done
3305 3305
3306 3306
3307 echocheck "mkstemp" 3307 echocheck "mkstemp"
3308 _mkstemp=no 3308 _mkstemp=no
3309 define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'mkstemp("")' && _mkstemp=yes 3309 statement_check stdlib.h 'mkstemp("")' && _mkstemp=yes
3310 if test "$_mkstemp" = yes ; then 3310 if test "$_mkstemp" = yes ; then
3311 def_mkstemp='#define HAVE_MKSTEMP 1' 3311 def_mkstemp='#define HAVE_MKSTEMP 1'
3312 else 3312 else
3313 def_mkstemp='#define HAVE_MKSTEMP 0' 3313 def_mkstemp='#define HAVE_MKSTEMP 0'
3314 fi 3314 fi
3676 3676
3677 3677
3678 echocheck "posix_memalign()" 3678 echocheck "posix_memalign()"
3679 posix_memalign=no 3679 posix_memalign=no
3680 def_posix_memalign='#define HAVE_POSIX_MEMALIGN 0' 3680 def_posix_memalign='#define HAVE_POSIX_MEMALIGN 0'
3681 define_statement_check "_XOPEN_SOURCE 600" "stdlib.h" 'posix_memalign(NULL, 0, 0)' && 3681 statement_check stdlib.h 'posix_memalign(NULL, 0, 0)' &&
3682 posix_memalign=yes && def_posix_memalign='#define HAVE_POSIX_MEMALIGN 1' 3682 posix_memalign=yes && def_posix_memalign='#define HAVE_POSIX_MEMALIGN 1'
3683 echores "$posix_memalign" 3683 echores "$posix_memalign"
3684 3684
3685 3685
3686 echocheck "alloca.h" 3686 echocheck "alloca.h"
4101 4101
4102 4102
4103 echocheck "vsscanf()" 4103 echocheck "vsscanf()"
4104 vsscanf=yes 4104 vsscanf=yes
4105 def_vsscanf='#define HAVE_VSSCANF 1' 4105 def_vsscanf='#define HAVE_VSSCANF 1'
4106 cat > $TMPC << EOF 4106 statement_check_broken stdarg.h stdio.h 'va_list ap; vsscanf("foo", "bar", ap)' ||
4107 #define _ISOC99_SOURCE 4107 { vsscanf=no ; def_vsscanf='#undef HAVE_VSSCANF' ; }
4108 #include <stdarg.h>
4109 #include <stdio.h>
4110 int main(void) { va_list ap; vsscanf("foo", "bar", ap); return 0; }
4111 EOF
4112 cc_check || { vsscanf=no ; def_vsscanf='#undef HAVE_VSSCANF' ; }
4113 echores "$vsscanf" 4108 echores "$vsscanf"
4114 4109
4115 4110
4116 echocheck "POSIX select()" 4111 echocheck "POSIX select()"
4117 cat > $TMPC << EOF 4112 cat > $TMPC << EOF