[MPlayer-cvslog] r21735 - trunk/configure

diego subversion at mplayerhq.hu
Sat Dec 23 03:47:38 CET 2006


Author: diego
Date: Sat Dec 23 03:47:38 2006
New Revision: 21735

Modified:
   trunk/configure

Log:
Fix disabling individual demuxers, parsers and decoders
based on a patch by Nicolas Baradakis, nbk sitadelle com


Modified: trunk/configure
==============================================================================
--- trunk/configure	(original)
+++ trunk/configure	Sat Dec 23 03:47:38 2006
@@ -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



More information about the MPlayer-cvslog mailing list