Newer
Older
check_host_cc(){
log check_host_cc "$@"
cat > $TMPC
log_file $TMPC
check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC
}
check_host_cflags(){
log check_host_cflags "$@"
set -- $($host_cflags_filter "$@")
check_host_cc "$@" <<EOF && append host_cflags "$@"
int x;
EOF
}
apply(){
file=$1
shift
"$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
}
cp_if_changed(){
cmp -s "$1" "$2" && echo "$2 is unchanged" && return
mkdir -p "$(dirname $2)"
cp -f "$1" "$2"
Diego Biurrun
committed
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
# system-dependent things.
COMPONENT_LIST="
bsfs
decoders
demuxers
encoders
hwaccels
parsers
protocols
"
ffplay
ffprobe
ffserver
ffmpeg
"
CONFIG_LIST="
$COMPONENT_LIST
Vitor Sessak
committed
avfilter
Diego Biurrun
committed
libfaac
libfreetype
libiec61883
libilbc
libopencore_amrnb
libopencore_amrwb
librtmp
Diego Biurrun
committed
libx264
Diego Biurrun
committed
libxvid
lsp
nonfree
Alex Converse
committed
rdft
safe_bitstream_reader
small
Cédric Schieli
committed
swscale_alpha
vda
THREADS_LIST='
pthreads
w32threads
'
ARCH_LIST='
alpha
avr32
avr32_ap
avr32_uc
bfin
ia64
m68k
mips
parisc
s390
sh4
sparc
sparc64
x86
x86_32
x86_64
'
ARCH_EXT_LIST='
amd3dnow
amd3dnowext
fma4
mmi
mmx
Diego Biurrun
committed
ppc4xx
mipsfpu
mips32r2
mipsdspr1
mipsdspr2
'
HAVE_LIST="
$ARCH_EXT_LIST
$THREADS_LIST
aligned_malloc
altivec_h
François Revol
committed
arpa_inet_h
dev_bktr_ioctl_bt848_h
dev_bktr_ioctl_meteor_h
dev_ic_bt8xx_h
dev_video_bktr_ioctl_bt848_h
dev_video_meteor_ioctl_meteor_h
dos_paths
ebp_available
ebx_available
Vitor Sessak
committed
exp2
exp2f
fast_clz
Martin Storsjö
committed
getaddrinfo
getopt
GetProcessMemoryInfo
GetProcessTimes
GetSystemTimeAsFileTime
isinf
isnan
jack_port_get_latency_range
Alessandro Sappia
committed
libdc1394_1
libdc1394_2
llrint
local_aligned_16
local_aligned_8
localtime_r
Alex Converse
committed
log2
Vitor Sessak
committed
log2f
lrint
Diego Biurrun
committed
lzo1x_999_compress
machine_ioctl_bt848_h
machine_ioctl_meteor_h
mm_empty
Ronald S. Bultje
committed
rdtsc
round
roundf
sdl
sdl_video_size
setmode
struct_addrinfo
struct_group_source_req
struct_ip_mreq_source
struct_ipv6_mreq
struct_rusage_ru_maxrss
struct_sockaddr_in6
Ronald S. Bultje
committed
struct_sockaddr_sa_len
struct_sockaddr_storage
symver
symver_asm_label
sys_param_h
sys_select_h
termios_h
VirtualAlloc
xmm_clobbers
"
# options emitted with CONFIG_ prefix but not available on command line
CONFIG_EXTRA="
aandcttables
ac3dsp
gcrypt
golomb
h264chroma
h264dsp
h264pred
huffman
lpc
mpegaudiodsp
nettle
rtpdec
sinewin
$ARCH_EXT_LIST
$THREADS_LIST
logging
optimizations
symver
PATHS_LIST='
incdir
libdir
mandir
prefix
shlibdir
'
CMDLINE_SET="
$PATHS_LIST
assert_level
build_suffix
cc
cpu
cross_prefix
extra_version
host_cc
host_cflags
host_ldflags
host_libs
Michael Niedermayer
committed
install
malloc_prefix
postproc_version
progs_suffix
sysinclude
sysroot
CMDLINE_APPEND="
extra_cflags
armv5te_deps="arm"
armv6_deps="arm"
mipsfpu_deps="mips"
mips32r2_deps="mips"
mipsdspr1_deps="mips"
mipsdspr2_deps="mips"
Diego Biurrun
committed
mmi_deps="mips"
altivec_deps="ppc"
ppc4xx_deps="ppc"
vis_deps="sparc"
amd3dnow_deps="mmx"
amd3dnowext_deps="amd3dnow"
sse_deps="mmx"
ssse3_deps="sse"
fma4_deps="avx"
fast_64bit_if_any="alpha ia64 mips64 parisc64 ppc64 sparc64 x86_64"
fast_clz_if_any="alpha armv5te avr32 mips ppc x86"
fast_unaligned_if_any="armv6 ppc x86"
need_memalign="altivec neon sse"
symver_if_any="symver_asm_label symver_gnu_asm"
# subsystems
mdct_select="fft"
rdft_select="fft"
mpegaudiodsp_select="dct"
# decoders / encoders / hardware accelerators
aac_decoder_select="mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
ac3_decoder_select="mdct ac3dsp ac3_parser"
ac3_encoder_select="mdct ac3dsp"
ac3_fixed_encoder_select="mdct ac3dsp"
alac_encoder_select="lpc"
amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp"
amv_encoder_select="aandcttables"
atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
binkaudio_rdft_decoder_select="mdct rdft sinewin"
cavs_decoder_select="golomb"
cook_decoder_select="mdct sinewin"
dca_decoder_select="mdct"
dirac_decoder_select="dwt golomb"
dnxhd_encoder_select="aandcttables"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="mdct ac3dsp"
eamad_decoder_select="aandcttables"
eatgq_decoder_select="aandcttables"
eatqi_decoder_select="aandcttables"
ffv1_decoder_select="golomb"
flac_decoder_select="golomb"
flac_encoder_select="golomb lpc"
flashsv_decoder_select="zlib"
flashsv_encoder_select="zlib"
flashsv2_encoder_select="zlib"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
fraps_decoder_select="huffman"
h261_encoder_select="aandcttables"
Diego Biurrun
committed
h263_decoder_select="h263_parser"
h263_encoder_select="aandcttables"
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"
h264_dxva2_hwaccel_deps="dxva2api_h"
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
h264_vaapi_hwaccel_select="vaapi h264_decoder"
h264_vda_hwaccel_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
h264_vda_hwaccel_select="vda h264_decoder"
h264_vdpau_decoder_select="vdpau h264_decoder"
imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
ljpeg_encoder_select="aandcttables"
loco_decoder_select="golomb"
mjpeg_encoder_select="aandcttables"
mlp_decoder_select="mlp_parser"
mp1_decoder_select="mpegaudiodsp"
mp1float_decoder_select="mpegaudiodsp"
mp2_decoder_select="mpegaudiodsp"
mp2float_decoder_select="mpegaudiodsp"
mp3_decoder_select="mpegaudiodsp"
mp3adu_decoder_select="mpegaudiodsp"
mp3adufloat_decoder_select="mpegaudiodsp"
mp3float_decoder_select="mpegaudiodsp"
mp3on4_decoder_select="mpegaudiodsp"
mp3on4float_decoder_select="mpegaudiodsp"
mpc7_decoder_select="mpegaudiodsp"
mpc8_decoder_select="mpegaudiodsp"
mpeg_vdpau_decoder_select="vdpau mpegvideo_decoder"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
mpeg1_vdpau_decoder_select="vdpau mpeg1video_decoder"
mpeg1_vdpau_hwaccel_select="vdpau mpeg1video_decoder"
mpeg1video_encoder_select="aandcttables"
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="aandcttables"
mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
mpeg4_encoder_select="h263_encoder"
mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"

NVIDIA Corporation
committed
mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"
msmpeg4_crystalhd_decoder_select="crystalhd"
msmpeg4v1_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v1_encoder_select="h263_encoder"
msmpeg4v2_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v2_encoder_select="h263_encoder"
msmpeg4v3_decoder_select="h263_decoder"
Diego Biurrun
committed
msmpeg4v3_encoder_select="h263_encoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="mdct sinewin"
png_decoder_select="zlib"
png_encoder_select="zlib"
qcelp_decoder_select="lsp"
qdm2_decoder_select="mdct rdft mpegaudiodsp"
Diego Biurrun
committed
ralf_decoder_select="golomb"
Diego Biurrun
committed
rv10_decoder_select="h263_decoder"
Diego Biurrun
committed
rv10_encoder_select="h263_encoder"
Diego Biurrun
committed
rv20_decoder_select="h263_decoder"
Diego Biurrun
committed
rv20_encoder_select="h263_encoder"
rv30_decoder_select="golomb h264chroma h264pred h264qpel"
rv40_decoder_select="golomb h264chroma h264pred h264qpel"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
snow_encoder_select="aandcttables dwt"
sonic_decoder_select="golomb"
sonic_encoder_select="golomb"
sonic_ls_encoder_select="golomb"
svq1_encoder_select="aandcttables"
svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel"
theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib"
tscc_decoder_select="zlib"
twinvq_decoder_select="mdct lsp sinewin"
vc1_crystalhd_decoder_select="crystalhd"
vc1_decoder_select="h263_decoder h264chroma h264qpel"
Michael Niedermayer
committed
vc1_dxva2_hwaccel_deps="dxva2api_h"
vc1_dxva2_hwaccel_select="dxva2 vc1_decoder"
vc1_vaapi_hwaccel_select="vaapi vc1_decoder"
vc1_vdpau_decoder_select="vdpau vc1_decoder"
vc1image_decoder_select="vc1_decoder"
vorbis_decoder_select="mdct"
vorbis_encoder_select="mdct"
vp3_decoder_select="vp3dsp"
vp5_decoder_select="vp3dsp"
vp6_decoder_select="huffman vp3dsp"
vp6a_decoder_select="vp6_decoder"
vp6f_decoder_select="vp6_decoder"
vp8_decoder_select="h264pred h264qpel"
wmapro_decoder_select="mdct sinewin"
wmav1_decoder_select="mdct sinewin"
wmav1_encoder_select="mdct sinewin"
wmav2_decoder_select="mdct sinewin"
wmav2_encoder_select="mdct sinewin"
wmavoice_decoder_select="lsp rdft dct mdct sinewin"
Diego Biurrun
committed
wmv1_decoder_select="h263_decoder"
wmv1_encoder_select="h263_encoder"
Diego Biurrun
committed
wmv2_decoder_select="h263_decoder"
wmv2_encoder_select="h263_encoder"
wmv3_decoder_select="vc1_decoder"
wmv3_crystalhd_decoder_select="crystalhd"
wmv3_dxva2_hwaccel_select="vc1_dxva2_hwaccel"
wmv3_vaapi_hwaccel_select="vc1_vaapi_hwaccel"
wmv3_vdpau_decoder_select="vc1_vdpau_decoder"
wmv3image_decoder_select="wmv3_decoder"
zlib_decoder_select="zlib"
zlib_encoder_select="zlib"
zmbv_decoder_select="zlib"
zmbv_encoder_select="zlib"
crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
Diego Biurrun
committed
# parsers
h264_parser_select="golomb h264dsp h264pred"
Diego Biurrun
committed
libfaac_encoder_deps="libfaac"
libfdk_aac_encoder_deps="libfdk_aac"
libgsm_decoder_deps="libgsm"
libgsm_encoder_deps="libgsm"
libgsm_ms_decoder_deps="libgsm"
libgsm_ms_encoder_deps="libgsm"
libilbc_decoder_deps="libilbc"
libilbc_encoder_deps="libilbc"
libmodplug_demuxer_deps="libmodplug"
Diego Biurrun
committed
libmp3lame_encoder_deps="libmp3lame"
libopencore_amrnb_decoder_deps="libopencore_amrnb"
libopencore_amrnb_encoder_deps="libopencore_amrnb"
libopencore_amrwb_decoder_deps="libopencore_amrwb"
libopenjpeg_decoder_deps="libopenjpeg"
libopenjpeg_encoder_deps="libopenjpeg"
libschroedinger_decoder_deps="libschroedinger"
libschroedinger_encoder_deps="libschroedinger"
libstagefright_h264_decoder_deps="libstagefright_h264"
libvo_aacenc_encoder_deps="libvo_aacenc"
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
Michael Niedermayer
committed
libvorbis_decoder_deps="libvorbis"
libvorbis_encoder_deps="libvorbis"
Diego Biurrun
committed
libx264_encoder_deps="libx264"
libx264rgb_encoder_deps="libx264"
libxavs_encoder_deps="libxavs"
Diego Biurrun
committed
libxvid_encoder_deps="libxvid"
libutvideo_decoder_deps="libutvideo"
libutvideo_encoder_deps="libutvideo"
ac3_demuxer_select="ac3_parser"
asf_stream_muxer_select="asf_muxer"
avisynth_demuxer_deps="avisynth"
dirac_demuxer_select="dirac_parser"
Diego Biurrun
committed
eac3_demuxer_select="ac3_parser"
flac_demuxer_select="flac_parser"
ipod_muxer_select="mov_muxer"
libnut_demuxer_deps="libnut"
libnut_muxer_deps="libnut"
matroska_audio_muxer_select="matroska_muxer"
matroska_demuxer_suggest="zlib bzlib"
mov_demuxer_suggest="zlib"
mp3_demuxer_select="mpegaudio_parser"
mp4_muxer_select="mov_muxer"
mpegts_muxer_select="adts_muxer latm_muxer"
mpegtsraw_demuxer_select="mpegts_demuxer"
mxf_d10_muxer_select="mxf_muxer"
psp_muxer_select="mov_muxer"
rtp_demuxer_select="sdp_demuxer"
Martin Storsjö
committed
rtpdec_select="asf_demuxer rm_demuxer rtp_protocol mpegts_demuxer mov_demuxer"
rtsp_demuxer_select="http_protocol rtpdec"
rtsp_muxer_select="rtp_muxer http_protocol rtp_protocol"
sap_muxer_select="rtp_muxer rtp_protocol"
Martin Storsjö
committed
sdp_demuxer_select="rtpdec"
spdif_muxer_select="aac_parser"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
w64_demuxer_deps="wav_demuxer"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
alsa_outdev_deps="alsa_asoundlib_h"
bktr_indev_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
dshow_indev_deps="IBaseFilter"
dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
dv1394_indev_deps="dv1394 dv_demuxer"
iec61883_indev_deps="libiec61883"
jack_indev_deps="jack_jack_h sem_timedwait"
lavfi_indev_deps="avfilter"
libcdio_indev_deps="libcdio"
libdc1394_indev_deps="libdc1394"
oss_indev_deps_any="soundcard_h sys_soundcard_h"
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
sndio_indev_deps="sndio_h"
sndio_outdev_deps="sndio_h"
v4l_indev_deps="linux_videodev_h"
v4l2_indev_deps_any="linux_videodev2_h sys_videoio_h"
vfwcap_indev_deps="capCreateCaptureWindow vfwcap_defines"
vfwcap_indev_extralibs="-lavicap32"
x11grab_indev_deps="x11grab"
ffrtmpcrypt_protocol_deps="!librtmp_protocol"
ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl"
ffrtmpcrypt_protocol_select="tcp_protocol"
ffrtmphttp_protocol_deps="!librtmp_protocol"
ffrtmphttp_protocol_select="http_protocol"
gopher_protocol_deps="network"
httpproxy_protocol_deps="network"
httpproxy_protocol_select="tcp_protocol"
http_protocol_deps="network"
http_protocol_select="tcp_protocol"
librtmp_protocol_deps="librtmp"
librtmpe_protocol_deps="librtmp"
librtmps_protocol_deps="librtmp"
librtmpt_protocol_deps="librtmp"
librtmpte_protocol_deps="librtmp"
rtmp_protocol_deps="!librtmp_protocol"
rtmp_protocol_select="tcp_protocol"
rtmps_protocol_deps="!librtmp_protocol"
rtmps_protocol_select="tls_protocol"
rtmpt_protocol_select="ffrtmphttp_protocol"
rtmpte_protocol_select="ffrtmpcrypt_protocol ffrtmphttp_protocol"
rtmpts_protocol_select="ffrtmphttp_protocol https_protocol"
rtp_protocol_select="udp_protocol"
sctp_protocol_deps="network netinet_sctp_h"
tcp_protocol_deps="network"
tls_protocol_deps_any="openssl gnutls"
tls_protocol_select="tcp_protocol"
udp_protocol_deps="network"
amovie_filter_deps="avcodec avformat"
asyncts_filter_deps="avresample"
atempo_filter_deps="avcodec rdft"
boxblur_filter_deps="gpl"
deshake_filter_deps="avcodec"
drawtext_filter_deps="libfreetype"
frei0r_src_filter_extralibs='$ldl'
movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec swscale postproc"
resample_filter_deps="avresample"
ocv_filter_deps="libopencv"
removelogo_filter_deps="avcodec avformat swscale"
super2xsai_filter_deps="gpl"
tinterlace_filter_deps="gpl"
yadif_filter_deps="gpl"
# libraries
avdevice_deps="avcodec avformat"
avformat_deps="avcodec"
postproc_deps="gpl"
Vitor Sessak
committed
ffmpeg_deps="avcodec avfilter avformat swscale swresample"
ffmpeg_select="buffersink_filter format_filter aformat_filter
setpts_filter null_filter anull_filter abuffersink_filter"
ffplay_deps="avcodec avformat swscale swresample sdl"
ffplay_select="buffersink_filter rdft"
ffprobe_deps="avcodec avformat"
ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
doc_deps_any="texi2html makeinfo pod2man"
colormatrix1_test_deps="colormatrix_filter"
colormatrix2_test_deps="colormatrix_filter"
flashsv2_test_deps="zlib"
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
mpng_test_deps="zlib"
pp_test_deps="mp_filter"
pp2_test_deps="mp_filter"
pp3_test_deps="mp_filter"
pp4_test_deps="mp_filter"
pp5_test_deps="mp_filter"
pp6_test_deps="mp_filter"
seek_lavf_mxf_d10_test_deps="mxf_d10_test"
zlib_test_deps="zlib"
zmbv_test_deps="zlib"
test_deps(){
suf1=$1
suf2=$2
shift 2
for v; do
dep=${v%=*}
tests=${v#*=}
for name in ${tests}; do
append ${name}_test_deps ${dep}$suf1 ${dep}$suf2
done
done
}
test_deps _muxer _demuxer \
aiff \
pcm_alaw=alaw \
asf \
au \
avi \
dv=dv_fmt \
ffm \
flv=flv_fmt \
gxf \
matroska=mkv \
mmf \
ogg="ogg ogg_vp3" \
rawvideo=pixfmt \
rm \
swf \
mpegts=ts \
voc \
wav \
yuv4mpegpipe=yuv4mpeg \
logfile="config.log"
prefix_default="/usr/local"
bindir_default='${prefix}/bin'
datadir_default='${prefix}/share/ffmpeg'
incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
shlibdir_default="$libdir_default"
postproc_version_default="current"
cc_default="gcc"
Michael Niedermayer
committed
install="install"
nm_default="nm"
strip_default="strip"
yasmexe_default="yasm"
arch_default=$(uname -m)
Guillaume Poirier
committed
cpu="generic"
target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
# alternative libpostproc version
ALT_PP_VER_MAJOR=51
ALT_PP_VER_MINOR=2
ALT_PP_VER_MICRO=101
ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO
enable $PROGRAM_LIST
enable avcodec
enable avdevice
enable avfilter
enable postproc
enable stripping
enable swresample
enable swscale
enable asm
enable debug
enable doc
enable fastdiv
enable optimizations
enable safe_bitstream_reader
Cédric Schieli
committed
enable swscale_alpha
FFSERVERLDFLAGS=-Wl,-E
LIBPREF="lib"
LIBSUF=".a"
FULLNAME='$(NAME)$(BUILDSUF)'
LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
SLIBPREF="lib"
SLIBSUF=".so"
SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_VERSION)'
SLIB_INSTALL_LINKS='$(SLIBNAME_WITH_MAJOR) $(SLIBNAME)'
asflags_filter=echo
cflags_filter=echo
AS_O='-o $@'
HOSTCC_O='-o $@'
host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
host_cflags_filter=echo
host_ldflags_filter=echo