From 2dd464868c64fa21a6e3bd63ad364ff12999c7d0 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Wed, 27 Mar 2013 18:21:10 +0100 Subject: [PATCH] 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. --- configure | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 70a0d95c50..acc74f2a6d 100755 --- a/configure +++ b/configure @@ -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() {