[FFmpeg-devel] [PATCH 1/2] configure: warn when en/disabling has no effect.

Alexander Strasser eclipse7 at gmx.net
Thu Nov 15 20:32:40 CET 2012


Hi Nicolas,

Nicolas George wrote:
> Print a warning for --enable- or --disable-something=pattern
> does not match any component.
> 
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
>  configure |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index ae11f5d..0700b1f 100755
> --- a/configure
> +++ b/configure
> @@ -2216,7 +2216,9 @@ for opt do
>      is_in "${thing}s" $COMPONENT_LIST || die_unknown "$opt"
>      eval list=\$$(toupper $thing)_LIST
>      name=$(echo "${optval}" | sed "s/,/_${thing}|/g")_${thing}
> -    $action $(filter "$name" $list)
> +    list=$(filter "$name" $list)
> +    [ "$list" = "" ] && warn "Option $opt did not match anything"
> +    $action $list
>      ;;
>      --enable-?*|--disable-?*)
>      eval $(echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g')

  Not sure if it is worth using [ here. But OTOH it is used similar
at other places too...

  Anyway LGTM!

  Alexander


More information about the ffmpeg-devel mailing list