configure: Group math functions into a separate variable

This avoids some duplication when listing and testing for the functions.
This commit is contained in:
Diego Biurrun 2012-10-19 18:58:39 +02:00
parent 5532cf3178
commit 79042ab376
1 changed files with 23 additions and 32 deletions

55
configure vendored
View File

@ -1124,6 +1124,25 @@ HAVE_LIST_PUB='
fast_unaligned fast_unaligned
' '
MATH_FUNCS="
cbrtf
exp2
exp2f
isinf
isnan
llrint
llrintf
log2
log2f
lrint
lrintf
rint
round
roundf
trunc
truncf
"
HAVE_LIST=" HAVE_LIST="
$ARCH_EXT_LIST $ARCH_EXT_LIST
$(add_suffix _external $ARCH_EXT_LIST) $(add_suffix _external $ARCH_EXT_LIST)
@ -1131,6 +1150,7 @@ HAVE_LIST="
$HAVE_LIST_CMDLINE $HAVE_LIST_CMDLINE
$HAVE_LIST_PUB $HAVE_LIST_PUB
$THREADS_LIST $THREADS_LIST
$MATH_FUNCS
aligned_malloc aligned_malloc
aligned_stack aligned_stack
alsa_asoundlib_h alsa_asoundlib_h
@ -1140,7 +1160,6 @@ HAVE_LIST="
asm_mod_y asm_mod_y
attribute_may_alias attribute_may_alias
attribute_packed attribute_packed
cbrtf
closesocket closesocket
cmov cmov
cpunop cpunop
@ -1158,8 +1177,6 @@ HAVE_LIST="
dxva_h dxva_h
ebp_available ebp_available
ebx_available ebx_available
exp2
exp2f
fast_64bit fast_64bit
fast_clz fast_clz
fast_cmov fast_cmov
@ -1179,22 +1196,14 @@ HAVE_LIST="
inet_aton inet_aton
io_h io_h
isatty isatty
isinf
isnan
jack_port_get_latency_range jack_port_get_latency_range
ldbrx ldbrx
libdc1394_1 libdc1394_1
libdc1394_2 libdc1394_2
llrint
llrintf
local_aligned_16 local_aligned_16
local_aligned_8 local_aligned_8
localtime_r localtime_r
log2
log2f
loongson loongson
lrint
lrintf
machine_ioctl_bt848_h machine_ioctl_bt848_h
machine_ioctl_meteor_h machine_ioctl_meteor_h
malloc_h malloc_h
@ -1209,9 +1218,6 @@ HAVE_LIST="
poll_h poll_h
posix_memalign posix_memalign
rdtsc rdtsc
rint
round
roundf
sched_getaffinity sched_getaffinity
sdl sdl
sdl_video_size sdl_video_size
@ -1246,8 +1252,6 @@ HAVE_LIST="
sys_time_h sys_time_h
sys_videoio_h sys_videoio_h
threads threads
trunc
truncf
unistd_h unistd_h
usleep usleep
vfp_args vfp_args
@ -3270,22 +3274,9 @@ done
check_lib math.h sin -lm && LIBM="-lm" check_lib math.h sin -lm && LIBM="-lm"
enabled vaapi && require vaapi va/va.h vaInitialize -lva enabled vaapi && require vaapi va/va.h vaInitialize -lva
check_mathfunc cbrtf for func in $MATH_FUNCS; do
check_mathfunc exp2 check_mathfunc $func
check_mathfunc exp2f done
check_mathfunc isinf
check_mathfunc isnan
check_mathfunc llrint
check_mathfunc llrintf
check_mathfunc log2
check_mathfunc log2f
check_mathfunc lrint
check_mathfunc lrintf
check_mathfunc rint
check_mathfunc round
check_mathfunc roundf
check_mathfunc trunc
check_mathfunc truncf
# these are off by default, so fail if requested and not available # these are off by default, so fail if requested and not available
enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32 enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32