--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-postproc disable libpostproc build
txtpages
"
+LIBRARY_LIST="
+ avcodec
+ avdevice
+ avfilter
+ avformat
+ avresample
+ avutil
+ swresample
+ swscale
+"
+
PROGRAM_LIST="
ffplay
ffprobe
CONFIG_LIST="
$COMPONENT_LIST
$DOCUMENT_LIST
+ $LIBRARY_LIST
$PROGRAM_LIST
- avcodec
- avdevice
- avfilter
- avformat
- avresample
avisynth
bzlib
crystalhd
small
sram
static
- swresample
- swscale
swscale_alpha
thumb
vaapi
$HAVE_LIST_PUB
$THREADS_LIST
$MATH_FUNCS
+ access
aligned_malloc
aligned_stack
alsa_asoundlib_h
CONFIG_EXTRA="
aandcttables
ac3dsp
- avutil
error_resilience
gcrypt
golomb
tinterlace_pad_test_deps="tinterlace_filter"
# libraries
-avdevice_deps="avcodec avformat"
-avformat_deps="avcodec"
+avcodec_deps="avutil"
+avdevice_deps="avutil avcodec avformat"
+avfilter_deps="avutil"
+avformat_deps="avutil avcodec"
+avresample_deps="avutil"
postproc_deps="gpl"
+swscale_deps="avutil"
# programs
ffmpeg_deps="avcodec avfilter avformat swscale swresample"
# configurable options
enable $PROGRAM_LIST
enable $DOCUMENT_LIST
-
-enable avcodec
-enable avdevice
-enable avfilter
-enable avformat
-enable avutil
+enable $(filter_out avresample $LIBRARY_LIST)
enable postproc
enable stripping
-enable swresample
-enable swscale
enable asm
enable debug
die "Sanity test failed."
fi
+ccc_flags(){
+ for flag; do
+ case $flag in
+ -std=c99) echo -c99 ;;
+ -mcpu=*) echo -arch ${flag#*=} ;;
+ -mieee) echo -ieee ;;
+ -O*|-fast) echo $flag ;;
+ -fno-math-errno) echo -assume nomath_errno ;;
+ -g) echo -g3 ;;
+ -Wall) echo -msg_enable level2 ;;
+ -Wno-pointer-sign) echo -msg_disable ptrmismatch1 ;;
+ -Wl,*) echo $flag ;;
+ -f*|-W*) ;;
+ *) echo $flag ;;
+ esac
+ done
+}
+
msvc_flags(){
for flag; do
case $flag in
prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
*-sse3) echo -xarch=sse3 ;;
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 ;;
athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
k8|opteron|athlon64|athlon-fx)
_type=ccc
_ident=$($_cc -V | head -n1 | cut -d' ' -f1-3)
_DEPFLAGS='-M'
- debuglevel=3
- _ldflags='-Wl,-z,now' # calls to libots crash without this
_cflags_speed='-fast'
_cflags_size='-O1'
+ _flags_filter=ccc_flags
elif $_cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
test -d "$sysroot" || die "No valid sysroot specified."
_type=armcc
# Add processor-specific flags
if test "$cpu" = generic; then
: do nothing
-elif enabled ppc; then
- case $(tolower $cpu) in
- 601|ppc601|powerpc601)
- cpuflags="-mcpu=601"
- disable altivec
- ;;
- 603*|ppc603*|powerpc603*)
- cpuflags="-mcpu=603"
- disable altivec
- ;;
- 604*|ppc604*|powerpc604*)
- cpuflags="-mcpu=604"
- disable altivec
- ;;
- g3|75*|ppc75*|powerpc75*)
- cpuflags="-mcpu=750"
- disable altivec
- ;;
- g4|745*|ppc745*|powerpc745*)
- cpuflags="-mcpu=7450"
- ;;
- 74*|ppc74*|powerpc74*)
- cpuflags="-mcpu=7400"
- ;;
- g5|970|ppc970|powerpc970)
- cpuflags="-mcpu=970"
- ;;
- power[3-7]*)
- cpuflags="-mcpu=$cpu"
- ;;
- cell)
- cpuflags="-mcpu=cell"
- enable ldbrx
- ;;
- e500mc)
- cpuflags="-mcpu=e500mc"
- disable altivec
- ;;
- e500v2)
- cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double"
- disable altivec
- ;;
- e500)
- cpuflags="-mcpu=8540 -mhard-float"
- disable altivec
- ;;
- esac
-
-elif enabled x86; then
+elif enabled aarch64; then
case $cpu in
- i[345]86|pentium)
- cpuflags="-march=$cpu"
- disable mmx
- ;;
- # targets that do NOT support conditional mov (cmov)
- pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
- cpuflags="-march=$cpu"
- 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|bdver*)
+ armv*)
cpuflags="-march=$cpu"
- enable cmov
- enable fast_cmov
;;
- # targets that do support conditional mov but on which it's slow
- pentium4|pentium4m|prescott|nocona)
- cpuflags="-march=$cpu"
- enable cmov
- disable fast_cmov
+ *)
+ cpuflags="-mcpu=$cpu"
;;
esac
-elif enabled sparc; then
+elif enabled alpha; then
- case $cpu in
- cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
- cpuflags="-mcpu=$cpu"
- disable vis
- ;;
- ultrasparc*|niagara[234])
- cpuflags="-mcpu=$cpu"
- ;;
- esac
+ cpuflags="-mcpu=$cpu"
elif enabled arm; then
;;
esac
-elif enabled alpha; then
+elif enabled avr32; then
- enabled ccc && cpuflags="-arch $cpu" || cpuflags="-mcpu=$cpu"
+ case $cpu in
+ ap7[02]0[0-2])
+ subarch="avr32_ap"
+ cpuflags="-mpart=$cpu"
+ ;;
+ ap)
+ subarch="avr32_ap"
+ cpuflags="-march=$cpu"
+ ;;
+ uc3[ab]*)
+ subarch="avr32_uc"
+ cpuflags="-mcpu=$cpu"
+ ;;
+ uc)
+ subarch="avr32_uc"
+ cpuflags="-march=$cpu"
+ ;;
+ esac
elif enabled bfin; then
;;
esac
-elif enabled avr32; then
+elif enabled ppc; then
- case $cpu in
- ap7[02]0[0-2])
- subarch="avr32_ap"
- cpuflags="-mpart=$cpu"
+ case $(tolower $cpu) in
+ 601|ppc601|powerpc601)
+ cpuflags="-mcpu=601"
+ disable altivec
;;
- ap)
- subarch="avr32_ap"
- cpuflags="-march=$cpu"
+ 603*|ppc603*|powerpc603*)
+ cpuflags="-mcpu=603"
+ disable altivec
;;
- uc3[ab]*)
- subarch="avr32_uc"
+ 604*|ppc604*|powerpc604*)
+ cpuflags="-mcpu=604"
+ disable altivec
+ ;;
+ g3|75*|ppc75*|powerpc75*)
+ cpuflags="-mcpu=750"
+ disable altivec
+ ;;
+ g4|745*|ppc745*|powerpc745*)
+ cpuflags="-mcpu=7450"
+ ;;
+ 74*|ppc74*|powerpc74*)
+ cpuflags="-mcpu=7400"
+ ;;
+ g5|970|ppc970|powerpc970)
+ cpuflags="-mcpu=970"
+ ;;
+ power[3-7]*)
cpuflags="-mcpu=$cpu"
;;
- uc)
- subarch="avr32_uc"
- cpuflags="-march=$cpu"
+ cell)
+ cpuflags="-mcpu=cell"
+ enable ldbrx
+ ;;
+ e500mc)
+ cpuflags="-mcpu=e500mc"
+ disable altivec
+ ;;
+ e500v2)
+ cpuflags="-mcpu=8548 -mhard-float -mfloat-gprs=double"
+ disable altivec
+ ;;
+ e500)
+ cpuflags="-mcpu=8540 -mhard-float"
+ disable altivec
;;
esac
-elif enabled aarch64; then
+elif enabled sparc; then
case $cpu in
- armv*)
- cpuflags="-march=$cpu"
+ cypress|f93[04]|tsc701|sparcl*|supersparc|hypersparc|niagara|v[789])
+ cpuflags="-mcpu=$cpu"
+ disable vis
;;
- *)
+ ultrasparc*|niagara[234])
cpuflags="-mcpu=$cpu"
;;
esac
+elif enabled x86; then
+
+ case $cpu in
+ i[345]86|pentium)
+ cpuflags="-march=$cpu"
+ disable mmx
+ ;;
+ # targets that do NOT support conditional mov (cmov)
+ pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
+ cpuflags="-march=$cpu"
+ 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|corei7*|amdfam10|barcelona|atom|bdver*)
+ cpuflags="-march=$cpu"
+ enable cmov
+ enable fast_cmov
+ ;;
+ # targets that do support conditional mov but on which it's slow
+ pentium4|pentium4m|prescott|nocona)
+ cpuflags="-march=$cpu"
+ enable cmov
+ disable fast_cmov
+ ;;
+ esac
+
fi
add_cflags $cpuflags
add_cflags -pds=48 # incompatible redefinition of macro
fi
+if enabled_all ccc glibc; then
+ add_ldflags -Wl,-z,now # calls to libots crash without this
+fi
+
esc(){
echo "$*" | sed 's/%/%25/g;s/:/%3a/g'
}
# 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
fi
elif enabled ccc; then
# disable some annoying warnings
- add_cflags -msg_disable cvtu32to64
- add_cflags -msg_disable embedcomment
- add_cflags -msg_disable needconstext
- add_cflags -msg_disable nomainieee
- add_cflags -msg_disable ptrmismatch1
- add_cflags -msg_disable unreachcode
+ add_cflags -msg_disable bitnotint
+ add_cflags -msg_disable mixfuncvoid
+ add_cflags -msg_disable nonstandcast
+ add_cflags -msg_disable unsupieee
elif enabled gcc; then
check_optflags -fno-tree-vectorize
check_cflags -Werror=implicit-function-declaration
fi
case $target_os in
+ osf1)
+ enabled ccc && add_ldflags '-Wl,-expect_unresolved,*'
+ ;;
plan9)
add_cppflags -Dmain=plan9_main
;;
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
EOF
get_version(){
- lcname=$1
+ lcname=lib${1}
name=$(toupper $lcname)
file=$source_path/$lcname/version.h
eval $(awk "/#define ${name}_VERSION_M/ { print \$2 \"=\" \$3 }" "$file")
get_version_old LIBPOSTPROC libpostproc/version.h
-get_version libavcodec
-get_version libavdevice
-get_version libavfilter
-get_version libavformat
-get_version libavresample
-get_version libavutil
-get_version libswresample
-get_version libswscale
+map 'get_version $v' $LIBRARY_LIST
cat > $TMPH <<EOF
/* Automatically generated by configure - do not modify! */
pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
-pkgconfig_generate libswresample "FFmpeg audio rescaling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
+pkgconfig_generate libswresample "FFmpeg audio resampling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
fix_ffmpeg_remote(){
git_remote_from=$1