mpeg2_vaapi_hwaccel_select="vaapi mpeg2video_decoder"
mpeg4_vaapi_hwaccel_deps="va_va_h"
mpeg4_vaapi_hwaccel_select="vaapi mpeg4_decoder"
+mpeg4_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
+mpeg4_vdpau_decoder_select="vdpau mpeg4_decoder"
mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select="mpegvideo_decoder"
msmpeg4v1_encoder_select="h263_encoder"
elif $cc -V 2>&1 | grep -q Sun; then
cc_type=suncc
cc_version="AV_STRINGIFY(__SUNPRO_C)"
- DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
+ DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
+ filter_cflags=suncc_flags
+ suncc_flags(){
+ for flag; do
+ case $flag in
+ -march=*|-mcpu=*)
+ case "${flag#*=}" in
+ native) echo -xtarget=native ;;
+ v9) echo -xarch=sparc ;;
+ ultrasparc) echo -xarch=sparcvis ;;
+ ultrasparc3|niagara*) echo -xarch=sparcvis2 ;;
+ i586|pentium) echo -xchip=pentium ;;
+ i686|pentiumpro|pentium2) echo -xtarget=pentium_pro ;;
+ pentium3*|c3-2) echo -xtarget=pentium3 ;;
+ pentium-m) echo -xarch=sse2 -xchip=pentium3 ;;
+ pentium4*) echo -xtarget=pentium4 ;;
+ prescott|nocona) echo -xarch=sse3 -xchip=pentium4 ;;
+ *-sse3) echo -xarch=sse3 ;;
+ core2) echo -xarch=ssse3 -xchip=core2 ;;
+ amdfam10|barcelona) echo -xarch=sse4_1 ;;
+ athlon-4|athlon-[mx]p) echo -xarch=ssea ;;
+ k8|opteron|athlon64|athlon-fx)
+ echo -xarch=sse2a ;;
+ athlon*) echo -xarch=pentium_proa ;;
+ esac
+ ;;
+ -std=c99) echo -xc99 ;;
+ -fomit-frame-pointer) echo -xregs=frameptr ;;
+ -fPIC) echo -KPIC -xcode=pic32 ;;
+ -Os) echo -O5 -xspace ;;
+ -W*,*) echo $flag ;;
+ -f*-*|-W*) ;;
+ *) echo $flag ;;
+ esac
+ done
+ }
fi
test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
enable fast_64bit
spic=$shared
# HACK: currently fails to build if .bss is > 4MB and shared libs are built
- enabled shared && enable hardcoded_tables
+ enabled shared && enable_weak hardcoded_tables
;;
m68k)
arch="m68k"
subarch="x86_32"
enable fast_unaligned
check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared
- int test[sizeof(char*) - 7];
+ int test[(int)sizeof(char*) - 7];
EOF
if test "$subarch" = "x86_64"; then
enable cmov
enable $arch $subarch
enabled spic && enable pic
+check_cpp_condition stdlib.h "defined(__PIC__) || defined(__pic__) || defined(PIC)" && enable pic
# OS specific
case $target_os in
beos|haiku|zeta)
prefix_default="$HOME/config"
- # helps building libavcodec
- add_cppflags -DPIC
- add_cflags -fomit-frame-pointer
# 3 gcc releases known for BeOS, each with ugly bugs
gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
case "$gcc_version" in
;;
openbsd)
enable malloc_aligned
+ # On OpenBSD 4.5. the compiler does not use PIC unless
+ # explicitly using -fPIC. FFmpeg builds fine without PIC,
+ # however the generated executable will not do anything
+ # (simply quits with exit-code 1, no crash, no output).
+ # Thus explicitly enable PIC here.
enable pic
SHFLAGS='-shared'
oss_indev_extralibs="-lossaudio"
check_asm dcbzl '"dcbzl 0, 1"'
check_asm ppc4xx '"maclhw r10, r11, r12"'
- check_asm xform_asm '"lwzx 0, %y0" :: "Z"(*(int*)0)'
+ check_asm xform_asm '"lwzx %1, %y0" :: "Z"(*(int*)0), "r"(0)'
# AltiVec flags: The FSF version of GCC differs from the Apple version
if enabled altivec; then
YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
enabled x86_64 && append YASMFLAGS "-m amd64"
- enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
+ enabled pic && append YASMFLAGS "-DPIC"
+ test -n "$extern_prefix" && append YASMFLAGS "-DPREFIX"
case "$objformat" in
elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
- macho64) append YASMFLAGS "-DPIC -DPREFIX" ;;
- *) append YASMFLAGS "-DPREFIX" ;;
esac
disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
if enabled xlc; then
add_cflags -O5
add_ldflags -O5
+ elif enabled suncc; then
+ add_cflags -O5
elif enabled ccc; then
add_cflags -fast
else
#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 CC_TYPE "$cc_type"
#define CC_VERSION $cc_version