Commit 2dd46486 authored by Diego Biurrun's avatar Diego Biurrun

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.
parent c78495d1
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment