summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-14 07:30:27 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-11-14 07:30:27 +0000
commit809ccc6ca489412356cbebf2134adf1475e8b5f4 (patch)
treee7f3963d5df9a9efb868270660b28d10c7507bca /gcc/configure.ac
parentcb65bd7c9c2c4b0b86ba60c60403cd686a5ee347 (diff)
downloadlinaro-gcc-809ccc6ca489412356cbebf2134adf1475e8b5f4.tar.gz
linaro-gcc-809ccc6ca489412356cbebf2134adf1475e8b5f4.tar.bz2
linaro-gcc-809ccc6ca489412356cbebf2134adf1475e8b5f4.zip
* configure.ac (--with-diagnostics-color): New configure
option, default to --with-diagnostics-color=auto. * toplev.c (process_options): Use DIAGNOSTICS_COLOR_DEFAULT to determine -fdiagnostics-color= option default. * doc/invoke.texi (-fdiagnostics-color=): Document new default. * configure: Regenerated. * config.in: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217540 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 0f7ab894ec5..f6e7ec3529e 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5651,6 +5651,34 @@ if test x"${LINKER_HASH_STYLE}" != x; then
[The linker hash style])
fi
+# Specify what should be the default of -fdiagnostics-color option.
+AC_ARG_WITH([diagnostics-color],
+[AC_HELP_STRING([--with-diagnostics-color={never,auto,auto-if-env,always}],
+ [specify the default of -fdiagnostics-color option
+ auto-if-env stands for -fdiagnostics-color=auto if
+ GCC_COLOR environment variable is present and
+ -fdiagnostics-color=never otherwise])],
+[case x"$withval" in
+ xnever)
+ DIAGNOSTICS_COLOR_DEFAULT=DIAGNOSTICS_COLOR_NO
+ ;;
+ xauto)
+ DIAGNOSTICS_COLOR_DEFAULT=DIAGNOSTICS_COLOR_AUTO
+ ;;
+ xauto-if-env)
+ DIAGNOSTICS_COLOR_DEFAULT=-1
+ ;;
+ xalways)
+ DIAGNOSTICS_COLOR_DEFAULT=DIAGNOSTICS_COLOR_YES
+ ;;
+ *)
+ AC_MSG_ERROR([$withval is an invalid option to --with-diagnostics-color])
+ ;;
+ esac],
+[DIAGNOSTICS_COLOR_DEFAULT=DIAGNOSTICS_COLOR_AUTO])
+AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT,
+ [The default for -fdiagnostics-color option])
+
# Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit
# of jit/jit-playback.c.
cat > gcc-driver-name.h <<EOF