--disable-dct disable DCT code
--disable-dwt disable DWT code
--disable-lsp disable LSP code
+ --disable-lzo disable LZO decoder code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
--disable-fft disable FFT code
done
}
-print_config_h(){
- enabled $1 && v=1 || v=0
- echo "#define $2 $v"
-}
-
-print_config_mak(){
- enabled $1 && v= || v=!
- echo "$v$2=yes"
-}
-
-print_config_asm(){
- enabled $1 && v=1 || v=0
- echo "%define $2 $v"
-}
-
print_config(){
pfx=$1
files=$2
shift 2
- for cfg; do
- ucname="$(toupper $cfg)"
- for f in $files; do
- "print_config_${f##*.}" $cfg ${pfx}${ucname} >>$f
- done
- done
+ map 'eval echo "$v \${$v:-no}"' "$@" |
+ awk "BEGIN { split(\"$files\", files) }
+ {
+ c = \"$pfx\" toupper(\$1);
+ v = \$2;
+ sub(/yes/, 1, v);
+ sub(/no/, 0, v);
+ for (f in files) {
+ file = files[f];
+ if (file ~ /\\.h\$/) {
+ printf(\"#define %s %d\\n\", c, v) >>file;
+ } else if (file ~ /\\.asm\$/) {
+ printf(\"%%define %s %d\\n\", c, v) >>file;
+ } else if (file ~ /\\.mak\$/) {
+ n = -v ? \"\" : \"!\";
+ printf(\"%s%s=yes\\n\", n, c) >>file;
+ }
+ }
+ }"
}
print_enabled(){
log check_ld "$@"
type=$1
shift 1
- flags=$(filter_out '-l*' "$@")
- libs=$(filter '-l*' "$@")
+ flags=$(filter_out '-l*' $@)
+ libs=$(filter '-l*' $@)
check_$type $($cflags_filter $flags) || return
flags=$($ldflags_filter $flags)
libs=$($ldflags_filter $libs)
check_mathfunc(){
log check_mathfunc "$@"
func=$1
- shift
- disable $func
- check_ld "cc" "$@" <<EOF && enable $func
-#include <math.h>
-float foo(float f) { return $func(f); }
-int main(void){ return (int) foo; }
-EOF
-}
-
-check_math2func(){
- log check_math2func "$@"
- func=$1
- shift
+ narg=$2
+ shift 2
+ test $narg = 2 && args="f, g" || args="f"
disable $func
check_ld "cc" "$@" <<EOF && enable $func
#include <math.h>
-float foo(float f) { return $func(f, f); }
+float foo(float f, float g) { return $func($args); }
int main(void){ return (int) foo; }
EOF
}
libxavs
libxvid
lsp
+ lzo
mdct
memalign_hack
memory_poisoning
MATH_FUNCS="
atanf
+ atan2f
cbrtf
cosf
exp2
expf
isinf
isnan
+ ldexpf
llrint
llrintf
log2
log10f
lrint
lrintf
+ powf
rint
round
roundf
truncf
"
-MATH2_FUNCS="
- atan2f
- ldexpf
- powf
-"
-
HAVE_LIST="
$ARCH_EXT_LIST
$(add_suffix _external $ARCH_EXT_LIST)
$HAVE_LIST_PUB
$THREADS_LIST
$MATH_FUNCS
- $MATH2_FUNCS
aligned_malloc
aligned_stack
alsa_asoundlib_h
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
binkaudio_rdft_decoder_select="mdct rdft sinewin"
cavs_decoder_select="golomb mpegvideo"
+comfortnoise_encoder_select="lpc"
cook_decoder_select="mdct sinewin"
+cscd_decoder_select="lzo"
cscd_decoder_suggest="zlib"
dca_decoder_select="mdct"
dirac_decoder_select="dwt golomb"
mss2_decoder_select="vc1_decoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="mdct sinewin"
+nuv_decoder_select="lzo"
png_decoder_select="zlib"
png_encoder_select="zlib"
qcelp_decoder_select="lsp"
libnut_demuxer_deps="libnut"
libnut_muxer_deps="libnut"
matroska_audio_muxer_select="matroska_muxer"
-matroska_demuxer_suggest="zlib bzlib"
+matroska_demuxer_suggest="bzlib lzo zlib"
mov_demuxer_suggest="zlib"
mp3_demuxer_select="mpegaudio_parser"
mp4_muxer_select="mov_muxer"
frei0r_src_filter_deps="frei0r dlopen"
frei0r_src_filter_extralibs='$ldl'
hqdn3d_filter_deps="gpl"
+hue_filter_deps="gpl"
movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec swscale postproc inline_asm"
mptestsrc_filter_deps="gpl"
arm*|iPad*)
arch="arm"
;;
- mips|mipsel|IP*)
- arch="mips"
- ;;
- mips64*)
+ mips*|IP*)
arch="mips"
- subarch="mips64"
- ;;
- parisc|hppa)
- arch="parisc"
;;
- parisc64|hppa64)
+ parisc*|hppa*)
arch="parisc"
- subarch="parisc64"
;;
- "Power Macintosh"|ppc|powerpc|ppc64|powerpc64)
+ "Power Macintosh"|ppc*|powerpc*)
arch="ppc"
;;
s390|s390x)
sh4|sh)
arch="sh4"
;;
- sun4u|sparc64)
+ sun4u|sparc*)
arch="sparc"
- subarch="sparc64"
;;
tilegx|tile-gx)
arch="tilegx"
elif enabled sparc; then
case $cpu in
- niagara)
+ cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
cpuflags="-mcpu=$cpu"
disable vis
;;
- sparc64)
- cpuflags="-mcpu=v9"
+ ultrasparc*|niagara[234])
+ cpuflags="-mcpu=$cpu"
;;
esac
check_host_cflags -std=c99
check_host_cflags -Wall
+check_64bit(){
+ arch32=$1
+ arch64=$2
+ expr=$3
+ check_code cc "" "int test[2*($expr) - 1]" &&
+ subarch=$arch64 || subarch=$arch32
+}
+
case "$arch" in
- alpha|ia64|mips|parisc|sparc)
+ alpha|ia64)
+ spic=$shared
+ ;;
+ mips)
+ check_64bit mips mips64 '_MIPS_SIM > 1'
+ spic=$shared
+ ;;
+ parisc)
+ check_64bit parisc parisc64 'sizeof(void *) > 4'
+ spic=$shared
+ ;;
+ ppc)
+ check_64bit ppc ppc64 'sizeof(void *) > 4'
+ ;;
+ sparc)
+ check_64bit sparc sparc64 'sizeof(void *) > 4'
spic=$shared
;;
x86)
- subarch="x86_32"
- check_code cc "" "int test[(int)sizeof(char*) - 7]" && subarch="x86_64"
+ check_64bit x86_32 x86_64 'sizeof(void *) > 4'
if test "$subarch" = "x86_64"; then
spic=$shared
fi
elif enabled sparc; then
- enabled vis &&
- check_inline_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
- add_cflags -mcpu=ultrasparc -mtune=ultrasparc
+ enabled vis && check_inline_asm vis '"pdist %f0, %f0, %f0"'
elif enabled x86; then
disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd
enabled vaapi && require vaapi va/va.h vaInitialize -lva
-for func in $MATH_FUNCS; do
- check_mathfunc $func
-done
+atan2f_args=2
+ldexpf_args=2
+powf_args=2
-for func in $MATH2_FUNCS; do
- check_math2func $func
+for func in $MATH_FUNCS; do
+ eval check_mathfunc $func \${${func}_args:-1}
done
# these are off by default, so fail if requested and not available