echo " --disable-aandct disable AAN DCT code"
echo " --disable-fft disable FFT code"
echo " --disable-golomb disable Golomb code"
+ echo " --disable-lpc disable LPC code"
echo " --disable-mdct disable MDCT code"
echo " --disable-rdft disable RDFT code"
echo " --disable-vaapi disable VAAPI code"
pat=$1
shift
for v; do
- case "$v" in $pat) echo "$v" ;; esac
+ eval "case $v in $pat) echo $v ;; esac"
done
}
name="$1"
asm="$2"
shift 2
- check_as "$@" <<EOF && enable $name || disable $name
+ disable $name
+ check_as "$@" <<EOF && enable $name
void foo(void){ __asm__ volatile($asm); }
EOF
}
libvorbis
libx264
libxvid
+ lpc
mdct
memalign_hack
mlib
aac_decoder_select="fft mdct"
aac_encoder_select="fft mdct"
ac3_decoder_select="fft mdct"
+alac_encoder_select="lpc"
atrac3_decoder_select="fft mdct"
cavs_decoder_select="golomb"
cook_decoder_select="fft mdct"
eatqi_decoder_select="aandct"
ffv1_decoder_select="golomb"
flac_decoder_select="golomb"
-flac_encoder_select="golomb"
+flac_encoder_select="golomb lpc"
flashsv_decoder_select="zlib"
flashsv_encoder_select="zlib"
flv_encoder_select="h263_encoder"
sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
tg2_muxer_select="mov_muxer"
tgp_muxer_select="mov_muxer"
+w64_demuxer_deps="wav_demuxer"
# indevs / outdevs
alsa_indev_deps="alsa_asoundlib_h snd_pcm_htimestamp"
# toolchain
ar="ar"
cc_default="gcc"
+cc_version=\"unknown\"
host_cc_default="gcc"
ln_s="ln -sf"
nm_default="nm"
tmpfile(){
tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
(set -C; exec > $tmp) 2>/dev/null ||
- die "Unable to create temoporary file in $TMPDIR."
+ die "Unable to create temporary file in $TMPDIR."
append TMPFILES $tmp
eval $1=$tmp
}
if $cc -v 2>&1 | grep -qi ^gcc; then
cc_type=gcc
+ cc_version=__VERSION__
if ! $cc -dumpversion | grep -q '^2\.'; then
CC_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
AS_DEPFLAGS='-MMD -MF $(@:.o=.d) -MT $@'
fi
elif $cc --version 2>/dev/null | grep -q Intel; then
cc_type=icc
+ cc_version="AV_STRINGIFY(__INTEL_COMPILER)"
CC_DEPFLAGS='-MMD'
AS_DEPFLAGS='-MMD'
elif $cc -v 2>&1 | grep -q xlc; then
cc_type=xlc
+ cc_version="AV_STRINGIFY(__IBMC__)"
elif $cc -V 2>/dev/null | grep -q Compaq; then
cc_type=ccc
+ cc_version="AV_STRINGIFY(__DECC_VER)"
DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -M'
debuglevel=3
add_ldflags -Wl,-z,now # calls to libots crash without this
-elif $cc --vsn 2>/dev/null | grep -q RVCT; then
+elif $cc --vsn 2>/dev/null | grep -q "ARM C/C++ Compiler"; then
test -d "$sysroot" || die "No valid sysroot specified."
cc_type=armcc
+ cc_version="AV_STRINGIFY(__ARMCC_VERSION)"
armcc_conf="$PWD/armcc.conf"
$cc --arm_linux_configure \
--arm_linux_config_file="$armcc_conf" \
AS_DEPFLAGS='-MMD'
elif $cc -version 2>/dev/null | grep -q TMS470; then
cc_type=tms470
+ cc_version="AV_STRINGIFY(__TI_COMPILER_VERSION__)"
cc="$cc --gcc --abi=eabi -eo=.o -mc -me"
CC_O='-fr=$(@D)'
as_default="${cross_prefix}gcc"
;;
-mfpu=neon) echo --float_support=vfpv3 --neon ;;
-mfpu=vfp) echo --float_support=vfpv2 ;;
- -mfpu=softvfp) echo --float_support=vfplib ;;
+ -msoft-float) echo --float_support=vfplib ;;
-Os) echo -O3 -mf=2 ;;
-O[0-3]) echo $flag -mf=5 ;;
-g) echo -g -mn ;;
enable fast_64bit
spic=$shared
;;
- i386|i486|i586|i686|i86pc|BePC)
+ i386|i486|i586|i686|i86pc|BePC|x86_64|amd64)
arch="x86"
subarch="x86_32"
enable fast_unaligned
- ;;
- x86_64|amd64)
- arch="x86"
- subarch="x86_32"
- enable cmov
- enable fast_cmov
- enable fast_unaligned
check_cc <<EOF && enable fast_64bit && subarch="x86_64" && spic=$shared
int test[sizeof(char*) - 7];
EOF
+ if test "$subarch" = "x86_64"; then
+ enable cmov
+ enable fast_cmov
+ fi
;;
*)
arch="unknown"
FFSERVERLDFLAGS=-Wl,-bind_at_load
objformat="macho"
enabled x86_64 && objformat="macho64"
- enabled shared ||
+ enabled_any pic shared ||
{ check_cflags -mdynamic-no-pic && add_asflags -mdynamic-no-pic; }
;;
mingw32*)
disabled optimizations || check_cflags -fomit-frame-pointer
+enable_pic() {
+ enable pic
+ add_cppflags -DPIC
+ add_cflags -fPIC
+ add_asflags -fPIC
+}
+
+enabled pic && enable_pic
+
check_cc <<EOF || die "Symbol mangling check failed."
int ff_extern;
EOF
if enabled arm; then
+ check_cflags -marm
+
check_ld <<EOF && enable vfp_args
__asm__ (".eabi_attribute 28, 1");
int main(void) { return 0; }
enabled iwmmxt && check_asm iwmmxt '"wunpckelub wr6, wr4"'
enabled neon && check_asm neon '"vadd.i16 q0, q0, q0"'
+ enabled_all armv6t2 shared !pic && enable_pic
+
elif enabled mips; then
check_asm loongson '"dmult.g $1, $2, $3"'
return i;
EOF
- # check wether EBX is available on x86
- check_asm ebx_available '"":::"%ebx"'
+ # check whether EBX is available on x86
+ check_asm ebx_available '""::"b"(0)' &&
+ check_asm ebx_available '"":::"%ebx"'
# check whether more than 10 operands are supported
check_cc <<EOF && enable ten_operands
enabled libspeex && require libspeex speex/speex.h speex_decoder_init -lspeex
enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
-enabled libx264 && require libx264 x264.h x264_encoder_open -lx264 -lm &&
- { check_cpp_condition x264.h "X264_BUILD >= 65" ||
- die "ERROR: libx264 version must be >= 0.65."; }
+enabled libx264 && require libx264 x264.h x264_encoder_encode -lx264 -lm &&
+ { check_cpp_condition x264.h "X264_BUILD >= 78" ||
+ die "ERROR: libx264 version must be >= 0.78."; }
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
check_func XOpenDisplay -lX11 &&
check_func XShmCreateImage -lX11 -lXext
-enabled debug && add_cflags -g"$debuglevel"
+enabled debug && add_cflags -g"$debuglevel" && add_asflags -g"$debuglevel"
# add some useful compiler flags if supported
check_cflags -Wdeclaration-after-statement
check_cflags -fno-tree-vectorize
fi
-enabled pic && LIBOBJFLAGS='$(PIC)'
-
if enabled gprof; then
add_cflags -p
add_ldflags -p
echo "Creating config.mak and config.h..."
echo "# Automatically generated by configure - do not modify!" > config.mak
-echo "/* Automatically generated by configure - do not modify! */" > $TMPH
-echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
-echo "#define FFMPEG_CONFIG_H" >> $TMPH
-echo "#define FFMPEG_CONFIGURATION \"$(c_escape $FFMPEG_CONFIGURATION)\"" >> $TMPH
-echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
-
echo "ifndef FFMPEG_CONFIG_MAK" >> config.mak
echo "FFMPEG_CONFIG_MAK=1" >> config.mak
echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
echo "SHFLAGS=$SHFLAGS" >> config.mak
echo "YASMFLAGS=$YASMFLAGS" >> config.mak
-echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
-echo "PIC=-fPIC -DPIC" >> config.mak
echo "BUILDSUF=$build_suffix" >> config.mak
echo "FULLNAME=$FULLNAME" >> config.mak
echo "LIBPREF=$LIBPREF" >> config.mak
echo "ARCH=$arch" >> config.mak
+
+echo "/* Automatically generated by configure - do not modify! */" > $TMPH
+echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
+echo "#define FFMPEG_CONFIG_H" >> $TMPH
+echo "#define FFMPEG_CONFIGURATION \"$(c_escape $FFMPEG_CONFIGURATION)\"" >> $TMPH
+echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
+
+echo "#define CC_TYPE \"$cc_type\"" >> $TMPH
+echo "#define CC_VERSION $cc_version" >> $TMPH
+echo "#define restrict $_restrict" >> $TMPH
+
+if enabled small || disabled optimizations; then
+ echo "#define av_always_inline" >> $TMPH
+fi
+
+
+# Apparently it's not possible to portably echo a backslash.
+enabled asmalign_pot &&
+ printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
+ printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
+
+echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
+echo "#define EXTERN_ASM ${extern_prefix}" >> $TMPH
+
print_config ARCH_ $TMPH config.mak $ARCH_LIST
print_config HAVE_ $TMPH config.mak $HAVE_LIST
print_config CONFIG_ $TMPH config.mak $CONFIG_LIST \
$INDEV_LIST \
$OUTDEV_LIST \
-echo "#define restrict $_restrict" >> $TMPH
-
-if enabled small || disabled optimizations; then
- echo "#define av_always_inline" >> $TMPH
-fi
-
-
-# Apparently it's not possible to portably echo a backslash.
-enabled asmalign_pot &&
- printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
- printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
-
-echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
-
echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
echo "endif # FFMPEG_CONFIG_MAK" >> config.mak
# build tree in object directory if source path is different from current one
if enabled source_path_used; then
- DIRS="\
- doc \
- libavcodec \
- libavcodec/alpha \
- libavcodec/arm \
- libavcodec/bfin \
- libavcodec/mlib \
- libavcodec/ppc \
- libavcodec/sh4 \
- libavcodec/sparc \
- libavcodec/x86 \
- libavdevice \
- libavfilter \
- libavformat \
- libavutil \
- libpostproc \
- libswscale \
- libswscale/bfin \
- libswscale/mlib \
- libswscale/ppc \
- libswscale/sparc \
- libswscale/x86 \
- tests \
- tools \
- "
- FILES="\
- Makefile \
- common.mak \
- subdir.mak \
- doc/texi2pod.pl \
- libavcodec/Makefile \
- libavdevice/Makefile \
- libavfilter/Makefile \
- libavformat/Makefile \
- libavutil/Makefile \
- libpostproc/Makefile \
- libswscale/Makefile \
- "
+ DIRS="
+ doc
+ libavcodec
+ libavcodec/$arch
+ libavdevice
+ libavfilter
+ libavformat
+ libavutil
+ libavutil/$arch
+ libpostproc
+ libswscale
+ libswscale/$arch
+ tests
+ tools
+ "
+ FILES="
+ Makefile
+ common.mak
+ subdir.mak
+ doc/texi2pod.pl
+ libavcodec/Makefile
+ libavdevice/Makefile
+ libavfilter/Makefile
+ libavformat/Makefile
+ libavutil/Makefile
+ libpostproc/Makefile
+ libswscale/Makefile
+ "
for dir in $DIRS ; do
mkdir -p $dir
done
Name: $name
Description: $comment
Version: $version
-Requires: $(disabled shared && echo $requires)
+Requires: $(enabled shared || echo $requires)
Requires.private: $(enabled shared && echo $requires)
Conflicts:
-Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
+Libs: -L\${libdir} -l${shortname} $(enabled shared || echo $libs)
Libs.private: $(enabled shared && echo $libs)
Cflags: -I\${includedir}
EOF