--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
-Component options:
+Documentation options:
--disable-doc do not build documentation
+ --disable-htmlpages do not build HTML documentation pages
+ --disable-manpages do not build man documentation pages
+ --disable-podpages do not build POD documentation pages
+ --disable-txtpages do not build text documentation pages
+
+Component options:
--disable-ffmpeg disable ffmpeg build
--disable-ffplay disable ffplay build
--disable-ffprobe disable ffprobe build
--ld=LD use linker LD [$ld_default]
--host-cc=HOSTCC use host C compiler HOSTCC
--host-cflags=HCFLAGS use HCFLAGS when compiling for host
+ --host-ld=HOSTLD use host linker HOSTLD
--host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
--host-libs=HLIBS use libs HLIBS when linking for host
--host-os=OS compiler host OS [$target_os]
--enable-sram allow use of on-chip SRAM
--enable-thumb compile for Thumb instruction set
--disable-symver disable symbol versioning
- --disable-fastdiv disable table-based division
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
--disable-safe-bitstream-reader
disable buffer boundary checking in bitreaders
--disable-mmx disable MMX optimizations
--disable-mmxext disable MMXEXT optimizations
--disable-sse disable SSE optimizations
+ --disable-sse2 disable SSE2 optimizations
+ --disable-sse3 disable SSE3 optimizations
--disable-ssse3 disable SSSE3 optimizations
+ --disable-sse4 disable SSE4 optimizations
+ --disable-sse42 disable SSE4.2 optimizations
--disable-avx disable AVX optimizations
--disable-fma4 disable FMA4 optimizations
--disable-armv5te disable armv5te optimizations
for v; do eval $m; done
}
+add_suffix(){
+ suffix=$1
+ shift
+ for v; do echo ${v}${suffix}; done
+}
+
set_all(){
value=$1
shift
check_cmd $cc $CPPFLAGS $CFLAGS "$@" $(cc_e $TMPO) $TMPC
}
+as_o(){
+ eval printf '%s\\n' $AS_O
+}
+
check_as(){
log check_as "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C -o $TMPO $TMPC
+ check_cmd $as $CPPFLAGS $ASFLAGS "$@" $AS_C $(as_o $TMPO) $TMPC
}
-check_asm(){
- log check_asm "$@"
+check_inline_asm(){
+ log check_inline_asm "$@"
name="$1"
code="$2"
shift 2
echo "$1" > $TMPS
log_file $TMPS
shift 1
- check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
+ check_cmd $yasmexe $YASMFLAGS -Werror "$@" -o $TMPO $TMPS
+}
+
+ld_o(){
+ eval printf '%s\\n' $LD_O
}
check_ld(){
check_$type $($cflags_filter $flags) || return
flags=$($ldflags_filter $flags)
libs=$($ldflags_filter $libs)
- check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs
+ check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
}
check_code(){
add_extralibs $(get_safe ${pkg}_libs)
}
+hostcc_o(){
+ eval printf '%s\\n' $HOSTCC_O
+}
+
check_host_cc(){
log check_host_cc "$@"
cat > $TMPC
log_file $TMPC
- check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
+ check_cmd $host_cc $host_cflags "$@" $HOSTCC_C $(hostcc_o $TMPO) $TMPC
}
check_host_cflags(){
protocols
"
+DOCUMENT_LIST="
+ doc
+ htmlpages
+ manpages
+ podpages
+ txtpages
+"
+
PROGRAM_LIST="
ffplay
ffprobe
CONFIG_LIST="
$COMPONENT_LIST
+ $DOCUMENT_LIST
$PROGRAM_LIST
avcodec
avdevice
bzlib
crystalhd
dct
- doc
dwt
dxva2
fast_unaligned
- fastdiv
fft
fontconfig
frei0r
gpl
gray
hardcoded_tables
+ incompatible_fork_abi
libaacplus
libass
libbluray
x86_64
'
-ARCH_EXT_LIST='
- altivec
+ARCH_EXT_LIST_X86='
amd3dnow
amd3dnowext
+ avx
+ fma4
+ mmx
+ mmxext
+ sse
+ sse2
+ sse3
+ sse4
+ sse42
+ ssse3
+'
+
+ARCH_EXT_LIST="
+ $ARCH_EXT_LIST_X86
+ altivec
armv5te
armv6
armv6t2
armvfp
- avx
- fma4
mmi
- mmx
- mmxext
neon
ppc4xx
- sse
- ssse3
vfpv3
vis
mipsfpu
mips32r2
mipsdspr1
mipsdspr2
-'
+"
HAVE_LIST_PUB='
bigendian
fast_unaligned
+ incompatible_fork_abi
'
HAVE_LIST="
$ARCH_EXT_LIST
+ $(add_suffix _external $ARCH_EXT_LIST)
+ $(add_suffix _inline $ARCH_EXT_LIST)
$HAVE_LIST_PUB
$THREADS_LIST
aligned_malloc
ibm_asm
inet_aton
inline_asm
+ io_h
isatty
isinf
isnan
mkstemp
mm_empty
mmap
+ msvcrt
nanosleep
PeekNamedPipe
+ perl
pod2man
poll_h
posix_memalign
socklen_t
soundcard_h
strerror_r
- strptime
struct_addrinfo
struct_group_source_req
struct_ip_mreq_source
aandcttables
ac3dsp
avutil
+ error_resilience
gcrypt
golomb
gplv3
lpc
mpegaudiodsp
mpegvideo
+ mpegvideoenc
nettle
+ rangecoder
rtpdec
sinewin
vp3dsp
extra_version
host_cc
host_cflags
+ host_ld
host_ldflags
host_libs
host_os
vis_deps="sparc"
x86_64_suggest="cmov fast_cmov"
+
amd3dnow_deps="mmx"
amd3dnowext_deps="amd3dnow"
mmx_deps="x86"
mmxext_deps="mmx"
-sse_deps="mmx"
-ssse3_deps="sse"
-avx_deps="ssse3"
+sse_deps="mmxext"
+sse2_deps="sse"
+sse3_deps="sse2"
+ssse3_deps="sse3"
+sse4_deps="ssse3"
+sse42_deps="sse4"
+avx_deps="sse42"
fma4_deps="avx"
+mmx_external_deps="yasm"
+mmx_inline_deps="inline_asm"
+mmx_suggest="mmx_external mmx_inline"
+
+for ext in $(filter_out mmx $ARCH_EXT_LIST_X86); do
+ eval dep=\$${ext}_deps
+ eval ${ext}_external_deps='"${dep}_external"'
+ eval ${ext}_inline_deps='"${dep}_inline"'
+ eval ${ext}_suggest='"${ext}_external ${ext}_inline"'
+done
+
aligned_stack_if_any="ppc x86"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
mdct_select="fft"
rdft_select="fft"
mpegaudiodsp_select="dct"
+mpegvideoenc_select="mpegvideo"
# decoders / encoders / hardware accelerators
aac_decoder_select="mdct sinewin"
cscd_decoder_suggest="zlib"
dca_decoder_select="mdct"
dirac_decoder_select="dwt golomb"
-dnxhd_encoder_select="aandcttables mpegvideo"
+dnxhd_encoder_select="aandcttables mpegvideoenc"
dxa_decoder_select="zlib"
eac3_decoder_select="ac3_decoder"
-eac3_encoder_select="mdct ac3dsp"
-eamad_decoder_select="aandcttables"
+eac3_encoder_select="ac3_encoder"
+eamad_decoder_select="aandcttables error_resilience mpegvideo"
eatgq_decoder_select="aandcttables"
-eatqi_decoder_select="aandcttables mpegvideo"
+eatqi_decoder_select="aandcttables error_resilience mpegvideo"
exr_decoder_select="zlib"
-ffv1_decoder_select="golomb"
+ffv1_decoder_select="golomb rangecoder"
+ffv1_encoder_select="rangecoder"
+ffvhuff_encoder_select="huffman"
flac_decoder_select="golomb"
flac_encoder_select="golomb lpc"
flashsv_decoder_select="zlib"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
fraps_decoder_select="huffman"
-h261_decoder_select="mpegvideo"
-h261_encoder_select="aandcttables mpegvideo"
-h263_decoder_select="h263_parser mpegvideo"
-h263_encoder_select="aandcttables mpegvideo"
+h261_decoder_select="error_resilience mpegvideo"
+h261_encoder_select="aandcttables mpegvideoenc"
+h263_decoder_select="error_resilience h263_parser mpegvideo"
+h263_encoder_select="aandcttables error_resilience mpegvideoenc"
h263_vaapi_hwaccel_select="vaapi h263_decoder"
h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
-h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
+h264_decoder_select="error_resilience golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
h264_dxva2_hwaccel_deps="dxva2api_h"
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
h264_vaapi_hwaccel_select="vaapi h264_decoder"
+h264_vda_decoder_select="vda h264_parser h264_decoder"
h264_vda_hwaccel_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
h264_vda_hwaccel_select="vda h264_decoder"
h264_vdpau_decoder_select="vdpau h264_decoder"
+huffyuv_encoder_select="huffman"
iac_decoder_select="fft mdct sinewin"
imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
-ljpeg_encoder_select="aandcttables mpegvideo"
+ljpeg_encoder_select="aandcttables mpegvideoenc"
loco_decoder_select="golomb"
-mdec_decoder_select="mpegvideo"
-mjpeg_encoder_select="aandcttables mpegvideo"
+mdec_decoder_select="error_resilience mpegvideo"
+mjpeg_encoder_select="aandcttables mpegvideoenc"
mlp_decoder_select="mlp_parser"
mp1_decoder_select="mpegaudiodsp"
mp1float_decoder_select="mpegaudiodsp"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder"
-mpeg1video_decoder_select="mpegvideo"
-mpeg1video_encoder_select="aandcttables mpegvideo"
+mpeg1video_decoder_select="error_resilience mpegvideo"
+mpeg1video_encoder_select="aandcttables error_resilience mpegvideoenc"
mpeg2_crystalhd_decoder_select="crystalhd"
mpeg2_dxva2_hwaccel_deps="dxva2api_h"
mpeg2_dxva2_hwaccel_select="dxva2 mpeg2video_decoder"
mpeg2_vdpau_hwaccel_select="vdpau mpeg2video_decoder"
mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
-mpeg2video_encoder_select="mpegvideo"
-mpeg2video_encoder_select="aandcttables mpegvideo"
+mpeg2video_decoder_select="error_resilience mpegvideo"
+mpeg2video_encoder_select="aandcttables error_resilience mpegvideoenc"
mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
mpeg4_encoder_select="h263_encoder"
msmpeg4v2_encoder_select="h263_encoder"
msmpeg4v3_decoder_select="h263_decoder"
msmpeg4v3_encoder_select="h263_encoder"
+mss2_decoder_select="vc1_decoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="mdct sinewin"
png_decoder_select="zlib"
rv10_encoder_select="h263_encoder"
rv20_decoder_select="h263_decoder"
rv20_encoder_select="h263_encoder"
-rv30_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo"
-rv40_decoder_select="golomb h264chroma h264pred h264qpel mpegvideo"
+rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo"
+rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
-snow_decoder_select="dwt"
-snow_encoder_select="aandcttables dwt mpegvideo"
+snow_decoder_select="dwt rangecoder"
+snow_encoder_select="aandcttables dwt error_resilience mpegvideoenc rangecoder"
sonic_decoder_select="golomb"
sonic_encoder_select="golomb"
sonic_ls_encoder_select="golomb"
-svq1_encoder_select="mpegvideo"
-svq1_encoder_select="aandcttables mpegvideo"
-svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
+svq1_decoder_select="error_resilience mpegvideo"
+svq1_encoder_select="aandcttables error_resilience mpegvideoenc"
+svq3_decoder_select="error_resilience golomb h264chroma h264dsp h264pred h264qpel mpegvideo"
svq3_decoder_suggest="zlib"
theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib"
tscc_decoder_select="zlib"
twinvq_decoder_select="mdct lsp sinewin"
+utvideo_encoder_select="huffman"
vc1_crystalhd_decoder_select="crystalhd"
vc1_decoder_select="h263_decoder h264chroma h264qpel"
vc1_dxva2_hwaccel_deps="dxva2api_h"
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
# parsers
-h264_parser_select="golomb h264dsp h264pred mpegvideo"
-mpeg4video_parser_select="mpegvideo"
-mpegvideo_parser_select="mpegvideo"
-vc1_parser_select="mpegvideo"
+h264_parser_select="error_resilience golomb h264dsp h264pred mpegvideo"
+mpeg4video_parser_select="error_resilience mpegvideo"
+mpegvideo_parser_select="error_resilience mpegvideo"
+vc1_parser_select="error_resilience mpegvideo"
# external libraries
libaacplus_encoder_deps="libaacplus"
boxblur_filter_deps="gpl"
colormatrix_filter_deps="gpl"
cropdetect_filter_deps="gpl"
+decimate_filter_deps="gpl avcodec"
delogo_filter_deps="gpl"
deshake_filter_deps="avcodec"
drawtext_filter_deps="libfreetype"
frei0r_src_filter_extralibs='$ldl'
hqdn3d_filter_deps="gpl"
movie_filter_deps="avcodec avformat"
-mp_filter_deps="gpl avcodec swscale postproc"
+mp_filter_deps="gpl avcodec swscale postproc inline_asm"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
resample_filter_deps="avresample"
pan_filter_deps="swresample"
removelogo_filter_deps="avcodec avformat swscale"
scale_filter_deps="swscale"
+smartblur_filter_deps="gpl swscale"
select_filter_deps="avcodec"
+showspectrum_filter_deps="avcodec"
super2xsai_filter_deps="gpl"
tinterlace_filter_deps="gpl"
yadif_filter_deps="gpl"
# programs
ffmpeg_deps="avcodec avfilter avformat swscale swresample"
-ffmpeg_select="buffersink_filter format_filter aformat_filter
- setpts_filter null_filter anull_filter abuffersink_filter"
+ffmpeg_select="ffbuffersink_filter format_filter aformat_filter
+ setpts_filter null_filter anull_filter ffabuffersink_filter"
ffplay_deps="avcodec avformat swscale swresample sdl"
-ffplay_select="buffersink_filter rdft"
+ffplay_select="ffbuffersink_filter rdft"
ffprobe_deps="avcodec avformat"
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
ffserver_extralibs='$ldl'
-doc_deps_any="texi2html makeinfo pod2man"
+# documentation
+podpages_deps="perl"
+manpages_deps="perl pod2man"
+htmlpages_deps="texi2html"
+txtpages_deps="makeinfo"
+doc_deps_any="manpages htmlpages podpages txtpages"
# tests
colormatrix1_test_deps="colormatrix_filter"
# configurable options
enable $PROGRAM_LIST
+enable $DOCUMENT_LIST
enable avcodec
enable avdevice
enable asm
enable debug
enable doc
-enable fastdiv
enable network
enable optimizations
enable safe_bitstream_reader
CXX_C='-c'
CXX_O='-o $@'
LD_O='-o $@'
+LD_LIB='-l%'
+LD_PATH='-L'
HOSTCC_C='-c'
HOSTCC_O='-o $@'
+HOSTLD_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
host_libs='-lm'
die "Sanity test failed."
fi
+msvc_flags(){
+ for flag; do
+ case $flag in
+ -fomit-frame-pointer) echo -Oy ;;
+ -g) echo -Z7 ;;
+ -Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
+ -wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
+ -wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
+ -wd4996 ;;
+ -std=c99) ;;
+ -fno-math-errno) ;;
+ -fno-common) ;;
+ -fno-signed-zeros) ;;
+ -lz) echo zlib.lib ;;
+ -l*) echo ${flag#-l}.lib ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
pgi_flags(){
for flag; do
case $flag in
prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
*-sse3) echo -xarch=sse3 ;;
core2) echo -xarch=ssse3 -xchip=core2 ;;
- amdfam10|barcelona) echo -xarch=sse4_1 ;;
+ amdfam10|barcelona|bdver*) echo -xarch=sse4_1 ;;
athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
k8|opteron|athlon64|athlon-fx)
echo -xarch=sse2a ;;
pfx=$1
_cc=$2
- unset _type _ident _cc_c _cc_e _cc_o _flags _cflags _ldflags
+ unset _type _ident _cc_c _cc_e _cc_o _flags _cflags
+ unset _ld_o _ldflags _ld_lib _ld_path
unset _depflags _DEPCMD _DEPFLAGS
_flags_filter=echo
_type=suncc
_ident=$($_cc -V 2>&1 | head -n1 | cut -d' ' -f 2-)
_DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
- _DEPFLAGS='-xM1'
+ _DEPFLAGS='-xM1 -xc99'
_ldflags='-std=c99'
_cflags_speed='-O5'
_cflags_size='-O5 -xspace'
_cflags_size="-O2 -Munroll=c:1 $opt_common"
_cflags_noopt="-O1"
_flags_filter=pgi_flags
+ elif $_cc 2>&1 | grep -q Microsoft; then
+ _type=msvc
+ _ident=$($cc 2>&1 | head -n1)
+ _DEPCMD='$(DEP$(1)) $(DEP$(1)FLAGS) $($(1)DEP_FLAGS) $< 2>&1 | awk '\''/including/ { sub(/^.*file: */, ""); gsub(/\\/, "/"); if (!match($$0, / /)) print "$@:", $$0 }'\'' > $(@:.o=.d)'
+ _DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -showIncludes -Zs'
+ _cflags_speed="-O2"
+ _cflags_size="-O1"
+ # Nonstandard output options, to avoid msys path conversion issues, relies on wrapper to remap it
+ if $_cc 2>&1 | grep -q Linker; then
+ _ld_o='-out $@'
+ else
+ _ld_o='-Fe$@'
+ fi
+ _cc_o='-Fo $@'
+ _cc_e='-P -Fi $@'
+ _flags_filter=msvc_flags
+ _ld_lib='lib%.a'
+ _ld_path='-libpath:'
+ _flags='-nologo'
+ _cflags='-D_USE_MATH_DEFINES -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64'
+ if [ $pfx = hostcc ]; then
+ _cflags="$cflags -Dsnprintf=_snprintf"
+ fi
+ disable aligned_stack
fi
eval ${pfx}_type=\$_type
probe_cc hostcc "$host_cc"
host_cflags_filter=$_flags_filter
-host_ldflags_filter=$_flags_filter
add_host_cflags $_flags $_cflags
-add_host_ldflags $_flags $_ldflags
set_ccvars HOSTCC
test -n "$cc_type" && enable $cc_type ||
: ${as_default:=$cc}
: ${dep_cc_default:=$cc}
: ${ld_default:=$cc}
-set_default ar as dep_cc ld
+: ${host_ld_default:=$host_cc}
+set_default ar as dep_cc ld host_ld
probe_cc as "$as"
asflags_filter=$_flags_filter
ldflags_filter=$_flags_filter
add_ldflags $_flags $_ldflags
test "$cc_type" != "$ld_type" && add_ldflags $cc_ldflags
-LD_O=${_cc_o-$LD_O}
+LD_O=${_ld_o-$LD_O}
+LD_LIB=${_ld_lib-$LD_LIB}
+LD_PATH=${_ld_path-$LD_PATH}
+
+probe_cc hostld "$host_ld"
+host_ldflags_filter=$_flags_filter
+add_host_ldflags $_flags $_ldflags
+HOSTLD_O=${_ld_o-$HOSTLD_O}
if [ -z "$CC_DEPFLAGS" ] && [ "$dep_cc" != "$cc" ]; then
probe_cc depcc "$dep_cc"
disable cmov
;;
# targets that do support conditional mov (cmov)
- i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom)
+ i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom|bdver*)
cpuflags="-march=$cpu"
enable cmov
enable fast_cmov
disable symver
SHFLAGS='-shared'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBVERSION)'
+ SLIB_INSTALL_LINKS=
oss_indev_extralibs="-lossaudio"
oss_outdev_extralibs="-lossaudio"
;;
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
objformat="win32"
+ ranlib=:
enable dos_paths
check_cflags -fno-common
- check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) \
- || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
- die "ERROR: MinGW runtime version must be >= 3.15."
add_cppflags -U__STRICT_ANSI__
;;
cygwin*)
;;
esac
+# determine libc flavour
+
+if check_cpp_condition features.h "defined __UCLIBC__"; then
+ libc_type=uclibc
+elif check_cpp_condition features.h "defined __GLIBC__"; then
+ libc_type=glibc
+elif check_header _mingw.h; then
+ libc_type=mingw
+ check_cpp_condition _mingw.h \
+ "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) || \
+ (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
+ die "ERROR: MinGW runtime version must be >= 3.15."
+elif check_cpp_condition newlib.h "defined _NEWLIB_VERSION"; then
+ libc_type=newlib
+elif check_func_headers stdlib.h _get_doserrno; then
+ libc_type=msvcrt
+ add_cflags -Dstrtod=avpriv_strtod
+ add_cflags -Dsnprintf=avpriv_snprintf \
+ -D_snprintf=avpriv_snprintf \
+ -Dvsnprintf=avpriv_vsnprintf
+elif check_cpp_condition stddef.h "defined __KLIBC__"; then
+ libc_type=klibc
+fi
+
+test -n "$libc_type" && enable $libc_type
+
esc(){
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
}
warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
fi
- enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
- enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
- enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
- enabled armvfp && check_asm armvfp '"fadds s0, s0, s0"'
- enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
- enabled vfpv3 && check_asm vfpv3 '"vmov.f32 s0, #1.0"'
+ enabled armv5te && check_inline_asm armv5te '"qadd r0, r0, r0"'
+ enabled armv6 && check_inline_asm armv6 '"sadd16 r0, r0, r0"'
+ enabled armv6t2 && check_inline_asm armv6t2 '"movt r0, #0"'
+ enabled armvfp && check_inline_asm armvfp '"fadds s0, s0, s0"'
+ enabled neon && check_inline_asm neon '"vadd.i16 q0, q0, q0"'
+ enabled vfpv3 && check_inline_asm vfpv3 '"vmov.f32 s0, #1.0"'
- check_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
- check_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)'
+ check_inline_asm asm_mod_q '"add r0, %Q0, %R0" :: "r"((long long)0)'
+ check_inline_asm asm_mod_y '"vmul.i32 d0, d0, %y0" :: "x"(0)'
enabled_all armv6t2 shared !pic && enable_pic
elif enabled mips; then
- check_asm loongson '"dmult.g $1, $2, $3"'
- enabled mmi && check_asm mmi '"lq $2, 0($2)"'
- enabled mips32r2 && add_cflags "-mips32r2" &&
- check_asm mips32r2 '"rotr $t0, $t1, 1"'
+ check_inline_asm loongson '"dmult.g $1, $2, $3"'
+ enabled mmi && check_inline_asm mmi '"lq $2, 0($2)"'
+ enabled mips32r2 && add_cflags "-mips32r2" && add_asflags "-mips32r2" &&
+ check_inline_asm mips32r2 '"rotr $t0, $t1, 1"'
enabled mipsdspr1 && add_cflags "-mdsp" && add_asflags "-mdsp" &&
- check_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"'
+ check_inline_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"'
enabled mipsdspr2 && add_cflags "-mdspr2" && add_asflags "-mdspr2" &&
- check_asm mipsdspr2 '"absq_s.qb $t0, $t1"'
- enabled mipsfpu && add_cflags "-mhard-float" &&
- check_asm mipsfpu '"madd.d $f0, $f2, $f4, $f6"'
-
+ check_inline_asm mipsdspr2 '"absq_s.qb $t0, $t1"'
+ enabled mipsfpu && add_cflags "-mhard-float" && add_asflags "-mhard-float" &&
+ check_inline_asm mipsfpu '"madd.d $f0, $f2, $f4, $f6"'
elif enabled ppc; then
enable local_aligned_8 local_aligned_16
- check_asm dcbzl '"dcbzl 0, %0" :: "r"(0)'
- check_asm ibm_asm '"add 0, 0, 0"'
- check_asm ppc4xx '"maclhw r10, r11, r12"'
- check_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'
+ check_inline_asm dcbzl '"dcbzl 0, %0" :: "r"(0)'
+ check_inline_asm ibm_asm '"add 0, 0, 0"'
+ check_inline_asm ppc4xx '"maclhw r10, r11, r12"'
+ check_inline_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'
# AltiVec flags: The FSF version of GCC differs from the Apple version
if enabled altivec; then
check_cc <<EOF || disable altivec
$inc_altivec_h
int main(void) {
- vector signed int v1, v2, v3;
- v1 = vec_add(v2,v3);
+ vector signed int v1 = (vector signed int) { 0 };
+ vector signed int v2 = (vector signed int) { 1 };
+ v1 = vec_add(v1, v2);
return 0;
}
EOF
- # check if our compiler supports braces for vector declarations
- check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations."
-$inc_altivec_h
-int main (void) { (vector int) {1}; return 0; }
-EOF
+ enabled altivec || warn "Altivec disabled, possibly missing --cpu flag"
fi
elif enabled sparc; then
- enabled vis && check_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
+ enabled vis &&
+ check_inline_asm vis '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc &&
add_cflags -mcpu=ultrasparc -mtune=ultrasparc
elif enabled x86; then
EOF
# check whether EBX is available on x86
- check_asm ebx_available '""::"b"(0)' &&
- check_asm ebx_available '"":::"%ebx"'
+ check_inline_asm ebx_available '""::"b"(0)' &&
+ check_inline_asm ebx_available '"":::"%ebx"'
# check whether xmm clobbers are supported
- check_asm xmm_clobbers '"":::"%xmm0"'
+ check_inline_asm xmm_clobbers '"":::"%xmm0"'
# check whether binutils is new enough to compile SSSE3/MMXEXT
- enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
- enabled mmxext && check_asm mmxext '"pmaxub %mm0, %mm1"'
+ enabled ssse3 && check_inline_asm ssse3_inline '"pabsw %xmm0, %xmm0"'
+ enabled mmxext && check_inline_asm mmxext_inline '"pmaxub %mm0, %mm1"'
if ! disabled_any asm mmx yasm; then
if check_cmd $yasmexe --version; then
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
- check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
- check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4
+ check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx_external
+ check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
check_yasm "CPU amdnop" && enable cpunop
fi
if enabled asm; then
as=${gas:=$as}
- check_asm gnu_as '".macro m n\n\\n:.int 0\n.endm\nm x"' ||
+ check_inline_asm gnu_as '".macro m n\n\\n:.int 0\n.endm\nm x"' ||
$nogas "GNU assembler not found, install gas-preprocessor"
fi
check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
check_func setrlimit
check_func strerror_r
-check_func strptime
check_func sched_getaffinity
check_func sysconf
check_func sysctl
check_header dlfcn.h
check_header dxva.h
check_header dxva2api.h -D_WIN32_WINNT=0x0600
+check_header io.h
check_header libcrystalhd/libcrystalhd_if.h
check_header malloc.h
check_header poll.h
enabled libbluray && require libbluray libbluray/bluray.h bd_open -lbluray
enabled libcelt && require libcelt celt/celt.h celt_decode -lcelt0 &&
{ check_lib celt/celt.h celt_decoder_create_custom -lcelt0 ||
- die "ERROR: libcelt version must be >= 0.11.0."; }
+ die "ERROR: libcelt must be installed and version must be >= 0.11.0."; }
enabled libcaca && require_pkg_config caca caca.h caca_create_canvas
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfdk_aac && require libfdk_aac fdk-aac/aacenc_lib.h aacEncOpen -lfdk-aac
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
enabled libtwolame && require libtwolame twolame.h twolame_init -ltwolame &&
{ check_lib twolame.h twolame_encode_buffer_float32_interleaved -ltwolame ||
- die "ERROR: libtwolame version must be >= 0.3.10"; }
+ die "ERROR: libtwolame must be installed and version must be >= 0.3.10"; }
enabled libutvideo && require_cpp utvideo "stdint.h stdlib.h utvideo/utvideo.h utvideo/Codec.h" 'CCodec*' -lutvideo -lstdc++
enabled libv4l2 && require_pkg_config libv4l2 libv4l2.h v4l2_ioctl
enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
enabled libvpx && {
enabled libvpx_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx ||
- die "ERROR: libvpx decoder version must be >=0.9.1"; }
+ die "ERROR: libvpx decoder must be installed and version must be >=0.9.1"; }
enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VP8E_SET_MAX_INTRA_BITRATE_PCT" -lvpx ||
die "ERROR: libvpx encoder version must be >=0.9.7"; } }
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
{ check_cpp_condition x264.h "X264_BUILD >= 118" ||
- die "ERROR: libx264 version must be >= 0.118."; }
+ die "ERROR: libx264 must be installed and version must be >= 0.118."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
die "ERROR: openal not found"; } &&
{ check_cpp_condition "AL/al.h" "defined(AL_VERSION_1_1)" ||
- die "ERROR: openal version must be 1.1 or compatible"; }
+ die "ERROR: openal must be installed and version must be 1.1 or compatible"; }
enabled openssl && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
texi2html --help 2> /dev/null | grep -q 'init-file' && enable texi2html || disable texi2html
makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
+perl --version > /dev/null 2>&1 && enable perl || disable perl
pod2man --help > /dev/null 2>&1 && enable pod2man || disable pod2man
check_header linux/fb.h
enabled_any $THREADS_LIST && enable threads
+enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
+
check_deps $CONFIG_LIST \
$CONFIG_EXTRA \
$HAVE_LIST \
$ALL_COMPONENTS \
$ALL_TESTS \
-enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
if test $target_os = "haiku"; then
disable memalign
echo "zlib enabled ${zlib-no}"
echo "bzlib enabled ${bzlib-no}"
echo "texi2html enabled ${texi2html-no}"
+echo "perl enabled ${perl-no}"
echo "pod2man enabled ${pod2man-no}"
echo "makeinfo enabled ${makeinfo-no}"
test -n "$random_seed" &&
CXX_C=$CXX_C
CXX_O=$CXX_O
LD_O=$LD_O
+LD_LIB=$LD_LIB
+LD_PATH=$LD_PATH
DLLTOOL=$dlltool
LDFLAGS=$LDFLAGS
LDFLAGS-ffserver=$FFSERVERLDFLAGS
CC_DEPFLAGS=$CC_DEPFLAGS
AS_DEPFLAGS=$AS_DEPFLAGS
HOSTCC=$host_cc
+HOSTLD=$host_ld
HOSTCFLAGS=$host_cflags
HOSTEXESUF=$HOSTEXESUF
HOSTLDFLAGS=$host_ldflags
HOSTCC_DEPFLAGS=$HOSTCC_DEPFLAGS
HOSTCC_C=$HOSTCC_C
HOSTCC_O=$HOSTCC_O
+HOSTLD_O=$HOSTLD_O
TARGET_EXEC=$target_exec
TARGET_PATH=$target_path
LIBS-ffplay=$sdl_libs
CFLAGS-ffplay=$sdl_cflags
+ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
INSTALL=$install