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 <gajjanaga...@gmail.com>
---
 configure | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 91f366e..7700d9d 100755
--- a/configure
+++ b/configure
@@ -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
@@ -6200,7 +6208,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
 
-- 
2.5.0

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to