diff options
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r-- | gcc/configure.ac | 28 |
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 |