wok-next rev 19825

Add fdk-aac; up cacerts (actualize its version on every cook), ffmpeg, ffmpegthumbnailer, lame, libgsf, tumbler.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Aug 01 00:49:30 2017 +0300 (2017-08-01)
parents da30720c01f0
children 35faee9ea669
files cacerts/receipt fdk-aac/receipt ffmpeg-dev/receipt ffmpeg-dev/stuff/avutil.h ffmpeg/receipt ffmpeg/stuff/build.patch ffmpeg/stuff/configure ffmpeg/stuff/ffmpeg-0.5.1-gcc45.u ffmpegthumbnailer-dev/receipt ffmpegthumbnailer/receipt ffmpegthumbnailer/stuff/ffmpeg.thumbnailer lame-dev/receipt lame/receipt libgsf-dev/receipt libgsf/receipt tumbler-dev/receipt tumbler/receipt
line diff
     1.1 --- a/cacerts/receipt	Sat Jul 29 22:49:56 2017 +0200
     1.2 +++ b/cacerts/receipt	Tue Aug 01 00:49:30 2017 +0300
     1.3 @@ -1,7 +1,8 @@
     1.4  # SliTaz package receipt v2.
     1.5  
     1.6 +# This receipt will follow actual version on each recook
     1.7  PACKAGE="cacerts"
     1.8 -VERSION="20170620"
     1.9 +VERSION="20170725"
    1.10  CATEGORY="security"
    1.11  SHORT_DESC="Certificate Authority Certificates"
    1.12  MAINTAINER="al.bobylev@gmail.com"
    1.13 @@ -9,19 +10,26 @@
    1.14  WEB_SITE="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cacerts.html"
    1.15  HOST_ARCH="any"
    1.16  
    1.17 -TARBALL="$PACKAGE-$VERSION.txt"
    1.18  #WGET_URL="https://hg.mozilla.org/releases/mozilla-release/file/default/security/nss/lib/ckfw/builtins/certdata.txt"
    1.19 -WGET_URL="http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt"
    1.20 +wget_url="http://anduin.linuxfromscratch.org/BLFS/other/certdata.txt"
    1.21  
    1.22  BUILD_DEPENDS="perl openssl locale-en"
    1.23  
    1.24  # Rules to configure and make the package.
    1.25  compile_rules()
    1.26  {
    1.27 -	mv -f *.txt certdata.txt
    1.28 -	act_version=$(sed -n '/\$Revision:/s|.*Revision: \([0-9]*\).*$|\1|p' certdata.txt)
    1.29 -	echo -e "\nActual version: $act_version\n"
    1.30 -	[ "$VERSION" == "$act_version" ] || echo -e "Warning: Please update receipt!\n"
    1.31 +	wget -P/tmp $wget_url
    1.32 +	VERSION=$(sed -n '/\$Revision:/s|.*Revision: \([0-9]*\).*$|\1|p' /tmp/certdata.txt)
    1.33 +	echo -e "\nActual version: $VERSION\n"
    1.34 +	sed -i "s|^VERSION=.*|VERSION=\"$VERSION\"|" $WOK/cacerts/receipt
    1.35 +
    1.36 +	src="$WOK/cacerts/source/cacerts-$VERSION"
    1.37 +	mkdir -p $src
    1.38 +	mv /tmp/certdata.txt $src
    1.39 +	cd $src
    1.40 +
    1.41 +	TARBALL="$PACKAGE-$VERSION.txt"
    1.42 +	[ -e "$SRC/$TARBALL" ] || cp $src/certdata.txt $SRC/$TARBALL
    1.43  
    1.44  	cp -a $stuff/* $src
    1.45  	./make-ca.sh &&
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/fdk-aac/receipt	Tue Aug 01 00:49:30 2017 +0300
     2.3 @@ -0,0 +1,33 @@
     2.4 +# SliTaz package receipt v2.
     2.5 +
     2.6 +PACKAGE="fdk-aac"
     2.7 +VERSION="0.1.5"
     2.8 +CATEGORY="multimedia"
     2.9 +SHORT_DESC="High quality Advanced Audio Coding library"
    2.10 +MAINTAINER="al.bobylev@gmail.com"
    2.11 +LICENSE="Apache2"
    2.12 +WEB_SITE="https://sourceforge.net/projects/opencore-amr/"
    2.13 +
    2.14 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.15 +WGET_URL="$SF_MIRROR/opencore-amr/$TARBALL"
    2.16 +
    2.17 +SPLIT="fdk-aac-dev"
    2.18 +
    2.19 +# Rules to configure and make the package.
    2.20 +compile_rules()
    2.21 +{
    2.22 +	./configure \
    2.23 +		--disable-static \
    2.24 +		$CONFIGURE_ARGS &&
    2.25 +	make &&
    2.26 +	make install
    2.27 +}
    2.28 +
    2.29 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.30 +genpkg_rules()
    2.31 +{
    2.32 +	case $PACKAGE in
    2.33 +		*-aac) copy @std;;
    2.34 +		*-dev) copy @dev;;
    2.35 +	esac
    2.36 +}
     3.1 --- a/ffmpeg-dev/receipt	Sat Jul 29 22:49:56 2017 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,22 +0,0 @@
     3.4 -# SliTaz package receipt.
     3.5 -
     3.6 -PACKAGE="ffmpeg-dev"
     3.7 -VERSION="2.8.7"
     3.8 -CATEGORY="development"
     3.9 -SHORT_DESC="Record, convert and stream audio and video, development files."
    3.10 -MAINTAINER="pascal.bellard@slitaz.org"
    3.11 -LICENSE="GPL2 LGPL2.1"
    3.12 -WEB_SITE="http://ffmpeg.org/"
    3.13 -WANTED="ffmpeg"
    3.14 -HOST_ARCH="i486 arm"
    3.15 -
    3.16 -# Rules to gen a SliTaz package suitable for Tazpkg.
    3.17 -genpkg_rules()
    3.18 -{
    3.19 -	mkdir -p $fs/usr/lib $fs/usr/share/ffmpeg
    3.20 -	cp -a $install/usr/include $fs/usr
    3.21 -	#cp -a $install/usr/lib/*.a $fs/usr/lib
    3.22 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
    3.23 -	cp -a $install/usr/share/ffmpeg/examples $fs/usr/share/ffmpeg
    3.24 -}
    3.25 -
     4.1 --- a/ffmpeg-dev/stuff/avutil.h	Sat Jul 29 22:49:56 2017 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,63 +0,0 @@
     4.4 -/*
     4.5 - * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
     4.6 - *
     4.7 - * This file is part of FFmpeg.
     4.8 - *
     4.9 - * FFmpeg is free software; you can redistribute it and/or
    4.10 - * modify it under the terms of the GNU Lesser General Public
    4.11 - * License as published by the Free Software Foundation; either
    4.12 - * version 2.1 of the License, or (at your option) any later version.
    4.13 - *
    4.14 - * FFmpeg is distributed in the hope that it will be useful,
    4.15 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.16 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    4.17 - * Lesser General Public License for more details.
    4.18 - *
    4.19 - * You should have received a copy of the GNU Lesser General Public
    4.20 - * License along with FFmpeg; if not, write to the Free Software
    4.21 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    4.22 - */
    4.23 -
    4.24 -#ifndef AVUTIL_AVUTIL_H
    4.25 -#define AVUTIL_AVUTIL_H
    4.26 -
    4.27 -/**
    4.28 - * @file libavutil/avutil.h
    4.29 - * external API header
    4.30 - */
    4.31 -
    4.32 -
    4.33 -#define AV_STRINGIFY(s)         AV_TOSTRING(s)
    4.34 -#define AV_TOSTRING(s) #s
    4.35 -
    4.36 -#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
    4.37 -#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
    4.38 -#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
    4.39 -
    4.40 -#define LIBAVUTIL_VERSION_MAJOR 49
    4.41 -#define LIBAVUTIL_VERSION_MINOR 15
    4.42 -#define LIBAVUTIL_VERSION_MICRO  0
    4.43 -
    4.44 -#define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
    4.45 -                                               LIBAVUTIL_VERSION_MINOR, \
    4.46 -                                               LIBAVUTIL_VERSION_MICRO)
    4.47 -#define LIBAVUTIL_VERSION       AV_VERSION(LIBAVUTIL_VERSION_MAJOR,     \
    4.48 -                                           LIBAVUTIL_VERSION_MINOR,     \
    4.49 -                                           LIBAVUTIL_VERSION_MICRO)
    4.50 -#define LIBAVUTIL_BUILD         LIBAVUTIL_VERSION_INT
    4.51 -
    4.52 -#define LIBAVUTIL_IDENT         "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
    4.53 -
    4.54 -/**
    4.55 - * Returns the LIBAVUTIL_VERSION_INT constant.
    4.56 - */
    4.57 -unsigned avutil_version(void);
    4.58 -
    4.59 -#include "common.h"
    4.60 -#include "mathematics.h"
    4.61 -#include "rational.h"
    4.62 -#include "intfloat_readwrite.h"
    4.63 -#include "log.h"
    4.64 -#include "pixfmt.h"
    4.65 -
    4.66 -#endif /* AVUTIL_AVUTIL_H */
     5.1 --- a/ffmpeg/receipt	Sat Jul 29 22:49:56 2017 +0200
     5.2 +++ b/ffmpeg/receipt	Tue Aug 01 00:49:30 2017 +0300
     5.3 @@ -1,77 +1,102 @@
     5.4 -# SliTaz package receipt.
     5.5 +# SliTaz package receipt v2.
     5.6  
     5.7  PACKAGE="ffmpeg"
     5.8 -VERSION="2.8.7"
     5.9 +VERSION="3.2.4"
    5.10  CATEGORY="multimedia"
    5.11 -SHORT_DESC="Record, convert and stream audio and video."
    5.12 +SHORT_DESC="Record, convert and stream audio and video"
    5.13  MAINTAINER="pascal.bellard@slitaz.org"
    5.14  LICENSE="GPL2 LGPL2.1"
    5.15  WEB_SITE="http://ffmpeg.org/"
    5.16 -TARBALL="$PACKAGE-$VERSION.tar.bz2"
    5.17 -WGET_URL="${WEB_SITE}releases/$TARBALL"
    5.18  HOST_ARCH="i486 arm"
    5.19  
    5.20 -SUGGESTED="ffplay"
    5.21 -TAGS="audio video convert stream"
    5.22 +TARBALL="$PACKAGE-$VERSION.tar.xz"
    5.23 +WGET_URL="${WEB_SITE}releases/$TARBALL"
    5.24  
    5.25 -DEPENDS="alsa-lib libsdl bzip2 zlib"
    5.26 -BUILD_DEPENDS="libsdl-dev zlib-dev bzip2-dev coreutils-file-format \
    5.27 -coreutils-file-special yasm"
    5.28 -
    5.29 -case "$SLITAZ_ARCH" in
    5.30 -	arm*) DEPENDS="alsa-lib bzip2 zlib" ;;
    5.31 -esac
    5.32 -
    5.33 -# Handle cross compilation. Host coreutils-file-* are used
    5.34 -case "$ARCH" in
    5.35 -	i?86) 
    5.36 -		ARCH_ARGS="--arch=$ARCH --cpu=$ARCH" ;;
    5.37 -	arm*) 
    5.38 -		BUILD_DEPENDS="zlib-dev bzip2-dev yasm" 
    5.39 -		ARCH_ARGS="--enable-cross-compile --arch=armel --target-os=linux \
    5.40 -		--cross-prefix=$HOST_SYSTEM-" ;;
    5.41 -esac
    5.42 -
    5.43 -# Handle arch package install
    5.44 -case "$SLITAZ_ARCH" in
    5.45 -	arm*) DEPENDS="alsa-lib bzip2" ;;
    5.46 -esac
    5.47 +BUILD_DEPENDS_arm="zlib-dev bzip2-dev yasm"
    5.48 +#BUILD_DEPENDS="libsdl-dev zlib-dev bzip2-dev coreutils-file-format \
    5.49 +#coreutils-file-special yasm"
    5.50 +BUILD_DEPENDS="coreutils-file-format libass-dev fdk-aac-dev lame-dev opus-dev \
    5.51 +libtheora-dev libvorbis-dev libvpx-dev x264-dev x265-dev xorg-libX11-dev"
    5.52 +SPLIT="ffmpeg-dev"
    5.53  
    5.54  # Rules to configure and make the package.
    5.55  compile_rules()
    5.56  {
    5.57 +	# http://www.linuxfromscratch.org/blfs/view/stable/multimedia/ffmpeg.html
    5.58 +
    5.59 +	# Handle cross compilation.
    5.60 +	case "$ARCH" in
    5.61 +		i?86) ARCH_ARGS="--arch=$ARCH --cpu=$ARCH" ;;
    5.62 +		arm*) ARCH_ARGS="--enable-cross-compile --arch=armel --target-os=linux \
    5.63 +			--cross-prefix=$HOST_SYSTEM-" ;;
    5.64 +	esac
    5.65 +
    5.66  	./configure \
    5.67  		--prefix=/usr \
    5.68 +		--enable-gpl \
    5.69 +		--enable-version3 \
    5.70 +		--enable-nonfree \
    5.71 +		--disable-static \
    5.72  		--enable-shared \
    5.73 -		--disable-static \
    5.74 -		--enable-gpl \
    5.75 +		--disable-debug \
    5.76 +		--enable-libass \
    5.77 +		--enable-libfdk-aac \
    5.78 +		--enable-libfreetype \
    5.79 +		--enable-libmp3lame \
    5.80 +		--enable-libopus \
    5.81 +		--enable-libtheora \
    5.82 +		--enable-libvorbis \
    5.83 +		--enable-libvpx \
    5.84 +		--enable-libx264 \
    5.85 +		--enable-libx265 \
    5.86 +		--enable-x11grab \
    5.87 +		--docdir=/usr/share/doc/ffmpeg-$VERSION \
    5.88  		--enable-runtime-cpudetect \
    5.89 -		--enable-avresample \
    5.90 -		--enable-pthreads \
    5.91 -		--enable-small \
    5.92 -		--enable-ffserver \
    5.93 -		--disable-ffprobe \
    5.94 -		--disable-encoder=h263 \
    5.95 -		--disable-encoder=h263p \
    5.96 -		--disable-encoder=mpeg2video \
    5.97 -		--disable-encoder=msmpeg4v2 \
    5.98 -		--disable-encoder=msmpeg4v3 \
    5.99 -		--disable-symver \
   5.100 -		--disable-debug \
   5.101 -		--disable-doc \
   5.102 -		${ARCH_ARGS} &&
   5.103 -	make && make install
   5.104 +		$ARCH_ARGS &&
   5.105 +
   5.106 +#		--enable-avresample \
   5.107 +#		--enable-pthreads \
   5.108 +#		--enable-small \
   5.109 +#		--enable-ffserver \
   5.110 +#		--disable-ffprobe \
   5.111 +#		--disable-encoder=h263 \
   5.112 +#		--disable-encoder=h263p \
   5.113 +#		--disable-encoder=mpeg2video \
   5.114 +#		--disable-encoder=msmpeg4v2 \
   5.115 +#		--disable-encoder=msmpeg4v3 \
   5.116 +#		--disable-symver \
   5.117 +#		--disable-doc \
   5.118 +
   5.119 +	make &&
   5.120 +	gcc tools/qt-faststart.c -o tools/qt-faststart &&
   5.121 +	make install &&
   5.122 +	install -v -m755 tools/qt-faststart $install/usr/bin &&
   5.123 +	docdir=$install/usr/share/doc/ffmpeg-$VERSION &&
   5.124 +	mkdir -p $docdir &&
   5.125 +	cp doc/*.txt $docdir
   5.126  }
   5.127  
   5.128  # Rules to gen a SliTaz package suitable for Tazpkg.
   5.129  genpkg_rules()
   5.130  {
   5.131 -	mkdir -p \
   5.132 -		$fs/usr/bin \
   5.133 -		$fs/usr/lib \
   5.134 -		$fs/usr/share
   5.135 -	cp -a $install/usr/lib/*so* $fs/usr/lib
   5.136 -	cp -a $install/usr/bin/ffmpeg $fs/usr/bin
   5.137 -	cp -a $install/usr/share/$PACKAGE $fs/usr/share
   5.138 -	rm -rf $fs/usr/share/$PACKAGE/examples
   5.139 +	case $PACKAGE in
   5.140 +		ffmpeg)
   5.141 +			copy @std
   5.142 +			rm -rf $fs/usr/share/$PACKAGE/examples/
   5.143 +			SUGGESTED="ffplay"
   5.144 +			TAGS="audio video convert stream"
   5.145 +			DEPENDS="bzlib fdk-aac freetype lame libass liblzma libtheora-enc \
   5.146 +			libvorbis libvpx opus x264 x265 xorg-libxcb zlib"
   5.147 +			case "$SLITAZ_ARCH" in
   5.148 +				arm*) DEPENDS="alsa-lib bzip2 zlib" ;;
   5.149 +			esac
   5.150 +			;;
   5.151 +		*-dev)
   5.152 +			copy @dev examples/
   5.153 +			DEPENDS="ffmpeg bzip2-dev fdk-aac-dev freetype-dev lame-dev \
   5.154 +			libass-dev libogg-dev libtheora-dev libvorbis-dev libvpx-dev \
   5.155 +			opus-dev x264-dev x265-dev xorg-libX11-dev xorg-libxcb-dev xz-dev \
   5.156 +			zlib-dev"
   5.157 +			;;
   5.158 +	esac
   5.159  }
     6.1 --- a/ffmpeg/stuff/build.patch	Sat Jul 29 22:49:56 2017 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,42 +0,0 @@
     6.4 ---- configure.orig	Wed Apr 22 17:24:34 2009
     6.5 -+++ configure	Tue Apr 21 21:21:01 2009
     6.6 -@@ -1371,33 +1371,13 @@
     6.7 - : ${TMPDIR:=$TMP}
     6.8 - : ${TMPDIR:=/tmp}
     6.9 - 
    6.10 --if ! check_cmd type mktemp; then
    6.11 --   # simple replacement for missing mktemp
    6.12 --    # NOT SAFE FOR GENERAL USE
    6.13 --    mktemp(){
    6.14 --        echo "${2%XXX*}.${HOSTNAME}.${UID}.$$"
    6.15 --    }
    6.16 --fi
    6.17 -- 
    6.18 --tmpfile(){
    6.19 --    tmp=$(mktemp -u "${TMPDIR}/ffconf.XXXXXXXX")$2 &&
    6.20 --        (set -C; exec > $tmp) 2>/dev/null ||
    6.21 --        die "Unable to create temoporary file in $TMPDIR."
    6.22 --    append TMPFILES $tmp
    6.23 --    eval $1=$tmp
    6.24 --}
    6.25 - 
    6.26 --trap 'rm -f -- $TMPFILES' EXIT
    6.27 --trap exit HUP INT TERM
    6.28 --
    6.29 --tmpfile TMPC  .c
    6.30 --tmpfile TMPE  $EXESUF
    6.31 --tmpfile TMPH  .h
    6.32 --tmpfile TMPO  .o
    6.33 --tmpfile TMPS  .S
    6.34 --tmpfile TMPSH .sh
    6.35 --
    6.36 --unset -f mktemp
    6.37 -+TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
    6.38 -+TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
    6.39 -+TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
    6.40 -+TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
    6.41 -+TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
    6.42 -+TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
    6.43 - 
    6.44 - # make sure we can execute files in $TMPDIR
    6.45 - cat > $TMPSH 2>> $logfile <<EOF
     7.1 --- a/ffmpeg/stuff/configure	Sat Jul 29 22:49:56 2017 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,2595 +0,0 @@
     7.4 -#!/bin/sh
     7.5 -#
     7.6 -# FFmpeg configure script
     7.7 -#
     7.8 -# Copyright (c) 2000-2002 Fabrice Bellard
     7.9 -# Copyright (c) 2005-2008 Diego Biurrun
    7.10 -# Copyright (c) 2005-2008 Mans Rullgard
    7.11 -#
    7.12 -
    7.13 -# Prevent locale nonsense from breaking basic text processing.
    7.14 -LC_ALL=C
    7.15 -export LC_ALL
    7.16 -
    7.17 -# make sure we are running under a compatible shell
    7.18 -# try to make this part work with most shells
    7.19 -
    7.20 -try_exec(){
    7.21 -    echo "Trying shell $1"
    7.22 -    type "$1" > /dev/null 2>&1 && exec "$@"
    7.23 -}
    7.24 -
    7.25 -unset foo
    7.26 -(: ${foo%%bar}) 2> /dev/null
    7.27 -E1="$?"
    7.28 -
    7.29 -(: ${foo?}) 2> /dev/null
    7.30 -E2="$?"
    7.31 -
    7.32 -if test "$E1" != 0 || test "$E2" = 0; then
    7.33 -    echo "Broken shell detected.  Trying alternatives."
    7.34 -    export FF_CONF_EXEC
    7.35 -    if test "0$FF_CONF_EXEC" -lt 1; then
    7.36 -        FF_CONF_EXEC=1
    7.37 -        try_exec bash "$0" "$@"
    7.38 -    fi
    7.39 -    if test "0$FF_CONF_EXEC" -lt 2; then
    7.40 -        FF_CONF_EXEC=2
    7.41 -        try_exec ksh "$0" "$@"
    7.42 -    fi
    7.43 -    if test "0$FF_CONF_EXEC" -lt 3; then
    7.44 -        FF_CONF_EXEC=3
    7.45 -        try_exec /usr/xpg4/bin/sh "$0" "$@"
    7.46 -    fi
    7.47 -    echo "No compatible shell script interpreter found."
    7.48 -    echo "This configure script requires a POSIX-compatible shell"
    7.49 -    echo "such as bash or ksh."
    7.50 -    echo "THIS IS NOT A BUG IN FFMPEG, DO NOT REPORT IT AS SUCH."
    7.51 -    echo "Instead, install a working POSIX-compatible shell."
    7.52 -    echo "Disabling this configure test will create a broken FFmpeg."
    7.53 -    if test "$BASH_VERSION" = '2.04.0(1)-release'; then
    7.54 -        echo "This bash version ($BASH_VERSION) is broken on your platform."
    7.55 -        echo "Upgrade to a later version if available."
    7.56 -    fi
    7.57 -    exit 1
    7.58 -fi
    7.59 -
    7.60 -show_help(){
    7.61 -  echo "Usage: configure [options]"
    7.62 -  echo "Options: [defaults in brackets after descriptions]"
    7.63 -  echo
    7.64 -  echo "Standard options:"
    7.65 -  echo "  --help                   print this message"
    7.66 -  echo "  --logfile=FILE           log tests and output to FILE [config.err]"
    7.67 -  echo "  --disable-logging        do not log configure debug information"
    7.68 -  echo "  --prefix=PREFIX          install in PREFIX [$prefix]"
    7.69 -  echo "  --bindir=DIR             install binaries in DIR [PREFIX/bin]"
    7.70 -  echo "  --datadir=DIR            install data files in DIR [PREFIX/share/ffmpeg]"
    7.71 -  echo "  --libdir=DIR             install libs in DIR [PREFIX/lib]"
    7.72 -  echo "  --shlibdir=DIR           install shared libs in DIR [PREFIX/lib]"
    7.73 -  echo "  --incdir=DIR             install includes in DIR [PREFIX/include]"
    7.74 -  echo "  --mandir=DIR             install man page in DIR [PREFIX/share/man]"
    7.75 -  echo
    7.76 -  echo "Configuration options:"
    7.77 -  echo "  --disable-static         do not build static libraries [no]"
    7.78 -  echo "  --enable-shared          build shared libraries [no]"
    7.79 -  echo "  --enable-gpl             allow use of GPL code, the resulting libs"
    7.80 -  echo "                           and binaries will be under GPL [no]"
    7.81 -  echo "  --enable-nonfree         allow use of nonfree code, the resulting libs"
    7.82 -  echo "                           and binaries will be unredistributable [no]"
    7.83 -  echo "  --disable-ffmpeg         disable ffmpeg build"
    7.84 -  echo "  --disable-ffplay         disable ffplay build"
    7.85 -  echo "  --disable-ffserver       disable ffserver build"
    7.86 -  echo "  --enable-postproc        enable GPLed postprocessing support [no]"
    7.87 -  echo "  --enable-avfilter        video filter support [no]"
    7.88 -  echo "  --enable-avfilter-lavf   video filters dependent on avformat [no]"
    7.89 -  echo "  --enable-beosthreads     use BeOS threads [no]"
    7.90 -  echo "  --enable-os2threads      use OS/2 threads [no]"
    7.91 -  echo "  --enable-pthreads        use pthreads [no]"
    7.92 -  echo "  --enable-w32threads      use Win32 threads [no]"
    7.93 -  echo "  --enable-x11grab         enable X11 grabbing [no]"
    7.94 -  echo "  --disable-network        disable network support [no]"
    7.95 -  echo "  --disable-ipv6           disable IPv6 support [no]"
    7.96 -  echo "  --disable-mpegaudio-hp   faster (but less accurate) MPEG audio decoding [no]"
    7.97 -  echo "  --enable-gray            enable full grayscale support (slower color)"
    7.98 -  echo "  --disable-swscale-alpha  disable alpha channel support in swscale"
    7.99 -  echo "  --disable-fastdiv        disable table-based division"
   7.100 -  echo "  --enable-small           optimize for size instead of speed"
   7.101 -  echo "  --disable-aandct         disable AAN DCT code"
   7.102 -  echo "  --disable-fft            disable FFT code"
   7.103 -  echo "  --disable-golomb         disable Golomb code"
   7.104 -  echo "  --disable-mdct           disable MDCT code"
   7.105 -  echo "  --disable-rdft           disable RDFT code"
   7.106 -  echo "  --enable-hardcoded-tables use hardcoded tables instead of runtime generation"
   7.107 -  echo "  --enable-memalign-hack   emulate memalign, interferes with memory debuggers"
   7.108 -  echo "  --enable-beos-netserver  enable BeOS netserver"
   7.109 -  echo "  --disable-encoder=NAME   disable encoder NAME"
   7.110 -  echo "  --enable-encoder=NAME    enable encoder NAME"
   7.111 -  echo "  --disable-encoders       disable all encoders"
   7.112 -  echo "  --disable-decoder=NAME   disable decoder NAME"
   7.113 -  echo "  --enable-decoder=NAME    enable decoder NAME"
   7.114 -  echo "  --disable-decoders       disable all decoders"
   7.115 -  echo "  --disable-hwaccel=NAME   disable hwaccel NAME"
   7.116 -  echo "  --enable-hwaccel=NAME    enable hwaccel NAME"
   7.117 -  echo "  --disable-hwaccels       disable all hwaccels"
   7.118 -  echo "  --disable-muxer=NAME     disable muxer NAME"
   7.119 -  echo "  --enable-muxer=NAME      enable muxer NAME"
   7.120 -  echo "  --disable-muxers         disable all muxers"
   7.121 -  echo "  --disable-demuxer=NAME   disable demuxer NAME"
   7.122 -  echo "  --enable-demuxer=NAME    enable demuxer NAME"
   7.123 -  echo "  --disable-demuxers       disable all demuxers"
   7.124 -  echo "  --enable-parser=NAME     enable parser NAME"
   7.125 -  echo "  --disable-parser=NAME    disable parser NAME"
   7.126 -  echo "  --disable-parsers        disable all parsers"
   7.127 -  echo "  --enable-bsf=NAME        enable bitstream filter NAME"
   7.128 -  echo "  --disable-bsf=NAME       disable bitstream filter NAME"
   7.129 -  echo "  --disable-bsfs           disable all bitstream filters"
   7.130 -  echo "  --enable-protocol=NAME   enable protocol NAME"
   7.131 -  echo "  --disable-protocol=NAME  disable protocol NAME"
   7.132 -  echo "  --disable-protocols      disable all protocols"
   7.133 -  echo "  --disable-indevs         disable input devices"
   7.134 -  echo "  --disable-outdevs        disable output devices"
   7.135 -  echo "  --disable-devices        disable all devices"
   7.136 -  echo "  --enable-filter=NAME     enable filter NAME"
   7.137 -  echo "  --disable-filter=NAME    disable filter NAME"
   7.138 -  echo "  --disable-filters        disable all filters"
   7.139 -  echo "  --list-decoders          show all available decoders"
   7.140 -  echo "  --list-encoders          show all available encoders"
   7.141 -  echo "  --list-hwaccels          show all available hardware accelerators"
   7.142 -  echo "  --list-muxers            show all available muxers"
   7.143 -  echo "  --list-demuxers          show all available demuxers"
   7.144 -  echo "  --list-parsers           show all available parsers"
   7.145 -  echo "  --list-protocols         show all available protocols"
   7.146 -  echo "  --list-bsfs              show all available bitstream filters"
   7.147 -  echo "  --list-indevs            show all available input devices"
   7.148 -  echo "  --list-outdevs           show all available output devices"
   7.149 -  echo "  --list-filters           show all available filters"
   7.150 -  echo
   7.151 -  echo "External library support:"
   7.152 -  echo "  --enable-avisynth        enable reading of AVISynth script files [no]"
   7.153 -  echo "  --enable-bzlib           enable bzlib [autodetect]"
   7.154 -  echo "  --enable-libamr-nb       enable libamr-nb floating point audio codec [no]"
   7.155 -  echo "  --enable-libamr-wb       enable libamr-wb floating point audio codec [no]"
   7.156 -  echo "  --enable-libdc1394       enable IIDC-1394 grabbing using libdc1394"
   7.157 -  echo "                           and libraw1394 [no]"
   7.158 -  echo "  --enable-libdirac        enable Dirac support via libdirac [no]"
   7.159 -  echo "  --enable-libfaac         enable FAAC support via libfaac [no]"
   7.160 -  echo "  --enable-libfaad         enable FAAD support via libfaad [no]"
   7.161 -  echo "  --enable-libfaadbin      open libfaad.so.0 at runtime [no]"
   7.162 -  echo "  --enable-libgsm          enable GSM support via libgsm [no]"
   7.163 -  echo "  --enable-libmp3lame      enable MP3 encoding via libmp3lame [no]"
   7.164 -  echo "  --enable-libnut          enable NUT (de)muxing via libnut,"
   7.165 -  echo "                           native (de)muxer exists [no]"
   7.166 -  echo "  --enable-libopenjpeg     enable JPEG 2000 decoding via OpenJPEG [no]"
   7.167 -  echo "  --enable-libschroedinger enable Dirac support via libschroedinger [no]"
   7.168 -  echo "  --enable-libspeex        enable Speex decoding via libspeex [no]"
   7.169 -  echo "  --enable-libtheora       enable Theora encoding via libtheora [no]"
   7.170 -  echo "  --enable-libvorbis       enable Vorbis encoding via libvorbis,"
   7.171 -  echo "                           native implementation exists [no]"
   7.172 -  echo "  --enable-libx264         enable H.264 encoding via x264 [no]"
   7.173 -  echo "  --enable-libxvid         enable Xvid encoding via xvidcore,"
   7.174 -  echo "                           native MPEG-4/Xvid encoder exists [no]"
   7.175 -  echo "  --enable-mlib            enable Sun medialib [no]"
   7.176 -  echo "  --enable-zlib            enable zlib [autodetect]"
   7.177 -  echo ""
   7.178 -  echo "Advanced options (experts only):"
   7.179 -  echo "  --source-path=PATH       path to source code [$source_path]"
   7.180 -  echo "  --cross-prefix=PREFIX    use PREFIX for compilation tools [$cross_prefix]"
   7.181 -  echo "  --enable-cross-compile   assume a cross-compiler is used"
   7.182 -  echo "  --sysroot=PATH           root of cross-build tree"
   7.183 -  echo "  --sysinclude=PATH        location of cross-build system headers"
   7.184 -  echo "  --target-os=OS           compiler targets OS [$target_os]"
   7.185 -  echo "  --target-exec=CMD        command to run executables on target"
   7.186 -  echo "  --target-path=DIR        path to view of build directory on target"
   7.187 -  echo "  --nm=NM                  use nm tool"
   7.188 -  echo "  --as=AS                  use assembler AS [$as_default]"
   7.189 -  echo "  --cc=CC                  use C compiler CC [$cc_default]"
   7.190 -  echo "  --host-cc=HOSTCC         use host C compiler HOSTCC"
   7.191 -  echo "  --host-cflags=HCFLAGS    use HCFLAGS when compiling for host"
   7.192 -  echo "  --host-ldflags=HLDFLAGS  use HLDFLAGS when linking for host"
   7.193 -  echo "  --host-libs=HLIBS        use libs HLIBS when linking for host"
   7.194 -  echo "  --extra-cflags=ECFLAGS   add ECFLAGS to CFLAGS [$CFLAGS]"
   7.195 -  echo "  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
   7.196 -  echo "  --extra-libs=ELIBS       add ELIBS [$ELIBS]"
   7.197 -  echo "  --extra-version=STRING   version string suffix []"
   7.198 -  echo "  --build-suffix=SUFFIX    library name suffix []"
   7.199 -  echo "  --arch=ARCH              select architecture [$arch]"
   7.200 -  echo "  --cpu=CPU                select the minimum required CPU (affects"
   7.201 -  echo "                           instruction selection, may crash on older CPUs)"
   7.202 -  echo "  --enable-powerpc-perf    enable performance report on PPC"
   7.203 -  echo "                           (requires enabling PMC)"
   7.204 -  echo "  --disable-altivec        disable AltiVec optimizations"
   7.205 -  echo "  --disable-amd3dnow       disable 3DNow! optimizations"
   7.206 -  echo "  --disable-amd3dnowext    disable 3DNow! extended optimizations"
   7.207 -  echo "  --disable-mmx            disable MMX optimizations"
   7.208 -  echo "  --disable-mmx2           disable MMX2 optimizations"
   7.209 -  echo "  --disable-sse            disable SSE optimizations"
   7.210 -  echo "  --disable-ssse3          disable SSSE3 optimizations"
   7.211 -  echo "  --disable-armv5te        disable armv5te optimizations"
   7.212 -  echo "  --disable-armv6          disable armv6 optimizations"
   7.213 -  echo "  --disable-armv6t2        disable armv6t2 optimizations"
   7.214 -  echo "  --disable-armvfp         disable ARM VFP optimizations"
   7.215 -  echo "  --disable-iwmmxt         disable iwmmxt optimizations"
   7.216 -  echo "  --disable-mmi            disable MMI optimizations"
   7.217 -  echo "  --disable-neon           disable neon optimizations"
   7.218 -  echo "  --disable-vis            disable VIS optimizations"
   7.219 -  echo "  --disable-yasm           disable use of yasm assembler"
   7.220 -  echo
   7.221 -  echo "Developer options (useful when working on FFmpeg itself):"
   7.222 -  echo "  --disable-debug          disable debugging symbols"
   7.223 -  echo "  --enable-debug=LEVEL     set the debug level [$debuglevel]"
   7.224 -  echo "  --enable-gprof           enable profiling with gprof [$gprof]"
   7.225 -  echo "  --disable-optimizations  disable compiler optimizations"
   7.226 -  echo "  --enable-extra-warnings  enable more compiler warnings"
   7.227 -  echo "  --disable-stripping      disable stripping of executables and shared libraries"
   7.228 -  echo ""
   7.229 -  echo "NOTE: Object files are built at the place where configure is launched."
   7.230 -  exit 0
   7.231 -}
   7.232 -
   7.233 -log(){
   7.234 -    echo "$@" >> $logfile
   7.235 -}
   7.236 -
   7.237 -log_file(){
   7.238 -    log BEGIN $1
   7.239 -    cat $1 >> $logfile
   7.240 -    log END $1
   7.241 -}
   7.242 -
   7.243 -echolog(){
   7.244 -    log "$@"
   7.245 -    echo "$@"
   7.246 -}
   7.247 -
   7.248 -die(){
   7.249 -    echolog "$@"
   7.250 -    cat <<EOF
   7.251 -
   7.252 -If you think configure made a mistake, make sure you are using the latest
   7.253 -version from SVN.  If the latest version fails, report the problem to the
   7.254 -ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
   7.255 -EOF
   7.256 -    if disabled logging; then
   7.257 -        cat <<EOF
   7.258 -Rerun configure with logging enabled (do not use --disable-logging), and
   7.259 -include the log this produces with your report.
   7.260 -EOF
   7.261 -    else
   7.262 -cat <<EOF
   7.263 -Include the log file "$logfile" produced by configure as this will help
   7.264 -solving the problem.
   7.265 -EOF
   7.266 -    fi
   7.267 -    exit 1
   7.268 -}
   7.269 -
   7.270 -# Avoid locale weirdness, besides we really just want to translate ASCII.
   7.271 -toupper(){
   7.272 -    echo "$@" | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ
   7.273 -}
   7.274 -
   7.275 -tolower(){
   7.276 -    echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz
   7.277 -}
   7.278 -
   7.279 -c_escape(){
   7.280 -    echo "$*" | sed 's/["\\]/\\\0/g'
   7.281 -}
   7.282 -
   7.283 -set_all(){
   7.284 -    value=$1
   7.285 -    shift
   7.286 -    for var in $*; do
   7.287 -        eval $var=$value
   7.288 -    done
   7.289 -}
   7.290 -
   7.291 -set_weak(){
   7.292 -    value=$1
   7.293 -    shift
   7.294 -    for var; do
   7.295 -        eval : \${$var:=$value}
   7.296 -    done
   7.297 -}
   7.298 -
   7.299 -pushvar(){
   7.300 -    for var in $*; do
   7.301 -        eval level=\${${var}_level:=0}
   7.302 -        eval ${var}_${level}="\$$var"
   7.303 -        eval ${var}_level=$(($level+1))
   7.304 -    done
   7.305 -}
   7.306 -
   7.307 -popvar(){
   7.308 -    for var in $*; do
   7.309 -        eval level=\${${var}_level:-0}
   7.310 -        test $level = 0 && continue
   7.311 -        eval level=$(($level-1))
   7.312 -        eval $var="\${${var}_${level}}"
   7.313 -        eval ${var}_level=$level
   7.314 -        eval unset ${var}_${level}
   7.315 -    done
   7.316 -}
   7.317 -
   7.318 -enable(){
   7.319 -    set_all yes $*
   7.320 -}
   7.321 -
   7.322 -disable(){
   7.323 -    set_all no $*
   7.324 -}
   7.325 -
   7.326 -enable_weak(){
   7.327 -    set_weak yes $*
   7.328 -}
   7.329 -
   7.330 -disable_weak(){
   7.331 -    set_weak no $*
   7.332 -}
   7.333 -
   7.334 -enable_safe(){
   7.335 -    enable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
   7.336 -}
   7.337 -
   7.338 -disable_safe(){
   7.339 -    disable $(echo "$*" | sed 's/[^A-Za-z0-9_ ]/_/g')
   7.340 -}
   7.341 -
   7.342 -do_enable_deep(){
   7.343 -    for var; do
   7.344 -        enabled $var && continue
   7.345 -        eval sel="\$${var}_select"
   7.346 -        eval sgs="\$${var}_suggest"
   7.347 -        pushvar var sgs
   7.348 -        enable_deep $sel
   7.349 -        popvar sgs
   7.350 -        enable_deep_weak $sgs
   7.351 -        popvar var
   7.352 -    done
   7.353 -}
   7.354 -
   7.355 -enable_deep(){
   7.356 -    do_enable_deep $*
   7.357 -    enable $*
   7.358 -}
   7.359 -
   7.360 -enable_deep_weak(){
   7.361 -    do_enable_deep $*
   7.362 -    enable_weak $*
   7.363 -}
   7.364 -
   7.365 -enabled(){
   7.366 -    test "${1#!}" = "$1" && op== || op=!=
   7.367 -    eval test "x\$${1#!}" $op "xyes"
   7.368 -}
   7.369 -
   7.370 -disabled(){
   7.371 -    test "${1#!}" = "$1" && op== || op=!=
   7.372 -    eval test "x\$${1#!}" $op "xno"
   7.373 -}
   7.374 -
   7.375 -enabled_all(){
   7.376 -    for opt; do
   7.377 -        enabled $opt || return 1
   7.378 -    done
   7.379 -}
   7.380 -
   7.381 -disabled_all(){
   7.382 -    for opt; do
   7.383 -        disabled $opt || return 1
   7.384 -    done
   7.385 -}
   7.386 -
   7.387 -enabled_any(){
   7.388 -    for opt; do
   7.389 -        enabled $opt && return 0
   7.390 -    done
   7.391 -}
   7.392 -
   7.393 -disabled_any(){
   7.394 -    for opt; do
   7.395 -        disabled $opt && return 0
   7.396 -    done
   7.397 -    return 1
   7.398 -}
   7.399 -
   7.400 -set_default(){
   7.401 -    for opt; do
   7.402 -        eval : \${$opt:=\$${opt}_default}
   7.403 -    done
   7.404 -}
   7.405 -
   7.406 -is_in(){
   7.407 -    value=$1
   7.408 -    shift
   7.409 -    for var in $*; do
   7.410 -        [ $var = $value ] && return 0
   7.411 -    done
   7.412 -    return 1
   7.413 -}
   7.414 -
   7.415 -check_deps(){
   7.416 -    for cfg; do
   7.417 -        cfg="${cfg#!}"
   7.418 -        enabled ${cfg}_checking && die "Circular dependency for $cfg."
   7.419 -        disabled ${cfg}_checking && continue
   7.420 -        enable ${cfg}_checking
   7.421 -
   7.422 -        eval dep_all="\$${cfg}_deps"
   7.423 -        eval dep_any="\$${cfg}_deps_any"
   7.424 -        eval dep_sel="\$${cfg}_select"
   7.425 -        eval dep_sgs="\$${cfg}_suggest"
   7.426 -
   7.427 -        pushvar cfg dep_all dep_any dep_sel dep_sgs
   7.428 -        check_deps $dep_all $dep_any $dep_sel $dep_sgs
   7.429 -        popvar cfg dep_all dep_any dep_sel dep_sgs
   7.430 -
   7.431 -        enabled_all  $dep_all || disable $cfg
   7.432 -        enabled_any  $dep_any || disable $cfg
   7.433 -        disabled_any $dep_sel && disable $cfg
   7.434 -
   7.435 -        if enabled $cfg; then
   7.436 -            eval dep_extralibs="\$${cfg}_extralibs"
   7.437 -            test -n "$dep_extralibs" && add_extralibs $dep_extralibs
   7.438 -            enable_deep $dep_sel
   7.439 -            enable_deep_weak $dep_sgs
   7.440 -        fi
   7.441 -
   7.442 -        disable ${cfg}_checking
   7.443 -    done
   7.444 -}
   7.445 -
   7.446 -print_config(){
   7.447 -    pfx=$1
   7.448 -    header=$2
   7.449 -    makefile=$3
   7.450 -    shift 3
   7.451 -    for cfg; do
   7.452 -        ucname="$(toupper $cfg)"
   7.453 -        if enabled $cfg; then
   7.454 -            echo "#define ${pfx}${ucname} 1" >> $header
   7.455 -            echo "${pfx}${ucname}=yes" >> $makefile
   7.456 -        else
   7.457 -            echo "#define ${pfx}${ucname} 0" >> $header
   7.458 -        fi
   7.459 -    done
   7.460 -}
   7.461 -
   7.462 -flags_saved(){
   7.463 -    (: ${SAVE_CFLAGS?}) 2> /dev/null
   7.464 -}
   7.465 -
   7.466 -save_flags(){
   7.467 -    flags_saved && return
   7.468 -    SAVE_CFLAGS="$CFLAGS"
   7.469 -    SAVE_LDFLAGS="$LDFLAGS"
   7.470 -    SAVE_extralibs="$extralibs"
   7.471 -}
   7.472 -
   7.473 -restore_flags(){
   7.474 -    flags_saved || return
   7.475 -    CFLAGS="$SAVE_CFLAGS"
   7.476 -    LDFLAGS="$SAVE_LDFLAGS"
   7.477 -    extralibs="$SAVE_extralibs"
   7.478 -    unset SAVE_CFLAGS
   7.479 -    unset SAVE_LDFLAGS
   7.480 -    unset SAVE_extralibs
   7.481 -}
   7.482 -
   7.483 -temp_cflags(){
   7.484 -    save_flags
   7.485 -    CFLAGS="$CFLAGS $*"
   7.486 -}
   7.487 -
   7.488 -temp_ldflags(){
   7.489 -    save_flags
   7.490 -    LDFLAGS="$LDFLAGS $*"
   7.491 -}
   7.492 -
   7.493 -temp_extralibs(){
   7.494 -    save_flags
   7.495 -    extralibs="$extralibs $*"
   7.496 -}
   7.497 -
   7.498 -append(){
   7.499 -    var=$1
   7.500 -    shift
   7.501 -    flags_saved && eval "SAVE_$var=\"\$SAVE_$var $*\""
   7.502 -    eval "$var=\"\$$var $*\""
   7.503 -}
   7.504 -
   7.505 -add_cflags(){
   7.506 -    append CFLAGS "$@"
   7.507 -}
   7.508 -
   7.509 -add_ldflags(){
   7.510 -    append LDFLAGS "$@"
   7.511 -}
   7.512 -
   7.513 -add_extralibs(){
   7.514 -    append extralibs "$@"
   7.515 -}
   7.516 -
   7.517 -check_cmd(){
   7.518 -    log "$@"
   7.519 -    "$@" >> $logfile 2>&1
   7.520 -}
   7.521 -
   7.522 -check_cc(){
   7.523 -    log check_cc "$@"
   7.524 -    cat > $TMPC
   7.525 -    log_file $TMPC
   7.526 -    check_cmd $cc $CFLAGS "$@" -c -o $TMPO $TMPC
   7.527 -}
   7.528 -
   7.529 -check_cpp(){
   7.530 -    log check_cpp "$@"
   7.531 -    cat > $TMPC
   7.532 -    log_file $TMPC
   7.533 -    check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
   7.534 -}
   7.535 -
   7.536 -check_as(){
   7.537 -    log check_as "$@"
   7.538 -    cat > $TMPC
   7.539 -    log_file $TMPC
   7.540 -    check_cmd $as $CFLAGS "$@" -c -o $TMPO $TMPC
   7.541 -}
   7.542 -
   7.543 -check_asm(){
   7.544 -    log check_asm "$@"
   7.545 -    name="$1"
   7.546 -    asm="$2"
   7.547 -    shift 2
   7.548 -    check_as "$@" <<EOF && enable $name || disable $name
   7.549 -void foo(void){ __asm__ volatile($asm); }
   7.550 -EOF
   7.551 -}
   7.552 -
   7.553 -check_yasm(){
   7.554 -    log check_yasm "$@"
   7.555 -    echo "$1" > $TMPS
   7.556 -    log_file $TMPS
   7.557 -    shift 1
   7.558 -    check_cmd $yasmexe $YASMFLAGS "$@" -o $TMPO $TMPS
   7.559 -}
   7.560 -
   7.561 -check_ld(){
   7.562 -    log check_ld "$@"
   7.563 -    check_cc || return
   7.564 -    flags=''
   7.565 -    libs=''
   7.566 -    for f; do
   7.567 -        test "${f}" = "${f#-l}" && flags="$flags $f" || libs="$libs $f"
   7.568 -    done
   7.569 -    check_cmd $cc $LDFLAGS $flags -o $TMPE $TMPO $extralibs $libs
   7.570 -}
   7.571 -
   7.572 -check_cflags(){
   7.573 -    log check_cflags "$@"
   7.574 -    check_cc "$@" <<EOF && add_cflags "$@"
   7.575 -int x;
   7.576 -EOF
   7.577 -}
   7.578 -
   7.579 -check_ldflags(){
   7.580 -    log check_ldflags "$@"
   7.581 -    check_ld "$@" <<EOF && add_ldflags "$@"
   7.582 -int main(void){ return 0; }
   7.583 -EOF
   7.584 -}
   7.585 -
   7.586 -check_header(){
   7.587 -    log check_header "$@"
   7.588 -    header=$1
   7.589 -    shift
   7.590 -    disable_safe $header
   7.591 -    check_cpp "$@" <<EOF && enable_safe $header
   7.592 -#include <$header>
   7.593 -int x;
   7.594 -EOF
   7.595 -}
   7.596 -
   7.597 -check_func(){
   7.598 -    log check_func "$@"
   7.599 -    func=$1
   7.600 -    shift
   7.601 -    disable $func
   7.602 -    check_ld "$@" <<EOF && enable $func
   7.603 -extern int $func();
   7.604 -int main(void){ $func(); }
   7.605 -EOF
   7.606 -}
   7.607 -
   7.608 -check_func_headers(){
   7.609 -    log check_func_headers "$@"
   7.610 -    headers=$1
   7.611 -    func=$2
   7.612 -    shift 2
   7.613 -    disable $func
   7.614 -    incs=""
   7.615 -    for hdr in $headers; do
   7.616 -        incs="$incs
   7.617 -#include <$hdr>"
   7.618 -    done
   7.619 -    check_ld "$@" <<EOF && enable $func && enable_safe $headers
   7.620 -$incs
   7.621 -int main(int argc, char **argv){
   7.622 -    (void) $func;
   7.623 -    return 0;
   7.624 -}
   7.625 -EOF
   7.626 -}
   7.627 -
   7.628 -check_cpp_condition(){
   7.629 -    log check_cpp_condition "$@"
   7.630 -    header=$1
   7.631 -    condition=$2
   7.632 -    check_cpp <<EOF
   7.633 -#include <$header>
   7.634 -#if !($condition)
   7.635 -#error "unsatisfied condition: $condition"
   7.636 -#endif
   7.637 -EOF
   7.638 -}
   7.639 -
   7.640 -check_lib(){
   7.641 -    log check_lib "$@"
   7.642 -    header="$1"
   7.643 -    func="$2"
   7.644 -    shift 2
   7.645 -    temp_extralibs "$@"
   7.646 -    check_header $header && check_func $func && add_extralibs "$@"
   7.647 -    err=$?
   7.648 -    restore_flags
   7.649 -    return $err
   7.650 -}
   7.651 -
   7.652 -check_lib2(){
   7.653 -    log check_lib2 "$@"
   7.654 -    headers="$1"
   7.655 -    func="$2"
   7.656 -    shift 2
   7.657 -    temp_extralibs "$@"
   7.658 -    check_func_headers "$headers" $func && add_extralibs "$@"
   7.659 -    err=$?
   7.660 -    restore_flags
   7.661 -    return $err
   7.662 -}
   7.663 -
   7.664 -check_exec(){
   7.665 -    check_ld "$@" && { enabled cross_compile || $TMPE >> $logfile 2>&1; }
   7.666 -}
   7.667 -
   7.668 -check_exec_crash(){
   7.669 -    code=$(cat)
   7.670 -
   7.671 -    # exit() is not async signal safe.  _Exit (C99) and _exit (POSIX)
   7.672 -    # are safe but may not be available everywhere.  Thus we use
   7.673 -    # raise(SIGTERM) instead.  The check is run in a subshell so we
   7.674 -    # can redirect the "Terminated" message from the shell.  SIGBUS
   7.675 -    # is not defined by standard C so it is used conditionally.
   7.676 -
   7.677 -    (check_exec "$@") >> $logfile 2>&1 <<EOF
   7.678 -#include <signal.h>
   7.679 -static void sighandler(int sig){
   7.680 -    raise(SIGTERM);
   7.681 -}
   7.682 -int main(void){
   7.683 -    signal(SIGILL, sighandler);
   7.684 -    signal(SIGFPE, sighandler);
   7.685 -    signal(SIGSEGV, sighandler);
   7.686 -#ifdef SIGBUS
   7.687 -    signal(SIGBUS, sighandler);
   7.688 -#endif
   7.689 -    { $code }
   7.690 -}
   7.691 -EOF
   7.692 -}
   7.693 -
   7.694 -check_type(){
   7.695 -    log check_type "$@"
   7.696 -    headers=$1
   7.697 -    type=$2
   7.698 -    shift 2
   7.699 -    disable $type
   7.700 -    incs=""
   7.701 -    for hdr in $headers; do
   7.702 -        incs="$incs
   7.703 -#include <$hdr>"
   7.704 -    done
   7.705 -    check_cc "$@" <<EOF && enable $type
   7.706 -$incs
   7.707 -$type v;
   7.708 -EOF
   7.709 -}
   7.710 -
   7.711 -require(){
   7.712 -    name="$1"
   7.713 -    header="$2"
   7.714 -    func="$3"
   7.715 -    shift 3
   7.716 -    check_lib $header $func "$@" || die "ERROR: $name not found"
   7.717 -}
   7.718 -
   7.719 -require2(){
   7.720 -    name="$1"
   7.721 -    headers="$2"
   7.722 -    func="$3"
   7.723 -    shift 3
   7.724 -    check_lib2 "$headers" $func "$@" || die "ERROR: $name not found"
   7.725 -}
   7.726 -
   7.727 -check_foo_config(){
   7.728 -    cfg=$1
   7.729 -    pkg=$2
   7.730 -    header=$3
   7.731 -    func=$4
   7.732 -    shift 4
   7.733 -    disable $cfg
   7.734 -    check_cmd ${pkg}-config --version
   7.735 -    err=$?
   7.736 -    if test "$err" = 0; then
   7.737 -        temp_cflags $(${pkg}-config --cflags)
   7.738 -        temp_extralibs $(${pkg}-config --libs)
   7.739 -        check_lib "$@" $header $func && enable $cfg
   7.740 -    fi
   7.741 -    return $err
   7.742 -}
   7.743 -
   7.744 -apply(){
   7.745 -    file=$1
   7.746 -    shift
   7.747 -    "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp"
   7.748 -}
   7.749 -
   7.750 -# CONFIG_LIST contains configurable options, while HAVE_LIST is for
   7.751 -# system-dependent things.
   7.752 -
   7.753 -COMPONENT_LIST="
   7.754 -    bsfs
   7.755 -    decoders
   7.756 -    demuxers
   7.757 -    encoders
   7.758 -    filters
   7.759 -    hwaccels
   7.760 -    indevs
   7.761 -    muxers
   7.762 -    outdevs
   7.763 -    parsers
   7.764 -    protocols
   7.765 -"
   7.766 -
   7.767 -CONFIG_LIST="
   7.768 -    $COMPONENT_LIST
   7.769 -    aandct
   7.770 -    avfilter
   7.771 -    avfilter_lavf
   7.772 -    avisynth
   7.773 -    beos_netserver
   7.774 -    bzlib
   7.775 -    fastdiv
   7.776 -    ffmpeg
   7.777 -    ffplay
   7.778 -    ffserver
   7.779 -    fft
   7.780 -    golomb
   7.781 -    gpl
   7.782 -    gprof
   7.783 -    gray
   7.784 -    hardcoded_tables
   7.785 -    ipv6
   7.786 -    libamr_nb
   7.787 -    libamr_wb
   7.788 -    libdc1394
   7.789 -    libdirac
   7.790 -    libfaac
   7.791 -    libfaad
   7.792 -    libfaadbin
   7.793 -    libgsm
   7.794 -    libmp3lame
   7.795 -    libnut
   7.796 -    libopenjpeg
   7.797 -    libschroedinger
   7.798 -    libspeex
   7.799 -    libtheora
   7.800 -    libvorbis
   7.801 -    libx264
   7.802 -    libxvid
   7.803 -    mdct
   7.804 -    memalign_hack
   7.805 -    mlib
   7.806 -    mpegaudio_hp
   7.807 -    network
   7.808 -    nonfree
   7.809 -    postproc
   7.810 -    powerpc_perf
   7.811 -    rdft
   7.812 -    shared
   7.813 -    small
   7.814 -    static
   7.815 -    swscale_alpha
   7.816 -    x11grab
   7.817 -    zlib
   7.818 -"
   7.819 -
   7.820 -THREADS_LIST='
   7.821 -    beosthreads
   7.822 -    os2threads
   7.823 -    pthreads
   7.824 -    w32threads
   7.825 -'
   7.826 -
   7.827 -ARCH_LIST='
   7.828 -    alpha
   7.829 -    arm
   7.830 -    bfin
   7.831 -    ia64
   7.832 -    m68k
   7.833 -    mips
   7.834 -    parisc
   7.835 -    ppc
   7.836 -    s390
   7.837 -    sh4
   7.838 -    sparc
   7.839 -    sparc64
   7.840 -    x86
   7.841 -    x86_32
   7.842 -    x86_64
   7.843 -'
   7.844 -
   7.845 -ARCH_EXT_LIST='
   7.846 -    altivec
   7.847 -    amd3dnow
   7.848 -    amd3dnowext
   7.849 -    armv5te
   7.850 -    armv6
   7.851 -    armv6t2
   7.852 -    armvfp
   7.853 -    iwmmxt
   7.854 -    mmi
   7.855 -    mmx
   7.856 -    mmx2
   7.857 -    neon
   7.858 -    ppc4xx
   7.859 -    sse
   7.860 -    ssse3
   7.861 -    vis
   7.862 -'
   7.863 -
   7.864 -HAVE_LIST="
   7.865 -    $ARCH_EXT_LIST
   7.866 -    $THREADS_LIST
   7.867 -    alsa_asoundlib_h
   7.868 -    altivec_h
   7.869 -    arpa_inet_h
   7.870 -    bswap
   7.871 -    closesocket
   7.872 -    cmov
   7.873 -    conio_h
   7.874 -    dcbzl
   7.875 -    dev_bktr_ioctl_bt848_h
   7.876 -    dev_bktr_ioctl_meteor_h
   7.877 -    dev_ic_bt8xx_h
   7.878 -    dev_video_meteor_ioctl_meteor_h
   7.879 -    dev_video_bktr_ioctl_bt848_h
   7.880 -    dlfcn_h
   7.881 -    dlopen
   7.882 -    dos_paths
   7.883 -    ebp_available
   7.884 -    ebx_available
   7.885 -    fast_64bit
   7.886 -    fast_cmov
   7.887 -    fast_unaligned
   7.888 -    fork
   7.889 -    gethrtime
   7.890 -    GetProcessTimes
   7.891 -    getrusage
   7.892 -    inet_aton
   7.893 -    inline_asm
   7.894 -    libdc1394_1
   7.895 -    libdc1394_2
   7.896 -    llrint
   7.897 -    lrint
   7.898 -    lrintf
   7.899 -    machine_ioctl_bt848_h
   7.900 -    machine_ioctl_meteor_h
   7.901 -    malloc_h
   7.902 -    memalign
   7.903 -    mkstemp
   7.904 -    pld
   7.905 -    posix_memalign
   7.906 -    ppc64
   7.907 -    round
   7.908 -    roundf
   7.909 -    sdl
   7.910 -    sdl_video_size
   7.911 -    setmode
   7.912 -    socklen_t
   7.913 -    soundcard_h
   7.914 -    poll_h
   7.915 -    sys_mman_h
   7.916 -    sys_resource_h
   7.917 -    sys_select_h
   7.918 -    sys_soundcard_h
   7.919 -    sys_videoio_h
   7.920 -    ten_operands
   7.921 -    termios_h
   7.922 -    threads
   7.923 -    truncf
   7.924 -    VirtualAlloc
   7.925 -    winsock2_h
   7.926 -    yasm
   7.927 -"
   7.928 -
   7.929 -# options emitted with CONFIG_ prefix but not available on command line
   7.930 -CONFIG_EXTRA="
   7.931 -"
   7.932 -
   7.933 -CMDLINE_SELECT="
   7.934 -    $ARCH_EXT_LIST
   7.935 -    $CONFIG_LIST
   7.936 -    $THREADS_LIST
   7.937 -    cross_compile
   7.938 -    debug
   7.939 -    extra_warnings
   7.940 -    logging
   7.941 -    optimizations
   7.942 -    stripping
   7.943 -    yasm
   7.944 -"
   7.945 -
   7.946 -PATHS_LIST='
   7.947 -    bindir
   7.948 -    datadir
   7.949 -    incdir
   7.950 -    libdir
   7.951 -    mandir
   7.952 -    prefix
   7.953 -    shlibdir
   7.954 -'
   7.955 -
   7.956 -CMDLINE_SET="
   7.957 -    $PATHS_LIST
   7.958 -    arch
   7.959 -    as
   7.960 -    build_suffix
   7.961 -    cc
   7.962 -    cpu
   7.963 -    cross_prefix
   7.964 -    extra_version
   7.965 -    host_cc
   7.966 -    host_cflags
   7.967 -    host_ldflags
   7.968 -    host_libs
   7.969 -    host_os
   7.970 -    logfile
   7.971 -    nm
   7.972 -    source_path
   7.973 -    sysinclude
   7.974 -    sysroot
   7.975 -    target_exec
   7.976 -    target_os
   7.977 -    target_path
   7.978 -"
   7.979 -
   7.980 -# code dependency declarations
   7.981 -
   7.982 -# architecture extensions
   7.983 -altivec_deps="ppc"
   7.984 -amd3dnow_deps="mmx"
   7.985 -amd3dnowext_deps="amd3dnow"
   7.986 -armv5te_deps="arm"
   7.987 -armv6_deps="arm"
   7.988 -armv6t2_deps="arm"
   7.989 -armvfp_deps="arm"
   7.990 -iwmmxt_deps="arm"
   7.991 -mmi_deps="mips"
   7.992 -mmx_deps="x86"
   7.993 -mmx2_deps="mmx"
   7.994 -neon_deps="arm"
   7.995 -ppc4xx_deps="ppc"
   7.996 -sse_deps="mmx"
   7.997 -ssse3_deps="sse"
   7.998 -vis_deps="sparc"
   7.999 -
  7.1000 -# decoders / encoders / hardware accelerators
  7.1001 -aac_decoder_select="fft mdct"
  7.1002 -ac3_decoder_deps="gpl"
  7.1003 -ac3_decoder_select="fft mdct"
  7.1004 -atrac3_decoder_select="fft mdct"
  7.1005 -cavs_decoder_select="golomb"
  7.1006 -cook_decoder_select="fft mdct"
  7.1007 -cscd_decoder_suggest="zlib"
  7.1008 -dca_decoder_select="fft mdct"
  7.1009 -dnxhd_encoder_select="aandct"
  7.1010 -dxa_decoder_select="zlib"
  7.1011 -eac3_decoder_deps="gpl"
  7.1012 -eac3_decoder_select="fft mdct"
  7.1013 -eatgq_decoder_select="aandct"
  7.1014 -eatqi_decoder_select="aandct"
  7.1015 -ffv1_decoder_select="golomb"
  7.1016 -flac_decoder_select="golomb"
  7.1017 -flac_encoder_select="golomb"
  7.1018 -flashsv_decoder_select="zlib"
  7.1019 -flashsv_encoder_select="zlib"
  7.1020 -flv_encoder_select="aandct"
  7.1021 -h261_encoder_select="aandct"
  7.1022 -h263_encoder_select="aandct"
  7.1023 -h263_vaapi_hwaccel_deps="va_va_h"
  7.1024 -h263p_encoder_select="aandct"
  7.1025 -h264_decoder_select="golomb"
  7.1026 -h264_vaapi_hwaccel_deps="va_va_h"
  7.1027 -h264_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
  7.1028 -imc_decoder_select="fft mdct"
  7.1029 -jpegls_decoder_select="golomb"
  7.1030 -jpegls_encoder_select="golomb"
  7.1031 -ljpeg_encoder_select="aandct"
  7.1032 -loco_decoder_select="golomb"
  7.1033 -mjpeg_encoder_select="aandct"
  7.1034 -mpeg1video_encoder_select="aandct"
  7.1035 -mpeg2video_encoder_select="aandct"
  7.1036 -mpeg4_encoder_select="aandct"
  7.1037 -mpeg_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
  7.1038 -mpeg1_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
  7.1039 -mpeg2_vaapi_hwaccel_deps="va_va_h"
  7.1040 -mpeg4_vaapi_hwaccel_deps="va_va_h"
  7.1041 -mpeg_xvmc_decoder_deps="X11_extensions_XvMClib_h"
  7.1042 -msmpeg4v1_encoder_select="aandct"
  7.1043 -msmpeg4v2_encoder_select="aandct"
  7.1044 -msmpeg4v3_encoder_select="aandct"
  7.1045 -nellymoser_decoder_select="fft mdct"
  7.1046 -nellymoser_encoder_select="fft mdct"
  7.1047 -png_decoder_select="zlib"
  7.1048 -png_encoder_select="zlib"
  7.1049 -qdm2_decoder_select="fft mdct rdft"
  7.1050 -rv10_encoder_select="aandct"
  7.1051 -rv20_encoder_select="aandct"
  7.1052 -rv30_decoder_select="golomb"
  7.1053 -rv40_decoder_select="golomb"
  7.1054 -shorten_decoder_select="golomb"
  7.1055 -sonic_decoder_select="golomb"
  7.1056 -sonic_encoder_select="golomb"
  7.1057 -sonic_ls_encoder_select="golomb"
  7.1058 -svq3_decoder_select="golomb"
  7.1059 -svq3_decoder_suggest="zlib"
  7.1060 -tiff_decoder_suggest="zlib"
  7.1061 -tiff_encoder_suggest="zlib"
  7.1062 -tscc_decoder_select="zlib"
  7.1063 -vc1_vaapi_hwaccel_deps="va_va_h"
  7.1064 -vc1_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
  7.1065 -vorbis_decoder_select="fft mdct"
  7.1066 -vorbis_encoder_select="fft mdct"
  7.1067 -wmav1_decoder_select="fft mdct"
  7.1068 -wmav1_encoder_select="fft mdct"
  7.1069 -wmav2_decoder_select="fft mdct"
  7.1070 -wmav2_encoder_select="fft mdct"
  7.1071 -wmv1_encoder_select="aandct"
  7.1072 -wmv2_encoder_select="aandct"
  7.1073 -wmv3_vaapi_hwaccel_deps="va_va_h"
  7.1074 -wmv3_vdpau_decoder_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
  7.1075 -zlib_decoder_select="zlib"
  7.1076 -zlib_encoder_select="zlib"
  7.1077 -zmbv_decoder_select="zlib"
  7.1078 -zmbv_encoder_select="zlib"
  7.1079 -
  7.1080 -# external libraries
  7.1081 -libamr_nb_decoder_deps="libamr_nb"
  7.1082 -libamr_nb_encoder_deps="libamr_nb"
  7.1083 -libamr_wb_decoder_deps="libamr_wb"
  7.1084 -libamr_wb_encoder_deps="libamr_wb"
  7.1085 -libdirac_decoder_deps="libdirac !libschroedinger"
  7.1086 -libdirac_encoder_deps="libdirac"
  7.1087 -libfaac_encoder_deps="libfaac"
  7.1088 -libfaad_decoder_deps="libfaad"
  7.1089 -libfaadbin_decoder_extralibs='$ldl'
  7.1090 -libgsm_decoder_deps="libgsm"
  7.1091 -libgsm_encoder_deps="libgsm"
  7.1092 -libgsm_ms_decoder_deps="libgsm"
  7.1093 -libgsm_ms_encoder_deps="libgsm"
  7.1094 -libmp3lame_encoder_deps="libmp3lame"
  7.1095 -libopenjpeg_decoder_deps="libopenjpeg"
  7.1096 -libschroedinger_decoder_deps="libschroedinger"
  7.1097 -libschroedinger_encoder_deps="libschroedinger"
  7.1098 -libspeex_decoder_deps="libspeex"
  7.1099 -libtheora_encoder_deps="libtheora"
  7.1100 -libvorbis_encoder_deps="libvorbis"
  7.1101 -libx264_encoder_deps="libx264"
  7.1102 -libxvid_encoder_deps="libxvid"
  7.1103 -
  7.1104 -# demuxers / muxers
  7.1105 -ac3_demuxer_deps="ac3_parser"
  7.1106 -alsa_demuxer_deps="alsa_asoundlib_h snd_pcm_htimestamp"
  7.1107 -alsa_demuxer_extralibs="-lasound"
  7.1108 -alsa_muxer_deps="alsa_asoundlib_h"
  7.1109 -alsa_muxer_extralibs="-lasound"
  7.1110 -audio_beos_demuxer_deps="audio_beos"
  7.1111 -audio_beos_demuxer_extralibs="-lmedia -lbe"
  7.1112 -audio_beos_muxer_deps="audio_beos"
  7.1113 -audio_beos_muxer_extralibs="-lmedia -lbe"
  7.1114 -avisynth_demuxer_deps="avisynth"
  7.1115 -bktr_demuxer_deps_any="dev_bktr_ioctl_bt848_h machine_ioctl_bt848_h dev_video_bktr_ioctl_bt848_h dev_ic_bt8xx_h"
  7.1116 -dirac_demuxer_deps="dirac_parser"
  7.1117 -dv1394_demuxer_deps="dv1394 dv_demuxer"
  7.1118 -jack_demuxer_deps="jack_jack_h"
  7.1119 -jack_demuxer_extralibs="-ljack"
  7.1120 -libdc1394_demuxer_deps="libdc1394"
  7.1121 -libnut_demuxer_deps="libnut"
  7.1122 -libnut_muxer_deps="libnut"
  7.1123 -matroska_demuxer_suggest="zlib bzlib"
  7.1124 -mov_demuxer_suggest="zlib"
  7.1125 -mp3_demuxer_deps="mpegaudio_parser"
  7.1126 -oss_demuxer_deps_any="soundcard_h sys_soundcard_h"
  7.1127 -oss_muxer_deps_any="soundcard_h sys_soundcard_h"
  7.1128 -redir_demuxer_deps="network"
  7.1129 -rtp_muxer_deps="network rtp_protocol"
  7.1130 -rtsp_demuxer_deps="sdp_demuxer"
  7.1131 -sdp_demuxer_deps="rtp_protocol mpegts_demuxer"
  7.1132 -v4l_demuxer_deps="linux_videodev_h"
  7.1133 -v4l2_demuxer_deps_any="linux_videodev2_h sys_videoio_h"
  7.1134 -vfwcap_demuxer_deps="capCreateCaptureWindow"
  7.1135 -vfwcap_demuxer_extralibs="-lvfw32"
  7.1136 -x11_grab_device_demuxer_deps="x11grab XShmCreateImage"
  7.1137 -x11_grab_device_demuxer_extralibs="-lX11 -lXext"
  7.1138 -
  7.1139 -# protocols
  7.1140 -gopher_protocol_deps="network"
  7.1141 -http_protocol_deps="network"
  7.1142 -rtp_protocol_deps="udp_protocol"
  7.1143 -tcp_protocol_deps="network"
  7.1144 -udp_protocol_deps="network"
  7.1145 -
  7.1146 -# filters
  7.1147 -movie_filter_deps="avfilter_lavf"
  7.1148 -
  7.1149 -# programs
  7.1150 -ffplay_deps="sdl"
  7.1151 -ffserver_deps="ffm_muxer rtp_protocol rtsp_demuxer"
  7.1152 -ffserver_extralibs='$ldl'
  7.1153 -
  7.1154 -
  7.1155 -# default parameters
  7.1156 -
  7.1157 -logfile="config.err"
  7.1158 -
  7.1159 -# installation paths
  7.1160 -prefix_default="/usr/local"
  7.1161 -bindir_default='${prefix}/bin'
  7.1162 -datadir_default='${prefix}/share/ffmpeg'
  7.1163 -incdir_default='${prefix}/include'
  7.1164 -libdir_default='${prefix}/lib'
  7.1165 -mandir_default='${prefix}/share/man'
  7.1166 -shlibdir_default="$libdir_default"
  7.1167 -
  7.1168 -# toolchain
  7.1169 -ar="ar"
  7.1170 -cc_default="gcc"
  7.1171 -host_cc_default="gcc"
  7.1172 -ln_s="ln -sf"
  7.1173 -nm_default="nm"
  7.1174 -objformat="elf"
  7.1175 -ranlib="ranlib"
  7.1176 -strip="strip"
  7.1177 -yasmexe="yasm"
  7.1178 -
  7.1179 -# machine
  7.1180 -arch=$(uname -m)
  7.1181 -cpu="generic"
  7.1182 -
  7.1183 -# OS
  7.1184 -target_os=$(tolower $(uname -s))
  7.1185 -host_os=$target_os
  7.1186 -
  7.1187 -# configurable options
  7.1188 -enable debug
  7.1189 -enable fastdiv
  7.1190 -enable ffmpeg
  7.1191 -enable ffplay
  7.1192 -enable ffserver
  7.1193 -enable ipv6
  7.1194 -enable mpegaudio_hp
  7.1195 -enable network
  7.1196 -enable optimizations
  7.1197 -enable protocols
  7.1198 -enable static
  7.1199 -enable stripping
  7.1200 -enable swscale_alpha
  7.1201 -
  7.1202 -# build settings
  7.1203 -add_cflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
  7.1204 -SHFLAGS='-shared -Wl,-soname,$$(@F)'
  7.1205 -FFSERVERLDFLAGS=-Wl,-E
  7.1206 -LIBPREF="lib"
  7.1207 -LIBSUF=".a"
  7.1208 -FULLNAME='$(NAME)$(BUILDSUF)'
  7.1209 -LIBNAME='$(LIBPREF)$(FULLNAME)$(LIBSUF)'
  7.1210 -SLIBPREF="lib"
  7.1211 -SLIBSUF=".so"
  7.1212 -SLIBNAME='$(SLIBPREF)$(FULLNAME)$(SLIBSUF)'
  7.1213 -SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
  7.1214 -SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
  7.1215 -LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(LIBDIR)/$(LIBNAME)"'
  7.1216 -
  7.1217 -host_cflags='-O3 -g -Wall'
  7.1218 -host_libs='-lm'
  7.1219 -
  7.1220 -target_path='.'
  7.1221 -
  7.1222 -# gcc stupidly only outputs the basename of targets with -MM, but we need the
  7.1223 -# full relative path for objects in subdirectories for non-recursive Make.
  7.1224 -DEPEND_CMD='$(CC) $(CFLAGS) -MM $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
  7.1225 -
  7.1226 -# find source path
  7.1227 -source_path="$(dirname "$0")"
  7.1228 -enable source_path_used
  7.1229 -if test -z "$source_path" -o "$source_path" = "." ; then
  7.1230 -    source_path="$(pwd)"
  7.1231 -    disable source_path_used
  7.1232 -else
  7.1233 -    source_path="$(cd "$source_path"; pwd)"
  7.1234 -    echo "$source_path" | grep -q '[[:blank:]]' &&
  7.1235 -        die "Out of tree builds are impossible with whitespace in source path."
  7.1236 -    test -e "$source_path/config.h" &&
  7.1237 -        die "Out of tree builds are impossible with config.h in source dir."
  7.1238 -fi
  7.1239 -
  7.1240 -for v in "$@"; do
  7.1241 -    r="${v#*=}"
  7.1242 -    l="${v%$r}"
  7.1243 -    test "$r" = "${r#* }" || r="'$r'"
  7.1244 -    FFMPEG_CONFIGURATION="${FFMPEG_CONFIGURATION# } ${l}${r}"
  7.1245 -done
  7.1246 -
  7.1247 -find_things(){
  7.1248 -    thing=$1
  7.1249 -    pattern=$2
  7.1250 -    file=$source_path/$3
  7.1251 -    sed -n "s/^[^#]*$pattern.*([^,]*, *\([^,]*\)\(,.*\)*).*/\1_$thing/p" "$file"
  7.1252 -}
  7.1253 -
  7.1254 -ENCODER_LIST=$(find_things  encoder  ENC      libavcodec/allcodecs.c)
  7.1255 -DECODER_LIST=$(find_things  decoder  DEC      libavcodec/allcodecs.c)
  7.1256 -HWACCEL_LIST=$(find_things  hwaccel  HWACCEL  libavcodec/allcodecs.c)
  7.1257 -PARSER_LIST=$(find_things   parser   PARSER   libavcodec/allcodecs.c)
  7.1258 -BSF_LIST=$(find_things      bsf      BSF      libavcodec/allcodecs.c)
  7.1259 -MUXER_LIST=$(find_things    muxer    _MUX     libavformat/allformats.c)
  7.1260 -DEMUXER_LIST=$(find_things  demuxer  DEMUX    libavformat/allformats.c)
  7.1261 -OUTDEV_LIST=$(find_things   muxer    _MUX     libavdevice/alldevices.c)
  7.1262 -INDEV_LIST=$(find_things    demuxer  DEMUX    libavdevice/alldevices.c)
  7.1263 -PROTOCOL_LIST=$(find_things protocol PROTOCOL libavformat/allformats.c)
  7.1264 -FILTER_LIST=$(find_things   filter   FILTER   libavfilter/allfilters.c)
  7.1265 -
  7.1266 -enable $ARCH_EXT_LIST \
  7.1267 -       $DECODER_LIST \
  7.1268 -       $ENCODER_LIST \
  7.1269 -       $HWACCEL_LIST \
  7.1270 -       $PARSER_LIST \
  7.1271 -       $BSF_LIST \
  7.1272 -       $DEMUXER_LIST \
  7.1273 -       $MUXER_LIST \
  7.1274 -       $FILTER_LIST \
  7.1275 -       $PROTOCOL_LIST \
  7.1276 -       $INDEV_LIST \
  7.1277 -       $OUTDEV_LIST \
  7.1278 -
  7.1279 -die_unknown(){
  7.1280 -    echo "Unknown option \"$1\"."
  7.1281 -    echo "See $0 --help for available options."
  7.1282 -    exit 1
  7.1283 -}
  7.1284 -
  7.1285 -show_list() {
  7.1286 -    suffix=_$1
  7.1287 -    shift
  7.1288 -    echo $* | sed s/$suffix//g | tr ' ' '\n' | sort
  7.1289 -    exit 0
  7.1290 -}
  7.1291 -
  7.1292 -for opt do
  7.1293 -    optval="${opt#*=}"
  7.1294 -    case "$opt" in
  7.1295 -    --extra-cflags=*) add_cflags $optval
  7.1296 -    ;;
  7.1297 -    --extra-ldflags=*) add_ldflags $optval
  7.1298 -    ;;
  7.1299 -    --extra-libs=*) add_extralibs $optval
  7.1300 -    ;;
  7.1301 -    --disable-devices) disable $INDEV_LIST $OUTDEV_LIST
  7.1302 -    ;;
  7.1303 -    --enable-debug=*) debuglevel="$optval"
  7.1304 -    ;;
  7.1305 -    --enable-*=*|--disable-*=*)
  7.1306 -    eval $(echo "$opt" | sed 's/=/-/;s/--/action=/;s/-/ thing=/;s/-/ name=/')
  7.1307 -    case "$thing" in
  7.1308 -        encoder|decoder|hwaccel|muxer|demuxer|parser|bsf|protocol|filter) $action ${optval}_${thing} ;;
  7.1309 -        *) die_unknown "$opt" ;;
  7.1310 -    esac
  7.1311 -    ;;
  7.1312 -    --enable-?*|--disable-?*)
  7.1313 -    eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')
  7.1314 -    if is_in $option $COMPONENT_LIST; then
  7.1315 -        eval $action \$$(toupper ${option%s})_LIST
  7.1316 -    elif is_in $option $CMDLINE_SELECT; then
  7.1317 -        $action $option
  7.1318 -    else
  7.1319 -        die_unknown $opt
  7.1320 -    fi
  7.1321 -    ;;
  7.1322 -    --list-*)
  7.1323 -        NAME="${opt#--list-}"
  7.1324 -        is_in $NAME $COMPONENT_LIST || die_unknown $opt
  7.1325 -        NAME=${NAME%s}
  7.1326 -        eval show_list $NAME \$$(toupper $NAME)_LIST
  7.1327 -    ;;
  7.1328 -    --help|-h) show_help
  7.1329 -    ;;
  7.1330 -    *)
  7.1331 -    optname="${opt%%=*}"
  7.1332 -    optname="${optname#--}"
  7.1333 -    optname=$(echo "$optname" | sed 's/-/_/g')
  7.1334 -    is_in $optname $CMDLINE_SET || die_unknown $opt
  7.1335 -    eval $optname='$optval'
  7.1336 -    ;;
  7.1337 -    esac
  7.1338 -done
  7.1339 -
  7.1340 -disabled logging && logfile=/dev/null
  7.1341 -
  7.1342 -echo "# $0 $FFMPEG_CONFIGURATION" > $logfile
  7.1343 -set >> $logfile
  7.1344 -
  7.1345 -test -n "$cross_prefix" && enable cross_compile
  7.1346 -
  7.1347 -ar="${cross_prefix}${ar}"
  7.1348 -cc_default="${cross_prefix}${cc_default}"
  7.1349 -nm_default="${cross_prefix}${nm_default}"
  7.1350 -ranlib="${cross_prefix}${ranlib}"
  7.1351 -strip="${cross_prefix}${strip}"
  7.1352 -
  7.1353 -sysinclude_default="${sysroot}/usr/include"
  7.1354 -
  7.1355 -set_default cc nm sysinclude
  7.1356 -as_default=$cc
  7.1357 -enabled cross_compile || host_cc_default=$cc
  7.1358 -set_default host_cc
  7.1359 -
  7.1360 -exesuf() {
  7.1361 -    case $1 in
  7.1362 -        mingw32*|cygwin*|*-dos|freedos|opendos|os/2*) echo .exe ;;
  7.1363 -    esac
  7.1364 -}
  7.1365 -
  7.1366 -EXESUF=$(exesuf $target_os)
  7.1367 -HOSTEXESUF=$(exesuf $host_os)
  7.1368 -
  7.1369 -# set temporary file name
  7.1370 -: ${TMPDIR:=$TEMPDIR}
  7.1371 -: ${TMPDIR:=$TMP}
  7.1372 -: ${TMPDIR:=/tmp}
  7.1373 -
  7.1374 -TMPC="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
  7.1375 -TMPE="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}${EXESUF}"
  7.1376 -TMPH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
  7.1377 -TMPO="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
  7.1378 -TMPS="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
  7.1379 -TMPSH="${TMPDIR}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.sh"
  7.1380 -
  7.1381 -# make sure we can execute files in $TMPDIR
  7.1382 -cat > $TMPSH 2>> $logfile <<EOF
  7.1383 -#! /bin/sh
  7.1384 -EOF
  7.1385 -chmod +x $TMPSH >> $logfile 2>&1
  7.1386 -if ! $TMPSH >> $logfile 2>&1; then
  7.1387 -    cat <<EOF
  7.1388 -Unable to create and execute files in $TMPDIR.  Set the TMPDIR environment
  7.1389 -variable to another directory and make sure that it is not mounted noexec.
  7.1390 -EOF
  7.1391 -    die "Sanity test failed."
  7.1392 -fi
  7.1393 -
  7.1394 -if   $cc --version 2>/dev/null | grep -qi gcc; then
  7.1395 -    cc_type=gcc
  7.1396 -elif $cc --version 2>/dev/null | grep -q Intel; then
  7.1397 -    cc_type=icc
  7.1398 -elif $cc -v 2>&1 | grep -q xlc; then
  7.1399 -    cc_type=xlc
  7.1400 -elif $cc -V 2>/dev/null | grep -q Compaq; then
  7.1401 -    cc_type=ccc
  7.1402 -    DEPEND_CMD='$(CC) $(CFLAGS) -M $< | sed -e "/^\#.*/d" -e "s,^[[:space:]]*$(*F)\\.o,$(@D)/$(*F).o,"'
  7.1403 -    debuglevel=3
  7.1404 -    add_ldflags -Wl,-z,now # calls to libots crash without this
  7.1405 -elif $cc --vsn 2>/dev/null | grep -q RVCT; then
  7.1406 -    test -d "$sysroot" || die "No valid sysroot specified."
  7.1407 -    cc_type=armcc
  7.1408 -    armcc_conf="$PWD/armcc.conf"
  7.1409 -    $cc --arm_linux_configure                 \
  7.1410 -        --arm_linux_config_file="$armcc_conf" \
  7.1411 -        --configure_sysroot="$sysroot"        \
  7.1412 -        --configure_cpp_headers="$sysinclude" >>$logfile 2>&1 ||
  7.1413 -        die "Error creating armcc configuration file."
  7.1414 -    cc="$cc --arm_linux_config_file=$armcc_conf --translate_gcc"
  7.1415 -    as_default="${cross_prefix}gcc"
  7.1416 -fi
  7.1417 -
  7.1418 -test -n "$cc_type" && enable $cc_type || echolog "Unknown C compiler $cc"
  7.1419 -
  7.1420 -set_default as
  7.1421 -
  7.1422 -if test -n "$sysroot"; then
  7.1423 -    case "$cc_type" in
  7.1424 -        gcc)
  7.1425 -            add_cflags  --sysroot="$sysroot"
  7.1426 -            add_ldflags --sysroot="$sysroot"
  7.1427 -        ;;
  7.1428 -    esac
  7.1429 -fi
  7.1430 -
  7.1431 -# compiler sanity check
  7.1432 -check_exec <<EOF
  7.1433 -int main(void){ return 0; }
  7.1434 -EOF
  7.1435 -if test "$?" != 0; then
  7.1436 -    echo "$cc is unable to create an executable file."
  7.1437 -    if test -z "$cross_prefix" && ! enabled cross_compile ; then
  7.1438 -        echo "If $cc is a cross-compiler, use the --enable-cross-compile option."
  7.1439 -        echo "Only do this if you know what cross compiling means."
  7.1440 -    fi
  7.1441 -    die "C compiler test failed."
  7.1442 -fi
  7.1443 -
  7.1444 -check_cflags -std=c99
  7.1445 -check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cflags -D_FILE_OFFSET_BITS=64
  7.1446 -#include <stdlib.h>
  7.1447 -EOF
  7.1448 -check_cc -D_LARGEFILE_SOURCE <<EOF && add_cflags -D_LARGEFILE_SOURCE
  7.1449 -#include <stdlib.h>
  7.1450 -EOF
  7.1451 -
  7.1452 -case "$arch" in
  7.1453 -    alpha)
  7.1454 -        arch="alpha"
  7.1455 -        enable fast_64bit
  7.1456 -        check_cflags -mieee
  7.1457 -    ;;
  7.1458 -    arm|armv[4567]*l)
  7.1459 -        arch="arm"
  7.1460 -    ;;
  7.1461 -    avr32)
  7.1462 -    ;;
  7.1463 -    bfin)
  7.1464 -        arch="bfin"
  7.1465 -    ;;
  7.1466 -    ia64)
  7.1467 -        arch="ia64"
  7.1468 -        enable fast_64bit
  7.1469 -    ;;
  7.1470 -    m68k)
  7.1471 -        arch="m68k"
  7.1472 -    ;;
  7.1473 -    mips|mipsel|IP*)
  7.1474 -        arch="mips"
  7.1475 -    ;;
  7.1476 -    mips64)
  7.1477 -        arch="mips"
  7.1478 -        enable fast_64bit
  7.1479 -    ;;
  7.1480 -    parisc|hppa)
  7.1481 -        arch="parisc"
  7.1482 -    ;;
  7.1483 -    parisc64|hppa64)
  7.1484 -        arch="parisc"
  7.1485 -        enable fast_64bit
  7.1486 -    ;;
  7.1487 -    "Power Macintosh"|ppc|powerpc)
  7.1488 -        arch="ppc"
  7.1489 -        enable fast_unaligned
  7.1490 -    ;;
  7.1491 -    ppc64)
  7.1492 -        arch="ppc"
  7.1493 -        enable fast_64bit
  7.1494 -        enable fast_unaligned
  7.1495 -    ;;
  7.1496 -    s390|s390x)
  7.1497 -        arch="s390"
  7.1498 -    ;;
  7.1499 -    sh4|sh)
  7.1500 -        arch="sh4"
  7.1501 -    ;;
  7.1502 -    sparc)
  7.1503 -        arch="sparc"
  7.1504 -    ;;
  7.1505 -    sun4u|sparc64)
  7.1506 -        arch="sparc"
  7.1507 -        subarch="sparc64"
  7.1508 -        enable fast_64bit
  7.1509 -    ;;
  7.1510 -    i386|i486|i586|i686|i86pc|BePC)
  7.1511 -        arch="x86"
  7.1512 -        subarch="x86_32"
  7.1513 -        enable fast_unaligned
  7.1514 -    ;;
  7.1515 -    x86_64|amd64)
  7.1516 -        arch="x86"
  7.1517 -        subarch="x86_32"
  7.1518 -        enable cmov
  7.1519 -        enable fast_cmov
  7.1520 -        enable fast_unaligned
  7.1521 -        check_cc <<EOF && enable fast_64bit && subarch="x86_64"
  7.1522 -        int test[sizeof(char*) - 7];
  7.1523 -EOF
  7.1524 -    ;;
  7.1525 -    *)
  7.1526 -        arch="unknown"
  7.1527 -    ;;
  7.1528 -esac
  7.1529 -
  7.1530 -enable $arch $subarch
  7.1531 -
  7.1532 -# OS specific
  7.1533 -case $target_os in
  7.1534 -    beos|haiku|zeta)
  7.1535 -        prefix_default="$HOME/config"
  7.1536 -        # helps building libavcodec
  7.1537 -        add_cflags -DPIC -fomit-frame-pointer
  7.1538 -        # 3 gcc releases known for BeOS, each with ugly bugs
  7.1539 -        gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
  7.1540 -        case "$gcc_version" in
  7.1541 -          2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
  7.1542 -            disable mmx
  7.1543 -            ;;
  7.1544 -          *20010315*) echo "BeBits gcc"
  7.1545 -            add_cflags -fno-expensive-optimizations
  7.1546 -            ;;
  7.1547 -        esac
  7.1548 -        SHFLAGS=-nostart
  7.1549 -        # enable BeOS things
  7.1550 -        enable audio_beos
  7.1551 -        # no need for libm, but the inet stuff
  7.1552 -        # Check for BONE
  7.1553 -        # XXX: actually should check for NOT net_server
  7.1554 -        if echo $BEINCLUDES | grep -q 'headers/be/bone'; then
  7.1555 -            network_extralibs="-lbind -lsocket"
  7.1556 -        else
  7.1557 -            enable beos_netserver
  7.1558 -            network_extralibs="-lnet"
  7.1559 -        fi ;;
  7.1560 -    sunos)
  7.1561 -        FFSERVERLDFLAGS=""
  7.1562 -        SHFLAGS='-shared -Wl,-h,$$(@F)'
  7.1563 -        network_extralibs="-lsocket -lnsl"
  7.1564 -        add_cflags -D__EXTENSIONS__
  7.1565 -        ;;
  7.1566 -    netbsd)
  7.1567 -        oss_demuxer_extralibs="-lossaudio"
  7.1568 -        oss_muxer_extralibs="-lossaudio"
  7.1569 -        ;;
  7.1570 -    openbsd)
  7.1571 -        disable need_memalign
  7.1572 -        LIBOBJFLAGS='$(PIC)'
  7.1573 -        SHFLAGS='-shared'
  7.1574 -        oss_demuxer_extralibs="-lossaudio"
  7.1575 -        oss_muxer_extralibs="-lossaudio"
  7.1576 -        ;;
  7.1577 -    freebsd)
  7.1578 -        disable need_memalign
  7.1579 -        ;;
  7.1580 -    bsd/os)
  7.1581 -        osextralibs="-lpoll -lgnugetopt"
  7.1582 -        strip="strip -d"
  7.1583 -        ;;
  7.1584 -    darwin)
  7.1585 -        disable need_memalign
  7.1586 -        SHFLAGS='-dynamiclib -Wl,-single_module -Wl,-install_name,$(SHLIBDIR)/$(SLIBNAME),-current_version,$(LIBVERSION),-compatibility_version,$(LIBMAJOR) -Wl,-read_only_relocs,suppress'
  7.1587 -        strip="strip -x"
  7.1588 -        FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
  7.1589 -        SLIBSUF=".dylib"
  7.1590 -        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME).$(LIBVERSION)$(SLIBSUF)'
  7.1591 -        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME).$(LIBMAJOR)$(SLIBSUF)'
  7.1592 -        FFSERVERLDFLAGS=-Wl,-bind_at_load
  7.1593 -        objformat="macho"
  7.1594 -        enabled x86_64 && objformat="macho64"
  7.1595 -        ;;
  7.1596 -    mingw32*)
  7.1597 -        target_os=mingw32
  7.1598 -        LIBTARGET=i386
  7.1599 -        if enabled x86_64; then
  7.1600 -            disable need_memalign
  7.1601 -            LIBTARGET=x64
  7.1602 -        fi
  7.1603 -        shlibdir_default="$bindir_default"
  7.1604 -        disable ffserver
  7.1605 -        SLIBPREF=""
  7.1606 -        SLIBSUF=".dll"
  7.1607 -        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
  7.1608 -        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
  7.1609 -        SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
  7.1610 -        SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
  7.1611 -            install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"'
  7.1612 -        SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"'
  7.1613 -        SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
  7.1614 -        objformat="win32"
  7.1615 -        enable dos_paths
  7.1616 -        if ! enabled x86_64; then
  7.1617 -            check_cpp_condition _mingw.h "(__MINGW32_MAJOR_VERSION > 3) || (__MINGW32_MAJOR_VERSION == 3 && __MINGW32_MINOR_VERSION >= 15)" ||
  7.1618 -                die "ERROR: MinGW runtime version must be >= 3.15."
  7.1619 -            enabled_any avisynth vfwcap_demuxer &&
  7.1620 -                { check_cpp_condition w32api.h "(__W32API_MAJOR_VERSION > 3) || (__W32API_MAJOR_VERSION == 3 && __W32API_MINOR_VERSION >= 13)" ||
  7.1621 -                  die "ERROR: avisynth and vfwcap_demuxer require w32api version 3.13 or later."; }
  7.1622 -            fi
  7.1623 -        ;;
  7.1624 -    cygwin*)
  7.1625 -        target_os=cygwin
  7.1626 -        shlibdir_default="$bindir_default"
  7.1627 -        SLIBPREF="cyg"
  7.1628 -        SLIBSUF=".dll"
  7.1629 -        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
  7.1630 -        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
  7.1631 -        SHFLAGS='-shared -Wl,--enable-auto-image-base'
  7.1632 -        objformat="win32"
  7.1633 -        enable dos_paths
  7.1634 -        ;;
  7.1635 -    *-dos|freedos|opendos)
  7.1636 -        disable ffplay ffserver
  7.1637 -        disable $INDEV_LIST $OUTDEV_LIST
  7.1638 -        network_extralibs="-lsocket"
  7.1639 -        objformat="coff"
  7.1640 -        enable dos_paths
  7.1641 -        ;;
  7.1642 -    linux)
  7.1643 -        enable dv1394
  7.1644 -        ;;
  7.1645 -    irix*)
  7.1646 -        target_os=irix
  7.1647 -        ranlib="echo ignoring ranlib"
  7.1648 -        ;;
  7.1649 -    os/2*)
  7.1650 -        strip="lxlite"
  7.1651 -        ln_s="cp -f"
  7.1652 -        FFLDFLAGS="-Zomf -Zbin-files -Zargs-wild -Zmap"
  7.1653 -        SHFLAGS='$(SUBDIR)$(NAME).def -Zdll -Zomf'
  7.1654 -        FFSERVERLDFLAGS=""
  7.1655 -        LIBSUF="_s.a"
  7.1656 -        SLIBPREF=""
  7.1657 -        SLIBSUF=".dll"
  7.1658 -        SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
  7.1659 -        SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(shell echo $(NAME) | cut -c1-6)$(LIBMAJOR)$(SLIBSUF)'
  7.1660 -        SLIB_CREATE_DEF_CMD='echo LIBRARY $(SLIBNAME_WITH_MAJOR) INITINSTANCE TERMINSTANCE > $(SUBDIR)$(NAME).def; \
  7.1661 -          echo PROTMODE >> $(SUBDIR)$(NAME).def; \
  7.1662 -          echo CODE PRELOAD MOVEABLE DISCARDABLE >> $(SUBDIR)$(NAME).def; \
  7.1663 -          echo DATA PRELOAD MOVEABLE MULTIPLE NONSHARED >> $(SUBDIR)$(NAME).def; \
  7.1664 -          echo EXPORTS >> $(SUBDIR)$(NAME).def; \
  7.1665 -          emxexp -o $(OBJS) >> $(SUBDIR)$(NAME).def'
  7.1666 -        SLIB_EXTRA_CMD='emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(NAME).def; \
  7.1667 -          emximp -o $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib $(SUBDIR)$(NAME).def;'
  7.1668 -        SLIB_INSTALL_EXTRA_CMD='install -m 644 $(SUBDIR)$(LIBPREF)$(NAME)_dll.a $(SUBDIR)$(LIBPREF)$(NAME)_dll.lib "$(LIBDIR)"'
  7.1669 -        SLIB_UNINSTALL_EXTRA_CMD='rm -f "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.a "$(LIBDIR)"/$(LIBPREF)$(NAME)_dll.lib'
  7.1670 -        enable dos_paths
  7.1671 -        ;;
  7.1672 -
  7.1673 -    *)
  7.1674 -        die "Unknown OS '$target_os'."
  7.1675 -        ;;
  7.1676 -esac
  7.1677 -
  7.1678 -set_default $PATHS_LIST
  7.1679 -
  7.1680 -add_extralibs $osextralibs
  7.1681 -
  7.1682 -# Combine FFLDFLAGS and the LDFLAGS environment variable.
  7.1683 -LDFLAGS="$FFLDFLAGS $LDFLAGS"
  7.1684 -
  7.1685 -# we need to build at least one lib type
  7.1686 -if ! enabled_any static shared; then
  7.1687 -    cat <<EOF
  7.1688 -At least one library type must be built.
  7.1689 -Specify --enable-static to build the static libraries or --enable-shared to
  7.1690 -build the shared libraries as well. To only build the shared libraries specify
  7.1691 ---disable-static in addition to --enable-shared.
  7.1692 -EOF
  7.1693 -    exit 1;
  7.1694 -fi
  7.1695 -
  7.1696 -disabled static && LIBNAME=""
  7.1697 -
  7.1698 -if enabled_any libfaad libfaadbin ; then
  7.1699 -    if check_header faad.h; then
  7.1700 -        check_cc <<EOF
  7.1701 -#include <faad.h>
  7.1702 -#ifndef FAAD2_VERSION
  7.1703 -ok faad1
  7.1704 -#endif
  7.1705 -int main(void) { return 0; }
  7.1706 -EOF
  7.1707 -        test $? = 0 && enable libfaad2
  7.1708 -    else
  7.1709 -        die "FAAD test failed."
  7.1710 -    fi
  7.1711 -fi
  7.1712 -
  7.1713 -
  7.1714 -if ! enabled gpl; then
  7.1715 -    die_gpl_disabled(){
  7.1716 -        name=$1
  7.1717 -        shift
  7.1718 -        enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
  7.1719 -    }
  7.1720 -    die_gpl_disabled "The Postprocessing code" postproc
  7.1721 -    die_gpl_disabled "libx264"                 libx264
  7.1722 -    die_gpl_disabled "libxvidcore"             libxvid
  7.1723 -    die_gpl_disabled "FAAD2"                   libfaad2
  7.1724 -    die_gpl_disabled "The X11 grabber"         x11grab
  7.1725 -fi
  7.1726 -
  7.1727 -if ! enabled nonfree && enabled_any libamr_nb libamr_wb; then
  7.1728 -    die "libamr is nonfree and --enable-nonfree is not specified."
  7.1729 -fi
  7.1730 -
  7.1731 -check_deps $ARCH_EXT_LIST
  7.1732 -
  7.1733 -test -z "$need_memalign" && need_memalign="$mmx"
  7.1734 -
  7.1735 -#Darwin CC versions
  7.1736 -if test $target_os = darwin; then
  7.1737 -    if enabled xlc; then
  7.1738 -        add_cflags -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto
  7.1739 -    else
  7.1740 -        add_cflags -pipe
  7.1741 -        check_cflags -force_cpusubtype_ALL
  7.1742 -        check_cflags -Wno-sign-compare
  7.1743 -        enabled shared || check_cflags -mdynamic-no-pic
  7.1744 -    fi
  7.1745 -fi
  7.1746 -
  7.1747 -disabled optimizations || check_cflags -fomit-frame-pointer
  7.1748 -
  7.1749 -# Add processor-specific flags
  7.1750 -if test $cpu != "generic"; then
  7.1751 -    warn_altivec(){
  7.1752 -        $1 altivec && echo "WARNING: Tuning for $2 but AltiVec $1.";
  7.1753 -    }
  7.1754 -    case $cpu in
  7.1755 -        601|ppc601|PowerPC601)
  7.1756 -            add_cflags -mcpu=601
  7.1757 -            warn_altivec enabled PPC601
  7.1758 -        ;;
  7.1759 -        603*|ppc603*|PowerPC603*)
  7.1760 -            add_cflags -mcpu=603
  7.1761 -            warn_altivec enabled PPC603
  7.1762 -        ;;
  7.1763 -        604*|ppc604*|PowerPC604*)
  7.1764 -            add_cflags -mcpu=604
  7.1765 -            warn_altivec enabled PPC604
  7.1766 -        ;;
  7.1767 -        G3|g3|75*|ppc75*|PowerPC75*)
  7.1768 -            add_cflags -mcpu=750 -mpowerpc-gfxopt
  7.1769 -            warn_altivec enabled PPC75x
  7.1770 -        ;;
  7.1771 -        G4|g4|745*|ppc745*|PowerPC745*)
  7.1772 -            add_cflags -mcpu=7450 -mpowerpc-gfxopt
  7.1773 -            warn_altivec disabled PPC745x
  7.1774 -        ;;
  7.1775 -        74*|ppc74*|PowerPC74*)
  7.1776 -            add_cflags -mcpu=7400 -mpowerpc-gfxopt
  7.1777 -            warn_altivec disabled PPC74xx
  7.1778 -        ;;
  7.1779 -        G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
  7.1780 -            add_cflags -mcpu=970 -mpowerpc-gfxopt -mpowerpc64
  7.1781 -            warn_altivec disabled PPC970
  7.1782 -            enable ppc64
  7.1783 -        ;;
  7.1784 -        Cell|CELL|cell)
  7.1785 -            add_cflags -mcpu=cell
  7.1786 -            warn_altivec disabled Cell
  7.1787 -            enable ppc64
  7.1788 -        ;;
  7.1789 -        # targets that do NOT support conditional mov (cmov)
  7.1790 -        i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
  7.1791 -            add_cflags -march=$cpu
  7.1792 -            disable cmov
  7.1793 -        ;;
  7.1794 -        # targets that do support conditional mov (cmov)
  7.1795 -        i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx|core2)
  7.1796 -            add_cflags -march=$cpu
  7.1797 -            enable cmov
  7.1798 -            enable fast_cmov
  7.1799 -        ;;
  7.1800 -        # targets that do support conditional mov but on which it's slow
  7.1801 -        pentium4|pentium4m|prescott|nocona)
  7.1802 -            add_cflags -march=$cpu
  7.1803 -            enable cmov
  7.1804 -            disable fast_cmov
  7.1805 -        ;;
  7.1806 -        sparc64)
  7.1807 -            add_cflags -mcpu=v9
  7.1808 -        ;;
  7.1809 -        arm11*|cortex*)
  7.1810 -            add_cflags -mcpu=$cpu
  7.1811 -            enable fast_unaligned
  7.1812 -        ;;
  7.1813 -        armv*)
  7.1814 -            add_cflags -march=$cpu
  7.1815 -        ;;
  7.1816 -        arm*)
  7.1817 -            add_cflags -mcpu=$cpu
  7.1818 -        ;;
  7.1819 -        ev4|ev45|ev5|ev56|pca56|ev6|ev67)
  7.1820 -            enabled ccc && add_cflags -arch $cpu || add_cflags -mcpu=$cpu
  7.1821 -        ;;
  7.1822 -        *)
  7.1823 -            echo "WARNING: Unknown CPU \"$cpu\", ignored."
  7.1824 -        ;;
  7.1825 -    esac
  7.1826 -fi
  7.1827 -
  7.1828 -check_cc <<EOF || die "Symbol mangling check failed."
  7.1829 -int ff_extern;
  7.1830 -EOF
  7.1831 -sym=$($nm -P -g $TMPO | grep ff_extern)
  7.1832 -extern_prefix=${sym%%ff_extern*}
  7.1833 -
  7.1834 -check_cc <<EOF && enable inline_asm
  7.1835 -void foo(void) { __asm__ volatile ("" ::); }
  7.1836 -EOF
  7.1837 -
  7.1838 -if enabled x86; then
  7.1839 -    # check whether EBP is available on x86
  7.1840 -    # As 'i' is stored on the stack, this program will crash
  7.1841 -    # if the base pointer is used to access it because the
  7.1842 -    # base pointer is cleared in the inline assembly code.
  7.1843 -    check_exec_crash <<EOF && enable ebp_available
  7.1844 -    volatile int i=0;
  7.1845 -    __asm__ volatile (
  7.1846 -        "xorl %%ebp, %%ebp"
  7.1847 -    ::: "%ebp");
  7.1848 -    return i;
  7.1849 -EOF
  7.1850 -
  7.1851 -    # check wether EBX is available on x86
  7.1852 -    check_asm ebx_available '"":::"%ebx"'
  7.1853 -
  7.1854 -    # check whether more than 10 operands are supported
  7.1855 -    check_cc <<EOF && enable ten_operands
  7.1856 -int main(void) {
  7.1857 -    int x=0;
  7.1858 -    __asm__ volatile(
  7.1859 -        ""
  7.1860 -        :"+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x), "+&rm"(x)
  7.1861 -    );
  7.1862 -    return 0;
  7.1863 -}
  7.1864 -EOF
  7.1865 -
  7.1866 -    # check whether binutils is new enough to compile SSSE3/MMX2
  7.1867 -    enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
  7.1868 -    enabled mmx2  && check_asm mmx2  '"pmaxub %mm0, %mm1"'
  7.1869 -
  7.1870 -    check_asm bswap '"bswap %%eax" ::: "%eax"'
  7.1871 -
  7.1872 -    YASMFLAGS="-f $objformat -DARCH_$(toupper $subarch)"
  7.1873 -    enabled     x86_64        && append YASMFLAGS "-m amd64"
  7.1874 -    enabled_all x86_64 shared && append YASMFLAGS "-DPIC"
  7.1875 -    case "$objformat" in
  7.1876 -        elf) enabled debug && append YASMFLAGS "-g dwarf2" ;;
  7.1877 -        macho64)              append YASMFLAGS "-DPIC -DPREFIX" ;;
  7.1878 -        *)                    append YASMFLAGS "-DPREFIX"  ;;
  7.1879 -    esac
  7.1880 -    disabled yasm || { check_yasm "pabsw xmm0, xmm0" && enable yasm; }
  7.1881 -fi
  7.1882 -
  7.1883 -# check for assembler specific support
  7.1884 -
  7.1885 -enabled ppc && check_asm dcbzl '"dcbzl 0, 1"'
  7.1886 -enabled ppc && check_asm ppc4xx '"maclhw r10, r11, r12"'
  7.1887 -
  7.1888 -# check for SIMD availability
  7.1889 -
  7.1890 -# AltiVec flags: The FSF version of GCC differs from the Apple version
  7.1891 -if enabled altivec; then
  7.1892 -    check_cflags -maltivec -mabi=altivec &&
  7.1893 -        { check_header altivec.h && inc_altivec_h="#include <altivec.h>" ; } ||
  7.1894 -        check_cflags -faltivec
  7.1895 -
  7.1896 -    # check if our compiler supports Motorola AltiVec C API
  7.1897 -    check_cc <<EOF || disable altivec
  7.1898 -$inc_altivec_h
  7.1899 -int main(void) {
  7.1900 -    vector signed int v1, v2, v3;
  7.1901 -    v1 = vec_add(v2,v3);
  7.1902 -    return 0;
  7.1903 -}
  7.1904 -EOF
  7.1905 -
  7.1906 -    # check if our compiler supports braces for vector declarations
  7.1907 -    check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations."
  7.1908 -$inc_altivec_h
  7.1909 -int main (void) { (vector int) {1}; return 0; }
  7.1910 -EOF
  7.1911 -fi
  7.1912 -
  7.1913 -# We have to check if pld is a nop and disable it.
  7.1914 -enabled arm     && check_asm pld     '"pld [r0]"'
  7.1915 -enabled armv5te && check_asm armv5te '"qadd r0, r0, r0"'
  7.1916 -enabled armv6   && check_asm armv6   '"sadd16 r0, r0, r0"'
  7.1917 -enabled armv6t2 && check_asm armv6t2 '"movt r0, #0"'
  7.1918 -enabled armvfp  && check_asm armvfp  '"fadds s0, s0, s0"'
  7.1919 -enabled iwmmxt  && check_asm iwmmxt  '"wunpckelub wr6, wr4"'
  7.1920 -enabled mmi     && check_asm mmi     '"lq $2, 0($2)"'
  7.1921 -enabled neon    && check_asm neon    '"vadd.i16 q0, q0, q0"'
  7.1922 -enabled vis     && check_asm vis     '"pdist %f0, %f0, %f0"' -mcpu=ultrasparc
  7.1923 -
  7.1924 -enabled vis && add_cflags -mcpu=ultrasparc -mtune=ultrasparc
  7.1925 -
  7.1926 -# ---
  7.1927 -# big/little-endian test
  7.1928 -check_cc <<EOF || die "endian test failed"
  7.1929 -unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
  7.1930 -EOF
  7.1931 -od -A n -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
  7.1932 -
  7.1933 -# ---
  7.1934 -# check availability of some header files
  7.1935 -
  7.1936 -if check_func dlopen; then
  7.1937 -    ldl=
  7.1938 -elif check_func dlopen -ldl; then
  7.1939 -    ldl=-ldl
  7.1940 -fi
  7.1941 -
  7.1942 -# Solaris has nanosleep in -lrt, OpenSolaris no longer needs that
  7.1943 -check_func nanosleep || { check_func nanosleep -lrt && add_extralibs -lrt; }
  7.1944 -
  7.1945 -check_func  fork
  7.1946 -check_func  gethrtime
  7.1947 -check_func  getrusage
  7.1948 -check_func  inet_aton $network_extralibs
  7.1949 -check_func  memalign
  7.1950 -check_func  mkstemp
  7.1951 -check_func  posix_memalign
  7.1952 -check_func_headers io.h setmode
  7.1953 -check_func_headers windows.h GetProcessTimes
  7.1954 -check_func_headers windows.h VirtualAlloc
  7.1955 -
  7.1956 -check_header conio.h
  7.1957 -check_header dlfcn.h
  7.1958 -check_header malloc.h
  7.1959 -check_header poll.h
  7.1960 -check_header sys/mman.h
  7.1961 -check_header sys/resource.h
  7.1962 -check_header sys/select.h
  7.1963 -check_header termios.h
  7.1964 -check_header vdpau/vdpau.h
  7.1965 -check_header vdpau/vdpau_x11.h
  7.1966 -check_header X11/extensions/XvMClib.h
  7.1967 -
  7.1968 -if ! enabled_any memalign memalign_hack posix_memalign && enabled need_memalign ; then
  7.1969 -    die "Error, no aligned memory allocator but SSE enabled, disable it or use --enable-memalign-hack."
  7.1970 -fi
  7.1971 -
  7.1972 -disabled  zlib || check_lib   zlib.h      zlibVersion -lz   || disable  zlib
  7.1973 -disabled bzlib || check_lib2 bzlib.h BZ2_bzlibVersion -lbz2 || disable bzlib
  7.1974 -
  7.1975 -# check for some common methods of building with pthread support
  7.1976 -# do this before the optional library checks as some of them require pthreads
  7.1977 -if enabled pthreads; then
  7.1978 -    if check_func pthread_create; then
  7.1979 -        :
  7.1980 -    elif check_func pthread_create -pthread; then
  7.1981 -        add_cflags -pthread
  7.1982 -        add_extralibs -pthread
  7.1983 -    elif check_func pthread_create -pthreads; then
  7.1984 -        add_cflags -pthreads
  7.1985 -        add_extralibs -pthreads
  7.1986 -    elif check_func pthread_create -lpthreadGC2; then
  7.1987 -        add_extralibs -lpthreadGC2
  7.1988 -    elif ! check_lib pthread.h pthread_create -lpthread; then
  7.1989 -        die "ERROR: can't find pthreads library"
  7.1990 -    fi
  7.1991 -fi
  7.1992 -
  7.1993 -for thread in $THREADS_LIST; do
  7.1994 -    if enabled $thread; then
  7.1995 -        test -n "$thread_type" &&
  7.1996 -            die "ERROR: Only one thread type must be selected." ||
  7.1997 -            thread_type="$thread"
  7.1998 -    fi
  7.1999 -done
  7.2000 -
  7.2001 -check_lib math.h sin -lm
  7.2002 -check_lib va/va.h vaInitialize -lva
  7.2003 -
  7.2004 -# test for C99 functions in math.h
  7.2005 -for func in llrint lrint lrintf round roundf truncf; do
  7.2006 -    check_exec <<EOF && enable $func || disable $func
  7.2007 -#include <math.h>
  7.2008 -int main(void) { return ($func(3.999f) > 0)?0:1; }
  7.2009 -EOF
  7.2010 -done
  7.2011 -
  7.2012 -# these are off by default, so fail if requested and not available
  7.2013 -enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lvfw32
  7.2014 -enabled libamr_nb  && require  libamrnb amrnb/interf_dec.h Speech_Decode_Frame_init -lamrnb -lm
  7.2015 -enabled libamr_wb  && require  libamrwb amrwb/dec_if.h D_IF_init -lamrwb -lm
  7.2016 -enabled libdirac   && add_cflags $(pkg-config --cflags dirac) &&
  7.2017 -                      require  libdirac libdirac_decoder/dirac_parser.h dirac_decoder_init -ldirac_decoder &&
  7.2018 -                      require  libdirac libdirac_encoder/dirac_encoder.h dirac_encoder_init -ldirac_encoder
  7.2019 -enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
  7.2020 -enabled libfaad    && require2 libfaad faad.h faacDecOpen -lfaad
  7.2021 -enabled libgsm     && require  libgsm gsm.h gsm_create -lgsm
  7.2022 -enabled libmp3lame && require  libmp3lame lame/lame.h lame_init -lmp3lame -lm
  7.2023 -enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
  7.2024 -enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
  7.2025 -enabled libschroedinger && add_cflags $(pkg-config --cflags schroedinger-1.0) &&
  7.2026 -                           require libschroedinger schroedinger/schro.h schro_init $(pkg-config --libs schroedinger-1.0)
  7.2027 -enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
  7.2028 -enabled libtheora  && require  libtheora theora/theora.h theora_info_init -ltheora -logg
  7.2029 -enabled libvorbis  && require  libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbisenc -lvorbis -logg
  7.2030 -enabled libx264    && require  libx264 x264.h x264_encoder_open -lx264 -lm &&
  7.2031 -                      { check_cpp_condition x264.h "X264_BUILD >= 65" ||
  7.2032 -                        die "ERROR: libx264 version must be >= 0.65."; }
  7.2033 -enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
  7.2034 -enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
  7.2035 -
  7.2036 -# libdc1394 check
  7.2037 -if enabled libdc1394; then
  7.2038 -    { check_lib dc1394/dc1394.h dc1394_new -ldc1394 -lraw1394 &&
  7.2039 -        enable libdc1394_2; } ||
  7.2040 -    { check_lib libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 &&
  7.2041 -        enable libdc1394_1; } ||
  7.2042 -    die "ERROR: No version of libdc1394 found "
  7.2043 -fi
  7.2044 -
  7.2045 -
  7.2046 -_restrict=
  7.2047 -for restrict_keyword in restrict __restrict__ __restrict; do
  7.2048 -    check_cc <<EOF && _restrict=$restrict_keyword && break
  7.2049 -void foo(char * $restrict_keyword p);
  7.2050 -EOF
  7.2051 -done
  7.2052 -
  7.2053 -##########################################
  7.2054 -# SDL check
  7.2055 -
  7.2056 -disable sdl_too_old
  7.2057 -disable sdl
  7.2058 -SDL_CONFIG="${cross_prefix}sdl-config"
  7.2059 -if "${SDL_CONFIG}" --version > /dev/null 2>&1; then
  7.2060 -    sdl_cflags=$("${SDL_CONFIG}" --cflags)
  7.2061 -    temp_cflags $sdl_cflags
  7.2062 -    temp_extralibs $("${SDL_CONFIG}" --libs)
  7.2063 -    if check_lib2 SDL.h SDL_Init; then
  7.2064 -        _sdlversion=$("${SDL_CONFIG}" --version | sed 's/[^0-9]//g')
  7.2065 -        if test "$_sdlversion" -lt 121 ; then
  7.2066 -            enable sdl_too_old
  7.2067 -        else
  7.2068 -            enable sdl
  7.2069 -            check_cc $sdl_cflags <<EOF && enable sdl_video_size
  7.2070 -#include <SDL.h>
  7.2071 -int main(int argc, char **argv){
  7.2072 -    const SDL_VideoInfo *vi = SDL_GetVideoInfo();
  7.2073 -    int w = vi->current_w;
  7.2074 -    return 0;
  7.2075 -}
  7.2076 -EOF
  7.2077 -        fi
  7.2078 -    fi
  7.2079 -    restore_flags
  7.2080 -fi
  7.2081 -
  7.2082 -texi2html -version > /dev/null 2>&1 && enable texi2html || disable texi2html
  7.2083 -
  7.2084 -##########################################
  7.2085 -# Network check
  7.2086 -
  7.2087 -if enabled network; then
  7.2088 -    check_type "sys/types.h sys/socket.h" socklen_t
  7.2089 -    # Prefer arpa/inet.h over winsock2
  7.2090 -    if check_header arpa/inet.h ; then
  7.2091 -        check_func closesocket
  7.2092 -    elif check_header winsock2.h ; then
  7.2093 -        network_extralibs="-lws2_32"
  7.2094 -        check_type ws2tcpip.h socklen_t
  7.2095 -        check_func_headers winsock2.h closesocket
  7.2096 -    fi
  7.2097 -fi
  7.2098 -
  7.2099 -##########################################
  7.2100 -# IPv6 check
  7.2101 -
  7.2102 -enabled network && enabled ipv6 && check_ld <<EOF && enable ipv6 || disable ipv6
  7.2103 -#include <sys/types.h>
  7.2104 -#include <sys/socket.h>
  7.2105 -#include <netinet/in.h>
  7.2106 -#include <netdb.h>
  7.2107 -int main(void) {
  7.2108 -    struct sockaddr_storage saddr;
  7.2109 -    struct ipv6_mreq mreq6;
  7.2110 -    getaddrinfo(0,0,0,0);
  7.2111 -    getnameinfo(0,0,0,0,0,0,0);
  7.2112 -    IN6_IS_ADDR_MULTICAST((const struct in6_addr *)0);
  7.2113 -}
  7.2114 -EOF
  7.2115 -
  7.2116 -check_header linux/videodev.h
  7.2117 -check_header linux/videodev2.h
  7.2118 -check_header sys/videoio.h
  7.2119 -
  7.2120 -check_func_headers "windows.h vfw.h" capCreateCaptureWindow -lvfw32
  7.2121 -
  7.2122 -# check for ioctl_meteor.h, ioctl_bt848.h and alternatives
  7.2123 -{ check_header dev/bktr/ioctl_meteor.h &&
  7.2124 -  check_header dev/bktr/ioctl_bt848.h; } ||
  7.2125 -{ check_header machine/ioctl_meteor.h &&
  7.2126 -  check_header machine/ioctl_bt848.h; } ||
  7.2127 -{ check_header dev/video/meteor/ioctl_meteor.h &&
  7.2128 -  check_header dev/video/bktr/ioctl_bt848.h; } ||
  7.2129 -check_header dev/ic/bt8xx.h
  7.2130 -
  7.2131 -check_header sys/soundcard.h
  7.2132 -check_header soundcard.h
  7.2133 -
  7.2134 -check_lib2 alsa/asoundlib.h snd_pcm_htimestamp -lasound
  7.2135 -
  7.2136 -check_lib2 jack/jack.h jack_client_open -ljack
  7.2137 -
  7.2138 -# deal with the X11 frame grabber
  7.2139 -enabled x11grab                         &&
  7.2140 -check_header X11/Xlib.h                 &&
  7.2141 -check_header X11/extensions/XShm.h      &&
  7.2142 -check_func XOpenDisplay -lX11           &&
  7.2143 -check_func XShmCreateImage -lX11 -lXext
  7.2144 -
  7.2145 -enabled debug && add_cflags -g"$debuglevel"
  7.2146 -
  7.2147 -# add some useful compiler flags if supported
  7.2148 -check_cflags -Wdeclaration-after-statement
  7.2149 -check_cflags -Wall
  7.2150 -check_cflags -Wno-switch
  7.2151 -check_cflags -Wdisabled-optimization
  7.2152 -check_cflags -Wpointer-arith
  7.2153 -check_cflags -Wredundant-decls
  7.2154 -check_cflags -Wno-pointer-sign
  7.2155 -check_cflags -Wcast-qual
  7.2156 -check_cflags -Wwrite-strings
  7.2157 -check_cflags -Wtype-limits
  7.2158 -check_cflags -Wundef
  7.2159 -enabled extra_warnings && check_cflags -Winline
  7.2160 -
  7.2161 -# add some linker flags
  7.2162 -check_ldflags -Wl,--warn-common
  7.2163 -check_ldflags -Wl,--as-needed
  7.2164 -check_ldflags '-Wl,-rpath-link,\$(BUILD_ROOT)/libpostproc -Wl,-rpath-link,\$(BUILD_ROOT)/libswscale -Wl,-rpath-link,\$(BUILD_ROOT)/libavfilter -Wl,-rpath-link,\$(BUILD_ROOT)/libavdevice -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
  7.2165 -check_ldflags -Wl,-Bsymbolic
  7.2166 -
  7.2167 -if enabled small; then
  7.2168 -    check_cflags -Os            # not all compilers support -Os
  7.2169 -    optimizations="small"
  7.2170 -elif enabled optimizations; then
  7.2171 -    if enabled xlc; then
  7.2172 -        add_cflags  -O5
  7.2173 -        add_ldflags -O5
  7.2174 -    elif enabled ccc; then
  7.2175 -        add_cflags -fast
  7.2176 -    else
  7.2177 -        add_cflags -O3
  7.2178 -    fi
  7.2179 -fi
  7.2180 -check_cflags -fno-math-errno
  7.2181 -check_cflags -fno-signed-zeros
  7.2182 -
  7.2183 -# add some flags for Intel C Compiler
  7.2184 -if enabled icc; then
  7.2185 -    # Just warnings, no remarks
  7.2186 -    check_cflags -w1
  7.2187 -    # -wd: Disable following warnings
  7.2188 -    # 144, 167, 556: -Wno-pointer-sign
  7.2189 -    # 10006: ignoring unknown option -fno-signed-zeros
  7.2190 -    # 10156: ignoring option '-W'; no argument required
  7.2191 -    check_cflags -wd144,167,556,10006,10156
  7.2192 -    # 11030: Warning unknown option --as-needed
  7.2193 -    # 10156: ignoring option '-export'; no argument required
  7.2194 -    check_ldflags -wd10156,11030
  7.2195 -    # Allow to compile with optimizations
  7.2196 -    check_ldflags -march=$cpu
  7.2197 -    # icc 11.0 and 11.1 work with ebp_available, but don't pass the test
  7.2198 -    enable ebp_available
  7.2199 -elif enabled ccc; then
  7.2200 -    # disable some annoying warnings
  7.2201 -    add_cflags -msg_disable cvtu32to64
  7.2202 -    add_cflags -msg_disable embedcomment
  7.2203 -    add_cflags -msg_disable needconstext
  7.2204 -    add_cflags -msg_disable nomainieee
  7.2205 -    add_cflags -msg_disable ptrmismatch1
  7.2206 -    add_cflags -msg_disable unreachcode
  7.2207 -fi
  7.2208 -
  7.2209 -# PIC flags for shared library objects where they are needed
  7.2210 -if enabled shared; then
  7.2211 -    # LIBOBJFLAGS may have already been set in the OS configuration
  7.2212 -    if test -z "$LIBOBJFLAGS" ; then
  7.2213 -        case "${subarch-$arch}" in
  7.2214 -            x86_64|ia64|alpha|sparc*|power*|parisc*|mips*) LIBOBJFLAGS='$(PIC)' ;;
  7.2215 -        esac
  7.2216 -    fi
  7.2217 -fi
  7.2218 -
  7.2219 -if enabled gprof; then
  7.2220 -    add_cflags  -p
  7.2221 -    add_ldflags -p
  7.2222 -fi
  7.2223 -
  7.2224 -# Find out if the .align argument is a power of two or not.
  7.2225 -check_asm asmalign_pot '".align 3"'
  7.2226 -
  7.2227 -enabled_any $DECODER_LIST      && enable decoders
  7.2228 -enabled_any $ENCODER_LIST      && enable encoders
  7.2229 -enabled_any $HWACCEL_LIST      && enable hwaccels
  7.2230 -enabled_any $BSF_LIST          && enable bsfs
  7.2231 -enabled_any $DEMUXER_LIST      && enable demuxers
  7.2232 -enabled_any $MUXER_LIST        && enable muxers
  7.2233 -enabled_any $FILTER_LIST       && enable filters
  7.2234 -enabled_any $INDEV_LIST        && enable demuxers
  7.2235 -enabled_any $OUTDEV_LIST       && enable muxers
  7.2236 -enabled_any $PROTOCOL_LIST     && enable protocols
  7.2237 -
  7.2238 -enabled_any $THREADS_LIST      && enable threads
  7.2239 -
  7.2240 -check_deps $CONFIG_LIST       \
  7.2241 -           $CONFIG_EXTRA      \
  7.2242 -           $HAVE_LIST         \
  7.2243 -           $DECODER_LIST      \
  7.2244 -           $ENCODER_LIST      \
  7.2245 -           $HWACCEL_LIST      \
  7.2246 -           $PARSER_LIST       \
  7.2247 -           $BSF_LIST          \
  7.2248 -           $DEMUXER_LIST      \
  7.2249 -           $MUXER_LIST        \
  7.2250 -           $FILTER_LIST       \
  7.2251 -           $INDEV_LIST        \
  7.2252 -           $OUTDEV_LIST       \
  7.2253 -           $PROTOCOL_LIST     \
  7.2254 -
  7.2255 -echo "install prefix            $prefix"
  7.2256 -echo "source path               $source_path"
  7.2257 -echo "C compiler                $cc"
  7.2258 -echo ".align is power-of-two    $asmalign_pot"
  7.2259 -echo "ARCH                      $arch ($cpu)"
  7.2260 -if test "$build_suffix" != ""; then
  7.2261 -    echo "build suffix              $build_suffix"
  7.2262 -fi
  7.2263 -if test "$extra_version" != ""; then
  7.2264 -    echo "version string suffix     $extra_version"
  7.2265 -fi
  7.2266 -echo "big-endian                ${bigendian-no}"
  7.2267 -if enabled x86; then
  7.2268 -    echo "yasm                      ${yasm-no}"
  7.2269 -    echo "MMX enabled               ${mmx-no}"
  7.2270 -    echo "MMX2 enabled              ${mmx2-no}"
  7.2271 -    echo "3DNow! enabled            ${amd3dnow-no}"
  7.2272 -    echo "3DNow! extended enabled   ${amd3dnowext-no}"
  7.2273 -    echo "SSE enabled               ${sse-no}"
  7.2274 -    echo "SSSE3 enabled             ${ssse3-no}"
  7.2275 -    echo "CMOV enabled              ${cmov-no}"
  7.2276 -    echo "CMOV is fast              ${fast_cmov-no}"
  7.2277 -    echo "EBX available             ${ebx_available-no}"
  7.2278 -    echo "EBP available             ${ebp_available-no}"
  7.2279 -    echo "10 operands supported     ${ten_operands-no}"
  7.2280 -fi
  7.2281 -if enabled arm; then
  7.2282 -    echo "ARMv5TE enabled           ${armv5te-no}"
  7.2283 -    echo "ARMv6 enabled             ${armv6-no}"
  7.2284 -    echo "ARMv6T2 enabled           ${armv6t2-no}"
  7.2285 -    echo "ARM VFP enabled           ${armvfp-no}"
  7.2286 -    echo "IWMMXT enabled            ${iwmmxt-no}"
  7.2287 -    echo "NEON enabled              ${neon-no}"
  7.2288 -fi
  7.2289 -if enabled mips; then
  7.2290 -    echo "MMI enabled               ${mmi-no}"
  7.2291 -fi
  7.2292 -if enabled ppc; then
  7.2293 -    echo "AltiVec enabled           ${altivec-no}"
  7.2294 -    echo "PPC 4xx optimizations     ${ppc4xx-no}"
  7.2295 -    echo "dcbzl available           ${dcbzl-no}"
  7.2296 -    echo "performance report        ${powerpc_perf-no}"
  7.2297 -fi
  7.2298 -if enabled sparc; then
  7.2299 -    echo "VIS enabled               ${vis-no}"
  7.2300 -fi
  7.2301 -echo "gprof enabled             ${gprof-no}"
  7.2302 -echo "debug symbols             ${debug-no}"
  7.2303 -echo "strip symbols             ${stripping-no}"
  7.2304 -echo "optimizations             ${optimizations-no}"
  7.2305 -echo "static                    ${static-no}"
  7.2306 -echo "shared                    ${shared-no}"
  7.2307 -echo "postprocessing support    ${postproc-no}"
  7.2308 -echo "new filter support        ${avfilter-no}"
  7.2309 -echo "filters using lavformat   ${avfilter_lavf-no}"
  7.2310 -echo "network support           ${network-no}"
  7.2311 -if enabled network; then
  7.2312 -    echo "IPv6 support              ${ipv6-no}"
  7.2313 -fi
  7.2314 -echo "threading support         ${thread_type-no}"
  7.2315 -echo "SDL support               ${sdl-no}"
  7.2316 -if enabled sdl_too_old; then
  7.2317 -    echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
  7.2318 -fi
  7.2319 -echo "Sun medialib support      ${mlib-no}"
  7.2320 -echo "AVISynth enabled          ${avisynth-no}"
  7.2321 -echo "libamr-nb support         ${libamr_nb-no}"
  7.2322 -echo "libamr-wb support         ${libamr_wb-no}"
  7.2323 -echo "libdc1394 support         ${libdc1394-no}"
  7.2324 -echo "libdirac enabled          ${libdirac-no}"
  7.2325 -echo "libfaac enabled           ${libfaac-no}"
  7.2326 -echo "libfaad enabled           ${libfaad-no}"
  7.2327 -echo "libfaad dlopened          ${libfaadbin-no}"
  7.2328 -echo "libgsm enabled            ${libgsm-no}"
  7.2329 -echo "libmp3lame enabled        ${libmp3lame-no}"
  7.2330 -echo "libnut enabled            ${libnut-no}"
  7.2331 -echo "libopenjpeg enabled       ${libopenjpeg-no}"
  7.2332 -echo "libschroedinger enabled   ${libschroedinger-no}"
  7.2333 -echo "libspeex enabled          ${libspeex-no}"
  7.2334 -echo "libtheora enabled         ${libtheora-no}"
  7.2335 -echo "libvorbis enabled         ${libvorbis-no}"
  7.2336 -echo "libx264 enabled           ${libx264-no}"
  7.2337 -echo "libxvid enabled           ${libxvid-no}"
  7.2338 -echo "zlib enabled              ${zlib-no}"
  7.2339 -echo "bzlib enabled             ${bzlib-no}"
  7.2340 -echo
  7.2341 -
  7.2342 -for type in decoder encoder hwaccel parser demuxer muxer protocol filter bsf indev outdev; do
  7.2343 -    echo "Enabled ${type}s:"
  7.2344 -    eval list=\$$(toupper $type)_LIST
  7.2345 -    for part in $list; do
  7.2346 -        enabled $part && echo ${part%_*}
  7.2347 -    done | sort | cat
  7.2348 -    echo
  7.2349 -done
  7.2350 -
  7.2351 -license="LGPL"
  7.2352 -if enabled nonfree; then
  7.2353 -    license="unredistributable"
  7.2354 -elif enabled gpl; then
  7.2355 -    license="GPL"
  7.2356 -fi
  7.2357 -
  7.2358 -echo "License: $license"
  7.2359 -
  7.2360 -echo "Creating config.mak and config.h..."
  7.2361 -
  7.2362 -echo "# Automatically generated by configure - do not modify!" > config.mak
  7.2363 -echo "/* Automatically generated by configure - do not modify! */" > $TMPH
  7.2364 -echo "#ifndef FFMPEG_CONFIG_H" >> $TMPH
  7.2365 -echo "#define FFMPEG_CONFIG_H" >> $TMPH
  7.2366 -echo "#define FFMPEG_CONFIGURATION \"$FFMPEG_CONFIGURATION\"" >> $TMPH
  7.2367 -echo "#define FFMPEG_DATADIR \"$(eval c_escape $datadir)\"" >> $TMPH
  7.2368 -
  7.2369 -echo "FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION" >> config.mak
  7.2370 -echo "prefix=$prefix" >> config.mak
  7.2371 -echo "LIBDIR=\$(DESTDIR)$libdir" >> config.mak
  7.2372 -echo "SHLIBDIR=\$(DESTDIR)$shlibdir" >> config.mak
  7.2373 -echo "INCDIR=\$(DESTDIR)$incdir" >> config.mak
  7.2374 -echo "BINDIR=\$(DESTDIR)$bindir" >> config.mak
  7.2375 -echo "DATADIR=\$(DESTDIR)$datadir" >> config.mak
  7.2376 -echo "MANDIR=\$(DESTDIR)$mandir" >> config.mak
  7.2377 -echo "SRC_PATH=\"$source_path\"" >> config.mak
  7.2378 -echo "SRC_PATH_BARE=$source_path" >> config.mak
  7.2379 -echo "BUILD_ROOT=\"$PWD\"" >> config.mak
  7.2380 -echo "CC=$cc" >> config.mak
  7.2381 -echo "AS=$as" >> config.mak
  7.2382 -echo "YASM=$yasmexe" >> config.mak
  7.2383 -echo "AR=$ar" >> config.mak
  7.2384 -echo "RANLIB=$ranlib" >> config.mak
  7.2385 -echo "LN_S=$ln_s" >> config.mak
  7.2386 -enabled stripping &&
  7.2387 -    echo "STRIP=$strip" >> config.mak ||
  7.2388 -    echo "STRIP=echo ignoring strip" >> config.mak
  7.2389 -
  7.2390 -echo "OPTFLAGS=$CFLAGS" >> config.mak
  7.2391 -echo "LDFLAGS=$LDFLAGS" >> config.mak
  7.2392 -echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
  7.2393 -echo "SHFLAGS=$SHFLAGS" >> config.mak
  7.2394 -echo "YASMFLAGS=$YASMFLAGS" >> config.mak
  7.2395 -echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
  7.2396 -echo "BUILD_STATIC=$static" >> config.mak
  7.2397 -echo "BUILDSUF=$build_suffix" >> config.mak
  7.2398 -echo "FULLNAME=$FULLNAME" >> config.mak
  7.2399 -echo "LIBPREF=$LIBPREF" >> config.mak
  7.2400 -echo "LIBSUF=$LIBSUF" >> config.mak
  7.2401 -echo "LIBNAME=$LIBNAME" >> config.mak
  7.2402 -echo "SLIBPREF=$SLIBPREF" >> config.mak
  7.2403 -echo "SLIBSUF=$SLIBSUF" >> config.mak
  7.2404 -echo "EXESUF=$EXESUF" >> config.mak
  7.2405 -echo "EXTRA_VERSION=$extra_version" >> config.mak
  7.2406 -echo "DEPEND_CMD=$DEPEND_CMD" >> config.mak
  7.2407 -echo "HOSTCC=$host_cc" >> config.mak
  7.2408 -echo "HOSTCFLAGS=$host_cflags" >> config.mak
  7.2409 -echo "HOSTEXESUF=$HOSTEXESUF" >> config.mak
  7.2410 -echo "HOSTLDFLAGS=$host_ldflags" >> config.mak
  7.2411 -echo "HOSTLIBS=$host_libs" >> config.mak
  7.2412 -echo "TARGET_EXEC=$target_exec" >> config.mak
  7.2413 -echo "TARGET_PATH=$target_path" >> config.mak
  7.2414 -
  7.2415 -if enabled bigendian; then
  7.2416 -    echo "WORDS_BIGENDIAN=yes" >> config.mak
  7.2417 -    echo "#define WORDS_BIGENDIAN 1" >> $TMPH
  7.2418 -fi
  7.2419 -
  7.2420 -if enabled sdl; then
  7.2421 -    echo "SDL_LIBS=$("${SDL_CONFIG}" --libs)" >> config.mak
  7.2422 -    echo "SDL_CFLAGS=$("${SDL_CONFIG}" --cflags)" >> config.mak
  7.2423 -fi
  7.2424 -if enabled texi2html; then
  7.2425 -    echo "BUILD_DOC=yes" >> config.mak
  7.2426 -fi
  7.2427 -
  7.2428 -get_version(){
  7.2429 -    name=$1
  7.2430 -    file=$source_path/$2
  7.2431 -    eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
  7.2432 -    eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
  7.2433 -    lcname=$(tolower $name)
  7.2434 -    eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
  7.2435 -    eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
  7.2436 -}
  7.2437 -
  7.2438 -get_version LIBSWSCALE  libswscale/swscale.h
  7.2439 -get_version LIBPOSTPROC libpostproc/postprocess.h
  7.2440 -get_version LIBAVCODEC  libavcodec/avcodec.h
  7.2441 -get_version LIBAVDEVICE libavdevice/avdevice.h
  7.2442 -get_version LIBAVFORMAT libavformat/avformat.h
  7.2443 -get_version LIBAVUTIL   libavutil/avutil.h
  7.2444 -get_version LIBAVFILTER libavfilter/avfilter.h
  7.2445 -
  7.2446 -if enabled shared; then
  7.2447 -    echo "BUILD_SHARED=yes" >> config.mak
  7.2448 -    echo "PIC=-fPIC -DPIC" >> config.mak
  7.2449 -    echo "LIBTARGET=${LIBTARGET}" >> config.mak
  7.2450 -    echo "SLIBNAME=${SLIBNAME}" >> config.mak
  7.2451 -    echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
  7.2452 -    echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
  7.2453 -    echo "SLIB_CREATE_DEF_CMD=${SLIB_CREATE_DEF_CMD}" >> config.mak
  7.2454 -    echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
  7.2455 -    echo "SLIB_INSTALL_EXTRA_CMD=${SLIB_INSTALL_EXTRA_CMD}" >> config.mak
  7.2456 -    echo "SLIB_UNINSTALL_EXTRA_CMD=${SLIB_UNINSTALL_EXTRA_CMD}" >> config.mak
  7.2457 -fi
  7.2458 -echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
  7.2459 -echo "EXTRALIBS=$extralibs" >> config.mak
  7.2460 -
  7.2461 -echo "ARCH=$arch" >> config.mak
  7.2462 -
  7.2463 -print_config ARCH_   $TMPH config.mak $ARCH_LIST
  7.2464 -print_config HAVE_   $TMPH config.mak $HAVE_LIST
  7.2465 -print_config CONFIG_ $TMPH config.mak $CONFIG_LIST       \
  7.2466 -                                      $CONFIG_EXTRA      \
  7.2467 -                                      $DECODER_LIST      \
  7.2468 -                                      $ENCODER_LIST      \
  7.2469 -                                      $HWACCEL_LIST      \
  7.2470 -                                      $PARSER_LIST       \
  7.2471 -                                      $BSF_LIST          \
  7.2472 -                                      $DEMUXER_LIST      \
  7.2473 -                                      $MUXER_LIST        \
  7.2474 -                                      $FILTER_LIST       \
  7.2475 -                                      $PROTOCOL_LIST     \
  7.2476 -                                      $INDEV_LIST        \
  7.2477 -                                      $OUTDEV_LIST       \
  7.2478 -
  7.2479 -echo "#define restrict $_restrict" >> $TMPH
  7.2480 -
  7.2481 -if enabled small; then
  7.2482 -    echo "#define av_always_inline"  >> $TMPH
  7.2483 -fi
  7.2484 -
  7.2485 -
  7.2486 -# Apparently it's not possible to portably echo a backslash.
  7.2487 -enabled asmalign_pot &&
  7.2488 -    printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
  7.2489 -    printf '#define ASMALIGN(ZEROBITS) ".align 1 << " #ZEROBITS "\\n\\t"\n' >> $TMPH
  7.2490 -
  7.2491 -echo "#define EXTERN_PREFIX \"${extern_prefix}\"" >> $TMPH
  7.2492 -
  7.2493 -echo "#endif /* FFMPEG_CONFIG_H */" >> $TMPH
  7.2494 -
  7.2495 -# Do not overwrite an unchanged config.h to avoid superfluous rebuilds.
  7.2496 -cmp -s $TMPH config.h &&
  7.2497 -    echo "config.h is unchanged" ||
  7.2498 -    mv -f $TMPH config.h
  7.2499 -
  7.2500 -# build tree in object directory if source path is different from current one
  7.2501 -if enabled source_path_used; then
  7.2502 -    DIRS="\
  7.2503 -        doc               \
  7.2504 -        libavcodec        \
  7.2505 -        libavcodec/alpha  \
  7.2506 -        libavcodec/arm    \
  7.2507 -        libavcodec/bfin   \
  7.2508 -        libavcodec/mlib   \
  7.2509 -        libavcodec/ppc    \
  7.2510 -        libavcodec/sh4    \
  7.2511 -        libavcodec/sparc  \
  7.2512 -        libavcodec/x86    \
  7.2513 -        libavdevice       \
  7.2514 -        libavfilter       \
  7.2515 -        libavformat       \
  7.2516 -        libavutil         \
  7.2517 -        libpostproc       \
  7.2518 -        libswscale        \
  7.2519 -        libswscale/bfin   \
  7.2520 -        libswscale/mlib   \
  7.2521 -        libswscale/ppc    \
  7.2522 -        libswscale/sparc  \
  7.2523 -        libswscale/x86    \
  7.2524 -        tests             \
  7.2525 -        tools             \
  7.2526 -        "
  7.2527 -    FILES="\
  7.2528 -        Makefile             \
  7.2529 -        common.mak           \
  7.2530 -        subdir.mak           \
  7.2531 -        doc/texi2pod.pl      \
  7.2532 -        libavcodec/Makefile  \
  7.2533 -        libavdevice/Makefile \
  7.2534 -        libavfilter/Makefile \
  7.2535 -        libavformat/Makefile \
  7.2536 -        libavutil/Makefile   \
  7.2537 -        libpostproc/Makefile \
  7.2538 -        libswscale/Makefile  \
  7.2539 -        "
  7.2540 -    for dir in $DIRS ; do
  7.2541 -        mkdir -p $dir
  7.2542 -    done
  7.2543 -    for f in $FILES ; do
  7.2544 -        $ln_s "$source_path/$f" $f
  7.2545 -    done
  7.2546 -fi
  7.2547 -
  7.2548 -
  7.2549 -# build pkg-config files
  7.2550 -
  7.2551 -pkgconfig_generate(){
  7.2552 -name=$1
  7.2553 -shortname=${name#lib}${build_suffix}
  7.2554 -comment=$2
  7.2555 -version=$3
  7.2556 -libs=$4
  7.2557 -requires=$5
  7.2558 -cat <<EOF > $name/$name.pc
  7.2559 -prefix=$prefix
  7.2560 -exec_prefix=\${prefix}
  7.2561 -libdir=$libdir
  7.2562 -includedir=$incdir
  7.2563 -
  7.2564 -Name: $name
  7.2565 -Description: $comment
  7.2566 -Version: $version
  7.2567 -Requires: $(disabled shared && echo $requires)
  7.2568 -Requires.private: $(enabled shared && echo $requires)
  7.2569 -Conflicts:
  7.2570 -Libs: -L\${libdir} -l${shortname} $(disabled shared && echo $libs)
  7.2571 -Libs.private: $(enabled shared && echo $libs)
  7.2572 -Cflags: -I\${includedir}
  7.2573 -EOF
  7.2574 -cat <<EOF > $name/$name-uninstalled.pc
  7.2575 -prefix=
  7.2576 -exec_prefix=
  7.2577 -libdir=\${pcfiledir}
  7.2578 -includedir=${source_path}
  7.2579 -
  7.2580 -Name: $name
  7.2581 -Description: $comment
  7.2582 -Version: $version
  7.2583 -Requires: $requires
  7.2584 -Conflicts:
  7.2585 -Libs: \${libdir}/${LIBPREF}${shortname}${LIBSUF} $libs
  7.2586 -Cflags: -I\${includedir}
  7.2587 -EOF
  7.2588 -}
  7.2589 -
  7.2590 -pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION"
  7.2591 -pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
  7.2592 -pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
  7.2593 -pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
  7.2594 -enabled avfilter &&
  7.2595 -    pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
  7.2596 -enabled postproc &&
  7.2597 -    pkgconfig_generate libpostproc "FFmpeg post processing library" "$LIBPOSTPROC_VERSION"
  7.2598 -pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
     8.1 --- a/ffmpeg/stuff/ffmpeg-0.5.1-gcc45.u	Sat Jul 29 22:49:56 2017 +0200
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,11 +0,0 @@
     8.4 ---- ffmpeg-0.5.1-ori/configure
     8.5 -+++ ffmpeg-0.5.1/configure
     8.6 -@@ -514,7 +514,7 @@
     8.7 - 
     8.8 - check_cmd(){
     8.9 -     log "$@"
    8.10 --    "$@" >> $logfile 2>&1
    8.11 -+    $@ >> $logfile 2>&1
    8.12 - }
    8.13 - 
    8.14 - check_cc(){
     9.1 --- a/ffmpegthumbnailer-dev/receipt	Sat Jul 29 22:49:56 2017 +0200
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,21 +0,0 @@
     9.4 -# SliTaz package receipt.
     9.5 -
     9.6 -PACKAGE="ffmpegthumbnailer-dev"
     9.7 -VERSION="2.0.8"
     9.8 -CATEGORY="development"
     9.9 -SHORT_DESC="Development files for ffmpegthumbnailer"
    9.10 -MAINTAINER="al.bobylev@gmail.com"
    9.11 -LICENSE="GPL2"
    9.12 -WEB_SITE="http://code.google.com/p/ffmpegthumbnailer/"
    9.13 -
    9.14 -WANTED="ffmpegthumbnailer"
    9.15 -DEPENDS="ffmpegthumbnailer pkg-config"
    9.16 -
    9.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
    9.18 -genpkg_rules()
    9.19 -{
    9.20 -	mkdir -p $fs/usr/lib
    9.21 -	cp -a $install/usr/include $fs/usr
    9.22 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
    9.23 -	cp -a $install/usr/lib/*.*a $fs/usr/lib
    9.24 -}
    10.1 --- a/ffmpegthumbnailer/receipt	Sat Jul 29 22:49:56 2017 +0200
    10.2 +++ b/ffmpegthumbnailer/receipt	Tue Aug 01 00:49:30 2017 +0300
    10.3 @@ -1,35 +1,53 @@
    10.4 -# SliTaz package receipt.
    10.5 +# SliTaz package receipt v2.
    10.6  
    10.7  PACKAGE="ffmpegthumbnailer"
    10.8 -VERSION="2.0.8"
    10.9 +VERSION="2.2.0"
   10.10  CATEGORY="system-tools"
   10.11 -SHORT_DESC="Lightweight video thumbnailer that can be used by file managers"
   10.12 +SHORT_DESC="Fast and lightweight video thumbnailer"
   10.13  MAINTAINER="al.bobylev@gmail.com"
   10.14  LICENSE="GPL2"
   10.15 -WEB_SITE="http://code.google.com/p/ffmpegthumbnailer/"
   10.16 -TARBALL="$PACKAGE-$VERSION.tar.gz"
   10.17 -WGET_URL="http://ffmpegthumbnailer.googlecode.com/files/$TARBALL"
   10.18 +WEB_SITE="https://github.com/dirkvdb/ffmpegthumbnailer"
   10.19  
   10.20 -DEPENDS="ffmpeg gcc-lib-base libjpeg libpng"
   10.21 -BUILD_DEPENDS="ffmpeg-dev libpng-dev jpeg-dev"
   10.22 +TARBALL="$PACKAGE-$VERSION.tar.bz2"
   10.23 +WGET_URL="https://github.com/dirkvdb/ffmpegthumbnailer/releases/download/$VERSION/$TARBALL"
   10.24 +
   10.25 +BUILD_DEPENDS="cmake libjpeg-turbo-dev zlib-dev libpng16-dev ffmpeg-dev"
   10.26 +SPLIT="ffmpegthumbnailer-dev"
   10.27  
   10.28  # Rules to configure and make the package.
   10.29  compile_rules()
   10.30  {
   10.31 -	./configure \
   10.32 -		--enable-png \
   10.33 -		--enable-jpeg \
   10.34 -		--enable-gio \
   10.35 -		$CONFIGURE_ARGS &&
   10.36 +	mkdir build; cd build
   10.37 +	cmake \
   10.38 +		-DCMAKE_INSTALL_PREFIX=/usr \
   10.39 +		-DCMAKE_BUILD_TYPE=Release \
   10.40 +		-DENABLE_GIO=ON \
   10.41 +		-DENABLE_THUMBNAILER=ON \
   10.42 +		.. &&
   10.43  	make &&
   10.44 -	make install
   10.45 +	make install &&
   10.46 +
   10.47 +	addtypes="video/x-ms-asx;video/x-ms-wmx;video/x-ms-wvx;application/mxf;\vid\
   10.48 +eo/3gp;video/3gpp;video/dv;video/divx;video/fli;video/flv;video/mp2t;video/mp4v\
   10.49 +-es;video/msvideo;video/ogg;video/vivo;video/vnd.divx;video/vnd.mpegurl;video/v\
   10.50 +nd.rn-realvideo;video/vnd.vivo;video/webm;video/x-anim;video/x-avi;video/x-flc;\
   10.51 +video/x-fli;video/x-flic;video/x-m4v;video/x-mpeg;video/x-mpeg2;video/x-nsv;vid\
   10.52 +eo/x-ogm+ogg;video/x-theora+ogg;" &&
   10.53 +	sed -i "/MimeType=/ s|\$|$addtypes|" \
   10.54 +		$install/usr/share/thumbnailers/ffmpegthumbnailer.thumbnailer
   10.55  }
   10.56  
   10.57  # Rules to gen a SliTaz package suitable for Tazpkg.
   10.58  genpkg_rules()
   10.59  {
   10.60 -	mkdir -p $fs/usr/lib $fs/usr/share/thumbnailers
   10.61 -	cp -a $install/usr/bin $fs/usr
   10.62 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
   10.63 -	cp -a $stuff/* $fs/usr/share/thumbnailers
   10.64 +	case $PACKAGE in
   10.65 +		ffmpegthumbnailer)
   10.66 +			copy @std
   10.67 +			DEPENDS="ffmpeg libjpeg-turbo libpng16 zlib"
   10.68 +			;;
   10.69 +		*-dev)
   10.70 +			copy @dev
   10.71 +			DEPENDS="ffmpegthumbnailer ffmpeg-dev"
   10.72 +			;;
   10.73 +	esac
   10.74  }
    11.1 --- a/ffmpegthumbnailer/stuff/ffmpeg.thumbnailer	Sat Jul 29 22:49:56 2017 +0200
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,4 +0,0 @@
    11.4 -[Thumbnailer Entry]
    11.5 -TryExec=ffmpegthumbnailer
    11.6 -Exec=ffmpegthumbnailer -i %i -o %o -s %s -f
    11.7 -MimeType=video/jpeg;video/mp4;video/mpeg;video/quicktime;video/x-ms-asf;video/x-ms-wm;video/x-ms-wmv;video/x-msvideo;video/x-flv;video/x-matroska;
    12.1 --- a/lame-dev/receipt	Sat Jul 29 22:49:56 2017 +0200
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,21 +0,0 @@
    12.4 -# SliTaz package receipt.
    12.5 -
    12.6 -PACKAGE="lame-dev"
    12.7 -VERSION="3.99.4"
    12.8 -CATEGORY="development"
    12.9 -SHORT_DESC="Lame (mp3 encoder) devel files."
   12.10 -MAINTAINER="pankso@slitaz.org"
   12.11 -LICENSE="LGPL2"
   12.12 -WANTED="lame"
   12.13 -WEB_SITE="http://lame.sourceforge.net/"
   12.14 -HOST_ARCH="i486 arm"
   12.15 -
   12.16 -DEPENDS="lame"
   12.17 -
   12.18 -# Rules to gen a SliTaz package suitable for Tazpkg.
   12.19 -genpkg_rules()
   12.20 -{
   12.21 -	mkdir -p $fs/usr/lib
   12.22 -	cp -a $install/usr/lib/*.*a $fs/usr/lib
   12.23 -	cp -a $install/usr/include $fs/usr
   12.24 -}
    13.1 --- a/lame/receipt	Sat Jul 29 22:49:56 2017 +0200
    13.2 +++ b/lame/receipt	Tue Aug 01 00:49:30 2017 +0300
    13.3 @@ -1,40 +1,46 @@
    13.4 -# SliTaz package receipt.
    13.5 +# SliTaz package receipt v2.
    13.6  
    13.7  PACKAGE="lame"
    13.8 -VERSION="3.99.4"
    13.9 +VERSION="3.99.5"
   13.10  CATEGORY="multimedia"
   13.11 -SHORT_DESC="MPEG Audio Layer III (MP3) encoder."
   13.12 +SHORT_DESC="MPEG Audio Layer III (MP3) encoder"
   13.13  MAINTAINER="pankso@slitaz.org"
   13.14  LICENSE="LGPL2"
   13.15 -TARBALL="$PACKAGE-$VERSION.tar.gz"
   13.16  WEB_SITE="http://lame.sourceforge.net/"
   13.17 -WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
   13.18  HOST_ARCH="i486 arm"
   13.19  
   13.20 -DEPENDS="ncurses"
   13.21 -BUILD_DEPENDS="gtk+-dev ncurses-dev libtinfo"
   13.22 +TARBALL="$PACKAGE-$VERSION.tar.gz"
   13.23 +WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
   13.24  
   13.25 -case "$ARCH" in
   13.26 -	arm) BUILD_DEPENDS="ncurses-dev libtinfo" ;;
   13.27 -esac
   13.28 +BUILD_DEPENDS_arm="ncurses-dev libtinfo"
   13.29 +BUILD_DEPENDS="ncurses-dev nasm"
   13.30 +SPLIT="lame-dev"
   13.31  
   13.32  # Rules to configure and make the package.
   13.33  compile_rules()
   13.34  {
   13.35 -	export CFLAGS="$CFLAGS -msse"
   13.36 +	# http://www.linuxfromscratch.org/blfs/view/stable/multimedia/lame.html
   13.37 +	case $(uname -m) in
   13.38 +		i?86) sed -i -e '/xmmintrin\.h/d' configure ;;
   13.39 +	esac
   13.40 +
   13.41  	./configure \
   13.42 -		--prefix=/usr \
   13.43 -		--infodir=/usr/share/info \
   13.44 -		--mandir=/usr/share/man \
   13.45 +		--enable-nasm \
   13.46 +		--enable-mp3rtp \
   13.47 +		--disable-static \
   13.48  		$CONFIGURE_ARGS &&
   13.49  	make &&
   13.50 -	make DESTDIR=$DESTDIR install
   13.51 +	make pkghtmldir=/usr/share/doc/lame-$VERSION install
   13.52  }
   13.53  
   13.54  # Rules to gen a SliTaz package suitable for Tazpkg.
   13.55  genpkg_rules()
   13.56  {
   13.57 -	mkdir -p $fs/usr/lib
   13.58 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
   13.59 -	cp -a $install/usr/bin $fs/usr
   13.60 +	case $PACKAGE in
   13.61 +		lame)
   13.62 +			copy @std
   13.63 +			DEPENDS="ncurses"
   13.64 +			;;
   13.65 +		*-dev) copy @dev;;
   13.66 +	esac
   13.67  }
    14.1 --- a/libgsf-dev/receipt	Sat Jul 29 22:49:56 2017 +0200
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,21 +0,0 @@
    14.4 -# SliTaz package receipt.
    14.5 -
    14.6 -PACKAGE="libgsf-dev"
    14.7 -VERSION="1.14.40"
    14.8 -CATEGORY="development"
    14.9 -SHORT_DESC="GNOME Structured File Library, development files"
   14.10 -MAINTAINER="pankso@slitaz.org"
   14.11 -LICENSE="GPL2"
   14.12 -WEB_SITE="https://developer.gnome.org/gsf/"
   14.13 -
   14.14 -WANTED="libgsf"
   14.15 -DEPENDS="libgsf glib-dev libxml2-dev"
   14.16 -
   14.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
   14.18 -genpkg_rules()
   14.19 -{
   14.20 -	mkdir -p $fs/usr/lib
   14.21 -	cp -a $install/usr/lib/*.*a $fs/usr/lib
   14.22 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
   14.23 -	cp -a $install/usr/include $fs/usr
   14.24 -}
    15.1 --- a/libgsf/receipt	Sat Jul 29 22:49:56 2017 +0200
    15.2 +++ b/libgsf/receipt	Tue Aug 01 00:49:30 2017 +0300
    15.3 @@ -1,27 +1,43 @@
    15.4 -# SliTaz package receipt.
    15.5 +# SliTaz package receipt v2.
    15.6  
    15.7  PACKAGE="libgsf"
    15.8 -VERSION="1.14.40"
    15.9 +VERSION="1.14.41"
   15.10  CATEGORY="libs"
   15.11  SHORT_DESC="GNOME Structured File Library"
   15.12  MAINTAINER="pankso@slitaz.org"
   15.13  LICENSE="GPL2"
   15.14 +WEB_SITE="https://developer.gnome.org/gsf/"
   15.15 +
   15.16  TARBALL="$PACKAGE-$VERSION.tar.xz"
   15.17 -WEB_SITE="https://developer.gnome.org/gsf/"
   15.18  WGET_URL="$GNOME_MIRROR/$PACKAGE/${VERSION%.*}/$TARBALL"
   15.19  
   15.20 -DEPENDS="bzlib gdk-pixbuf glib glibc-base libffi libpng libxml2 pcre zlib"
   15.21 -BUILD_DEPENDS="gtk-doc glib-dev libxml2-dev zlib-dev gdk-pixbuf-dev"
   15.22 +BUILD_DEPENDS="intltool gtk-doc glib-dev libxml2-dev zlib-dev bzip2-dev \
   15.23 +gdk-pixbuf-dev gobject-introspection-dev"
   15.24 +SPLIT="libgsf-dev"
   15.25  
   15.26  # Rules to configure and make the package.
   15.27  compile_rules()
   15.28  {
   15.29 -	./configure $CONFIGURE_ARGS && make && make install
   15.30 +	# http://www.linuxfromscratch.org/blfs/view/stable/general/libgsf.html
   15.31 +	./configure \
   15.32 +		--enable-introspection \
   15.33 +		$CONFIGURE_ARGS &&
   15.34 +	make && make install
   15.35  }
   15.36  
   15.37  # Rules to gen a SliTaz package suitable for Tazpkg.
   15.38  genpkg_rules()
   15.39  {
   15.40 -	copy gsf *.so* gsf-vba* gsf-office*
   15.41 -	rm -r $fs/usr/share/man
   15.42 +	case $PACKAGE in
   15.43 +		libgsf)
   15.44 +			copy @std
   15.45 +			DEPENDS="bzlib gdk-pixbuf glib libxml2 zlib"
   15.46 +			;;
   15.47 +		*-dev)
   15.48 +			copy @dev
   15.49 +			DEPENDS="libgsf bzip2-dev glib-dev libffi-dev libxml2-dev pcre-dev \
   15.50 +			util-linux-blkid-dev util-linux-mount-dev util-linux-uuid-dev \
   15.51 +			xz-dev zlib-dev"
   15.52 +			;;
   15.53 +	esac
   15.54  }
    16.1 --- a/tumbler-dev/receipt	Sat Jul 29 22:49:56 2017 +0200
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,24 +0,0 @@
    16.4 -# SliTaz package receipt.
    16.5 -
    16.6 -PACKAGE="tumbler-dev"
    16.7 -VERSION="0.1.27"
    16.8 -CATEGORY="development"
    16.9 -SHORT_DESC="Development files for tumbler"
   16.10 -MAINTAINER="al.bobylev@gmail.com"
   16.11 -LICENSE="GPL2 LGPL2.1"
   16.12 -WEB_SITE="http://www.ohloh.net/p/tumbler-xfce"
   16.13 -
   16.14 -WANTED="tumbler"
   16.15 -DEPENDS="tumbler pkg-config"
   16.16 -
   16.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
   16.18 -genpkg_rules()
   16.19 -{
   16.20 -	mkdir -p $fs/usr/lib/tumbler-1
   16.21 -	cp -a $install/usr/include $fs/usr
   16.22 -	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
   16.23 -	cp -a $install/usr/lib/*.la $usr/lib
   16.24 -	cp -a $install/usr/lib/tumbler-1/plugins $fs/usr/lib/tumbler-1
   16.25 -	find $fs/usr/lib -name '*.so*' -delete
   16.26 -
   16.27 -}
    17.1 --- a/tumbler/receipt	Sat Jul 29 22:49:56 2017 +0200
    17.2 +++ b/tumbler/receipt	Tue Aug 01 00:49:30 2017 +0300
    17.3 @@ -1,21 +1,20 @@
    17.4 -# SliTaz package receipt.
    17.5 +# SliTaz package receipt v2.
    17.6  
    17.7  PACKAGE="tumbler"
    17.8 -VERSION="0.1.27"
    17.9 +VERSION="0.1.32"
   17.10  CATEGORY="system-tools"
   17.11 -SHORT_DESC="A D-Bus thumbnailing service based on the thumbnail management D-Bus specification"
   17.12 +SHORT_DESC="A D-Bus thumbnailing service"
   17.13  MAINTAINER="al.bobylev@gmail.com"
   17.14  LICENSE="GPL2 LGPL2.1"
   17.15 -WEB_SITE="http://www.ohloh.net/p/tumbler-xfce"
   17.16 +WEB_SITE="https://www.openhub.net/p/tumbler"
   17.17 +
   17.18  TARBALL="$PACKAGE-$VERSION.tar.bz2"
   17.19 -HI_VERSION=$(echo $VERSION | cut -d. -f1,2)
   17.20 -WGET_URL="http://archive.xfce.org/src/xfce/$PACKAGE/$HI_VERSION/$TARBALL"
   17.21 -CONFIG_FILES="/etc/xdg/tumbler/tumbler.rc"
   17.22 +WGET_URL="http://archive.xfce.org/src/xfce/$PACKAGE/${VERSION%.*}/$TARBALL"
   17.23  
   17.24 -DEPENDS="dbus-glib ffmpegthumbnailer libcurl libgsf poppler"
   17.25 -BUILD_DEPENDS="dbus-glib-dev curl-dev glib-dev gdk-pixbuf-dev \
   17.26 -freetype-dev jpeg-dev ffmpegthumbnailer-dev gst0-plugins-base-dev \
   17.27 -libgsf-dev poppler-dev libpng-dev lcms-dev tiff-dev" # gstreamer1-dev
   17.28 +BUILD_DEPENDS="intltool dbus-glib-dev curl-dev glib-dev gdk-pixbuf-dev \
   17.29 +freetype-dev libjpeg-turbo-dev ffmpegthumbnailer-dev gst1-plugins-base-dev \
   17.30 +libgsf-dev poppler-dev libpng16-dev lcms2-dev tiff-dev gtk-doc"
   17.31 +SPLIT="tumbler-dev"
   17.32  
   17.33  # Rules to configure and make the package.
   17.34  compile_rules()
   17.35 @@ -31,21 +30,24 @@
   17.36  # Rules to gen a SliTaz package suitable for Tazpkg.
   17.37  genpkg_rules()
   17.38  {
   17.39 -	mkdir -p \
   17.40 -		$fs/usr/lib \
   17.41 -		$fs/usr/share/locale
   17.42 -	cp -a $install/etc $fs
   17.43 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
   17.44 -	cp -a $install/usr/lib/tumbler* $fs/usr/lib
   17.45 -	find $fs/usr/lib -name '*.la' -delete
   17.46 -	cp -a $install/usr/share/dbus* $fs/usr/share
   17.47 -
   17.48 -	# SliTaz locale settings
   17.49 -	. $WOK/slitaz-i18n/stuff/locale-pack.conf
   17.50 -	for lang in $LOCALE_PACK; do
   17.51 -		langd=$install/usr/share/locale/$lang
   17.52 -		[ -d $langd ] && cp -a $langd $fs/usr/share/locale
   17.53 -	done
   17.54 -	true
   17.55 +	case $PACKAGE in
   17.56 +		tumbler)
   17.57 +			copy @std
   17.58 +			DEPENDS="cairo dbus dbus-glib ffmpegthumbnailer freetype \
   17.59 +			gdk-pixbuf glib gst1-plugins-base gstreamer1 libcurl libgsf \
   17.60 +			libjpeg-turbo libpng16 libxml2 poppler"
   17.61 +			CONFIG_FILES="/etc/xdg/tumbler/tumbler.rc"
   17.62 +			;;
   17.63 +		*-dev)
   17.64 +			copy @dev
   17.65 +			DEPENDS="tumbler bzip2-dev cairo-dev curl-dev \
   17.66 +			ffmpegthumbnailer-dev fontconfig-dev freetype-dev gdk-pixbuf-dev \
   17.67 +			glib-dev gst1-plugins-base-dev gstreamer1-dev harfbuzz-dev \
   17.68 +			libjpeg-turbo-dev lcms2-dev libffi-dev libgsf-dev libpng16-dev \
   17.69 +			libxml2-dev openssl-dev pcre-dev poppler-dev tiff-dev \
   17.70 +			util-linux-blkid-dev util-linux-mount-dev util-linux-uuid-dev \
   17.71 +			xorg-libX11-dev xorg-libXau-dev xorg-libXdmcp-dev xorg-libXext-dev \
   17.72 +			xorg-libXrender-dev xorg-libxcb-dev xorg-pixman-dev xz-dev zlib-dev"
   17.73 +			;;
   17.74 +	esac
   17.75  }
   17.76 -