configure: Move license checks directly after command line parsing

This will allow to error out immediately if incompatible options are
passed on the command line instead of running time-consuming tests.
This commit is contained in:
Diego Biurrun 2013-03-27 18:21:10 +01:00
parent c78495d1cd
commit 2dd464868c
1 changed files with 11 additions and 10 deletions

21
configure vendored
View File

@ -2767,6 +2767,17 @@ done
disabled logging && logfile=/dev/null
# Die early if licensing-related configure options are incompatible.
die_license_disabled() {
enabled $1 || { enabled $v && die "$v is $1 and --enable-$1 is not specified."; }
}
map "die_license_disabled gpl" $EXTERNAL_LIBRARY_GPL_LIST
map "die_license_disabled nonfree" $EXTERNAL_LIBRARY_NONFREE_LIST $HWACCEL_LIBRARY_NONFREE_LIST
map "die_license_disabled version3" $EXTERNAL_LIBRARY_VERSION3_LIST
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
# Disable all the library-specific components if the library itself
# is disabled, see AVCODEC_LIST and following _LIST variables.
@ -4124,16 +4135,6 @@ EOF
exit 1
fi
die_license_disabled() {
enabled $1 || { enabled $v && die "$v is $1 and --enable-$1 is not specified."; }
}
map "die_license_disabled gpl" $EXTERNAL_LIBRARY_GPL_LIST
map "die_license_disabled nonfree" $EXTERNAL_LIBRARY_NONFREE_LIST $HWACCEL_LIBRARY_NONFREE_LIST
map "die_license_disabled version3" $EXTERNAL_LIBRARY_VERSION3_LIST
enabled version3 && { enabled gpl && enable gplv3 || enable lgplv3; }
disabled optimizations || check_cflags -fomit-frame-pointer
enable_weak_pic() {