On Tue, Sep 8, 2015 at 3:17 PM, Ganesh Ajjanagadde <gajjanaga...@gmail.com> wrote: > Previous color support relies on existence of tput. > Unfortunately, tput is not available on windows. > According to > https://stackoverflow.com/questions/19710074/tput-color-definitions-for-windows-git-shell, > using ANSI color codes for Windows should be safe. > Thus, tput is used whenever possible; and falls back to ANSI codes when it is > unavailable. > > Untested on Windows. > > Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> > --- > configure | 18 ++++++++++++------ > 1 file changed, 12 insertions(+), 6 deletions(-) > > diff --git a/configure b/configure > index cd0c22a..99e1cc4 100755 > --- a/configure > +++ b/configure > @@ -416,12 +416,18 @@ EOF > } > > 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 > + bold_color="" > + warn_color=$'\033[33;1m' > + reset_color=$'\033[0m' > fi > fi > > -- > 2.5.1 >
Should add a caveat: according to https://en.wikipedia.org/wiki/ANSI_escape_code, these color codes are not supported by the Win32 console. Like I said, I can't test this, so if this does not work on windows, please ignore the patch. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel