summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2015-09-07 19:11:16 -0700
committerTimothy Gu <timothygu99@gmail.com>2015-09-07 20:41:38 -0700
commit617d53f4c7e43b5df6f99b363b550ff7b0007c6e (patch)
tree6638c96d9592ab65a93ddee71c01b9e989ec9d60 /configure
parent12e6b64cd47c2e2c07f1bbeff83b1297717658c4 (diff)
configure: Reenable colorized warnings and check for tput's existence
Untested.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 9 insertions, 1 deletions
diff --git a/configure b/configure
index 8c1309f16b..cd0c22a514 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