diff: configure.in bug fixes

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jan 21 03:01:51 AEDT 1999


Estimated hours taken: 0.5

configure.in:
	Don't pass `-fno-gcse' if gcc version is 2.8*.
	Also fix a bug in the check for gcc 2.8*.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.145
diff -u -r1.145 configure.in
--- configure.in	1998/12/16 20:15:51	1.145
+++ configure.in	1999/01/20 15:56:32
@@ -1195,7 +1195,12 @@
 save_CC="$CC"
 save_LIBRARY_PATH="$LIBRARY_PATH"
 CFLAGS_FOR_REGS=
-CFLAGS_FOR_GOTOS="-fno-defer-pop -fno-function-cse -fno-gcse"
+case $ac_cv_prog_gcc in yes)
+    case "`$CC --version < /dev/null`" in
+	2.8*) CFLAGS_FOR_GOTOS="-fno-defer-pop -fno-function-cse" ;;
+	*)    CFLAGS_FOR_GOTOS="-fno-defer-pop -fno-function-cse -fno-gcse" ;;
+    esac ;;
+esac
 case "$host" in
 	mips-sgi-irix5.*)
 		CC="$CC -non_shared -mno-abicalls"
@@ -1227,12 +1232,14 @@
 		mercury_cv_gcc_labels=no
 		;;
 	sparc*)
-		case "`$CC --version`" in
-		    gcc-2.8*)
+		case $ac_cv_prog_gcc in yes)
+		    case "`$CC --version < /dev/null`" in 2.8*)
 			AC_MSG_WARN(*** Mercury might not work with " \
 				"gcc 2.8 on sparc!)
 			AC_MSG_WARN(We advise using gcc 2.7.x or egcs.)
 			;;
+		    esac
+		    ;;
 		esac
 		;;
 esac

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "Binaries may die
WWW: <http://www.cs.mu.oz.au/~fjh>  |   but source code lives forever"
PGP: finger fjh at 128.250.37.3        |     -- leaked Microsoft memo.



More information about the developers mailing list