--disable-avcodec disable libavcodec build
--disable-avformat disable libavformat build
--disable-swscale disable libswscale build
- --enable-postproc enable GPLed postprocessing support [no]
+ --disable-postproc disable libpostproc build
--disable-avfilter disable video filter support [no]
--disable-pthreads disable pthreads [auto]
--enable-w32threads use Win32 threads [no]
--enable-x11grab enable X11 grabbing [no]
--disable-network disable network support [no]
- --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]
--enable-gray enable full grayscale support (slower color)
--disable-swscale-alpha disable alpha channel support in swscale
--disable-fastdiv disable table-based division
--disable-lpc disable LPC code
--disable-mdct disable MDCT code
--disable-rdft disable RDFT code
- --disable-vaapi disable VAAPI code
- --disable-vdpau disable VDPAU code
+ --enable-vaapi enable VAAPI code
+ --enable-vdpau enable VDPAU code
--disable-dxva2 disable DXVA2 code
--enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)
--enable-hardcoded-tables use hardcoded tables instead of runtime generation
and libraw1394 [no]
--enable-libdirac enable Dirac support via libdirac [no]
--enable-libfaac enable FAAC support via libfaac [no]
+ --enable-libfreetype enable libfreetype [no]
--enable-libgsm enable GSM support via libgsm [no]
--enable-libmp3lame enable MP3 encoding via libmp3lame [no]
--enable-libnut enable NUT (de)muxing via libnut,
--enable-libschroedinger enable Dirac support via libschroedinger [no]
--enable-libspeex enable Speex decoding via libspeex [no]
--enable-libtheora enable Theora encoding via libtheora [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,
native implementation exists [no]
--enable-libvpx enable VP8 support via libvpx [no]
--enable-zlib enable zlib [autodetect]
Advanced options (experts only):
- --source-path=PATH path to source code [$source_path]
--cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]
--enable-cross-compile assume a cross-compiler is used
--sysroot=PATH root of cross-build tree
--malloc-prefix=PFX prefix malloc and related names with PFX
--enable-sram allow use of on-chip SRAM
--disable-symver disable symbol versioning
+ --optflags override optimization-related compiler flags
Developer options (useful when working on Libav itself):
--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
--samples=PATH location of test samples for FATE, if not set use
\$FATE_SAMPLES at make invocation time.
test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
done
check_cc $($filter_cflags $flags) || return
- check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
+ check_cmd $ld $LDFLAGS $flags -o $TMPE $TMPO $libs $extralibs
}
check_cppflags(){
}
cp_if_changed(){
- cmp -s "$1" "$2" &&
- echo "$2 is unchanged" ||
- cp -f "$1" "$2"
+ cmp -s "$1" "$2" && echo "$2 is unchanged" && return
+ mkdir -p "$(dirname $2)"
+ cp -f "$1" "$2"
}
# CONFIG_LIST contains configurable options, while HAVE_LIST is for
libdc1394
libdirac
libfaac
+ libfreetype
libgsm
libmp3lame
libnut
libschroedinger
libspeex
libtheora
+ libvo_aacenc
+ libvo_amrwbenc
libvorbis
libvpx
libx264
mdct
memalign_hack
mlib
- mpegaudio_hp
+ mpegaudiodsp
network
nonfree
pic
static
swscale
swscale_alpha
+ thumb
vaapi
vdpau
version3
ppc4xx
sse
ssse3
+ vfpv3
vis
'
inet_aton
inline_asm
isatty
- kbhit
ldbrx
libdc1394_1
libdc1394_2
llrintf
local_aligned_16
local_aligned_8
+ localtime_r
log2
log2f
loongson
memalign
mkstemp
mmap
- pld
posix_memalign
round
roundf
sdl
sdl_video_size
setmode
+ sndio_h
socklen_t
soundcard_h
poll_h
sys_select_h
sys_soundcard_h
sys_videoio_h
- ten_operands
threads
+ trunc
truncf
vfp_args
VirtualAlloc
extra_warnings
logging
optimizations
- stripping
symver
yasm
"
logfile
malloc_prefix
nm
+ optflags
pkg_config
samples
- source_path
- strip
sysinclude
sysroot
target_exec
armvfp_deps="arm"
iwmmxt_deps="arm"
neon_deps="arm"
+vfpv3_deps="armvfp"
mmi_deps="mips"
dct_select="rdft"
mdct_select="fft"
rdft_select="fft"
+mpegaudiodsp_select="dct"
# decoders / encoders / hardware accelerators
-aac_decoder_select="mdct rdft sinewin"
+aac_decoder_select="mdct sinewin"
aac_encoder_select="mdct sinewin"
aac_latm_decoder_select="aac_decoder aac_latm_parser"
-ac3_decoder_select="mdct ac3_parser"
+ac3_decoder_select="mdct ac3dsp ac3_parser"
ac3_encoder_select="mdct ac3dsp"
-ac3_fixed_encoder_select="ac3dsp"
+ac3_fixed_encoder_select="mdct ac3dsp"
alac_encoder_select="lpc"
amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp"
atrac1_decoder_select="mdct sinewin"
atrac3_decoder_select="mdct"
-binkaudio_dct_decoder_select="mdct rdft dct"
-binkaudio_rdft_decoder_select="mdct rdft"
+binkaudio_dct_decoder_select="mdct rdft dct sinewin"
+binkaudio_rdft_decoder_select="mdct rdft sinewin"
cavs_decoder_select="golomb"
cook_decoder_select="mdct sinewin"
cscd_decoder_suggest="zlib"
dnxhd_encoder_select="aandct"
dxa_decoder_select="zlib"
eac3_decoder_select="ac3_decoder"
+eac3_encoder_select="mdct ac3dsp"
eamad_decoder_select="aandct"
eatgq_decoder_select="aandct"
eatqi_decoder_select="aandct"
h264_dxva2_hwaccel_select="dxva2 h264_decoder"
h264_vaapi_hwaccel_select="vaapi"
h264_vdpau_decoder_select="vdpau h264_decoder"
-imc_decoder_select="fft mdct"
+imc_decoder_select="fft mdct sinewin"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
ljpeg_encoder_select="aandct"
loco_decoder_select="golomb"
mjpeg_encoder_select="aandct"
mlp_decoder_select="mlp_parser"
-mp1float_decoder_select="dct"
-mp2float_decoder_select="dct"
-mp3adufloat_decoder_select="dct"
-mp3float_decoder_select="dct"
-mp3on4float_decoder_select="dct"
+mp1_decoder_select="mpegaudiodsp"
+mp2_decoder_select="mpegaudiodsp"
+mp3adu_decoder_select="mpegaudiodsp"
+mp3_decoder_select="mpegaudiodsp"
+mp3on4_decoder_select="mpegaudiodsp"
+mp1float_decoder_select="mpegaudiodsp"
+mp2float_decoder_select="mpegaudiodsp"
+mp3adufloat_decoder_select="mpegaudiodsp"
+mp3float_decoder_select="mpegaudiodsp"
+mp3on4float_decoder_select="mpegaudiodsp"
mpeg1video_encoder_select="aandct"
mpeg2video_encoder_select="aandct"
mpeg4_decoder_select="h263_decoder mpeg4video_parser"
png_decoder_select="zlib"
png_encoder_select="zlib"
qcelp_decoder_select="lsp"
-qdm2_decoder_select="mdct rdft"
+qdm2_decoder_select="mdct rdft mpegaudiodsp"
ra_144_encoder_select="lpc"
rv10_decoder_select="h263_decoder"
rv10_encoder_select="h263_encoder"
libschroedinger_encoder_deps="libschroedinger"
libspeex_decoder_deps="libspeex"
libtheora_encoder_deps="libtheora"
+libvo_aacenc_encoder_deps="libvo_aacenc"
+libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
libvorbis_encoder_deps="libvorbis"
libvpx_decoder_deps="libvpx"
libvpx_encoder_deps="libvpx"
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"
dv1394_indev_deps="dv1394 dv_demuxer"
+fbdev_indev_deps="linux_fb_h"
jack_indev_deps="jack_jack_h"
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"
# filters
blackframe_filter_deps="gpl"
cropdetect_filter_deps="gpl"
+drawtext_filter_deps="libfreetype"
frei0r_filter_deps="frei0r dlopen strtok_r"
frei0r_src_filter_deps="frei0r dlopen strtok_r"
hqdn3d_filter_deps="gpl"
-scale_filter_deps="swscale"
ocv_filter_deps="libopencv"
+scale_filter_deps="swscale"
yadif_filter_deps="gpl"
# libraries
avdevice_deps="avcodec avformat"
avformat_deps="avcodec"
+postproc_deps="gpl"
# programs
ffmpeg_deps="avcodec avformat swscale"
ffplay_deps="avcodec avformat swscale sdl"
ffplay_select="rdft"
ffprobe_deps="avcodec avformat"
-ffserver_deps="avformat ffm_muxer rtp_protocol rtsp_demuxer"
+ffserver_deps="avformat ffm_muxer fork rtp_protocol rtsp_demuxer"
ffserver_extralibs='$ldl'
doc_deps="texi2html"
done
}
-set_ne_test_deps(){
- eval ${1}_be_test_deps="bigendian"
- eval ${1}_le_test_deps="!bigendian"
-}
-
test_deps _encoder _decoder \
adpcm_g726=g726 \
adpcm_ima_qt \
ac3_fixed_test_deps="ac3_fixed_encoder ac3_decoder rm_muxer rm_demuxer"
mpg_test_deps="mpeg1system_muxer mpegps_demuxer"
-set_ne_test_deps pixdesc
-set_ne_test_deps pixfmts_copy
-set_ne_test_deps pixfmts_crop
-set_ne_test_deps pixfmts_hflip
-set_ne_test_deps pixfmts_null
-set_ne_test_deps pixfmts_pad
-set_ne_test_deps pixfmts_scale
-set_ne_test_deps pixfmts_vflip
-
# default parameters
logfile="config.log"
objformat="elf"
pkg_config_default=pkg-config
ranlib="ranlib"
-strip_default="strip"
yasmexe="yasm"
nogas=":"
enable ffplay
enable ffprobe
enable ffserver
-enable mpegaudio_hp
enable network
enable optimizations
+enable postproc
enable protocols
enable static
-enable stripping
enable swscale
enable swscale_alpha
SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
LIB_INSTALL_EXTRA_CMD='$$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
+AS_O='-o $@'
CC_O='-o $@'
-host_cflags='-D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 -O3 -g -Wall'
+host_cflags='-D_ISOC99_SOURCE -O3 -g'
host_libs='-lm'
target_path='$(CURDIR)'
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -MM'
# find source path
-source_path="$(dirname "$0")"
-enable source_path_used
if test -f configure; then
- source_path="$(pwd)"
- disable source_path_used
+ source_path=.
else
- source_path="$(cd "$source_path"; pwd)"
+ source_path=$(cd $(dirname "$0"); pwd)
echo "$source_path" | grep -q '[[:blank:]]' &&
die "Out of tree builds are impossible with whitespace in source path."
test -e "$source_path/config.h" &&
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"
-set_default cc nm pkg_config strip sysinclude
+set_default cc nm pkg_config sysinclude
enabled cross_compile || host_cc_default=$cc
set_default host_cc
+if ! $pkg_config --version >/dev/null 2>&1; then
+ warn "$pkg_config not found, library detection may fail."
+ pkg_config=false
+fi
+
exesuf() {
case $1 in
- mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) echo .exe ;;
+ mingw32*|cygwin*|*-dos|freedos|opendos|os/2*|symbian) echo .exe ;;
esac
}
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
speed_cflags='-O2'
size_cflags='-Os'
+ filter_cflags='filter_out -Wdisabled-optimization'
elif $cc -v 2>&1 | grep -q Open64; then
cc_type=open64
cc_version=__OPEN64__
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
speed_cflags='-O2'
size_cflags='-Os'
+ filter_cflags='filter_out -Wdisabled-optimization|-Wtype-limits|-fno-signed-zeros'
fi
test -n "$cc_type" && enable $cc_type ||
disable cmov
;;
# targets that do support conditional mov (cmov)
- i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2|amdfam10|barcelona|atom)
+ i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64*|k8*|opteron*|athlon-fx|core2|amdfam10|barcelona|atom)
cpuflags="-march=$cpu"
enable cmov
enable fast_cmov
case $cpu in
cortex-a*) subarch=armv7a ;;
cortex-r*) subarch=armv7r ;;
- cortex-m*) subarch=armv7m ;;
+ cortex-m*) enable thumb; subarch=armv7m ;;
arm11*) subarch=armv6 ;;
arm[79]*e*|arm9[24]6*|arm96*|arm102[26]) subarch=armv5te ;;
armv4*|arm7*|arm9[24]*) subarch=armv4 ;;
die "C compiler test failed."
fi
-add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
+add_cppflags -D_ISOC99_SOURCE
check_cflags -std=c99
check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
#include <stdlib.h>
EOF
check_host_cflags -std=c99
+check_host_cflags -Wall
case "$arch" in
alpha|ia64|mips|parisc|sparc)
disable symver
oss_indev_extralibs="-lossaudio"
oss_outdev_extralibs="-lossaudio"
- add_cppflags -D_XOPEN_SOURCE=600
;;
openbsd)
enable malloc_aligned
;;
bsd/os)
add_extralibs -lpoll -lgnugetopt
- strip="strip -d"
;;
darwin)
enable malloc_aligned
enabled ppc && add_asflags -force_cpusubtype_ALL
SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-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)'
LIBTARGET=arm-wince
fi
shlibdir_default="$bindir_default"
- disable ffserver
SLIBPREF=""
SLIBSUF=".dll"
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
check_cpp_condition _mingw.h "defined (__MINGW64_VERSION_MAJOR) || (__MINGW32_MAJOR_VERSION > 3) \
|| (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
die "ERROR: MinGW runtime version must be >= 3.15."
+ add_cppflags -U__STRICT_ANSI__
;;
cygwin*)
target_os=cygwin
objformat="win32"
enable dos_paths
check_cflags -fno-common
+ add_cppflags -U__STRICT_ANSI__
;;
*-dos|freedos|opendos)
- disable ffplay ffserver
- disable $INDEV_LIST $OUTDEV_LIST
network_extralibs="-lsocket"
objformat="coff"
enable dos_paths
+ add_cppflags -U__STRICT_ANSI__
;;
linux)
+ add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600
enable dv1394
;;
irix*)
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'
FFSERVERLDFLAGS=""
enable dos_paths
;;
gnu/kfreebsd)
+ add_cppflags -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
;;
gnu)
;;
add_cppflags -D_QNX_SOURCE
network_extralibs="-lsocket"
;;
+ symbian)
+ SLIBSUF=".dll"
+ enable dos_paths
+ add_cflags --include=$sysinclude/gcce/gcce.h
+ ;;
none)
;;
*)
exit 1;
fi
-disabled static && LIBNAME=""
-
die_license_disabled() {
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
}
die_license_disabled gpl libx264
die_license_disabled gpl libxavs
die_license_disabled gpl libxvid
-die_license_disabled gpl postproc
die_license_disabled gpl x11grab
die_license_disabled nonfree libfaac
die_license_disabled version3 libopencore_amrnb
die_license_disabled version3 libopencore_amrwb
+die_license_disabled version3 libvo_aacenc
+die_license_disabled version3 libvo_amrwbenc
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
elif enabled arm; then
- check_cflags -marm
+ enabled thumb && check_cflags -mthumb || check_cflags -marm
nogas=die
if check_cpp_condition stddef.h "defined __ARM_PCS_VFP"; then
warn "Compiler does not indicate floating-point ABI, guessing $fpabi."
fi
- # We have to check if pld is a nop and disable it.
- check_asm pld '"pld [r0]"'
-
enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
enabled armv6 && check_asm armv6 '"sadd16 r0, r0, r0"'
enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
enabled armvfp && check_asm armvfp '"fadds s0, s0, s0"'
enabled iwmmxt && check_asm iwmmxt '"wunpckelub wr6, wr4"'
enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
+ enabled vfpv3 && check_asm vfpv3 '"vmov.f32 s0, #1.0"'
enabled_all armv6t2 shared !pic && enable_pic
# check whether xmm clobbers are supported
check_asm xmm_clobbers '"":::"%xmm0"'
- # check whether more than 10 operands are supported
- check_cc <<EOF && enable ten_operands
-int main(void) {
- int x=0;
- __asm__ volatile(
- ""
- :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
- );
- return 0;
-}
-EOF
-
# check whether binutils is new enough to compile SSSE3/MMX2
enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
enabled mmx2 && check_asm mmx2 '"pmaxub %mm0, %mm1"'
check_yasm "pextrd [eax], xmm0, 1" && enable yasm ||
die "yasm not found, use --disable-yasm for a crippled build"
- check_yasm "vpaddw xmm0, xmm0, xmm0" || disable avx
+ check_yasm "vextractf128 xmm0, ymm0, 0" || disable avx
fi
case "$cpu" in
$nogas "GNU assembler not found, install gas-preprocessor"
fi
+check_ldflags -Wl,--as-needed
+
if check_func dlopen; then
ldl=
elif check_func dlopen -ldl; then
check_struct "sys/time.h sys/resource.h" "struct rusage" ru_maxrss
check_func inet_aton $network_extralibs
check_func isatty
+check_func localtime_r
check_func ${malloc_prefix}memalign && enable memalign
check_func mkstemp
check_func mmap
check_func setrlimit
check_func strerror_r
check_func strtok_r
-check_func_headers conio.h kbhit
check_func_headers io.h setmode
check_func_headers lzo/lzo1x.h lzo1x_999_compress
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
check_struct dxva2api.h DXVA_PictureParameters wDecodedPictureIndex
-if ! enabled_any memalign memalign_hack posix_memalign malloc_aligned &&
- enabled_any $need_memalign ; then
- die "Error, no aligned memory allocator but SSE enabled, disable it or use --enable-memalign-hack."
-fi
-
disabled zlib || check_lib zlib.h zlibVersion -lz || disable zlib
disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
fi
done
-check_lib math.h sin -lm
-disabled vaapi || check_lib va/va.h vaInitialize -lva
+check_lib math.h sin -lm && LIBM="-lm"
+enabled vaapi && require vaapi va/va.h vaInitialize -lva
check_mathfunc exp2
check_mathfunc exp2f
check_mathfunc lrintf
check_mathfunc round
check_mathfunc roundf
+check_mathfunc trunc
check_mathfunc truncf
# these are off by default, so fail if requested and not available
"libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h" \
"dirac_decoder_init dirac_encoder_init"
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
+enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
enabled libgsm && require libgsm gsm/gsm.h gsm_create -lgsm
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 libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
+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_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" vpx_codec_dec_init_ver -lvpx ||
enabled libvpx_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_enc_init_ver -lvpx ||
die "ERROR: libvpx encoder version must be >=0.9.1"; } }
enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 &&
- { check_cpp_condition x264.h "X264_BUILD >= 99" ||
- die "ERROR: libx264 version must be >= 0.99."; }
+ { check_cpp_condition x264.h "X264_BUILD >= 115" ||
+ die "ERROR: libx264 version must be >= 0.115."; }
enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
+check_header linux/fb.h
check_header linux/videodev.h
check_header linux/videodev2.h
check_header sys/videoio.h
check_header dev/video/bktr/ioctl_bt848.h; } ||
check_header dev/ic/bt8xx.h
+check_header sndio.h
check_header sys/soundcard.h
check_header soundcard.h
enabled jack_indev && check_lib2 jack/jack.h jack_client_open -ljack
+enabled_any sndio_indev sndio_outdev && check_lib2 sndio.h sio_open -lsndio
+
enabled x11grab &&
check_header X11/Xlib.h &&
check_header X11/extensions/XShm.h &&
check_cflags -Wall
check_cflags -Wno-parentheses
check_cflags -Wno-switch
+check_cflags -Wno-format-zero-length
check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
check_cflags -Wredundant-decls
# add some linker flags
check_ldflags -Wl,--warn-common
-check_ldflags -Wl,--as-needed
-check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
+check_ldflags -Wl,-rpath-link=libpostproc:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil
test_ldflags -Wl,-Bsymbolic && append SHFLAGS -Wl,-Bsymbolic
echo "X{};" > $TMPV
EOF
fi
-if enabled small; then
+if [ -n "$optflags" ]; then
+ add_cflags $optflags
+elif enabled small; then
add_cflags $size_cflags
- optimizations="small"
elif enabled optimizations; then
add_cflags $speed_cflags
else
check_cflags -w1
# -wd: Disable following warnings
# 144, 167, 556: -Wno-pointer-sign
+ # 1292: attribute "foo" ignored
# 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,10006,10148,10156
+ check_cflags -wd144,167,556,1292,10006,10148,10156
# 11030: Warning unknown option --as-needed
# 10156: ignoring option '-export'; no argument required
check_ldflags -wd10156,11030
add_cflags -W${armcc_opt},--diag_suppress=1207
add_cflags -W${armcc_opt},--diag_suppress=1293 # assignment in condition
add_cflags -W${armcc_opt},--diag_suppress=3343 # hardfp compat
+ add_cflags -W${armcc_opt},--diag_suppress=167 # pointer sign
+ add_cflags -W${armcc_opt},--diag_suppress=513 # pointer sign
elif enabled tms470; then
add_cflags -pds=824 -pds=837
elif enabled pathscale; then
enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; }
+! enabled_any memalign posix_memalign malloc_aligned &&
+ enabled_any $need_memalign && enable memalign_hack
+
echo "install prefix $prefix"
echo "source path $source_path"
echo "C compiler $cc"
echo "big-endian ${bigendian-no}"
echo "runtime cpu detection ${runtime_cpudetect-no}"
if enabled x86; then
- echo "yasm ${yasm-no}"
+ echo "${yasmexe} ${yasm-no}"
echo "MMX enabled ${mmx-no}"
echo "MMX2 enabled ${mmx2-no}"
echo "3DNow! enabled ${amd3dnow-no}"
echo "3DNow! extended enabled ${amd3dnowext-no}"
echo "SSE enabled ${sse-no}"
echo "SSSE3 enabled ${ssse3-no}"
+ echo "AVX enabled ${avx-no}"
echo "CMOV enabled ${cmov-no}"
echo "CMOV is fast ${fast_cmov-no}"
echo "EBX available ${ebx_available-no}"
echo "EBP available ${ebp_available-no}"
- echo "10 operands supported ${ten_operands-no}"
fi
if enabled arm; then
echo "ARMv5TE enabled ${armv5te-no}"
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 "threading support ${thread_type-no}"
echo "SDL support ${sdl-no}"
echo "Sun medialib support ${mlib-no}"
+echo "libdxva2 enabled ${dxva2-no}"
+echo "libva enabled ${vaapi-no}"
+echo "libvdpau enabled ${vdpau-no}"
echo "AVISynth enabled ${avisynth-no}"
echo "frei0r enabled ${frei0r-no}"
echo "libdc1394 support ${libdc1394-no}"
echo "libschroedinger enabled ${libschroedinger-no}"
echo "libspeex enabled ${libspeex-no}"
echo "libtheora enabled ${libtheora-no}"
+echo "libvo-aacenc support ${libvo_aacenc-no}"
+echo "libvo-amrwbenc support ${libvo_amrwbenc-no}"
echo "libvorbis enabled ${libvorbis-no}"
echo "libvpx enabled ${libvpx-no}"
echo "libx264 enabled ${libx264-no}"
echo "Creating config.mak and config.h..."
-# build tree in object directory if source path is different from current one
-if enabled source_path_used; then
- DIRS="
- doc
- libavcodec
- libavcodec/$arch
- libavdevice
- libavfilter
- libavfilter/$arch
- libavformat
- libavutil
- libavutil/$arch
- libpostproc
- libswscale
- libswscale/$arch
- tests
- tools
- "
- FILES="
- Makefile
- common.mak
- subdir.mak
- doc/texi2pod.pl
- libavcodec/Makefile
- libavcodec/${arch}/Makefile
- libavdevice/Makefile
- libavfilter/Makefile
- libavfilter/${arch}/Makefile
- libavformat/Makefile
- libavutil/Makefile
- libpostproc/Makefile
- libswscale/Makefile
- "
- map 'mkdir -p $v' $DIRS;
- map 'test -f "$source_path/$v" && $ln_s "$source_path/$v" $v' $FILES
-fi
-
-enabled stripping || strip="echo skipping strip"
+test -e Makefile || $ln_s "$source_path/Makefile" .
config_files="$TMPH config.mak"
cat > config.mak <<EOF
# Automatically generated by configure - do not modify!
-ifndef LIBAV_CONFIG_MAK
-LIBAV_CONFIG_MAK=1
LIBAV_CONFIGURATION=$LIBAV_CONFIGURATION
prefix=$prefix
LIBDIR=\$(DESTDIR)$libdir
BINDIR=\$(DESTDIR)$bindir
DATADIR=\$(DESTDIR)$datadir
MANDIR=\$(DESTDIR)$mandir
-SRC_PATH="$source_path"
-SRC_PATH_BARE=$source_path
-BUILD_ROOT="$PWD"
+SRC_PATH=$source_path
CC_IDENT=$cc_ident
ARCH=$arch
CC=$cc
YASMDEP=$yasmexe
AR=$ar
RANLIB=$ranlib
-CP=cp -p
LN_S=$ln_s
-STRIP=$strip
CPPFLAGS=$CPPFLAGS
CFLAGS=$CFLAGS
ASFLAGS=$ASFLAGS
+AS_O=$CC_O
CC_O=$CC_O
DLLTOOL=$dlltool
LDFLAGS=$LDFLAGS
SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}
SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}
SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}
-SAMPLES=${samples:-\$(FATE_SAMPLES)}
+SAMPLES:=${samples:-\$(FATE_SAMPLES)}
EOF
get_version(){
get_version LIBSWSCALE libswscale/swscale.h
get_version LIBPOSTPROC libpostproc/postprocess.h
-get_version LIBAVCODEC libavcodec/avcodec.h
+get_version LIBAVCODEC libavcodec/version.h
get_version LIBAVDEVICE libavdevice/avdevice.h
get_version LIBAVFORMAT libavformat/version.h
get_version LIBAVUTIL libavutil/avutil.h
EOF
echo "#endif /* LIBAV_CONFIG_H */" >> $TMPH
-echo "endif # LIBAV_CONFIG_MAK" >> config.mak
# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
cp_if_changed $TMPH config.h
libs=$4
requires=$5
enabled ${name#lib} || return 0
+mkdir -p $name
cat <<EOF > $name/$name.pc
prefix=$prefix
exec_prefix=\${prefix}
EOF
}
-pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION"
-pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs"
+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"
-pkgconfig_generate libpostproc "Libav post processing library" "$LIBPOSTPROC_VERSION"
-pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate libpostproc "Libav post processing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"