summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2019-01-28 01:49:46 +0100
committerMarton Balint <cus@passwd.hu>2019-02-11 22:01:48 +0100
commit0c3333faf6b7bfd45ce666ae697759d9239ba587 (patch)
tree92a33b1dc39c4d38855f8e518f8cb00a76d32b8a
parentaa25198f1b925a464bdfa83a98476f08d26c9209 (diff)
downloadffmpeg-streaming-0c3333faf6b7bfd45ce666ae697759d9239ba587.zip
ffmpeg-streaming-0c3333faf6b7bfd45ce666ae697759d9239ba587.tar.gz
configure: warn about disabled explicitly enabled components
If we enable a component but a dependant library is disabled, then the enabled component gets silently disabled. Warning about disabled explicitly enabled components allows configure to show the missing dependencies and if --fatal-warnings is used it can also fail if the user wants it so. For example if libdav1d is not availble ./configure --enable-decoder=libdav1d succeeds but the libdav1d decoder is not be enabled. After the patch configure will warn about this: WARNING: Disabled libdav1d_decoder because not all dependencies are satisfied: libdav1d Signed-off-by: Marton Balint <cus@passwd.hu>
-rwxr-xr-xconfigure32
1 files changed, 28 insertions, 4 deletions
diff --git a/configure b/configure
index fe45fd2..ac2d7ab 100755
--- a/configure
+++ b/configure
@@ -649,6 +649,12 @@ request(){
done
}
+warn_if_gets_disabled(){
+ for var in $*; do
+ WARN_IF_GETS_DISABLED_LIST="$WARN_IF_GETS_DISABLED_LIST $var"
+ done
+}
+
enable(){
set_all yes $*
}
@@ -657,6 +663,14 @@ disable(){
set_all no $*
}
+disable_with_reason(){
+ disable $1
+ eval "${1}_disable_reason=\"$2\""
+ if requested $1; then
+ die "ERROR: $1 requested, but $2"
+ fi
+}
+
enable_weak(){
set_weak yes $*
}
@@ -785,10 +799,10 @@ check_deps(){
[ -n "$dep_ifa" ] && { enabled_all $dep_ifa && enable_weak $cfg; }
[ -n "$dep_ifn" ] && { enabled_any $dep_ifn && enable_weak $cfg; }
- enabled_all $dep_all || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not all dependencies are satisfied: $dep_all"; }
- enabled_any $dep_any || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but not any dependency is satisfied: $dep_any"; }
- disabled_all $dep_con || { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some conflicting dependencies are unsatisfied: $dep_con"; }
- disabled_any $dep_sel && { disable $cfg && requested $cfg && die "ERROR: $cfg requested, but some selected dependency is unsatisfied: $dep_sel"; }
+ enabled_all $dep_all || { disable_with_reason $cfg "not all dependencies are satisfied: $dep_all"; }
+ enabled_any $dep_any || { disable_with_reason $cfg "not any dependency is satisfied: $dep_any"; }
+ disabled_all $dep_con || { disable_with_reason $cfg "some conflicting dependencies are unsatisfied: $dep_con"; }
+ disabled_any $dep_sel && { disable_with_reason $cfg "some selected dependency is unsatisfied: $dep_sel"; }
enabled $cfg && enable_deep_weak $dep_sel $dep_sgs
@@ -3883,6 +3897,7 @@ for opt do
name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
list=$(filter "$name" $list)
[ "$list" = "" ] && warn "Option $opt did not match anything"
+ test $action = enable && warn_if_gets_disabled $list
$action $list
;;
--enable-yasm|--disable-yasm)
@@ -7109,6 +7124,15 @@ echo "License: $license"
fi # test "$quiet" != "yes"
+if test -n "$WARN_IF_GETS_DISABLED_LIST"; then
+ for cfg in $WARN_IF_GETS_DISABLED_LIST; do
+ if disabled $cfg; then
+ varname=${cfg}_disable_reason
+ eval "warn \"Disabled $cfg because \$$varname\""
+ fi
+ done
+fi
+
if test -n "$WARNINGS"; then
printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color"
enabled fatal_warnings && exit 1
OpenPOWER on IntegriCloud