[FFmpeg-devel] [PATCH] configure: colorize warnings on Windows

Timothy Gu timothygu99 at gmail.com
Tue Sep 8 21:34:00 CEST 2015


On Tue, Sep 8, 2015 at 12:18 PM Ganesh Ajjanagadde <gajjanagadde at gmail.com>
wrote:

>  quotes='""'
> -if test -t 1 && which tput >/dev/null; then
> -    ncolors=$(tput colors)
> -    if test -n "$ncolors" && test $ncolors -ge 8; then
> -        bold_color=$(tput bold)
> -        warn_color=$(tput setaf 3)
> -        reset_color=$(tput sgr0)
> +if test -t 1; then
> +    if which tput >/dev/null; then
> +        ncolors=$(tput colors)
> +        if test -n "$ncolors" && test $ncolors -ge 8; then
> +            bold_color=$(tput bold)
> +            warn_color=$(tput setaf 3)
> +            reset_color=$(tput sgr0)
> +        fi
>


> +    else
>

1. This doesn't check for Windows.
2. Not all Windows terminals support ANSI color codes.


> +        bold_color=""
> +        warn_color=$'\033[33;1m'
> +        reset_color=$'\033[0m'
>      fi
>  fi
>

Timtohy


More information about the ffmpeg-devel mailing list