+dnl Search for GCC specific build problems we know about
+if test "$GCC" = "yes"; then
+AC_MSG_CHECKING(for buggy gcc versions)
+GCC_VERSION=`$CC --version`
+case `uname -s`:`uname -m`:$GCC_VERSION in
+ dnl egcs 2.90.21 (egcs-1.00 release)
+ dnl egcs 2.90.29 (egcs-1.0.3 release)
+ *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
+ dnl Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures
+ dnl without also using `-fno-schedule-insns'.
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-schedule-insns*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures)
+ AC_MSG_WARN(without also using -fno-schedule-insns.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ dnl egcs-2.91.57 (egcs-1.1 release)
+ dnl egcs-2.91.66 (egcs-1.1.2 release)
+ Linux:alpha:egcs-2.91.*)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(There have been reports of egcs-1.1 not compiling XEmacs correctly on)
+ AC_MSG_WARN(Alpha Linux. There have also been reports that egcs-1.0.3a is O.K.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ *:i*86*:2.7.2*)
+ case "$GCC_VERSION" in
+ 2.7.2)
+ case "$CFLAGS" in
+ *-O2*|*-O3*)
+ case "$CFLAGS" in
+ *-fno-strength-reduce*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
+ AC_MSG_WARN(-fno-strength-reduce.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ case "$CFLAGS" in
+ *-fno-caller-saves*) ;;
+ *)
+ AC_MSG_RESULT(Yes)
+ AC_MSG_WARN(Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using)
+ AC_MSG_WARN(-fno-caller-saves.)
+ AC_MSG_ERROR(Aborting due to known problem)
+ ;;
+ esac
+ ;;
+esac
+fi
+AC_MSG_RESULT(No)
+