X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=configure;h=ad127f4f2b159d95d14e58e5dd039aa2b725417a;hb=7ee4dd028253e67379fed95144152b408c01787d;hp=be091dfa5cc773c25a619011a73337ac6e74bed3;hpb=b147ec08c33b0ce5d8a62acd545da42cf02e0d90;p=ffmpeg diff --git a/configure b/configure index be091dfa5cc..ad127f4f2b1 100755 --- a/configure +++ b/configure @@ -72,6 +72,8 @@ show_help(){ echo " and ffmpeg will be unredistributable [default=no]" echo " --enable-pp enable GPLed postprocessing support [default=no]" echo " --enable-swscaler software scaler support [default=no]" + echo " --enable-avfilter video filter support (replaces vhook) [default=no]" + echo " --enable-avfilter-lavf video filters dependant on avformat [default=no]" echo " --enable-beosthreads use BeOS threads [default=no]" echo " --enable-os2threads use OS/2 threads [default=no]" echo " --enable-pthreads use pthreads [default=no]" @@ -615,6 +617,7 @@ COMPONENT_LIST=" decoders demuxers encoders + filters indevs muxers outdevs @@ -624,6 +627,8 @@ COMPONENT_LIST=" CONFIG_LIST=" $COMPONENT_LIST + avfilter + avfilter_lavf avisynth beos_netserver ffmpeg @@ -727,6 +732,7 @@ HAVE_LIST=" getrusage imlib2 inet_aton + inline_asm libdc1394_1 libdc1394_2 llrint @@ -781,22 +787,9 @@ ac3_decoder_deps="gpl" dxa_decoder_deps="zlib" flashsv_decoder_deps="zlib" flashsv_encoder_deps="zlib" -flv_decoder_deps="h263_decoder" -h263_decoder_deps="h263_parser mpeg4video_parser" -h263i_decoder_deps="h263_decoder" -h264_decoder_deps="h264_parser" mpeg_xvmc_decoder_deps="xvmc" -mpeg4_decoder_deps="h263_decoder" -msmpeg4v1_decoder_deps="h263_decoder" -msmpeg4v2_decoder_deps="h263_decoder" -msmpeg4v3_decoder_deps="h263_decoder" png_decoder_deps="zlib" png_encoder_deps="zlib" -svq3_decoder_deps="h264_parser" -vc1_decoder_deps="h263_decoder" -wmv1_decoder_deps="h263_decoder" -wmv2_decoder_deps="h263_decoder" -wmv3_decoder_deps="h263_decoder" zmbv_decoder_deps="zlib" zmbv_encoder_deps="zlib" @@ -851,6 +844,9 @@ rtp_protocol_deps="udp_protocol" tcp_protocol_deps="network" udp_protocol_deps="network" +# filters +movie_filter_deps="avfilter_lavf" + # programs ffplay_deps="sdl" ffserver_deps="ffm_muxer rtp_protocol rtsp_demuxer" @@ -882,7 +878,7 @@ logfile="config.err" PREFIX="/usr/local" libdir='$(PREFIX)/lib' shlibdir="$libdir" -incdir='$(PREFIX)/include/ffmpeg' +incdir='$(PREFIX)/include' mandir='$(PREFIX)/share/man' bindir='$(PREFIX)/bin' @@ -949,15 +945,23 @@ fi FFMPEG_CONFIGURATION="$@" -ENCODER_LIST=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"` -DECODER_LIST=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"` -PARSER_LIST=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"` -BSF_LIST=`sed -n 's/^[^#]*BSF.*(.*, *\(.*\)).*/\1_bsf/p' "$source_path/libavcodec/allcodecs.c"` -MUXER_LIST=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"` -DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"` -OUTDEV_LIST=`sed -n 's/^[^#]*_MUX.*(.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavdevice/alldevices.c"` -INDEV_LIST=`sed -n 's/^[^#]*DEMUX.*(.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavdevice/alldevices.c"` -PROTOCOL_LIST=`sed -n 's/^[^#]*PROTOCOL.*(.*, *\(.*\)).*/\1_protocol/p' "$source_path/libavformat/allformats.c"` +find_things(){ + thing=$1 + pattern=$2 + file=$source_path/$3 + sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file" +} + +ENCODER_LIST=$(find_things encoder ENC libavcodec/allcodecs.c) +DECODER_LIST=$(find_things decoder DEC libavcodec/allcodecs.c) +PARSER_LIST=$(find_things parser PARSER libavcodec/allcodecs.c) +BSF_LIST=$(find_things bsf BSF libavcodec/allcodecs.c) +MUXER_LIST=$(find_things muxer _MUX libavformat/allformats.c) +DEMUXER_LIST=$(find_things demuxer DEMUX libavformat/allformats.c) +OUTDEV_LIST=$(find_things muxer _MUX libavdevice/alldevices.c) +INDEV_LIST=$(find_things demuxer DEMUX libavdevice/alldevices.c) +PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c) +FILTER_LIST=$(find_things filter FILTER libavfilter/allfilters.c) enable $ARCH_EXT_LIST \ $DECODER_LIST \ @@ -966,6 +970,7 @@ enable $ARCH_EXT_LIST \ $BSF_LIST \ $DEMUXER_LIST \ $MUXER_LIST \ + $FILTER_LIST \ $PROTOCOL_LIST \ $INDEV_LIST \ $OUTDEV_LIST \ @@ -1028,33 +1033,26 @@ for opt do ;; --disable-strip) disable dostrip ;; - --disable-encoders) disable $ENCODER_LIST - ;; - --disable-decoders) disable $DECODER_LIST - ;; - --disable-muxers) disable $MUXER_LIST - ;; - --disable-demuxers) disable $DEMUXER_LIST - ;; - --disable-parsers) disable $PARSER_LIST - ;; - --disable-bsfs) disable $BSF_LIST - ;; - --disable-protocols) disable $PROTOCOL_LIST - ;; --disable-devices) disable $INDEV_LIST $OUTDEV_LIST ;; + --enable-debug=*) debuglevel="$optval" + ;; --enable-*=*|--disable-*=*) eval `echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/'` case "$thing" in - encoder|decoder|muxer|demuxer|parser|bsf|protocol) $action ${optval}_${thing} ;; + encoder|decoder|muxer|demuxer|parser|bsf|protocol|filter) $action ${optval}_${thing} ;; *) die_unknown "$opt" ;; esac ;; --enable-?*|--disable-?*) eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'` - echo "$CMDLINE_SELECT" | grep -q "^ *$option\$" || die_unknown $opt - $action $option + if is_in $option $COMPONENT_LIST; then + eval $action \$$(toupper ${option%s})_LIST + elif is_in $option $CMDLINE_SELECT; then + $action $option + else + die_unknown $opt + fi ;; --list-*) NAME="${opt#--list-}" @@ -1245,7 +1243,6 @@ case $targetos in SHFLAGS='-shared -Wl,--enable-auto-image-base' ;; *-dos|freedos|opendos) - enable memalign_hack disable ffplay ffserver vhook disable $INDEV_LIST $OUTDEV_LIST network_extralibs="-lsocket" @@ -1284,7 +1281,10 @@ case $targetos in emximp -o $(LIBPREF)$(NAME)_dll.lib $(NAME).def;' SLIB_INSTALL_EXTRA_CMD='install -m 644 $(LIBPREF)$(NAME)_dll.a $(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"' SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib' - vhook="no" + disable vhook + ;; + interix) + disable vhook ;; *) @@ -1368,7 +1368,7 @@ if test $targetos = darwin; then if test -n "`$cc -v 2>&1 | grep xlc`"; then add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto" else - add_cflags "-no-cpp-precomp -pipe" + add_cflags "-pipe" check_cflags "-force_cpusubtype_ALL" check_cflags "-Wno-sign-compare" disabled shared && add_cflags -mdynamic-no-pic @@ -1437,10 +1437,6 @@ if test $cpu != "generic"; then sparc64) add_cflags "-mcpu=v9" ;; - bf*) #bf531 bf532 bf533 bf561 bf5xx all get this config - add_cflags "-mfdpic" - add_ldflags "-mfdpic" - ;; arm*) add_cflags "-mcpu=$cpu" ;; @@ -1488,6 +1484,8 @@ if test "$?" != 0; then die "C compiler test failed." fi +check_asm inline_asm '""' + if enabled x86; then # check whether EBP is available on x86 # As 'i' is stored on the stack, this program will crash @@ -1558,7 +1556,7 @@ enabled vis && add_cflags "-mcpu=ultrasparc -mtune=ultrasparc" check_cc <> config.mak fi -sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'` -pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'` -lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'` -lavd_version=`grep '#define LIBAVDEVICE_VERSION ' "$source_path/libavdevice/avdevice.h" | sed 's/[^0-9\.]//g'` -lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'` -lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'` - +get_version(){ + name=$1 + file=$source_path/$2 + eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }') + eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO +} +get_version LIBSWSCALE libswscale/swscale.h +get_version LIBPOSTPROC libpostproc/postprocess.h +get_version LIBAVCODEC libavcodec/avcodec.h +get_version LIBAVDEVICE libavdevice/avdevice.h +get_version LIBAVFORMAT libavformat/avformat.h +get_version LIBAVUTIL libavutil/avutil.h +get_version LIBAVFILTER libavfilter/avfilter.h if enabled shared; then echo "BUILD_SHARED=yes" >> config.mak echo "PIC=-fPIC -DPIC" >> config.mak - echo "SPPMAJOR=${pp_version%%.*}" >> config.mak - echo "SPPVERSION=$pp_version" >> config.mak - echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak - echo "LAVCVERSION=$lavc_version" >> config.mak - echo "LAVDMAJOR=${lavd_version%%.*}" >> config.mak - echo "LAVDVERSION=$lavd_version" >> config.mak - echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak - echo "LAVFVERSION=$lavf_version" >> config.mak - echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak - echo "LAVUVERSION=$lavu_version" >> config.mak - echo "SWSMAJOR=${sws_version%%.*}" >> config.mak - echo "SWSVERSION=$sws_version" >> config.mak + echo "SPPMAJOR=$LIBPOSTPROC_VERSION_MAJOR" >> config.mak + echo "SPPVERSION=$LIBPOSTPROC_VERSION" >> config.mak + echo "LAVCMAJOR=$LIBAVCODEC_VERSION_MAJOR" >> config.mak + echo "LAVCVERSION=$LIBAVCODEC_VERSION" >> config.mak + echo "LAVDMAJOR=$LIBAVDEVICE_VERSION_MAJOR" >> config.mak + echo "LAVDVERSION=$LIBAVDEVICE_VERSION" >> config.mak + echo "LAVFMAJOR=$LIBAVFORMAT_VERSION_MAJOR" >> config.mak + echo "LAVFVERSION=$LIBAVFORMAT_VERSION" >> config.mak + echo "LAVUMAJOR=$LIBAVUTIL_VERSION_MAJOR" >> config.mak + echo "LAVUVERSION=$LIBAVUTIL_VERSION" >> config.mak + echo "LAVFIMAJOR=$LIBAVFILTER_VERSION_MAJOR" >> config.mak + echo "LAVFIVERSION=$LIBAVFILTER_VERSION" >> config.mak + echo "SWSMAJOR=$LIBSWSCALE_VERSION_MAJOR" >> config.mak + echo "SWSVERSION=$LIBSWSCALE_VERSION" >> config.mak echo "SLIBNAME=${SLIBNAME}" >> config.mak echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak @@ -2043,6 +2053,7 @@ print_config CONFIG_ $TMPH config.mak $CONFIG_LIST \ $BSF_LIST \ $DEMUXER_LIST \ $MUXER_LIST \ + $FILTER_LIST \ $PROTOCOL_LIST \ $INDEV_LIST \ $OUTDEV_LIST \ @@ -2086,6 +2097,7 @@ if enabled source_path_used; then libavcodec/sh4 \ libavcodec/sparc \ libavdevice \ + libavfilter \ libavformat \ libavutil \ libpostproc \ @@ -2100,6 +2112,7 @@ if enabled source_path_used; then doc/texi2pod.pl \ libavcodec/Makefile \ libavdevice/Makefile \ + libavfilter/Makefile \ libavformat/Makefile \ libavutil/Makefile \ libpostproc/Makefile \ @@ -2123,7 +2136,6 @@ comment=$2 version=$3 libs=$4 requires=$5 -include=$6 cat <$name.pc prefix=$PREFIX exec_prefix=\${prefix} @@ -2136,7 +2148,7 @@ Version: $version Requires: $requires Conflicts: Libs: -L\${libdir} $libs -Cflags: -I\${includedir}/$include +Cflags: -I\${includedir} EOF } @@ -2151,7 +2163,7 @@ cat <$name-uninstalled.pc prefix= exec_prefix= libdir=\${pcfiledir}/$name -includedir=\${pcfiledir}/$name +includedir=\${pcfiledir} Name: $name Description: $comment @@ -2163,28 +2175,33 @@ Cflags: -I\${includedir} EOF } -pkgconfig_generate libavutil "FFmpeg utility library" "$lavu_version" -lavutil "" ffmpeg -pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$lavu_version" +pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" -lavutil "" +pkgconfig_generate_uninstalled libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" -pkgconfig_generate libavcodec "FFmpeg codec library" "$lavc_version" "-lavcodec $extralibs" "$pkg_requires libavutil = $lavu_version" ffmpeg -pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" "$extralibs" "$pkg_requires libavutil = $lavu_version" +pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "-lavcodec $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" +pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" -pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg -pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version" +pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "-lavformat $extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION" +pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION" -pkgconfig_generate libavdevice "FFmpeg device handling library" "$lavd_version" "-lavdevice $extralibs" "$pkg_requires libavformat = $lavf_version" ffmpeg -pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$lavd_version" "$extralibs" "$pkg_requires libavformat = $lavf_version" +pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "-lavdevice $extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION" +pkgconfig_generate_uninstalled libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$pkg_requires libavformat = $LIBAVFORMAT_VERSION" if enabled pp; then - pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc - pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version" + pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" -lpostproc "" + pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION" fi if enabled swscaler; then - pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" -lswscale "libavutil = $lavu_version" ffmpeg - pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "libavutil = $lavu_version" + pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" -lswscale "libavutil = $LIBAVUTIL_VERSION" + pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION" else - pkgconfig_generate libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version" ffmpeg - pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$sws_version" "" "$pkg_requires libavcodec = $lavc_version" + pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION" + pkgconfig_generate_uninstalled libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "$pkg_requires libavcodec = $LIBAVCODEC_VERSION" apply libswscale.pc sed s/^Libs:.*$/Libs:/ apply libswscale-uninstalled.pc sed s/^Libs:.*$/Libs:/ fi + +if enabled avfilter; then + pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "-lavfilter $extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" ffmpeg + pkgconfig_generate_uninstalled libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$pkg_requires libavutil = $LIBAVUTIL_VERSION" +fi