summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-23 02:47:38 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-12-23 02:47:38 +0000
commit07e24dd787b1f3fc3e1185b8194a24cd9d58c348 (patch)
treeb722604d917d488af3b1a85665827685a6ddf60c /configure
parente72cb98ab0bc1c94467de352b7277a5897a1173d (diff)
downloadmpv-07e24dd787b1f3fc3e1185b8194a24cd9d58c348.tar.bz2
mpv-07e24dd787b1f3fc3e1185b8194a24cd9d58c348.tar.xz
Fix disabling individual demuxers, parsers and decoders
based on a patch by Nicolas Baradakis, nbk sitadelle com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21735 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure40
1 files changed, 18 insertions, 22 deletions
diff --git a/configure b/configure
index 9115bdebe0..5be0b98b86 100755
--- a/configure
+++ b/configure
@@ -7560,6 +7560,19 @@ AF_SRCS = $_afsrc
EOF
#############################################################################
+
+ff_config_enable () {
+for part in $1; do
+ ucname=` echo $part | tr '[a-z]' '[A-Z]' `
+ if ` echo $2 | grep $part > /dev/null `; then
+ echo "#define CONFIG_$ucname 1"
+ echo "#define ENABLE_$ucname 1"
+ else
+ echo "#define ENABLE_$ucname 0"
+ fi
+done
+}
+
echo "Creating config.h"
cat > config.h << EOF
/* -------- This file has been automatically generated by configure ---------
@@ -7886,28 +7899,11 @@ $_def_amr_nb_fixed
$_def_amr_wb
/* Use specific parts from FFmpeg. */
-`echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
-`echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define ENABLE_/;s/$/ 1/'`
-`echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
-`echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
-`echo $_libavparsers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define ENABLE_/;s/$/ 1/'`
-`echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
-`echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define ENABLE_/;s/$/ 1/'`
-`echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/#define CONFIG_/;s/$/ 1/'`
-`for part in $_libavencoders_all; do
- if \` echo $_libavencoders | grep $part > /dev/null \`; then
- echo $part | tr '[a-z] ' '[A-Z]' | sed 's/^/#define ENABLE_/;s/$/ 1/'
- else
- echo $part | tr '[a-z] ' '[A-Z]' | sed 's/^/#define ENABLE_/;s/$/ 0/'
- fi
- done`
-`for part in $_libavmuxers_all; do
- if \` echo $_libavmuxers | grep $part > /dev/null \`; then
- echo $part | tr '[a-z] ' '[A-Z]' | sed 's/^/#define ENABLE_/;s/$/ 1/'
- else
- echo $part | tr '[a-z] ' '[A-Z]' | sed 's/^/#define ENABLE_/;s/$/ 0/'
- fi
- done`
+`ff_config_enable "$_libavdecoders_all" "$_libavdecoders"`
+`ff_config_enable "$_libavencoders_all" "$_libavencoders"`
+`ff_config_enable "$_libavparsers_all" "$_libavparsers"`
+`ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"`
+`ff_config_enable "$_libavmuxers_all" "$_libavmuxers"`
$_def_lavc_faac
$_def_lavc_xvid