⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure

📁 ffmpeg源码分析
💻
📖 第 1 页 / 共 4 页
字号:
  ;;  --enable-pp) pp="yes"  ;;  --enable-libgsm) libgsm="yes"    extralibs="$extralibs -lgsm"  ;;  --enable-mp3lame) mp3lame="yes"    extralibs="$extralibs -lmp3lame"  ;;  --enable-libogg) libogg="yes"    extralibs="$extralibs -logg"    pkg_requires="$pkg_requires ogg >= 1.1"  ;;  --enable-vorbis) vorbis="yes"    extralibs="$extralibs -lvorbis -lvorbisenc"    pkg_requires="$pkg_requires vorbis vorbisenc"  ;;  --enable-theora) theora="yes"    extralibs="$extralibs -ltheora"    pkg_requires="$pkg_requires theora"  ;;  --enable-faad) faad="yes"    extralibs="$extralibs -lfaad"  ;;  --enable-faadbin) faadbin="yes"  ;;  --enable-faac) faac="yes"    extralibs="$extralibs -lfaac"  ;;  --enable-xvid) xvid="yes"    extralibs="$extralibs -lxvidcore"  ;;  --enable-x264) x264="yes"    extralibs="$extralibs -lx264"  ;;  --enable-dc1394) dc1394="yes"    extralibs="$extralibs -ldc1394_control -lraw1394"    pkg_requires="$pkg_requires libraw1394"  ;;  --disable-vhook) vhook="no"  ;;  --disable-simple_idct) simpleidct="no"  ;;  --enable-mingw32) mingw32="yes"  ;;  --enable-mingwce) mingwce="yes"  ;;  --enable-static) lstatic="yes"  ;;  --disable-static) lstatic="no"  ;;  --enable-shared) lshared="yes"  ;;  --disable-shared) lshared="no"  ;;  --disable-debug) debug="no"  ;;  --disable-opts) optimize="no"  ;;  --disable-mpegaudio-hp) mpegaudio_hp="no"  ;;  --disable-protocols) protocols="no"; network="no"; ffserver="no"  ;;  --disable-ffserver) ffserver="no"  ;;  --disable-ffplay) ffplay="no"  ;;  --enable-small) optimize="small"  ;;  --enable-amr_nb) amr_nb="yes"  ;;  --enable-amr_nb-fixed) amr_nb_fixed="yes"  ;;  --enable-amr_wb) amr_wb="yes"  ;;  --enable-amr_if2) amr_if2="yes"  ;;  --enable-sunmlib) sunmlib="yes"  ;;  --enable-pthreads) pthreads="yes"  ;;  --enable-gpl) gpl="yes"  ;;  --enable-memalign-hack) memalignhack="yes"  ;;  --disable-strip) dostrip="no"  ;;  --enable-encoder=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-encoder=}_encoder"  ;;  --enable-decoder=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-decoder=}_decoder"  ;;  --disable-encoder=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-encoder=}_encoder##\"`"  ;;  --disable-decoder=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-decoder=}_decoder##\"`"  ;;  --disable-encoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"  ;;  --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"  ;;  --disable-muxers) muxers="no"; ffserver="no"  ;;  --disable-demuxers) demuxers="no"  ;;  *)  echo "Unknown option \"$opt\"."  echo "See $0 --help for available options."  exit 1  ;;  esacdone# we need to build at least one lib typeif test "$lstatic" = "no" && test "$lshared" = "no" ; then    cat <<EOFAt least one library type must be built.Specify --enable-static to build the static libraries or --enable-shared tobuild the shared libraries as well. To only build the shared libraries specify--disable-static in addition to --enable-shared.EOF    exit 1;fiif test "$theora" = "yes" ; then    if test "$libogg" = "no"; then        echo "libogg must be enabled to enable Theora."        fail="yes"        theora="no"    fifiif test "$vorbis" = "yes" ; then    if test "$libogg" = "no"; then        echo "libogg must be enabled to enable Vorbis."        fail="yes"        vorbis="no"    fifiif test "$gpl" != "yes"; then    if test "$pp" != "no"; then        echo "The Postprocessing code is under GPL and --enable-gpl is not specified."        fail="yes"    fi    if test "$a52" != "no" -o "$a52bin" != "no"; then        echo "liba52 is under GPL and --enable-gpl is not specified."        fail="yes"    fi    if test "$xvid" != "no"; then        echo "libxvidcore is under GPL and --enable-gpl is not specified."        fail="yes"    fi    if test "$x264" != "no"; then        echo "x264 is under GPL and --enable-gpl is not specified."        fail="yes"    fi    if test "$dts" != "no"; then        echo "libdts is under GPL and --enable-gpl is not specified."        fail="yes"    fi    if test "$faad" != "no" -o "$faadbin" != "no"; then        cat > $TMPC << EOF            #include <faad.h>            int main( void ) { return 0; }EOF        if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then            cat > $TMPC << EOF                #include <faad.h>                #ifndef FAAD2_VERSION                ok faad1                #endif                int main( void ) { return 0; }EOF            if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then                echo "FAAD2 is under GPL and --enable-gpl is not specified."                fail="yes"            fi        else            faad="no"            faadbin="no"            echo "FAAD test failed."        fi    fi    if test "$fail" = "yes"; then        exit 1    fifi# compute MMX stateif test $mmx = "default"; then    if test $cpu = "x86" -o $cpu = "x86_64"; then        mmx="yes"    else        mmx="no"    fifi# check iwmmxt supportif test $iwmmxt = "default" -a $cpu = "armv4l"; then    cat > $TMPC << EOF        int main(void) {        __asm__ __volatile__ ("wunpckelub wr6, wr4");        }EOF    iwmmxt=no    if ${cross_prefix}${cc} -o $TMPO $TMPC 2> /dev/null ; then        iwmmxt=yes    fifi#Darwin CC versionsneedmdynamicnopic="no"if test $targetos = Darwin; then    if test -n "`$cc -v 2>&1 | grep xlc`"; then        CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"    else        gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"        case "$gcc_version" in            *2.95*)                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"                ;;            *[34].*)                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"                if test "$lshared" = no; then                   needmdynamicnopic="yes"                fi                ;;            *)                CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"                if test "$lshared" = no; then                   needmdynamicnopic="yes"                fi                ;;        esac    fifi# Can only do AltiVec on PowerPCif test $altivec = "default"; then    if test $cpu = "powerpc"; then        altivec="yes"    else        altivec="no"    fifi# Add processor-specific flagsTUNECPU="generic"POWERPCMODE="32bits"if test $tune != "generic"; then    case $tune in        601|ppc601|PowerPC601)            CFLAGS="$CFLAGS -mcpu=601"            if test $altivec = "yes"; then                echo "WARNING: Tuning for PPC601 but AltiVec enabled!";            fi            TUNECPU=ppc601        ;;        603*|ppc603*|PowerPC603*)            CFLAGS="$CFLAGS -mcpu=603"            if test $altivec = "yes"; then                echo "WARNING: Tuning for PPC603 but AltiVec enabled!";            fi            TUNECPU=ppc603        ;;        604*|ppc604*|PowerPC604*)            CFLAGS="$CFLAGS -mcpu=604"            if test $altivec = "yes"; then                echo "WARNING: Tuning for PPC604 but AltiVec enabled!";            fi            TUNECPU=ppc604        ;;        G3|g3|75*|ppc75*|PowerPC75*)            CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"            if test $altivec = "yes"; then                echo "WARNING: Tuning for PPC75x but AltiVec enabled!";            fi            TUNECPU=ppc750        ;;        G4|g4|745*|ppc745*|PowerPC745*)            CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"            if test $altivec = "no"; then                echo "WARNING: Tuning for PPC745x but AltiVec disabled!";            fi            TUNECPU=ppc7450        ;;        74*|ppc74*|PowerPC74*)            CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"            if test $altivec = "no"; then                echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";            fi            TUNECPU=ppc7400        ;;        G5|g5|970|ppc970|PowerPC970|power4*|Power4*)            CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"            if test $altivec = "no"; then                echo "WARNING: Tuning for PPC970 but AltiVec disabled!";            fi            TUNECPU=ppc970            POWERPCMODE="64bits"        ;;        i[3456]86|pentium|pentiumpro|pentium-mmx|pentium[234]|prescott|k6|k6-[23]|athlon|athlon-tbird|athlon-4|athlon-[mx]p|winchip-c6|winchip2|c3|nocona|athlon64|k8|opteron|athlon-fx)            CFLAGS="$CFLAGS -march=$tune"        ;;        *)        echo "WARNING: Unknown CPU \"$tune\", ignored."        ;;    esacfi# AltiVec flags: The FSF version of GCC differs from the Apple versionif test $cpu = "powerpc"; then    if test $altivec = "yes"; then        if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then            CFLAGS="$CFLAGS -faltivec"        else            CFLAGS="$CFLAGS -maltivec -mabi=altivec"        fi    fifi# check if we have <altivec.h>cat > $TMPC << EOF#include <altivec.h>int main( void ) { return 0; }EOF_altivec_h="no"if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then_altivec_h="yes"fi# check if our compiler supports Motorola AltiVec C APIif test $altivec = "yes"; thenif test $_altivec_h = "yes"; thencat > $TMPC << EOF#include <altivec.h>int main(void) {    vector signed int v1, v2, v3;    v1 = vec_add(v2,v3);    return 0;}EOFelsecat > $TMPC << EOFint main(void) {    vector signed int v1, v2, v3;    v1 = vec_add(v2,v3);    return 0;}EOFfi$cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"fi# mmi only available on mipsif test $mmi = "default"; then    if test $cpu = "mips"; then        mmi="yes"    else        mmi="no"    fifi# check if our compiler supports mmiif test $mmi = "yes"; thencat > $TMPC << EOFint main(void) {    __asm__ ("lq \$2, 0(\$2)");    return 0;}EOF$cc -o $TMPE $TMPC 2> /dev/null || mmi="no"fiif test "$mingw32" = "yes" -o "$mingwce" = "yes"; then    if test "$lshared" = "yes" && test "$lstatic" = "yes" ; then        cat <<EOFYou can only build one library type at once on MinGW.Specify --disable-static --enable-shared to only buildthe shared libraries. To build only the static librariesyou do not need to pass additional options.EOF        exit 1    fi    v4l="no"    v4l2="no"    bktr="no"    audio_oss="no"    dv1394="no"    dc1394="no"    ffserver="no"    network="no"if test "$mingwce" = "yes"; then    protocols="no"fi    SLIBPREF=""    SLIBSUF=".dll"    EXESUF=".exe"    if test "$force_prefix" != yes; then prefix="/c/Program Files/FFmpeg"; fi    if test "$force_libdir" != yes; then bindir="$prefix"; fificc="${cross_prefix}${cc}"ar="${cross_prefix}${ar}"ranlib="${cross_prefix}${ranlib}"strip="${cross_prefix}${strip}"if test -z "$cross_prefix" ; then# ---# big/little-endian testcat > $TMPC << EOF#include <inttypes.h>int main(int argc, char ** argv){        volatile uint32_t i=0x01234567;        return (*((uint8_t*)(&i))) == 0x67;}EOFif $cc -o $TMPE $TMPC 2>/dev/null ; then$TMPE && bigendian="yes"elseecho big/little test failedfielse# programs cannot be launched if cross compiling, so make a static guessif test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then    bigendian="yes"fifi# ---# *inttypes.h* testcat > $TMPC << EOF#include <inttypes.h>int main(int argc, char ** argv){    return 0;}EOF$cc -o $TMPE $TMPC 2>/dev/null || inttypes="no"# ---# *int_fast* testcat > $TMPC << EOF#include <inttypes.h>int main(int argc, char ** argv){        volatile uint_fast64_t i=0x01234567;        return 0;}EOF$cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"# ---# check availability of some header filescat > $TMPC << EOF#include <malloc.h>int main( void ) { return 0; }EOF_memalign=no_malloc_h=noif $cc -o $TMPE $TMPC 2> /dev/null ; then_malloc_h=yes_memalign=yes# check for memalign - atmoscat > $TMPC << EOF#include <stdio.h>#include <malloc.h>int main ( void ) {char *string = NULL;string = memalign(64, sizeof(char));return 0;}EOF$cc -o $TMPE $TMPC 2> /dev/null || _memalign=nofiif test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then    echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."    exit 1ficat > $TMPC << EOF#include <time.h>int main( void ) { localtime_r(NULL, NULL); }EOFlocaltime_r=noif $cc -o $TMPE $TMPC 2> /dev/null ; then  localtime_r=yesfiif test "$zlib" = "yes"; then# check for zlib - mmu_mancat > $TMPC << EOF#include <zlib.h>int main ( void ) {if (zlibVersion() != ZLIB_VERSION)   puts("zlib version differs !!!");   return 1;return 0;}EOF$cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"# $TMPE 2> /dev/null > /dev/null || zlib="no"# XXX: more tests needed - runtime testfiif test "$zlib" = "yes"; thenextralibs="$extralibs -lz"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -