Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: source/patched-ffmpeg-mt/configure

Issue 3384002: ffmpeg source update for sep 09 (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/ffmpeg/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/patched-ffmpeg-mt/common.mak ('k') | source/patched-ffmpeg-mt/doc/APIchanges » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/patched-ffmpeg-mt/configure
===================================================================
--- source/patched-ffmpeg-mt/configure (revision 59334)
+++ source/patched-ffmpeg-mt/configure (working copy)
@@ -495,20 +495,29 @@
done
}
+print_config_h(){
+ enabled $1 && v=1 || v=0
+ echo "#define $2 $v"
+}
+
+print_config_mak(){
+ enabled $1 && v= || v=!
+ echo "$v$2=yes"
+}
+
+print_config_asm(){
+ enabled $1 && echo "%define $2"
+}
+
print_config(){
pfx=$1
- header=$2
- makefile=$3
- shift 3
+ files=$2
+ shift 2
for cfg; do
ucname="$(toupper $cfg)"
- if enabled $cfg; then
- echo "#define ${pfx}${ucname} 1" >> $header
- echo "${pfx}${ucname}=yes" >> $makefile
- else
- echo "#define ${pfx}${ucname} 0" >> $header
- echo "!${pfx}${ucname}=yes" >> $makefile
- fi
+ for f in $files; do
+ "print_config_${f##*.}" $cfg ${pfx}${ucname} >>$f
+ done
done
}
@@ -1374,6 +1383,7 @@
gopher_protocol_deps="network"
http_protocol_deps="network"
http_protocol_select="tcp_protocol"
+mmsh_protocol_select="http_protocol"
mmst_protocol_deps="network"
rtmp_protocol_select="tcp_protocol"
rtp_protocol_select="udp_protocol"
@@ -1427,7 +1437,7 @@
asv1 \
asv2 \
bmp \
- dnxhd="hdxhd_1080i dnxhd_720p dnxhd_720p_rd" \
+ dnxhd="dnxhd_1080i dnxhd_720p dnxhd_720p_rd" \
dvvideo="dv dv50" \
ffv1 \
flac \
@@ -1492,6 +1502,7 @@
set_ne_test_deps pixdesc
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
@@ -1777,6 +1788,7 @@
tmpfile TMPS .S
tmpfile TMPV .ver
tmpfile TMPSH .sh
+tmpfile TMPASM .asm
unset -f mktemp
@@ -1797,7 +1809,16 @@
filter_cppflags=echo
filter_asflags=echo
-if $cc -v 2>&1 | grep -qi ^gcc; then
+if $cc -v 2>&1 | grep -q '^gcc.*LLVM'; then
+ cc_type=llvm_gcc
+ cc_version=__VERSION__
+ gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
+ cc_ident="llvm-gcc $($cc -dumpversion) $gcc_extra_ver"
+ CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+ AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
+ speed_cflags='-O3'
+ size_cflags='-Os'
+elif $cc -v 2>&1 | grep -qi ^gcc; then
cc_type=gcc
cc_version=__VERSION__
gcc_extra_ver=$(expr "$($cc --version | head -n1)" : '.*\((.*)\)')
@@ -1843,6 +1864,7 @@
--configure_sysroot="$sysroot" \
--configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
die "Error creating armcc configuration file."
+ $cc --vsn | grep -q RVCT && armcc_opt=rvct || armcc_opt=armcc
cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
as_default="${cross_prefix}gcc"
CC_DEPFLAGS='-MMD'
@@ -1966,7 +1988,7 @@
if test -n "$sysroot"; then
case "$cc_type" in
- gcc)
+ gcc|llvm_gcc)
add_cppflags --sysroot="$sysroot"
add_ldflags --sysroot="$sysroot"
;;
@@ -1985,7 +2007,7 @@
enabled cross_compile && die "--cpu=host makes no sense when cross-compiling."
case "$cc_type" in
- gcc)
+ gcc|llvm_gcc)
check_native(){
$cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return
sed -n "/$1=/{
@@ -2103,7 +2125,7 @@
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)
+ 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
@@ -2375,6 +2397,8 @@
;;
esac
+echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$FFMPEG_CONFIGURATION" >config.fate
+
check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
set_default $PATHS_LIST
@@ -2559,16 +2583,16 @@
check_asm bswap '"bswap %%eax" ::: "%eax"'
- YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
+ YASMFLAGS="-f $objformat"
enabled x86_64 && append YASMFLAGS "-m amd64"
enabled pic && append YASMFLAGS "-DPIC"
test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
case "$objformat" in
elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
esac
- if ! disabled yasm; then
+ if ! disabled_any asm mmx yasm; then
check_yasm "pabsw xmm0, xmm0" && enable yasm ||
- warn "yasm not found, performance will suffer"
+ die "yasm not found, use --disable-yasm for a crippled build"
fi
case "$cpu" in
@@ -2873,12 +2897,16 @@
elif enabled gcc; then
check_cflags -fno-tree-vectorize
check_cflags -Werror=implicit-function-declaration
+ check_cflags -Werror=missing-prototypes
+elif enabled llvm_gcc; then
+ check_cflags -mllvm -stack-alignment=16
elif enabled clang; then
+ check_cflags -mllvm -stack-alignment=16
check_cflags -Qunused-arguments
elif enabled armcc; then
# 2523: use of inline assembler is deprecated
- add_cflags -Wrvct,--diag_suppress=2523
- add_cflags -Wrvct,--diag_suppress=1207
+ add_cflags -W${armcc_opt},--diag_suppress=2523
+ add_cflags -W${armcc_opt},--diag_suppress=1207
elif enabled tms470; then
add_cflags -pds=824 -pds=837
fi
@@ -3047,6 +3075,8 @@
enabled stripping || strip="echo skipping strip"
+config_files="$TMPH config.mak"
+
cat > config.mak <<EOF
# Automatically generated by configure - do not modify!
ifndef FFMPEG_CONFIG_MAK
@@ -3162,22 +3192,27 @@
echo "#define av_always_inline" >> $TMPH
fi
-print_config ARCH_ $TMPH config.mak $ARCH_LIST
-print_config HAVE_ $TMPH config.mak $HAVE_LIST
-print_config CONFIG_ $TMPH config.mak $CONFIG_LIST \
- $CONFIG_EXTRA \
- $DECODER_LIST \
- $ENCODER_LIST \
- $HWACCEL_LIST \
- $PARSER_LIST \
- $BSF_LIST \
- $DEMUXER_LIST \
- $MUXER_LIST \
- $FILTER_LIST \
- $PROTOCOL_LIST \
- $INDEV_LIST \
- $OUTDEV_LIST \
+if enabled yasm; then
+ append config_files $TMPASM
+ printf '' >$TMPASM
+fi
+print_config ARCH_ "$config_files" $ARCH_LIST
+print_config HAVE_ "$config_files" $HAVE_LIST
+print_config CONFIG_ "$config_files" $CONFIG_LIST \
+ $CONFIG_EXTRA \
+ $DECODER_LIST \
+ $ENCODER_LIST \
+ $HWACCEL_LIST \
+ $PARSER_LIST \
+ $BSF_LIST \
+ $DEMUXER_LIST \
+ $MUXER_LIST \
+ $FILTER_LIST \
+ $PROTOCOL_LIST \
+ $INDEV_LIST \
+ $OUTDEV_LIST \
+
cat >>config.mak <<EOF
ACODEC_TESTS=$(print_enabled -n _test $ACODEC_TESTS)
VCODEC_TESTS=$(print_enabled -n _test $VCODEC_TESTS)
@@ -3193,20 +3228,20 @@
cp_if_changed $TMPH config.h
touch .config
+enabled yasm && cp_if_changed $TMPASM config.asm
+
cat > $TMPH <<EOF
/* Generated by ffconf */
#ifndef AVUTIL_AVCONFIG_H
#define AVUTIL_AVCONFIG_H
EOF
-print_config AV_HAVE_ $TMPH /dev/null $HAVE_LIST_PUB
+print_config AV_HAVE_ $TMPH $HAVE_LIST_PUB
echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
cp_if_changed $TMPH libavutil/avconfig.h
-echo "config:$arch:$subarch:$cpu:$target_os:$cc_ident:$FFMPEG_CONFIGURATION" >config.fate
-
test -n "$WARNINGS" && printf "\n$WARNINGS"
# build pkg-config files
@@ -3218,7 +3253,7 @@
version=$3
libs=$4
requires=$5
-enabled $shortname || return 0
+enabled ${name#lib} || return 0
cat <<EOF > $name/$name.pc
prefix=$prefix
exec_prefix=\${prefix}
« no previous file with comments | « source/patched-ffmpeg-mt/common.mak ('k') | source/patched-ffmpeg-mt/doc/APIchanges » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698