[FFmpeg-cvslog] configure: Reenable colorized warnings and check for tput's existence

Timothy Gu git at videolan.org
Tue Sep 8 05:42:38 CEST 2015


ffmpeg | branch: master | Timothy Gu <timothygu99 at gmail.com> | Mon Sep  7 19:11:16 2015 -0700| [617d53f4c7e43b5df6f99b363b550ff7b0007c6e] | committer: Timothy Gu

configure: Reenable colorized warnings and check for tput's existence

Untested.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=617d53f4c7e43b5df6f99b363b550ff7b0007c6e
---

 configure |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index 8c1309f..cd0c22a 100755
--- a/configure
+++ b/configure
@@ -416,6 +416,14 @@ 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)
+    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
 



More information about the ffmpeg-cvslog mailing list