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:
21
configure
vendored
21
configure
vendored
@ -2767,6 +2767,17 @@ done
|
|||||||
|
|
||||||
disabled logging && logfile=/dev/null
|
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
|
# Disable all the library-specific components if the library itself
|
||||||
# is disabled, see AVCODEC_LIST and following _LIST variables.
|
# is disabled, see AVCODEC_LIST and following _LIST variables.
|
||||||
|
|
||||||
@ -4124,16 +4135,6 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
disabled optimizations || check_cflags -fomit-frame-pointer
|
||||||
|
|
||||||
enable_weak_pic() {
|
enable_weak_pic() {
|
||||||
|
Reference in New Issue
Block a user