X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/blobdiff_plain/bfd259cfca6e56d33812cb016687fc0394bfce72..refs/heads/master:/configure diff --git a/configure b/configure index b101c12b3..13e53d136 100755 --- a/configure +++ b/configure @@ -55,182 +55,187 @@ if test "$E1" != 0 || test "$E2" = 0; then fi show_help(){ - echo "Usage: configure [options]" - echo "Options: [defaults in brackets after descriptions]" - echo - echo "Standard options:" - echo " --help print this message" - echo " --logfile=FILE log tests and output to FILE [config.err]" - echo " --disable-logging do not log configure debug information" - echo " --prefix=PREFIX install in PREFIX [$prefix]" - echo " --bindir=DIR install binaries in DIR [PREFIX/bin]" - echo " --datadir=DIR install data files in DIR [PREFIX/share/ffmpeg]" - echo " --libdir=DIR install libs in DIR [PREFIX/lib]" - echo " --shlibdir=DIR install shared libs in DIR [PREFIX/lib]" - echo " --incdir=DIR install includes in DIR [PREFIX/include]" - echo " --mandir=DIR install man page in DIR [PREFIX/share/man]" - echo - echo "Configuration options:" - echo " --disable-static do not build static libraries [no]" - echo " --enable-shared build shared libraries [no]" - echo " --enable-gpl allow use of GPL code, the resulting libs" - echo " and binaries will be under GPL [no]" - echo " --enable-version3 upgrade (L)GPL to version 3 [no]" - echo " --enable-nonfree allow use of nonfree code, the resulting libs" - echo " and binaries will be unredistributable [no]" - echo " --disable-ffmpeg disable ffmpeg build" - echo " --disable-ffplay disable ffplay build" - echo " --disable-ffserver disable ffserver build" - echo " --enable-postproc enable GPLed postprocessing support [no]" - echo " --enable-avfilter video filter support [no]" - echo " --enable-avfilter-lavf video filters dependent on avformat [no]" - echo " --enable-beosthreads use BeOS threads [no]" - echo " --enable-os2threads use OS/2 threads [no]" - echo " --enable-pthreads use pthreads [no]" - echo " --enable-w32threads use Win32 threads [no]" - echo " --enable-x11grab enable X11 grabbing [no]" - echo " --disable-network disable network support [no]" - echo " --disable-ipv6 disable IPv6 support [no]" - echo " --disable-mpegaudio-hp faster (but less accurate) MPEG audio decoding [no]" - echo " --enable-gray enable full grayscale support (slower color)" - echo " --disable-swscale-alpha disable alpha channel support in swscale" - echo " --disable-fastdiv disable table-based division" - echo " --enable-small optimize for size instead of speed" - echo " --disable-aandct disable AAN DCT code" - echo " --disable-fft disable FFT code" - echo " --disable-golomb disable Golomb code" - echo " --disable-mdct disable MDCT code" - echo " --disable-rdft disable RDFT code" - echo " --disable-vaapi disable VAAPI code" - echo " --disable-vdpau disable VDPAU code" - echo " --enable-runtime-cpudetect detect cpu capabilities at runtime (bigger binary)" - echo " --enable-hardcoded-tables use hardcoded tables instead of runtime generation" - echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers" - echo " --enable-beos-netserver enable BeOS netserver" - echo " --disable-encoder=NAME disable encoder NAME" - echo " --enable-encoder=NAME enable encoder NAME" - echo " --disable-encoders disable all encoders" - echo " --disable-decoder=NAME disable decoder NAME" - echo " --enable-decoder=NAME enable decoder NAME" - echo " --disable-decoders disable all decoders" - echo " --disable-hwaccel=NAME disable hwaccel NAME" - echo " --enable-hwaccel=NAME enable hwaccel NAME" - echo " --disable-hwaccels disable all hwaccels" - echo " --disable-muxer=NAME disable muxer NAME" - echo " --enable-muxer=NAME enable muxer NAME" - echo " --disable-muxers disable all muxers" - echo " --disable-demuxer=NAME disable demuxer NAME" - echo " --enable-demuxer=NAME enable demuxer NAME" - echo " --disable-demuxers disable all demuxers" - echo " --enable-parser=NAME enable parser NAME" - echo " --disable-parser=NAME disable parser NAME" - echo " --disable-parsers disable all parsers" - echo " --enable-bsf=NAME enable bitstream filter NAME" - echo " --disable-bsf=NAME disable bitstream filter NAME" - echo " --disable-bsfs disable all bitstream filters" - echo " --enable-protocol=NAME enable protocol NAME" - echo " --disable-protocol=NAME disable protocol NAME" - echo " --disable-protocols disable all protocols" - echo " --disable-indev=NAME disable input device NAME" - echo " --disable-outdev=NAME disable output device NAME" - echo " --disable-indevs disable input devices" - echo " --disable-outdevs disable output devices" - echo " --disable-devices disable all devices" - echo " --enable-filter=NAME enable filter NAME" - echo " --disable-filter=NAME disable filter NAME" - echo " --disable-filters disable all filters" - echo " --list-decoders show all available decoders" - echo " --list-encoders show all available encoders" - echo " --list-hwaccels show all available hardware accelerators" - echo " --list-muxers show all available muxers" - echo " --list-demuxers show all available demuxers" - echo " --list-parsers show all available parsers" - echo " --list-protocols show all available protocols" - echo " --list-bsfs show all available bitstream filters" - echo " --list-indevs show all available input devices" - echo " --list-outdevs show all available output devices" - echo " --list-filters show all available filters" - echo - echo "External library support:" - echo " --enable-avisynth enable reading of AVISynth script files [no]" - echo " --enable-bzlib enable bzlib [autodetect]" - echo " --enable-libopencore-amrnb enable AMR-NB de/encoding via libopencore-amrnb [no]" - echo " --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no]" - echo " --enable-libdc1394 enable IIDC-1394 grabbing using libdc1394" - echo " and libraw1394 [no]" - echo " --enable-libdirac enable Dirac support via libdirac [no]" - echo " --enable-libfaac enable FAAC support via libfaac [no]" - echo " --enable-libfaad enable FAAD support via libfaad [no]" - echo " --enable-libfaadbin open libfaad.so.0 at runtime [no]" - echo " --enable-libgsm enable GSM support via libgsm [no]" - echo " --enable-libmp3lame enable MP3 encoding via libmp3lame [no]" - echo " --enable-libnut enable NUT (de)muxing via libnut," - echo " native (de)muxer exists [no]" - echo " --enable-libopenjpeg enable JPEG 2000 decoding via OpenJPEG [no]" - echo " --enable-libschroedinger enable Dirac support via libschroedinger [no]" - echo " --enable-libspeex enable Speex decoding via libspeex [no]" - echo " --enable-libtheora enable Theora encoding via libtheora [no]" - echo " --enable-libvorbis enable Vorbis encoding via libvorbis," - echo " native implementation exists [no]" - echo " --enable-libx264 enable H.264 encoding via x264 [no]" - echo " --enable-libxvid enable Xvid encoding via xvidcore," - echo " native MPEG-4/Xvid encoder exists [no]" - echo " --enable-mlib enable Sun medialib [no]" - echo " --enable-zlib enable zlib [autodetect]" - echo "" - echo "Advanced options (experts only):" - echo " --source-path=PATH path to source code [$source_path]" - echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]" - echo " --enable-cross-compile assume a cross-compiler is used" - echo " --sysroot=PATH root of cross-build tree" - echo " --sysinclude=PATH location of cross-build system headers" - echo " --target-os=OS compiler targets OS [$target_os]" - echo " --target-exec=CMD command to run executables on target" - echo " --target-path=DIR path to view of build directory on target" - echo " --nm=NM use nm tool" - echo " --as=AS use assembler AS [$as_default]" - echo " --cc=CC use C compiler CC [$cc_default]" - echo " --ld=LD use linker LD" - echo " --host-cc=HOSTCC use host C compiler HOSTCC" - echo " --host-cflags=HCFLAGS use HCFLAGS when compiling for host" - echo " --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host" - echo " --host-libs=HLIBS use libs HLIBS when linking for host" - echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]" - echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]" - echo " --extra-libs=ELIBS add ELIBS [$ELIBS]" - echo " --extra-version=STRING version string suffix []" - echo " --build-suffix=SUFFIX library name suffix []" - echo " --arch=ARCH select architecture [$arch]" - echo " --cpu=CPU select the minimum required CPU (affects" - echo " instruction selection, may crash on older CPUs)" - echo " --enable-powerpc-perf enable performance report on PPC" - echo " (requires enabling PMC)" - echo " --disable-altivec disable AltiVec optimizations" - echo " --disable-amd3dnow disable 3DNow! optimizations" - echo " --disable-amd3dnowext disable 3DNow! extended optimizations" - echo " --disable-mmx disable MMX optimizations" - echo " --disable-mmx2 disable MMX2 optimizations" - echo " --disable-sse disable SSE optimizations" - echo " --disable-ssse3 disable SSSE3 optimizations" - echo " --disable-armv5te disable armv5te optimizations" - echo " --disable-armv6 disable armv6 optimizations" - echo " --disable-armv6t2 disable armv6t2 optimizations" - echo " --disable-armvfp disable ARM VFP optimizations" - echo " --disable-iwmmxt disable iwmmxt optimizations" - echo " --disable-mmi disable MMI optimizations" - echo " --disable-neon disable neon optimizations" - echo " --disable-vis disable VIS optimizations" - echo " --disable-yasm disable use of yasm assembler" - echo - echo "Developer options (useful when working on FFmpeg itself):" - echo " --disable-debug disable debugging symbols" - echo " --enable-debug=LEVEL set the debug level [$debuglevel]" - echo " --enable-gprof enable profiling with gprof [$gprof]" - echo " --disable-optimizations disable compiler optimizations" - echo " --enable-extra-warnings enable more compiler warnings" - echo " --disable-stripping disable stripping of executables and shared libraries" - echo "" - echo "NOTE: Object files are built at the place where configure is launched." +cat < $TMPC + log_file $TMPC + check_cmd $host_cc $host_cflags "$@" -c -o $TMPO $TMPC +} + +check_host_cflags(){ + log check_host_cflags "$@" + check_host_cc "$@" < $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 } @@ -1500,20 +1540,31 @@ filter_cflags=echo filter_cppflags=echo filter_asflags=echo -if $cc --version 2>/dev/null | grep -qi gcc; then +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" \ @@ -1522,17 +1573,20 @@ elif $cc --vsn 2>/dev/null | grep -q RVCT; then die "Error creating armcc configuration file." cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc" as_default="${cross_prefix}gcc" + CC_DEPFLAGS='-MMD' + 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" ld_default="${cross_prefix}gcc" - dep_cc_default="${cross_prefix}gcc" TMPO=$(basename $TMPC .c).o append TMPFILES $TMPO add_cflags -D__gnuc_va_list=va_list -D__USER_LABEL_PREFIX__= - DEPFLAGS='$(CPPFLAGS) -MM' + CC_DEPFLAGS='-ppa -ppd=$(@:.o=.d)' + AS_DEPFLAGS='-MMD' filter_cflags=tms470_flags tms470_flags(){ for flag; do @@ -1550,13 +1604,58 @@ elif $cc -version 2>/dev/null | grep -q TMS470; then ;; -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 ;; esac done } +elif $cc -v 2>&1 | grep -q clang; then + cc_type=clang + cc_version=__VERSION__ + CC_DEPFLAGS='-MMD' + AS_DEPFLAGS='-MMD' +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)' + 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" @@ -1566,6 +1665,9 @@ test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc" : ${ld_default:=$cc} set_default as dep_cc ld +test -n "$CC_DEPFLAGS" || CCDEP=$DEPEND_CMD +test -n "$AS_DEPFLAGS" || ASDEP=$DEPEND_CMD + add_cflags $extra_cflags add_asflags $extra_cflags @@ -1579,9 +1681,29 @@ if test -n "$sysroot"; then add_cppflags -I"$sysinclude" add_ldflags --sysroot="$sysroot" ;; + clang) + add_cppflags -isysroot="$sysroot" + add_ldflags -isysroot="$sysroot" + ;; esac fi +if test "$cpu" = host; then + enabled cross_compile && die "--cpu=host makes no sense when cross-compiling." + + case "$cc_type" in + gcc) + check_native(){ + $cc $1=native -v -c -o $TMPO $TMPC >$TMPE 2>&1 || return + awk "/$1=/{ match(\$0, /$1=(\\w+)/, a);print a[1];exit }" $TMPE + } + cpu=$(check_native -march || check_native -mcpu) + ;; + esac + + test "${cpu:-host}" = host && die "--cpu=host not supported with compiler $cc" +fi + # Add processor-specific flags case $cpu in 601|ppc601|PowerPC601) @@ -1615,7 +1737,7 @@ case $cpu in 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) + i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2|amdfam10) cpuflags="-march=$cpu" enable cmov enable fast_cmov @@ -1652,6 +1774,22 @@ case $cpu in mips*|[45]k*|[237]4k*|m4k|r*000|loongson2[ef]) cpuflags="-march=$cpu" ;; + ap7[02]0[0-2]) + subarch="avr32_ap" + cpuflags="-mpart=$cpu" + ;; + ap) + subarch="avr32_ap" + cpuflags="-march=$cpu" + ;; + uc3[ab]*) + subarch="avr32_uc" + cpuflags="-mcpu=$cpu" + ;; + uc) + subarch="avr32_uc" + cpuflags="-march=$cpu" + ;; generic) ;; *) @@ -1684,12 +1822,14 @@ check_cc -D_LARGEFILE_SOURCE < EOF +check_host_cflags -std=c99 + case "$arch" in alpha) arch="alpha" enable fast_64bit check_cflags -mieee - pic=$shared + spic=$shared ;; arm|armv[4567]*l) arch="arm" @@ -1702,29 +1842,31 @@ case "$arch" in ia64) arch="ia64" enable fast_64bit - pic=$shared + spic=$shared + # HACK: currently fails to build if .bss is > 4MB and shared libs are built + enabled shared && enable_weak hardcoded_tables ;; m68k) arch="m68k" ;; mips|mipsel|IP*) arch="mips" - pic=$shared + spic=$shared ;; mips64) arch="mips" subarch="mips64" enable fast_64bit - pic=$shared + spic=$shared ;; parisc|hppa) arch="parisc" - pic=$shared + spic=$shared ;; parisc64|hppa64) arch="parisc" enable fast_64bit - pic=$shared + spic=$shared ;; "Power Macintosh"|ppc|powerpc) arch="ppc" @@ -1744,28 +1886,25 @@ case "$arch" in ;; sparc) arch="sparc" - pic=$shared + spic=$shared ;; sun4u|sparc64) arch="sparc" subarch="sparc64" enable fast_64bit - pic=$shared + 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 <= 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 @@ -2239,8 +2397,9 @@ disable sdl SDL_CONFIG="${cross_prefix}sdl-config" if "${SDL_CONFIG}" --version > /dev/null 2>&1; then sdl_cflags=$("${SDL_CONFIG}" --cflags) + sdl_libs=$("${SDL_CONFIG}" --libs) temp_cflags $sdl_cflags - temp_extralibs $("${SDL_CONFIG}" --libs) + temp_extralibs $sdl_libs if check_lib2 SDL.h SDL_Init; then _sdlversion=$("${SDL_CONFIG}" --version | sed 's/[^0-9]//g') if test "$_sdlversion" -lt 121 ; then @@ -2320,7 +2479,7 @@ check_header X11/extensions/XShm.h && 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 @@ -2349,6 +2508,8 @@ elif enabled optimizations; then 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 @@ -2383,10 +2544,10 @@ elif enabled ccc; then add_cflags -msg_disable unreachcode elif enabled gcc; then check_cflags -fno-tree-vectorize +elif enabled clang; then + check_cflags -Qunused-arguments fi -enabled pic && LIBOBJFLAGS='$(PIC)' - if enabled gprof; then add_cflags -p add_ldflags -p @@ -2535,75 +2696,67 @@ echo "License: $license" 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 "FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION" >> config.mak -echo "prefix=$prefix" >> config.mak -echo "LIBDIR=\$(DESTDIR)$libdir" >> config.mak -echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak -echo "INCDIR=\$(DESTDIR)$incdir" >> config.mak -echo "BINDIR=\$(DESTDIR)$bindir" >> config.mak -echo "DATADIR=\$(DESTDIR)$datadir" >> config.mak -echo "MANDIR=\$(DESTDIR)$mandir" >> config.mak -echo "SRC_PATH=\"$source_path\"" >> config.mak -echo "SRC_PATH_BARE=$source_path" >> config.mak -echo "BUILD_ROOT=\"$PWD\"" >> config.mak -echo "CC=$cc" >> config.mak -echo "AS=$as" >> config.mak -echo "LD=$ld" >> config.mak -echo "DEPCC=$dep_cc" >> config.mak -echo "YASM=$yasmexe" >> config.mak -echo "AR=$ar" >> config.mak -echo "RANLIB=$ranlib" >> config.mak -echo "LN_S=$ln_s" >> config.mak -enabled stripping && - echo "STRIP=$strip" >> config.mak || - echo "STRIP=echo ignoring strip" >> config.mak - -echo "CPPFLAGS=$CPPFLAGS" >> config.mak -echo "CFLAGS=$CFLAGS" >> config.mak -echo "ASFLAGS=$ASFLAGS" >> config.mak -echo "CC_O=$CC_O" >> config.mak -echo "LDFLAGS=$LDFLAGS" >> 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 "LIBSUF=$LIBSUF" >> config.mak -echo "LIBNAME=$LIBNAME" >> config.mak -echo "SLIBPREF=$SLIBPREF" >> config.mak -echo "SLIBSUF=$SLIBSUF" >> config.mak -echo "EXESUF=$EXESUF" >> config.mak -echo "EXTRA_VERSION=$extra_version" >> config.mak -echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak -echo "DEPFLAGS=$DEPFLAGS" >> config.mak -echo "HOSTCC=$host_cc" >> config.mak -echo "HOSTCFLAGS=$host_cflags" >> config.mak -echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak -echo "HOSTLDFLAGS=$host_ldflags" >> config.mak -echo "HOSTLIBS=$host_libs" >> config.mak -echo "TARGET_EXEC=$target_exec" >> config.mak -echo "TARGET_PATH=$target_path" >> config.mak - -if enabled sdl; then - echo "SDL_LIBS=$("${SDL_CONFIG}" --libs)" >> config.mak - echo "SDL_CFLAGS=$("${SDL_CONFIG}" --cflags)" >> config.mak -fi -if enabled texi2html; then - echo "BUILD_DOC=yes" >> config.mak -fi +enabled stripping || strip="echo skipping strip" + +cat > config.mak <> 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 - echo "SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}" >> config.mak - echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak - echo "SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}" >> config.mak - echo "SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}" >> config.mak -fi -echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak -echo "EXTRALIBS=$extralibs" >> config.mak +enabled shared && cat >> config.mak <> config.mak +enabled asmalign_pot || align_shift="1 <<" + +cat > $TMPH <> $TMPH +fi print_config ARCH_ $TMPH config.mak $ARCH_LIST print_config HAVE_ $TMPH config.mak $HAVE_LIST @@ -2654,20 +2824,6 @@ 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 @@ -2678,44 +2834,34 @@ cmp -s $TMPH config.h && # 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 @@ -2743,10 +2889,10 @@ includedir=$incdir 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