aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-04-29 15:32:40 +0000
committerDiego Biurrun <diego@biurrun.de>2009-04-29 15:32:40 +0000
commit2184c6f7af9e16306e339baae5f4f671b3a32ed0 (patch)
tree3427b7cafb3e7e7680242e89e4c3e336ceb7c917
parentd647ed789f6c648be6ab6750e64f304e9b024772 (diff)
downloadffmpeg-2184c6f7af9e16306e339baae5f4f671b3a32ed0.tar.gz
Factorize GPL and nonfree license checks into a common function.
Originally committed as revision 18714 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-xconfigure27
1 files changed, 12 insertions, 15 deletions
diff --git a/configure b/configure
index fccbc998d1..57c64f5984 100755
--- a/configure
+++ b/configure
@@ -1736,22 +1736,19 @@ EOF
fi
-if ! enabled gpl; then
- die_gpl_disabled(){
- name=$1
- shift
- enabled_any $@ && die "$name is under GPL and --enable-gpl is not specified."
- }
- die_gpl_disabled "The Postprocessing code" postproc
- die_gpl_disabled "libx264" libx264
- die_gpl_disabled "libxvidcore" libxvid
- die_gpl_disabled "FAAD2" libfaad2
- die_gpl_disabled "The X11 grabber" x11grab
-fi
+die_license_disabled() {
+ enabled $1 || enabled $2 && die "$2 is $1 and --enable-$1 is not specified."
+}
+
+die_license_disabled gpl libfaad2
+die_license_disabled gpl libx264
+die_license_disabled gpl libxvid
+die_license_disabled gpl postproc
+die_license_disabled gpl x11grab
+
+die_license_disabled nonfree libamr_nb
+die_license_disabled nonfree libamr_wb
-if ! enabled nonfree && enabled_any libamr_nb libamr_wb; then
- die "libamr is nonfree and --enable-nonfree is not specified."
-fi
check_deps $ARCH_EXT_LIST