summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure869
1 files changed, 722 insertions, 147 deletions
diff --git a/configure b/configure
index 46635ce21f..4b46007318 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Libav configure script
+# FFmpeg configure script
#
# Copyright (c) 2000-2002 Fabrice Bellard
# Copyright (c) 2005-2008 Diego Biurrun
@@ -44,9 +44,9 @@ if test "$E1" != 0 || test "$E2" = 0; then
echo "No compatible shell script interpreter found."
echo "This configure script requires a POSIX-compatible shell"
echo "such as bash or ksh."
- echo "THIS IS NOT A BUG IN LIBAV, DO NOT REPORT IT AS SUCH."
+ echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH."
echo "Instead, install a working POSIX-compatible shell."
- echo "Disabling this configure test will create a broken Libav."
+ echo "Disabling this configure test will create a broken FFmpeg."
if test "$BASH_VERSION" = '2.04.0(1)-release'; then
echo "This bash version ($BASH_VERSION) is broken on your platform."
echo "Upgrade to a later version if available."
@@ -78,9 +78,10 @@ Help options:
Standard options:
--logfile=FILE log tests and output to FILE [config.log]
--disable-logging do not log configure debug information
+ --fatal-warnings fail if any configure warning is generated
--prefix=PREFIX install in PREFIX [$prefix]
--bindir=DIR install binaries in DIR [PREFIX/bin]
- --datadir=DIR install data files in DIR [PREFIX/share/avconv]
+ --datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]
--libdir=DIR install libs in DIR [PREFIX/lib]
--shlibdir=DIR install shared libs in DIR [PREFIX/lib]
--incdir=DIR install includes in DIR [PREFIX/include]
@@ -97,31 +98,41 @@ Configuration options:
--disable-static do not build static libraries [no]
--enable-shared build shared libraries [no]
--enable-small optimize for size instead of speed
- --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
+ --disable-runtime-cpudetect disable detecting cpu capabilities at runtime (smaller binary)
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--disable-all disable building components, libraries and programs
Program options:
--disable-programs do not build command line programs
- --disable-avconv disable avconv build
- --disable-avplay disable avplay build
- --disable-avprobe disable avprobe build
- --disable-avserver disable avserver build
+ --disable-ffmpeg disable ffmpeg build
+ --disable-ffplay disable ffplay build
+ --disable-ffprobe disable ffprobe build
+ --disable-ffserver disable ffserver build
-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-avdevice disable libavdevice build
--disable-avcodec disable libavcodec build
--disable-avformat disable libavformat build
--disable-avutil disable libavutil build
+ --disable-swresample disable libswresample build
--disable-swscale disable libswscale build
- --disable-avfilter disable video filter support [no]
- --disable-avresample disable libavresample build [no]
+ --disable-postproc disable libpostproc build
+ --disable-avfilter disable libavfilter build
+ --enable-avresample enable libavresample build [no]
--disable-pthreads disable pthreads [auto]
--disable-w32threads disable Win32 threads [auto]
+ --disable-os2threads disable OS/2 threads [auto]
--disable-network disable network support [no]
--disable-dct disable DCT code
+ --disable-dwt disable DWT code
--disable-error-resilience disable error resilience code
--disable-lsp disable LSP code
--disable-lzo disable LZO decoder code
@@ -175,17 +186,29 @@ Individual component options:
External library support:
--enable-avisynth enable reading of AVISynth script files [no]
--enable-bzlib enable bzlib [autodetect]
+ --enable-fontconfig enable fontconfig
--enable-frei0r enable frei0r video filtering
--enable-gnutls enable gnutls [no]
+ --enable-iconv enable iconv [autodetect]
+ --enable-libaacplus enable AAC+ encoding via libaacplus [no]
+ --enable-libass enable libass subtitles rendering [no]
+ --enable-libbluray enable BluRay reading using libbluray [no]
+ --enable-libcaca enable textual display using libcaca
+ --enable-libcelt enable CELT decoding via libcelt [no]
--enable-libcdio enable audio CD grabbing with libcdio
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
--enable-libfaac enable AAC encoding via libfaac [no]
--enable-libfdk-aac enable AAC encoding via libfdk-aac [no]
+ --enable-libflite enable flite (voice synthesis) support via libflite [no]
--enable-libfreetype enable libfreetype [no]
--enable-libgsm enable GSM de/encoding via libgsm [no]
+ --enable-libiec61883 enable iec61883 via libiec61883 [no]
--enable-libilbc enable iLBC de/encoding via libilbc [no]
+ --enable-libmodplug enable ModPlug via libmodplug [no]
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
+ --enable-libnut enable NUT (de)muxing via libnut,
+ native (de)muxer exists [no]
--enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]
--enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]
--enable-libopencv enable video filtering via libopencv [no]
@@ -194,16 +217,24 @@ External library support:
--enable-libpulse enable Pulseaudio input via libpulse [no]
--enable-librtmp enable RTMP[E] support via librtmp [no]
--enable-libschroedinger enable Dirac de/encoding via libschroedinger [no]
+ --enable-libsoxr enable Include libsoxr resampling [no]
--enable-libspeex enable Speex de/encoding via libspeex [no]
+ --enable-libstagefright-h264 enable H.264 decoding via libstagefright [no]
--enable-libtheora enable Theora encoding via libtheora [no]
+ --enable-libtwolame enable MP2 encoding via libtwolame [no]
+ --enable-libutvideo enable Ut Video encoding and decoding via libutvideo [no]
+ --enable-libv4l2 enable libv4l2/v4l-utils [no]
--enable-libvo-aacenc enable AAC encoding via libvo-aacenc [no]
--enable-libvo-amrwbenc enable AMR-WB encoding via libvo-amrwbenc [no]
- --enable-libvorbis enable Vorbis encoding via libvorbis [no]
+ --enable-libvorbis enable Vorbis en/decoding via libvorbis,
+ native implementation exists [no]
--enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no]
--enable-libx264 enable H.264 encoding via x264 [no]
--enable-libxavs enable AVS encoding via xavs [no]
--enable-libxvid enable Xvid encoding via xvidcore,
native MPEG-4/Xvid encoder exists [no]
+ --enable-openal enable OpenAL 1.1 capture support [no]
+ --enable-opencl enable OpenCL code
--enable-openssl enable openssl [no]
--enable-x11grab enable X11 grabbing [no]
--enable-zlib enable zlib [autodetect]
@@ -217,12 +248,14 @@ Advanced options (experts only):
--target-exec=CMD command to run executables on target
--target-path=DIR path to view of build directory on target
--toolchain=NAME set tool defaults according to NAME
- --nm=NM use nm tool
+ --nm=NM use nm tool NM [$nm_default]
--ar=AR use archive tool AR [$ar_default]
--as=AS use assembler AS [$as_default]
+ --yasmexe=EXE use yasm-compatible assembler EXE [$yasmexe_default]
--cc=CC use C compiler CC [$cc_default]
+ --cxx=CXX use C compiler CXX [$cxx_default]
--dep-cc=DEPCC use dependency generator DEPCC [$cc_default]
- --ld=LD use linker LD
+ --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-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
@@ -231,12 +264,14 @@ Advanced options (experts only):
--host-libs=HLIBS use libs HLIBS when linking for host
--host-os=OS compiler host OS [$target_os]
--extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]
+ --extra-cxxflags=ECFLAGS add ECFLAGS to CXXFLAGS [$CXXFLAGS]
--extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
--extra-libs=ELIBS add ELIBS [$ELIBS]
--extra-version=STRING version string suffix []
--optflags=OPTFLAGS override optimization-related compiler flags
--build-suffix=SUFFIX library name suffix []
--malloc-prefix=PREFIX prefix malloc and related names with PREFIX
+ --progs-suffix=SUFFIX program name suffix []
--arch=ARCH select architecture [$arch]
--cpu=CPU select the minimum required CPU (affects
instruction selection, may crash on older CPUs)
@@ -274,14 +309,28 @@ Optimization options (experts only):
--disable-vis disable VIS optimizations
--disable-inline-asm disable use of inline assembler
--disable-yasm disable use of yasm assembler
-
-Developer options (useful when working on Libav itself):
+ --disable-mips32r2 disable MIPS32R2 optimizations
+ --disable-mipsdspr1 disable MIPS DSP ASE R1 optimizations
+ --disable-mipsdspr2 disable MIPS DSP ASE R2 optimizations
+ --disable-mipsfpu disable floating point MIPS optimizations
+ --disable-fast-unaligned consider unaligned accesses slow
+
+Developer options (useful when working on FFmpeg itself):
+ --enable-coverage build with test coverage instrumentation
--disable-debug disable debugging symbols
--enable-debug=LEVEL set the debug level [$debuglevel]
--disable-optimizations disable compiler optimizations
--enable-extra-warnings enable more compiler warnings
+ --disable-stripping disable stripping of executables and shared libraries
+ --assert-level=level 0(default), 1 or 2, amount of assertion testing,
+ 2 causes a slowdown at runtime.
+ --enable-memory-poisoning fill heap uninitialized allocated space with arbitrary data
+ --valgrind=VALGRIND run "make fate" tests through valgrind to detect memory
+ leaks and errors, using the specified valgrind binary.
+ Cannot be combined with --target-exec
+ --enable-ftrapv Trap arithmetic overflows
--samples=PATH location of test samples for FATE, if not set use
- \$LIBAV_SAMPLES at make invocation time.
+ \$FATE_SAMPLES at make invocation time.
--enable-xmm-clobber-test check XMM registers for clobbering (Win64-only;
should be used only for debugging purposes)
--enable-random randomly enable/disable components
@@ -326,7 +375,7 @@ die(){
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
-libav-user@libav.org mailing list or IRC #libav on irc.freenode.net.
+ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
EOF
if disabled logging; then
cat <<EOF
@@ -642,6 +691,10 @@ add_cflags(){
append CFLAGS $($cflags_filter "$@")
}
+add_cxxflags(){
+ append CXXFLAGS $($cflags_filter "$@")
+}
+
add_asflags(){
append ASFLAGS $($asflags_filter "$@")
}
@@ -692,6 +745,13 @@ check_cc(){
check_cmd $cc $CPPFLAGS $CFLAGS "$@" $CC_C $(cc_o $TMPO) $TMPC
}
+check_cxx(){
+ log check_cxx "$@"
+ cat > $TMPCPP
+ log_file $TMPCPP
+ check_cmd $cxx $CPPFLAGS $CFLAGS $CXXFLAGS "$@" $CXX_C -o $TMPO $TMPCPP
+}
+
check_cpp(){
log check_cpp "$@"
cat > $TMPC
@@ -732,7 +792,7 @@ check_yasm(){
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(){
@@ -741,9 +801,11 @@ ld_o(){
check_ld(){
log check_ld "$@"
- flags=$(filter_out '-l*' "$@")
- libs=$(filter '-l*' "$@")
- check_cc $($cflags_filter $flags) || return
+ type=$1
+ shift 1
+ flags=$(filter_out '-l*|*.so' $@)
+ libs=$(filter '-l*|*.so' $@)
+ check_$type $($cflags_filter $flags) || return
flags=$($ldflags_filter $flags)
libs=$($ldflags_filter $libs)
check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
@@ -778,9 +840,17 @@ int x;
EOF
}
+check_cxxflags(){
+ log check_cxxflags "$@"
+ set -- $($cflags_filter "$@")
+ check_cxx "$@" <<EOF && append CXXFLAGS "$@"
+int x;
+EOF
+}
+
test_ldflags(){
log test_ldflags "$@"
- check_ld "$@" <<EOF
+ check_ld "cc" "$@" <<EOF
int main(void){ return 0; }
EOF
}
@@ -806,7 +876,7 @@ check_func(){
func=$1
shift
disable $func
- check_ld "$@" <<EOF && enable $func
+ check_ld "cc" "$@" <<EOF && enable $func
extern int $func();
int main(void){ $func(); }
EOF
@@ -819,10 +889,10 @@ check_mathfunc(){
shift 2
test $narg = 2 && args="f, g" || args="f"
disable $func
- check_ld "$@" <<EOF && enable $func
+ check_ld "cc" "$@" <<EOF && enable $func
#include <math.h>
float foo(float f, float g) { return $func($args); }
-int main(void){ return 0; }
+int main(void){ return (int) foo; }
EOF
}
@@ -839,7 +909,26 @@ check_func_headers(){
echo "long check_$func(void) { return (long) $func; }"
done
echo "int main(void) { return 0; }"
- } | check_ld "$@" && enable $funcs && enable_safe $headers
+ } | check_ld "cc" "$@" && enable $funcs && enable_safe $headers
+}
+
+check_class_headers_cpp(){
+ log check_class_headers_cpp "$@"
+ headers=$1
+ classes=$2
+ shift 2
+ {
+ for hdr in $headers; do
+ echo "#include <$hdr>"
+ done
+ echo "int main(void) { "
+ i=1
+ for class in $classes; do
+ echo "$class obj$i;"
+ i=$(expr $i + 1)
+ done
+ echo "return 0; }"
+ } | check_ld "cxx" "$@" && enable $funcs && enable_safe $headers
}
check_cpp_condition(){
@@ -871,13 +960,21 @@ check_lib2(){
check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@"
}
+check_lib_cpp(){
+ log check_lib_cpp "$@"
+ headers="$1"
+ classes="$2"
+ shift 2
+ check_class_headers_cpp "$headers" "$classes" "$@" && add_extralibs "$@"
+}
+
check_pkg_config(){
log check_pkg_config "$@"
pkg="$1"
headers="$2"
funcs="$3"
shift 3
- $pkg_config --exists $pkg || return
+ $pkg_config --exists $pkg 2>/dev/null || return
pkg_cflags=$($pkg_config --cflags $pkg)
pkg_libs=$($pkg_config --libs $pkg)
check_func_headers "$headers" "$funcs" $pkg_cflags $pkg_libs "$@" &&
@@ -886,7 +983,7 @@ check_pkg_config(){
}
check_exec(){
- check_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
+ check_ld "cc" "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
}
check_exec_crash(){
@@ -903,9 +1000,10 @@ check_exec_crash(){
static void sighandler(int sig){
raise(SIGTERM);
}
-int foo(void){
+int func(void){
$code
}
+int (*func_ptr)(void) = func;
int main(void){
signal(SIGILL, sighandler);
signal(SIGFPE, sighandler);
@@ -913,7 +1011,7 @@ int main(void){
#ifdef SIGBUS
signal(SIGBUS, sighandler);
#endif
- foo();
+ return func_ptr();
}
EOF
}
@@ -945,7 +1043,7 @@ check_builtin(){
builtin=$3
shift 3
disable "$name"
- check_code ld "$headers" "$builtin" "$@" && enable "$name"
+ check_code ld "$headers" "$builtin" "cc" "$@" && enable "$name"
}
require(){
@@ -964,6 +1062,14 @@ require2(){
check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
}
+require_cpp(){
+ name="$1"
+ headers="$2"
+ classes="$3"
+ shift 3
+ check_lib_cpp "$headers" "$classes" "$@" || die "ERROR: $name not found"
+}
+
require_pkg_config(){
pkg="$1"
check_pkg_config "$@" || die "ERROR: $pkg not found"
@@ -1029,16 +1135,28 @@ COMPONENT_LIST="
EXTERNAL_LIBRARY_LIST="
avisynth
bzlib
+ crystalhd
+ fontconfig
frei0r
gnutls
+ iconv
+ libaacplus
+ libass
+ libbluray
+ libcaca
libcdio
+ libcelt
libdc1394
libfaac
libfdk_aac
+ libflite
libfreetype
libgsm
+ libiec61883
libilbc
+ libmodplug
libmp3lame
+ libnut
libopencore_amrnb
libopencore_amrwb
libopencv
@@ -1047,8 +1165,13 @@ EXTERNAL_LIBRARY_LIST="
libpulse
librtmp
libschroedinger
+ libsoxr
libspeex
+ libstagefright_h264
libtheora
+ libtwolame
+ libutvideo
+ libv4l2
libvo_aacenc
libvo_amrwbenc
libvorbis
@@ -1056,17 +1179,28 @@ EXTERNAL_LIBRARY_LIST="
libx264
libxavs
libxvid
+ openal
+ opencl
openssl
x11grab
zlib
"
+DOCUMENT_LIST="
+ doc
+ htmlpages
+ manpages
+ podpages
+ txtpages
+"
+
HWACCEL_LIST="
dxva2
vaapi
vda
vdpau
"
+
LIBRARY_LIST="
avcodec
avdevice
@@ -1074,33 +1208,40 @@ LIBRARY_LIST="
avformat
avresample
avutil
+ postproc
+ swresample
swscale
"
PROGRAM_LIST="
- avconv
- avplay
- avprobe
- avserver
+ ffplay
+ ffprobe
+ ffserver
+ ffmpeg
"
CONFIG_LIST="
$COMPONENT_LIST
+ $DOCUMENT_LIST
$EXTERNAL_LIBRARY_LIST
$HWACCEL_LIST
$LIBRARY_LIST
$PROGRAM_LIST
dct
- doc
+ dwt
error_resilience
+ fast_unaligned
fft
+ ftrapv
gpl
gray
hardcoded_tables
+ incompatible_fork_abi
lsp
lzo
mdct
memalign_hack
+ memory_poisoning
network
nonfree
pic
@@ -1120,6 +1261,7 @@ CONFIG_LIST="
THREADS_LIST='
pthreads
w32threads
+ os2threads
'
ATOMICS_LIST='
@@ -1185,6 +1327,10 @@ ARCH_EXT_LIST="
altivec
ppc4xx
vis
+ mipsfpu
+ mips32r2
+ mipsdspr1
+ mipsdspr2
"
HAVE_LIST_CMDLINE='
@@ -1196,11 +1342,13 @@ HAVE_LIST_CMDLINE='
HAVE_LIST_PUB='
bigendian
fast_unaligned
+ incompatible_fork_abi
'
MATH_FUNCS="
atanf
atan2f
+ cbrt
cbrtf
cosf
exp2
@@ -1234,6 +1382,7 @@ HAVE_LIST="
$THREADS_LIST
$ATOMICS_LIST
$MATH_FUNCS
+ access
aligned_malloc
aligned_stack
alsa_asoundlib_h
@@ -1241,12 +1390,14 @@ HAVE_LIST="
arpa_inet_h
asm_mod_q
asm_mod_y
+ asm_types_h
atomic_cas_ptr
atomics_native
attribute_may_alias
attribute_packed
cdio_paranoia_h
cdio_paranoia_paranoia_h
+ clock_gettime
closesocket
cmov
CommandLineToArgvW
@@ -1280,6 +1431,7 @@ HAVE_LIST="
getrusage
getservbyport
gettimeofday
+ glob
gnu_as
gsm_h
ibm_asm
@@ -1287,6 +1439,7 @@ HAVE_LIST="
io_h
isatty
jack_port_get_latency_range
+ kbhit
ldbrx
libdc1394_1
libdc1394_2
@@ -1294,9 +1447,11 @@ HAVE_LIST="
local_aligned_8
localtime_r
loongson
+ lzo1x_999_compress
machine_ioctl_bt848_h
machine_ioctl_meteor_h
machine_rw_barrier
+ makeinfo
malloc_h
MapViewOfFile
memalign
@@ -1307,9 +1462,15 @@ HAVE_LIST="
mprotect
msvcrt
nanosleep
+ openjpeg_1_5_openjpeg_h
+ PeekNamedPipe
+ perl
+ pod2man
poll_h
posix_memalign
+ pthread_cancel
rdtsc
+ rsync_contimeout
sched_getaffinity
sdl
SetConsoleTextAttribute
@@ -1320,14 +1481,13 @@ HAVE_LIST="
socklen_t
soundcard_h
strerror_r
- strptime
- strtok_r
struct_addrinfo
struct_group_source_req
struct_ip_mreq_source
struct_ipv6_mreq
struct_pollfd
struct_rusage_ru_maxrss
+ struct_sctp_event_subscribe
struct_sockaddr_in6
struct_sockaddr_sa_len
struct_sockaddr_storage
@@ -1344,6 +1504,8 @@ HAVE_LIST="
sys_soundcard_h
sys_time_h
sys_videoio_h
+ termios_h
+ texi2html
threads
unistd_h
usleep
@@ -1360,6 +1522,8 @@ CONFIG_EXTRA="
aandcttables
ac3dsp
audio_frame_queue
+ dsputil
+ frame_thread_encoder
gcrypt
golomb
gplv3
@@ -1367,6 +1531,7 @@ CONFIG_EXTRA="
h264dsp
h264pred
h264qpel
+ hpeldsp
huffman
lgplv3
lpc
@@ -1389,12 +1554,14 @@ CMDLINE_SELECT="
$HAVE_LIST_CMDLINE
$THREADS_LIST
asm
+ coverage
cross_compile
debug
extra_warnings
logging
lto
optimizations
+ stripping
"
PATHS_LIST='
@@ -1412,10 +1579,12 @@ CMDLINE_SET="
ar
arch
as
+ assert_level
build_suffix
cc
cpu
cross_prefix
+ cxx
dep_cc
extra_version
host_cc
@@ -1424,24 +1593,30 @@ CMDLINE_SET="
host_ldflags
host_libs
host_os
+ install
ld
logfile
malloc_prefix
nm
optflags
pkg_config
+ progs_suffix
random_seed
samples
+ strip
sysinclude
sysroot
target_exec
target_os
target_path
toolchain
+ valgrind
+ yasmexe
"
CMDLINE_APPEND="
extra_cflags
+ extra_cxxflags
host_cppflags
"
@@ -1458,6 +1633,11 @@ vfpv3_deps="vfp"
map 'eval ${v}_inline_deps=inline_asm' $ARCH_EXT_LIST_ARM
+mipsfpu_deps="mips"
+mips32r2_deps="mips"
+mipsdspr1_deps="mips"
+mipsdspr2_deps="mips"
+
altivec_deps="ppc"
ppc4xx_deps="ppc"
@@ -1503,51 +1683,66 @@ log2_deps="!msvcrt"
# subsystems
dct_select="rdft"
+error_resilience_select="dsputil"
+frame_thread_encoder_deps="encoders threads"
mdct_select="fft"
rdft_select="fft"
mpegaudio_select="mpegaudiodsp"
mpegaudiodsp_select="dct"
-mpegvideo_select="videodsp"
+mpegvideo_select="dsputil h264chroma hpeldsp videodsp"
mpegvideoenc_select="mpegvideo"
# decoders / encoders
aac_decoder_select="mdct sinewin"
aac_encoder_select="audio_frame_queue 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"
+ac3_decoder_select="mdct ac3dsp ac3_parser dsputil"
+ac3_encoder_select="mdct ac3dsp dsputil"
+ac3_fixed_encoder_select="mdct ac3dsp dsputil"
alac_encoder_select="lpc"
+als_decoder_select="dsputil"
amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp"
+amv_encoder_select="aandcttables"
+ape_decoder_select="dsputil"
+asv_decoder_select="dsputil"
atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
+bink_decoder_select="dsputil hpeldsp"
binkaudio_dct_decoder_select="mdct rdft dct sinewin"
binkaudio_rdft_decoder_select="mdct rdft sinewin"
-cavs_decoder_select="golomb h264chroma videodsp"
+cavs_decoder_select="dsputil golomb h264chroma videodsp"
+cllc_decoder_select="dsputil"
comfortnoise_encoder_select="lpc"
-cook_decoder_select="mdct sinewin"
+cook_decoder_select="dsputil mdct sinewin"
cscd_decoder_select="lzo"
cscd_decoder_suggest="zlib"
dca_decoder_select="mdct"
-dnxhd_encoder_select="aandcttables mpegvideoenc"
+dirac_decoder_select="dsputil dwt golomb videodsp"
+dnxhd_decoder_select="dsputil"
+dnxhd_encoder_select="aandcttables dsputil mpegvideoenc"
+dvvideo_decoder_select="dsputil"
dxa_decoder_select="zlib"
eac3_decoder_select="ac3_decoder"
eac3_encoder_select="ac3_encoder"
-eamad_decoder_select="aandcttables mpegvideo"
+eamad_decoder_select="aandcttables dsputil mpegvideo"
eatgq_decoder_select="aandcttables"
eatqi_decoder_select="aandcttables error_resilience mpegvideo"
-ffv1_decoder_select="golomb rangecoder"
+exr_decoder_select="zlib"
+ffv1_decoder_select="dsputil golomb rangecoder"
ffv1_encoder_select="rangecoder"
ffvhuff_encoder_select="huffman"
flac_decoder_select="golomb"
-flac_encoder_select="golomb lpc"
+flac_encoder_select="dsputil golomb lpc"
flashsv_decoder_select="zlib"
flashsv_encoder_select="zlib"
+flashsv2_encoder_select="zlib"
flashsv2_decoder_select="zlib"
flv_decoder_select="h263_decoder"
flv_encoder_select="h263_encoder"
-fraps_decoder_select="huffman"
+fourxm_decoder_select="dsputil"
+fraps_decoder_select="dsputil huffman"
+g729_decoder_select="dsputil"
h261_decoder_select="error_resilience mpegvideo"
h261_encoder_select="aandcttables mpegvideoenc"
h263_decoder_select="error_resilience h263_parser mpegvideo"
@@ -1556,16 +1751,24 @@ h263i_decoder_select="h263_decoder"
h263p_encoder_select="h263_encoder"
h264_decoder_select="golomb h264chroma h264dsp h264pred h264qpel videodsp"
h264_decoder_suggest="error_resilience"
+huffyuv_decoder_select="dsputil"
huffyuv_encoder_select="huffman"
iac_decoder_select="fft mdct sinewin"
-imc_decoder_select="fft mdct sinewin"
+imc_decoder_select="dsputil fft mdct sinewin"
+indeo3_decoder_select="hpeldsp"
+interplay_video_decoder_select="hpeldsp"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
+jv_decoder_select="dsputil"
+lagarith_decoder_select="dsputil"
ljpeg_encoder_select="aandcttables mpegvideoenc"
loco_decoder_select="golomb"
-mdec_decoder_select="error_resilience mpegvideo"
-mjpeg_encoder_select="aandcttables mpegvideoenc"
-mlp_decoder_select="mlp_parser"
+mdec_decoder_select="dsputil error_resilience mpegvideo"
+mimic_decoder_select="dsputil hpeldsp"
+mjpeg_decoder_select="dsputil hpeldsp"
+mjpeg_encoder_select="aandcttables dsputil mpegvideoenc"
+mlp_decoder_select="dsputil mlp_parser"
+motionpixels_decoder_select="dsputil"
mp1_decoder_select="mpegaudio"
mp1float_decoder_select="mpegaudio"
mp2_decoder_select="mpegaudio"
@@ -1576,8 +1779,8 @@ mp3adufloat_decoder_select="mpegaudio"
mp3float_decoder_select="mpegaudio"
mp3on4_decoder_select="mpegaudio"
mp3on4float_decoder_select="mpegaudio"
-mpc7_decoder_select="mpegaudiodsp"
-mpc8_decoder_select="mpegaudiodsp"
+mpc7_decoder_select="dsputil mpegaudiodsp"
+mpc8_decoder_select="dsputil mpegaudiodsp"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpeg2video_decoder"
mpeg1video_decoder_select="error_resilience mpegvideo"
@@ -1594,13 +1797,15 @@ msmpeg4v3_encoder_select="h263_encoder"
mss2_decoder_select="error_resilience vc1_decoder"
nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="audio_frame_queue mdct sinewin"
-nuv_decoder_select="lzo"
+nuv_decoder_select="dsputil lzo"
png_decoder_select="zlib"
-png_encoder_select="zlib"
+png_encoder_select="dsputil zlib"
+prores_decoder_select="dsputil"
qcelp_decoder_select="lsp"
qdm2_decoder_select="mdct rdft mpegaudiodsp"
ra_144_encoder_select="audio_frame_queue lpc"
ralf_decoder_select="golomb"
+rtjpeg_decoder_select="dsputil"
rv10_decoder_select="error_resilience h263_decoder"
rv10_encoder_select="h263_encoder"
rv20_decoder_select="error_resilience h263_decoder"
@@ -1609,23 +1814,33 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvi
rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp"
shorten_decoder_select="golomb"
sipr_decoder_select="lsp"
-svq1_encoder_select="aandcttables mpegvideoenc"
-svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel mpegvideo videodsp"
+snow_decoder_select="dsputil dwt h264qpel hpeldsp rangecoder"
+snow_encoder_select="aandcttables dsputil dwt h264qpel hpeldsp mpegvideoenc rangecoder"
+sonic_decoder_select="golomb"
+sonic_encoder_select="golomb"
+sonic_ls_encoder_select="golomb"
+svq1_decoder_select="hpeldsp"
+svq1_encoder_select="aandcttables dsputil hpeldsp mpegvideoenc"
+svq3_decoder_select="dsputil golomb h264chroma h264dsp h264pred h264qpel mpegvideo videodsp"
svq3_decoder_suggest="error_resilience zlib"
+tak_decoder_select="dsputil"
theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib"
-truehd_decoder_select="mlp_decoder"
+truehd_decoder_select="mlp_parser"
+truemotion2_decoder_select="dsputil"
tscc_decoder_select="zlib"
twinvq_decoder_select="mdct lsp sinewin"
+utvideo_decoder_select="dsputil"
utvideo_encoder_select="huffman"
+vble_decoder_select="dsputil"
vc1_decoder_select="error_resilience h263_decoder h264chroma h264qpel"
vc1image_decoder_select="vc1_decoder"
vorbis_decoder_select="mdct"
vorbis_encoder_select="mdct"
-vp3_decoder_select="vp3dsp videodsp"
-vp5_decoder_select="h264chroma videodsp vp3dsp"
-vp6_decoder_select="h264chroma huffman videodsp vp3dsp"
+vp3_decoder_select="hpeldsp vp3dsp videodsp"
+vp5_decoder_select="h264chroma hpeldsp videodsp vp3dsp"
+vp6_decoder_select="h264chroma hpeldsp huffman videodsp vp3dsp"
vp6a_decoder_select="vp6_decoder"
vp6f_decoder_select="vp6_decoder"
vp8_decoder_select="h264pred videodsp"
@@ -1648,6 +1863,7 @@ zmbv_decoder_select="zlib"
zmbv_encoder_select="zlib"
# hardware accelerators
+crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
dxva2_deps="dxva2api_h"
vaapi_deps="va_va_h"
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
@@ -1658,10 +1874,13 @@ h263_vaapi_hwaccel_deps="vaapi"
h263_vaapi_hwaccel_select="h263_decoder"
h263_vdpau_hwaccel_deps="vdpau"
h263_vdpau_hwaccel_select="h263_decoder"
+h264_crystalhd_decoder_select="crystalhd h264_mp4toannexb_bsf h264_parser"
h264_dxva2_hwaccel_deps="dxva2"
h264_dxva2_hwaccel_select="h264_decoder"
h264_vaapi_hwaccel_deps="vaapi"
h264_vaapi_hwaccel_select="h264_decoder"
+h264_vda_decoder_deps="vda"
+h264_vda_decoder_select="h264_decoder"
h264_vda_hwaccel_deps="vda"
h264_vda_hwaccel_select="h264_decoder"
h264_vdpau_decoder_deps="vdpau"
@@ -1674,18 +1893,22 @@ mpeg1_vdpau_decoder_deps="vdpau"
mpeg1_vdpau_decoder_select="mpeg1video_decoder"
mpeg1_vdpau_hwaccel_deps="vdpau"
mpeg1_vdpau_hwaccel_select="mpeg1video_decoder"
+mpeg2_crystalhd_decoder_select="crystalhd"
mpeg2_dxva2_hwaccel_deps="dxva2"
mpeg2_dxva2_hwaccel_select="mpeg2video_decoder"
mpeg2_vaapi_hwaccel_deps="vaapi"
mpeg2_vaapi_hwaccel_select="mpeg2video_decoder"
mpeg2_vdpau_hwaccel_deps="vdpau"
mpeg2_vdpau_hwaccel_select="mpeg2video_decoder"
+mpeg4_crystalhd_decoder_select="crystalhd"
mpeg4_vaapi_hwaccel_deps="vaapi"
mpeg4_vaapi_hwaccel_select="mpeg4_decoder"
mpeg4_vdpau_decoder_deps="vdpau"
mpeg4_vdpau_decoder_select="mpeg4_decoder"
mpeg4_vdpau_hwaccel_deps="vdpau"
mpeg4_vdpau_hwaccel_select="mpeg4_decoder"
+msmpeg4_crystalhd_decoder_select="crystalhd"
+vc1_crystalhd_decoder_select="crystalhd"
vc1_dxva2_hwaccel_deps="dxva2"
vc1_dxva2_hwaccel_select="vc1_decoder"
vc1_vaapi_hwaccel_deps="vaapi"
@@ -1694,6 +1917,7 @@ vc1_vdpau_decoder_deps="vdpau"
vc1_vdpau_decoder_select="vc1_decoder"
vc1_vdpau_hwaccel_deps="vdpau"
vc1_vdpau_hwaccel_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"
@@ -1706,6 +1930,8 @@ mpegvideo_parser_select="error_resilience mpegvideo"
vc1_parser_select="mpegvideo"
# external libraries
+libaacplus_encoder_deps="libaacplus"
+libcelt_decoder_deps="libcelt"
libfaac_encoder_deps="libfaac"
libfaac_encoder_select="audio_frame_queue"
libfdk_aac_encoder_deps="libfdk_aac"
@@ -1716,6 +1942,7 @@ libgsm_ms_decoder_deps="libgsm"
libgsm_ms_encoder_deps="libgsm"
libilbc_decoder_deps="libilbc"
libilbc_encoder_deps="libilbc"
+libmodplug_demuxer_deps="libmodplug"
libmp3lame_encoder_deps="libmp3lame"
libmp3lame_encoder_select="audio_frame_queue"
libopencore_amrnb_decoder_deps="libopencore_amrnb"
@@ -1732,10 +1959,13 @@ libschroedinger_encoder_deps="libschroedinger"
libspeex_decoder_deps="libspeex"
libspeex_encoder_deps="libspeex"
libspeex_encoder_select="audio_frame_queue"
+libstagefright_h264_decoder_deps="libstagefright_h264"
libtheora_encoder_deps="libtheora"
+libtwolame_encoder_deps="libtwolame"
libvo_aacenc_encoder_deps="libvo_aacenc"
libvo_aacenc_encoder_select="audio_frame_queue"
libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
+libvorbis_decoder_deps="libvorbis"
libvorbis_encoder_deps="libvorbis"
libvorbis_encoder_select="audio_frame_queue"
libvpx_vp8_decoder_deps="libvpx"
@@ -1743,18 +1973,26 @@ libvpx_vp8_encoder_deps="libvpx"
libvpx_vp9_decoder_deps="libvpx"
libvpx_vp9_encoder_deps="libvpx"
libx264_encoder_deps="libx264"
+libx264rgb_encoder_deps="libx264"
libxavs_encoder_deps="libxavs"
libxvid_encoder_deps="libxvid"
+libutvideo_decoder_deps="libutvideo"
+libutvideo_encoder_deps="libutvideo"
# demuxers / muxers
ac3_demuxer_select="ac3_parser"
asf_stream_muxer_select="asf_muxer"
avisynth_demuxer_deps="avisynth"
dirac_demuxer_select="dirac_parser"
+dts_demuxer_select="dca_parser"
+dtshd_demuxer_select="dca_parser"
eac3_demuxer_select="ac3_parser"
+f4v_muxer_select="mov_muxer"
flac_demuxer_select="flac_parser"
ipod_muxer_select="mov_muxer"
ismv_muxer_select="mov_muxer"
+libnut_demuxer_deps="libnut"
+libnut_muxer_deps="libnut"
matroska_audio_muxer_select="matroska_muxer"
matroska_demuxer_suggest="bzlib lzo zlib"
mov_demuxer_suggest="zlib"
@@ -1778,28 +2016,40 @@ spdif_muxer_select="aac_parser"
tak_demuxer_select="tak_parser"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
+vobsub_demuxer_select="mpegps_demuxer"
w64_demuxer_deps="wav_demuxer"
+w64_muxer_deps="wav_muxer"
# 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"
+caca_outdev_deps="libcaca"
+dshow_indev_deps="IBaseFilter"
+dshow_indev_extralibs="-lpsapi -lole32 -lstrmiids -luuid"
dv1394_indev_deps="dv1394 dv_demuxer"
fbdev_indev_deps="linux_fb_h"
-jack_indev_deps="jack_jack_h"
+iec61883_indev_deps="libiec61883"
+jack_indev_deps="jack_jack_h sem_timedwait"
+lavfi_indev_deps="avfilter"
libcdio_indev_deps="libcdio"
libdc1394_indev_deps="libdc1394"
+libv4l2_indev_deps="libv4l2"
+openal_indev_deps="openal"
oss_indev_deps_any="soundcard_h sys_soundcard_h"
oss_outdev_deps_any="soundcard_h sys_soundcard_h"
pulse_indev_deps="libpulse"
+sdl_outdev_deps="sdl"
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 XShmCreateImage"
+x11grab_indev_deps="x11grab"
# protocols
+bluray_protocol_deps="libbluray"
ffrtmpcrypt_protocol_deps="!librtmp_protocol"
ffrtmpcrypt_protocol_deps_any="gcrypt nettle openssl"
ffrtmpcrypt_protocol_select="tcp_protocol"
@@ -1834,20 +2084,52 @@ tls_protocol_select="tcp_protocol"
udp_protocol_select="network"
# filters
+aconvert_filter_deps="swresample"
+amovie_filter_deps="avcodec avformat"
+aresample_filter_deps="swresample"
+ass_filter_deps="libass"
+asyncts_filter_deps="avresample"
+atempo_filter_deps="avcodec rdft"
blackframe_filter_deps="gpl"
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_filter_deps="frei0r dlopen strtok_r"
+ebur128_filter_deps="gpl"
+flite_filter_deps="libflite"
+frei0r_filter_deps="frei0r dlopen"
frei0r_filter_extralibs='$ldl'
-frei0r_src_filter_deps="frei0r dlopen strtok_r"
+frei0r_src_filter_deps="frei0r dlopen"
frei0r_src_filter_extralibs='$ldl'
+geq_filter_deps="gpl"
+histeq_filter_deps="gpl"
hqdn3d_filter_deps="gpl"
+hue_filter_deps="gpl"
+kerndeint_filter_deps="gpl"
+movie_filter_deps="avcodec avformat"
+mp_filter_deps="gpl avcodec swscale inline_asm"
+mptestsrc_filter_deps="gpl"
+negate_filter_deps="lut_filter"
+noise_filter_deps="gpl"
resample_filter_deps="avresample"
ocv_filter_deps="libopencv"
+pan_filter_deps="swresample"
+pp_filter_deps="gpl postproc"
+removelogo_filter_deps="avcodec avformat swscale"
scale_filter_deps="swscale"
+smartblur_filter_deps="gpl swscale"
+showspectrum_filter_deps="avcodec rdft"
+stereo3d_filter_deps="gpl"
+subtitles_filter_deps="avformat avcodec libass"
+super2xsai_filter_deps="gpl"
+tinterlace_filter_deps="gpl"
yadif_filter_deps="gpl"
+pixfmts_super2xsai_test_deps="super2xsai_filter"
+tinterlace_merge_test_deps="tinterlace_filter"
+tinterlace_pad_test_deps="tinterlace_filter"
# libraries
avcodec_deps="avutil"
@@ -1855,20 +2137,25 @@ avdevice_deps="avutil avcodec avformat"
avfilter_deps="avutil"
avformat_deps="avutil avcodec"
avresample_deps="avutil"
+postproc_deps="avutil gpl"
swscale_deps="avutil"
# programs
-avconv_deps="avcodec avfilter avformat avresample swscale"
-avconv_select="aformat_filter anull_filter asyncts_filter format_filter
- fps_filter null_filter resample_filter scale_filter
- setpts_filter"
-avplay_deps="avcodec avformat avresample swscale sdl"
-avplay_select="rdft"
-avprobe_deps="avcodec avformat"
-avserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer !shared"
-avserver_extralibs='$ldl'
-
-doc_deps="texi2html"
+ffmpeg_deps="avcodec avfilter avformat swscale swresample"
+ffmpeg_select="format_filter aformat_filter
+ setpts_filter null_filter anull_filter"
+ffplay_deps="avcodec avformat swscale swresample sdl"
+ffplay_select="rdft crop_filter"
+ffprobe_deps="avcodec avformat"
+ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
+ffserver_extralibs='$ldl'
+
+# documentation
+podpages_deps="perl"
+manpages_deps="perl pod2man"
+htmlpages_deps="texi2html"
+txtpages_deps="makeinfo"
+doc_deps_any="manpages htmlpages podpages txtpages"
# default parameters
@@ -1877,7 +2164,7 @@ logfile="config.log"
# installation paths
prefix_default="/usr/local"
bindir_default='${prefix}/bin'
-datadir_default='${prefix}/share/avconv'
+datadir_default='${prefix}/share/ffmpeg'
incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
@@ -1886,14 +2173,17 @@ shlibdir_default="$libdir_default"
# toolchain
ar_default="ar"
cc_default="gcc"
+cxx_default="g++"
host_cc_default="gcc"
cp_f="cp -f"
+install="install"
ln_s="ln -s -f"
nm_default="nm -g"
objformat="elf"
pkg_config_default=pkg-config
ranlib="ranlib"
-yasmexe="yasm"
+strip_default="strip"
+yasmexe_default="yasm"
nogas=":"
@@ -1906,12 +2196,16 @@ target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
# configurable options
-enable $LIBRARY_LIST $PROGRAM_LIST
+enable $PROGRAM_LIST
+enable $DOCUMENT_LIST
+enable $(filter_out avresample $LIBRARY_LIST)
+enable stripping
enable asm
enable debug
enable doc
enable optimizations
+enable runtime_cpudetect
enable safe_bitstream_reader
enable static
enable swscale_alpha
@@ -1921,7 +2215,7 @@ enable dxva2 vdpau
# build settings
SHFLAGS='-shared -Wl,-soname,$$(@F)'
-AVSERVERLDFLAGS=-Wl,-E
+FFSERVERLDFLAGS=-Wl,-E
LIBPREF="lib"
LIBSUF=".a"
FULLNAME='$(NAME)$(BUILDSUF)'
@@ -1944,6 +2238,8 @@ AS_O='-o $@'
CC_C='-c'
CC_E='-E -o $@'
CC_O='-o $@'
+CXX_C='-c'
+CXX_O='-o $@'
LD_O='-o $@'
LD_LIB='-l%'
LD_PATH='-L'
@@ -1979,7 +2275,7 @@ for v in "$@"; do
r=${v#*=}
l=${v%"$r"}
r=$(sh_quote "$r")
- LIBAV_CONFIGURATION="${LIBAV_CONFIGURATION# } ${l}${r}"
+ FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
done
find_things(){
@@ -2099,7 +2395,9 @@ for opt do
is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
eval list=\$$(toupper $thing)_LIST
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
- $action $(filter "$name" $list)
+ list=$(filter "$name" $list)
+ [ "$list" = "" ] && warn "Option $opt did not match anything"
+ $action $list
;;
--enable-?*|--disable-?*)
eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
@@ -2120,6 +2418,8 @@ for opt do
;;
--help|-h) show_help
;;
+ --fatal-warnings) enable fatal_warnings
+ ;;
*)
optname="${opt%%=*}"
optname="${optname#--}"
@@ -2137,7 +2437,7 @@ done
disabled logging && logfile=/dev/null
-echo "# $0 $LIBAV_CONFIGURATION" > $logfile
+echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
set >> $logfile
test -n "$cross_prefix" && enable cross_compile
@@ -2149,9 +2449,11 @@ fi
ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}"
+cxx_default="${cross_prefix}${cxx_default}"
nm_default="${cross_prefix}${nm_default}"
pkg_config_default="${cross_prefix}${pkg_config_default}"
ranlib="${cross_prefix}${ranlib}"
+strip_default="${cross_prefix}${strip_default}"
sysinclude_default="${sysroot}/usr/include"
@@ -2178,7 +2480,7 @@ case "$toolchain" in
;;
esac
-set_default arch cc pkg_config sysinclude target_os
+set_default arch cc cxx pkg_config strip sysinclude target_os yasmexe
enabled cross_compile || host_cc_default=$cc
set_default host_cc
@@ -2221,6 +2523,7 @@ trap 'rm -f -- $TMPFILES' EXIT
tmpfile TMPASM .asm
tmpfile TMPC .c
+tmpfile TMPCPP .cpp
tmpfile TMPE $EXESUF
tmpfile TMPH .h
tmpfile TMPO .o
@@ -2271,6 +2574,7 @@ msvc_flags(){
-Wall) echo -W4 -wd4244 -wd4127 -wd4018 -wd4389 \
-wd4146 -wd4057 -wd4204 -wd4706 -wd4305 \
-wd4152 -wd4324 -we4013 -wd4100 -wd4214 \
+ -wd4554 \
-wd4996 -wd4273 ;;
-std=c99) ;;
-fno-math-errno) ;;
@@ -2316,7 +2620,8 @@ suncc_flags(){
core2) echo -xarch=ssse3 -xchip=core2 ;;
corei7) echo -xarch=sse4_2 -xchip=nehalem ;;
corei7-avx) echo -xarch=avx -xchip=sandybridge ;;
- amdfam10|barcelona|bdver*) echo -xarch=sse4_1 ;;
+ amdfam10|barcelona) echo -xtarget=barcelona ;;
+ bdver*) echo -xarch=avx ;;
athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
k8|opteron|athlon64|athlon-fx)
echo -xarch=sse2a ;;
@@ -2496,6 +2801,7 @@ probe_cc(){
if [ $pfx = hostcc ]; then
append _cflags -Dsnprintf=_snprintf
fi
+ disable stripping
fi
eval ${pfx}_type=\$_type
@@ -2576,6 +2882,7 @@ else
fi
add_cflags $extra_cflags
+add_cxxflags $extra_cxxflags
add_asflags $extra_cflags
if test -n "$sysroot"; then
@@ -2616,7 +2923,7 @@ case "$arch" in
aarch64|arm64)
arch="aarch64"
;;
- arm*)
+ arm*|iPad*)
arch="arm"
;;
mips*|IP*)
@@ -2640,7 +2947,7 @@ case "$arch" in
tilegx|tile-gx)
arch="tilegx"
;;
- i[3-6]86|i86pc|BePC|x86pc|x86_64|amd64)
+ i[3-6]86|i86pc|BePC|x86pc|x86_64|x86_32|amd64)
arch="x86"
;;
esac
@@ -2750,6 +3057,28 @@ elif enabled mips; then
cpuflags="-march=$cpu"
+ case $cpu in
+ 24kc)
+ disable mipsfpu
+ disable mipsdspr1
+ disable mipsdspr2
+ ;;
+ 24kf*)
+ disable mipsdspr1
+ disable mipsdspr2
+ ;;
+ 24kec|34kc|1004kc)
+ disable mipsfpu
+ disable mipsdspr2
+ ;;
+ 24kef*|34kf*|1004kf*)
+ disable mipsdspr2
+ ;;
+ 74kc)
+ disable mipsfpu
+ ;;
+ esac
+
elif enabled ppc; then
case $(tolower $cpu) in
@@ -2858,6 +3187,7 @@ if test "$?" != 0; then
fi
add_cppflags -D_ISOC99_SOURCE
+add_cxxflags -D__STDC_CONSTANT_MACROS
check_cflags -std=c99
check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
#include <stdlib.h>
@@ -2903,6 +3233,11 @@ case "$arch" in
spic=$shared
fi
;;
+ ppc)
+ check_cc <<EOF && subarch="ppc64"
+ int test[(int)sizeof(char*) - 7];
+EOF
+ ;;
esac
enable $subarch
@@ -2916,7 +3251,7 @@ case $target_os in
host_libs=
;;
sunos)
- AVSERVERLDFLAGS=""
+ FFSERVERLDFLAGS=""
SHFLAGS='-shared -Wl,-h,$$(@F)'
enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
network_extralibs="-lsocket -lnsl"
@@ -2933,6 +3268,7 @@ case $target_os in
disable symver
oss_indev_extralibs="-lossaudio"
oss_outdev_extralibs="-lossaudio"
+ enabled gcc || check_ldflags -Wl,-zmuldefs
;;
openbsd|bitrig)
disable symver
@@ -2949,17 +3285,19 @@ case $target_os in
;;
bsd/os)
add_extralibs -lpoll -lgnugetopt
+ strip="strip -d"
;;
darwin)
gas="gas-preprocessor.pl $cc"
enabled ppc && add_asflags -force_cpusubtype_ALL
SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR)'
enabled x86_32 && append SHFLAGS -Wl,-read_only_relocs,suppress
+ strip="${strip} -x"
add_ldflags -Wl,-dynamic,-search_paths_first
SLIBSUF=".dylib"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
- AVSERVERLDFLAGS=-Wl,-bind_at_load
+ FFSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
enabled x86_64 && objformat="macho64"
enabled_any pic shared ||
@@ -2982,14 +3320,21 @@ case $target_os in
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
- SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+ dlltool="${cross_prefix}dlltool"
+ if check_cmd lib.exe -list; then
+ SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
+ if enabled x86_64; then
+ LIBTARGET=x64
+ fi
+ elif check_cmd $dlltool --version; then
+ SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
+ fi
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
SLIB_INSTALL_LINKS=
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.orig.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
objformat="win32"
- dlltool="${cross_prefix}dlltool"
ranlib=:
enable dos_paths
;;
@@ -3045,12 +3390,13 @@ case $target_os in
ranlib="echo ignoring ranlib"
;;
os/2*)
+ strip="lxlite -CS"
ln_s="cp -f"
objformat="aout"
add_cppflags -D_GNU_SOURCE
add_ldflags -Zomf -Zbin-files -Zargs-wild -Zmap
SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
- AVSERVERLDFLAGS=""
+ FFSERVERLDFLAGS=""
LIBSUF="_s.a"
SLIBPREF=""
SLIBSUF=".dll"
@@ -3066,6 +3412,7 @@ case $target_os in
emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
SLIB_INSTALL_EXTRA_LIB='$(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib'
enable dos_paths
+ enable_weak os2threads
;;
gnu/kfreebsd)
add_cppflags -D_BSD_SOURCE
@@ -3090,7 +3437,7 @@ case $target_os in
;;
osf1)
add_cppflags -D_OSF_SOURCE -D_POSIX_PII -D_REENTRANT
- AVSERVERLDFLAGS=
+ FFSERVERLDFLAGS=
;;
minix)
;;
@@ -3103,7 +3450,7 @@ case $target_os in
add_compat strtod.o strtod=avpriv_strtod
network_extralibs='-lbsd'
exeobjs=compat/plan9/main.o
- disable avserver
+ disable ffserver
cp_f='cp'
;;
none)
@@ -3133,6 +3480,11 @@ elif check_header _mingw.h; then
(__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW runtime version must be >= 3.15."
add_cppflags -U__STRICT_ANSI__
+ if check_cpp_condition _mingw.h "defined(__MINGW64_VERSION_MAJOR) && \
+ __MINGW64_VERSION_MAJOR < 3"; then
+ add_compat msvcrt/snprintf.o
+ add_cflags "-include $source_path/compat/msvcrt/snprintf.h"
+ fi
elif check_func_headers stdlib.h _get_doserrno; then
libc_type=msvcrt
add_compat strtod.o strtod=avpriv_strtod
@@ -3163,7 +3515,7 @@ esc(){
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
}
-echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $LIBAV_CONFIGURATION)" >config.fate
+echo "config:$arch:$subarch:$cpu:$target_os:$(esc $cc_ident):$(esc $FFMPEG_CONFIGURATION)" >config.fate
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
@@ -3185,15 +3537,21 @@ die_license_disabled() {
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
}
+die_license_disabled_gpl() {
+ enabled $1 || { enabled $2 && die "$2 is incompatible with the gpl and --enable-$1 is not specified."; }
+}
+
die_license_disabled gpl libcdio
+die_license_disabled gpl libutvideo
die_license_disabled gpl libx264
die_license_disabled gpl libxavs
die_license_disabled gpl libxvid
die_license_disabled gpl x11grab
+die_license_disabled nonfree libaacplus
die_license_disabled nonfree libfaac
-die_license_disabled nonfree libfdk_aac
-die_license_disabled nonfree openssl
+enabled gpl && die_license_disabled_gpl nonfree libfdk_aac
+enabled gpl && die_license_disabled_gpl nonfree openssl
die_license_disabled version3 libopencore_amrnb
die_license_disabled version3 libopencore_amrwb
@@ -3249,7 +3607,10 @@ if enabled alpha; then
elif enabled arm; then
- check_cpp_condition stddef.h "defined __thumb__" && enable_weak thumb
+ check_cpp_condition stddef.h "defined __thumb__" && check_cc <<EOF && enable_weak thumb
+float func(float a, float b){ return a+b; }
+EOF
+
enabled thumb && check_cflags -mthumb || check_cflags -marm
nogas=die
@@ -3258,7 +3619,7 @@ elif enabled arm; then
elif ! check_cpp_condition stddef.h "defined __ARM_PCS || defined __SOFTFP__"; then
case "${cross_prefix:-$cc}" in
*hardfloat*) enable vfp_args; fpabi=vfp ;;
- *) check_ld <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
+ *) check_ld "cc" <<EOF && enable vfp_args && fpabi=vfp || fpabi=soft ;;
__asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; }
EOF
@@ -3285,6 +3646,14 @@ EOF
elif enabled mips; then
check_inline_asm loongson '"dmult.g $1, $2, $3"'
+ 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_inline_asm mipsdspr1 '"addu.qb $t0, $t1, $t2"'
+ enabled mipsdspr2 && add_cflags "-mdspr2" && add_asflags "-mdspr2" &&
+ 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 parisc; then
@@ -3373,8 +3742,9 @@ EOF
elf*) enabled debug && append YASMFLAGS $yasm_debug ;;
esac
- check_yasm "vextractf128 xmm0, ymm0, 0" && enable yasm ||
+ 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_external
check_yasm "vfmaddps ymm0, ymm1, ymm2, ymm3" || disable fma4_external
check_yasm "CPU amdnop" && enable cpunop
fi
@@ -3445,6 +3815,8 @@ fi
# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
check_func nanosleep || { check_func nanosleep -lrt && add_extralibs -lrt; }
+check_func access
+check_func clock_gettime || { check_func clock_gettime -lrt && add_extralibs -lrt; }
check_func fcntl
check_func fork
check_func gethrtime
@@ -3463,8 +3835,6 @@ check_func ${malloc_prefix}posix_memalign && enable posix_memalign
check_func_headers malloc.h _aligned_malloc && enable aligned_malloc
check_func setrlimit
check_func strerror_r
-check_func strptime
-check_func strtok_r
check_func sched_getaffinity
check_builtin sync_val_compare_and_swap "" "int *ptr; int oldval, newval; __sync_val_compare_and_swap(ptr, oldval, newval)"
check_builtin machine_rw_barrier mbarrier.h "__machine_rw_barrier()"
@@ -3473,7 +3843,10 @@ check_builtin MemoryBarrier windows.h "MemoryBarrier()"
check_func sysconf
check_func sysctl
check_func usleep
+check_func_headers conio.h kbhit
+check_func_headers windows.h PeekNamedPipe
check_func_headers io.h setmode
+check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_lib2 "windows.h shellapi.h" CommandLineToArgvW -lshell32
check_lib2 "windows.h wincrypt.h" CryptGenRandom -ladvapi32
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
@@ -3484,12 +3857,14 @@ check_func_headers windows.h MapViewOfFile
check_func_headers windows.h SetConsoleTextAttribute
check_func_headers windows.h Sleep
check_func_headers windows.h VirtualAlloc
+check_func_headers glob.h glob
check_header direct.h
check_header dlfcn.h
check_header dxva.h
-check_header dxva2api.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
check_header sys/mman.h
@@ -3497,12 +3872,14 @@ check_header sys/param.h
check_header sys/resource.h
check_header sys/select.h
check_header sys/time.h
+check_header termios.h
check_header unistd.h
check_header vdpau/vdpau.h
check_header vdpau/vdpau_x11.h
check_header VideoDecodeAcceleration/VDADecoder.h
check_header windows.h
check_header X11/extensions/XvMClib.h
+check_header asm/types.h
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
@@ -3513,7 +3890,7 @@ fi
# check for some common methods of building with pthread support
# do this before the optional library checks as some of them require pthreads
-if ! disabled pthreads && ! enabled w32threads; then
+if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
enable pthreads
if check_func pthread_create; then
:
@@ -3538,11 +3915,16 @@ for thread in $THREADS_LIST; do
fi
done
+if enabled pthreads; then
+ check_func pthread_cancel
+fi
+
enabled sync_val_compare_and_swap && enable atomics_gcc
enabled machine_rw_barrier && enabled atomic_cas_ptr && enable atomics_suncc
enabled MemoryBarrier && enable atomics_win32
check_lib math.h sin -lm && LIBM="-lm"
+disabled crystalhd || check_lib libcrystalhd/libcrystalhd_if.h DtsCrystalHDVersion -lcrystalhd || disable crystalhd
enabled vaapi && require vaapi va/va.h vaInitialize -lva
atan2f_args=2
@@ -3554,42 +3936,74 @@ for func in $MATH_FUNCS; do
done
# these are off by default, so fail if requested and not available
-enabled avisynth && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
+enabled avisynth && { { check_lib2 "windows.h" LoadLibrary; } ||
+ { check_lib2 "dlfcn.h" dlopen -ldl; } ||
+ die "ERROR: LoadLibrary/dlopen not found for avisynth"; }
+enabled fontconfig && require_pkg_config fontconfig "fontconfig/fontconfig.h" FcInit
enabled frei0r && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
enabled gnutls && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
+enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
+enabled libaacplus && require "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
+enabled libass && require_pkg_config libass ass/ass.h ass_library_init
+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 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
+flite_libs="-lflite_cmu_time_awb -lflite_cmu_us_awb -lflite_cmu_us_kal -lflite_cmu_us_kal16 -lflite_cmu_us_rms -lflite_cmu_us_slt -lflite_usenglish -lflite_cmulex -lflite"
+enabled libflite && require2 libflite "flite/flite.h" flite_init $flite_libs
enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
check_lib "${gsm_hdr}" gsm_create -lgsm && break;
done || die "ERROR: libgsm not found"; }
enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
+enabled libmodplug && require libmodplug libmodplug/modplug.h ModPlug_Load -lmodplug
enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
+enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
-enabled libopencv && require_pkg_config opencv opencv/cv.h cvCreateImageHeader
-enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
+enabled libopencv && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader
+enabled libopenjpeg && { check_lib openjpeg-1.5/openjpeg.h opj_version -lopenjpeg ||
+ check_lib openjpeg.h opj_version -lopenjpeg ||
+ die "ERROR: libopenjpeg not found"; }
enabled libopus && require_pkg_config opus opus_multistream.h opus_multistream_decoder_create
enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new
enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
+enabled libsoxr && require libsoxr soxr.h soxr_create -lsoxr
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
+enabled libstagefright_h264 && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
+ media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h
+ media/stagefright/OMXClient.h media/stagefright/OMXCodec.h" android::OMXClient -lstagefright -lmedia -lutils -lbinder -lgnustl_static
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 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 libvo_amrwbenc && require libvo_amrwbenc vo-amrwbenc/enc_if.h E_IF_init -lvo-amrwbenc
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
enabled libvpx && {
enabled libvpx_vp8_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"; }
- enabled libvpx_vp8_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_enc_init_ver VPX_CQ" -lvpx ||
- die "ERROR: libvpx encoder version must be >=0.9.6"; }
+ enabled libvpx_vp8_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 libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx" -lvpx || disable libvpx_vp9_encoder; } }
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 must be installed and version must be 1.1 or compatible"; }
+enabled opencl && require2 opencl CL/cl.h clEnqueueNDRangeKernel -lOpenCL
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 ||
@@ -3609,17 +4023,33 @@ if enabled libdc1394; then
die "ERROR: No version of libdc1394 found "
fi
+SDL_CONFIG="${cross_prefix}sdl-config"
if check_pkg_config sdl SDL_events.h SDL_PollEvent; then
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
enable sdl
+else
+ if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
+ sdl_cflags=$("${SDL_CONFIG}" --cflags)
+ sdl_libs=$("${SDL_CONFIG}" --libs)
+ check_func_headers SDL_version.h SDL_Linked_Version $sdl_cflags $sdl_libs &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x010201" $sdl_cflags &&
+ check_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x010300" $sdl_cflags &&
+ enable sdl
+ fi
fi
+enabled sdl && add_cflags $sdl_cflags && add_extralibs $sdl_libs
-texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
+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
+rsync --help 2> /dev/null | grep -q 'contimeout' && enable rsync_contimeout || disable rsync_contimeout
check_header linux/fb.h
+check_header linux/videodev.h
check_header linux/videodev2.h
-check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete
+check_code cc linux/videodev2.h "struct v4l2_frmsizeenum vfse; vfse.discrete.width = 0;" && enable_safe struct_v4l2_frmivalenum_discrete
check_header sys/videoio.h
@@ -3628,6 +4058,8 @@ check_func_headers "windows.h vfw.h" capCreateCaptureWindow "$vfwcap_indev_extra
# w32api 3.12 had it defined wrong
check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_defines
+check_type "dshow.h" IBaseFilter
+
# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
{ check_header dev/bktr/ioctl_meteor.h &&
check_header dev/bktr/ioctl_bt848.h; } ||
@@ -3638,12 +4070,19 @@ check_cpp_condition vfw.h "WM_CAP_DRIVER_CONNECT > WM_USER" && enable vfwcap_def
check_header dev/ic/bt8xx.h
check_header sndio.h
-check_header sys/soundcard.h
+if check_struct sys/soundcard.h audio_buf_info bytes; then
+ enable_safe sys/soundcard.h
+else
+ check_cc -D__BSD_VISIBLE -D__XSI_VISIBLE <<EOF && add_cppflags -D__BSD_VISIBLE -D__XSI_VISIBLE && enable_safe sys/soundcard.h
+ #include <sys/soundcard.h>
+ audio_buf_info abc;
+EOF
+fi
check_header soundcard.h
enabled_any alsa_indev alsa_outdev && check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
-enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack &&
+enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack && check_func sem_timedwait &&
check_func jack_port_get_latency_range -ljack
enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
@@ -3657,11 +4096,23 @@ require X11 X11/Xlib.h XOpenDisplay -lX11 &&
require Xext X11/extensions/XShm.h XShmCreateImage -lXext &&
require Xfixes X11/extensions/Xfixes.h XFixesGetCursorImage -lXfixes
+if ! disabled vaapi; then
+ check_lib va/va.h vaInitialize -lva && {
+ check_cpp_condition va/va_version.h "VA_CHECK_VERSION(0,32,0)" ||
+ warn "Please upgrade to VA-API >= 0.32 if you would like full VA-API support.";
+ } || disable vaapi
+fi
+
enabled vdpau &&
check_cpp_condition vdpau/vdpau.h "defined VDP_DECODER_PROFILE_MPEG4_PART2_ASP" ||
disable vdpau
+# Funny iconv installations are not unusual, so check it after all flags have been set
+disabled iconv || check_func_headers iconv.h iconv || check_lib2 iconv.h iconv -liconv || disable iconv
+
enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
+enabled coverage && add_cflags "-fprofile-arcs -ftest-coverage" && add_ldflags "-fprofile-arcs -ftest-coverage"
+test -n "$valgrind" && target_exec="$valgrind --error-exitcode=1 --malloc-fill=0x2a --track-origins=yes --leak-check=full --gen-suppressions=all --suppressions=$source_path/tests/fate-valgrind.supp"
# add some useful compiler flags if supported
check_cflags -Wdeclaration-after-statement
@@ -3673,17 +4124,17 @@ check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
check_cflags -Wredundant-decls
check_cflags -Wno-pointer-sign
-check_cflags -Wcast-qual
check_cflags -Wwrite-strings
check_cflags -Wtype-limits
check_cflags -Wundef
check_cflags -Wmissing-prototypes
+check_cflags -Wno-pointer-to-int-cast
check_cflags -Wstrict-prototypes
enabled extra_warnings && check_cflags -Winline
# add some linker flags
check_ldflags -Wl,--warn-common
-check_ldflags -Wl,-rpath-link=libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
+check_ldflags -Wl,-rpath-link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
enabled xmm_clobber_test &&
@@ -3736,17 +4187,25 @@ check_optflags $optflags
check_optflags -fno-math-errno
check_optflags -fno-signed-zeros
+enabled ftrapv && check_cflags -ftrapv
+
+check_cc -mno-red-zone <<EOF && noredzone_flags="-mno-red-zone"
+int x;
+EOF
+
+
if enabled icc; then
# Just warnings, no remarks
check_cflags -w1
# -wd: Disable following warnings
# 144, 167, 556: -Wno-pointer-sign
+ # 188: enumerated type mixed with another type
# 1292: attribute "foo" ignored
# 1419: external declaration in primary source file
# 10006: ignoring unknown option -fno-signed-zeros
# 10148: ignoring unknown option -Wno-parentheses
# 10156: ignoring option '-W'; no argument required
- check_cflags -wd144,167,556,1292,1419,10006,10148,10156
+ check_cflags -wd144,167,188,556,1292,1419,10006,10148,10156
# 11030: Warning unknown option --as-needed
# 10156: ignoring option '-export'; no argument required
check_ldflags -wd10156,11030
@@ -3769,7 +4228,6 @@ elif enabled gcc; then
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
check_cflags -Werror=return-type
- check_cflags -Werror=declaration-after-statement
check_cflags -Werror=vla
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
@@ -3804,6 +4262,7 @@ case $target_os in
;;
esac
+enable frame_thread_encoder
enabled_any $THREADS_LIST && enable threads
enabled_any $ATOMICS_LIST && enable atomics_native
@@ -3814,9 +4273,42 @@ check_deps $CONFIG_LIST \
$HAVE_LIST \
$ALL_COMPONENTS \
+
+if test $target_os = "haiku"; then
+ disable memalign
+ disable posix_memalign
+fi
+
! enabled_any memalign posix_memalign aligned_malloc &&
enabled_any $need_memalign && enable memalign_hack
+# add_dep lib dep
+# -> enable ${lib}_deps_${dep}
+# -> add $dep to ${lib}_deps only once
+add_dep() {
+ lib=$1
+ dep=$2
+ enabled "${lib}_deps_${dep}" && return 0
+ enable "${lib}_deps_${dep}"
+ prepend "${lib}_deps" $dep
+}
+
+# merge deps lib components
+# merge all ${component}_deps into ${lib}_deps and ${lib}_deps_*
+merge_deps() {
+ lib=$1
+ shift
+ for comp in $*; do
+ enabled $comp || continue
+ eval "dep=\"\$${comp}_deps\""
+ for d in $dep; do
+ add_dep $lib $d
+ done
+ done
+}
+
+merge_deps libavfilter $FILTER_LIST
+
echo "install prefix $prefix"
echo "source path $source_path"
echo "C compiler $cc"
@@ -3824,6 +4316,9 @@ echo "ARCH $arch ($cpu)"
if test "$build_suffix" != ""; then
echo "build suffix $build_suffix"
fi
+if test "$progs_suffix" != ""; then
+ echo "progs suffix $progs_suffix"
+fi
if test "$extra_version" != ""; then
echo "version string suffix $extra_version"
fi
@@ -3850,6 +4345,13 @@ if enabled arm; then
echo "ARMv6T2 enabled ${armv6t2-no}"
echo "VFP enabled ${vfp-no}"
echo "NEON enabled ${neon-no}"
+ echo "THUMB enabled ${thumb-no}"
+fi
+if enabled mips; then
+ echo "MIPS FPU enabled ${mipsfpu-no}"
+ echo "MIPS32R2 enabled ${mips32r2-no}"
+ echo "MIPS DSP R1 enabled ${mipsdspr1-no}"
+ echo "MIPS DSP R2 enabled ${mipsdspr2-no}"
fi
if enabled ppc; then
echo "AltiVec enabled ${altivec-no}"
@@ -3860,15 +4362,22 @@ if enabled sparc; then
echo "VIS enabled ${vis-no}"
fi
echo "debug symbols ${debug-no}"
+echo "strip symbols ${stripping-no}"
echo "optimize for size ${small-no}"
echo "optimizations ${optimizations-no}"
echo "static ${static-no}"
echo "shared ${shared-no}"
+echo "postprocessing support ${postproc-no}"
echo "new filter support ${avfilter-no}"
echo "network support ${network-no}"
echo "threading support ${thread_type-no}"
echo "safe bitstream reader ${safe_bitstream_reader-no}"
echo "SDL support ${sdl-no}"
+echo "opencl enabled ${opencl-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" &&
echo "random seed ${random_seed}"
echo
@@ -3901,11 +4410,15 @@ echo "Creating config.mak and config.h..."
test -e Makefile || $ln_s "$source_path/Makefile" .
+enabled stripping || strip="echo skipping strip"
+
config_files="$TMPH config.mak"
cat > config.mak <<EOF
# Automatically generated by configure - do not modify!
-LIBAV_CONFIGURATION=$LIBAV_CONFIGURATION
+ifndef FFMPEG_CONFIG_MAK
+FFMPEG_CONFIG_MAK=1
+FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
prefix=$prefix
LIBDIR=\$(DESTDIR)$libdir
SHLIBDIR=\$(DESTDIR)$shlibdir
@@ -3914,9 +4427,13 @@ BINDIR=\$(DESTDIR)$bindir
DATADIR=\$(DESTDIR)$datadir
MANDIR=\$(DESTDIR)$mandir
SRC_PATH=$source_path
+ifndef MAIN_MAKEFILE
+SRC_PATH:=\$(SRC_PATH:.%=..%)
+endif
CC_IDENT=$cc_ident
ARCH=$arch
CC=$cc
+CXX=$cxx
AS=$as
LD=$ld
DEPCC=$dep_cc
@@ -3929,24 +4446,30 @@ AR=$ar
ARFLAGS=$arflags
AR_O=$ar_o
RANLIB=$ranlib
+CP=cp -p
LN_S=$ln_s
+STRIP=$strip
CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS
+CXXFLAGS=$CXXFLAGS
ASFLAGS=$ASFLAGS
AS_C=$AS_C
AS_O=$AS_O
CC_C=$CC_C
CC_E=$CC_E
CC_O=$CC_O
+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-avserver=$AVSERVERLDFLAGS
+LDFLAGS-ffserver=$FFSERVERLDFLAGS
SHFLAGS=$(echo $($ldflags_filter $SHFLAGS))
YASMFLAGS=$YASMFLAGS
BUILDSUF=$build_suffix
+PROGSSUF=$progs_suffix
FULLNAME=$FULLNAME
LIBPREF=$LIBPREF
LIBSUF=$LIBSUF
@@ -3956,6 +4479,7 @@ SLIBSUF=$SLIBSUF
EXESUF=$EXESUF
EXTRA_VERSION=$extra_version
CCDEP=$CCDEP
+CXXDEP=$CXXDEP
CCDEP_FLAGS=$CCDEP_FLAGS
ASDEP=$ASDEP
ASDEP_FLAGS=$ASDEP_FLAGS
@@ -3978,14 +4502,14 @@ HOSTCC_O=$HOSTCC_O
HOSTLD_O=$HOSTLD_O
TARGET_EXEC=$target_exec
TARGET_PATH=$target_path
-LIBS-avplay=$sdl_libs
-CFLAGS-avplay=$sdl_cflags
+LIBS-ffplay=$sdl_libs
+CFLAGS-ffplay=$sdl_cflags
ZLIB=$($ldflags_filter -lz)
LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD
EXTRALIBS=$extralibs
COMPAT_OBJS=$compat_objs
EXEOBJS=$exeobjs
-INSTALL=install
+INSTALL=$install
LIBTARGET=${LIBTARGET}
SLIBNAME=${SLIBNAME}
SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}
@@ -3996,7 +4520,8 @@ SLIB_INSTALL_NAME=${SLIB_INSTALL_NAME}
SLIB_INSTALL_LINKS=${SLIB_INSTALL_LINKS}
SLIB_INSTALL_EXTRA_LIB=${SLIB_INSTALL_EXTRA_LIB}
SLIB_INSTALL_EXTRA_SHLIB=${SLIB_INSTALL_EXTRA_SHLIB}
-SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
+SAMPLES:=${samples:-\$(FATE_SAMPLES)}
+NOREDZONE_FLAGS=$noredzone_flags
EOF
get_version(){
@@ -4014,18 +4539,23 @@ map 'get_version $v' $LIBRARY_LIST
cat > $TMPH <<EOF
/* Automatically generated by configure - do not modify! */
-#ifndef LIBAV_CONFIG_H
-#define LIBAV_CONFIG_H
-#define LIBAV_CONFIGURATION "$(c_escape $LIBAV_CONFIGURATION)"
-#define LIBAV_LICENSE "$(c_escape $license)"
+#ifndef FFMPEG_CONFIG_H
+#define FFMPEG_CONFIG_H
+#define FFMPEG_CONFIGURATION "$(c_escape $FFMPEG_CONFIGURATION)"
+#define FFMPEG_LICENSE "$(c_escape $license)"
+#define FFMPEG_DATADIR "$(eval c_escape $datadir)"
#define AVCONV_DATADIR "$(eval c_escape $datadir)"
#define CC_IDENT "$(c_escape ${cc_ident:-Unknown compiler})"
-#define restrict $_restrict
+#define av_restrict $_restrict
#define EXTERN_PREFIX "${extern_prefix}"
#define EXTERN_ASM ${extern_prefix}
#define SLIBSUF "$SLIBSUF"
+#define HAVE_MMX2 HAVE_MMXEXT
EOF
+test -n "$assert_level" &&
+ echo "#define ASSERT_LEVEL $assert_level" >>$TMPH
+
test -n "$malloc_prefix" &&
echo "#define MALLOC_PREFIX $malloc_prefix" >>$TMPH
@@ -4040,7 +4570,8 @@ print_config CONFIG_ "$config_files" $CONFIG_LIST \
$CONFIG_EXTRA \
$ALL_COMPONENTS \
-echo "#endif /* LIBAV_CONFIG_H */" >> $TMPH
+echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
+echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
cp_if_changed $TMPH config.h
@@ -4060,7 +4591,10 @@ echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
cp_if_changed $TMPH libavutil/avconfig.h
-test -n "$WARNINGS" && printf "\n$WARNINGS"
+if test -n "$WARNINGS"; then
+ printf "\n$WARNINGS"
+ enabled fatal_warnings && exit 1
+fi
# build pkg-config files
@@ -4073,7 +4607,7 @@ pkgconfig_generate(){
requires=$5
enabled ${name#lib} || return 0
mkdir -p $name
- cat <<EOF > $name/$name.pc
+ cat <<EOF > $name/$name${build_suffix}.pc
prefix=$prefix
exec_prefix=\${prefix}
libdir=$libdir
@@ -4089,26 +4623,67 @@ Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
Libs.private: $(enabled shared && echo $libs)
Cflags: -I\${includedir}
EOF
- cat <<EOF > $name/$name-uninstalled.pc
+
+mkdir -p doc/examples/pc-uninstalled
+includedir=${source_path}
+[ "$includedir" = . ] && includedir="\${pcfiledir}/../../.."
+ cat <<EOF > doc/examples/pc-uninstalled/$name.pc
prefix=
exec_prefix=
-libdir=\${pcfiledir}
-includedir=${source_path}
+libdir=\${pcfiledir}/../../../$name
+includedir=${includedir}
Name: $name
Description: $comment
Version: $version
Requires: $requires
Conflicts:
-Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
+Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
Cflags: -I\${includedir}
EOF
}
-pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM"
-pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
-pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
-pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
+libavfilter_pc_deps="libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+enabled libavfilter_deps_avcodec && prepend libavfilter_pc_deps "libavcodec${build_suffix} = $LIBAVCODEC_VERSION,"
+enabled libavfilter_deps_avformat && prepend libavfilter_pc_deps "libavformat${build_suffix} = $LIBAVFORMAT_VERSION,"
+enabled libavfilter_deps_avresample && prepend libavfilter_pc_deps "libavresample${build_suffix} = $LIBAVRESAMPLE_VERSION,"
+enabled libavfilter_deps_swscale && prepend libavfilter_pc_deps "libswscale${build_suffix} = $LIBSWSCALE_VERSION,"
+enabled libavfilter_deps_swresample && prepend libavfilter_pc_deps "libswresample${build_suffix} = $LIBSWRESAMPLE_VERSION,"
+enabled libavfilter_deps_postproc && prepend libavfilter_pc_deps "libpostproc${build_suffix} = $LIBPOSTPROC_VERSION,"
+libavfilter_pc_deps=${libavfilter_pc_deps%, }
+
+libavdevice_pc_deps="libavformat${build_suffix} = $LIBAVFORMAT_VERSION"
+enabled lavfi_indev && prepend libavdevice_pc_deps "libavfilter${build_suffix} = $LIBAVFILTER_VERSION,"
+
+pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM"
+pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec${build_suffix} = $LIBAVCODEC_VERSION"
+pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$libavdevice_pc_deps"
+pkgconfig_generate libavfilter "FFmpeg audio/video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$libavfilter_pc_deps"
+pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil${build_suffix} = $LIBAVUTIL_VERSION"
+
+fix_ffmpeg_remote(){
+ git_remote_from=$1
+ git_remote_to=$2
+ fixme_remote=$(git --git-dir=$source_path/.git --work-tree=$source_path remote -v | grep $git_remote_from | cut -f 1 | sort | uniq)
+ if [ "$fixme_remote" != "" ]; then
+ echolog "
+Outdated domain in git config, the official domain for ffmpeg git is since
+November 2011, source.ffmpeg.org, both the old and the new point to the same
+repository and server. To update it enter the following commands:
+"
+ for remote in $fixme_remote; do
+ echolog "git remote set-url $remote $git_remote_to"
+ done
+ fi
+}
+
+if test -f "$source_path/.git/config"; then
+ remote_from=git.videolan.org
+ remote_to=source.ffmpeg.org
+ fix_ffmpeg_remote git@$remote_from:ffmpeg git@$remote_to:ffmpeg
+ fix_ffmpeg_remote git://$remote_from/ffmpeg git://$remote_to/ffmpeg
+fi