diff options
author | Ganesh Ajjanagadde <gajjanagadde@gmail.com> | 2015-08-28 10:39:59 -0400 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-09-07 16:27:17 +0200 |
commit | 3e830b6dc844219673b6a036d8a3bd326ac4f9e2 (patch) | |
tree | df304a460d7b0563349cb60672f55194479c0bd8 | |
parent | 1f1c10083352d2d118818b31ec223de8b24fae53 (diff) | |
download | ffmpeg-3e830b6dc844219673b6a036d8a3bd326ac4f9e2.tar.gz |
configure: colorize warning messages
This patch introduces color warning messages (yellow).
They are enabled whenever available.
Tested with zsh, bash, and sh (bash under --posix).
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rwxr-xr-x | configure | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -416,6 +416,14 @@ EOF } quotes='""' +if test -t 1; 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 +fi log(){ echo "$@" >> $logfile @@ -6201,7 +6209,7 @@ echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH cp_if_changed $TMPH libavutil/avconfig.h if test -n "$WARNINGS"; then - printf "\n$WARNINGS" + printf "\n%s%s$WARNINGS%s" "$warn_color" "$bold_color" "$reset_color" enabled fatal_warnings && exit 1 fi |