summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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