changeset 21719:b10aaa4bbff7

Fix disabling individual demuxers, parsers and decoders based on a patch by Nicolas Baradakis, nbk sitadelle com
author diego
date Sat, 23 Dec 2006 02:47:38 +0000
parents 0874b012cc2f
children a751ed5e3aeb
files configure
diffstat 1 files changed, 18 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Dec 23 01:08:51 2006 +0000
+++ b/configure	Sat Dec 23 02:47:38 2006 +0000
@@ -7560,6 +7560,19 @@
 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_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