[m-rev.] diff: fix hard-coded references to gcc
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Sep 12 03:19:40 AEST 2002
Estimated hours taken: 1
Branches: main
Some more changes for MacOS.
configure.in:
Fix hard-coded references to gcc; this is needed to build on systems such
as MacOS that only have cc, not gcc.
Rename $GCC as $GCC_PROG, to avoid conflicting with the $GCC variable
set by AC_PROG_CC.
Change some tests which were wrongly testing $GCC_PROG to instead test $GCC.
Workspace: /private/automount/home/users/f/fe/fergus/macosx/mercury-latest
cvs diff: in directory .:
cvs diff: ignoring CVS/Root because it specifies a non-existent repository /home/mercury1/repository
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.315
diff -u -d -r1.315 configure.in
--- configure.in 11 Sep 2002 11:58:02 -0000 1.315
+++ configure.in 11 Sep 2002 17:18:55 -0000
@@ -341,6 +341,13 @@
AC_PROG_CC
AC_SUBST(CC)
+# AC_PROG_CC sets GCC to yes if $CC is GNU C.
+if test "$GCC" = "yes"; then
+ GCC_PROG=$CC
+else
+ AC_PATH_PROG(GCC_PROG,gcc)
+fi
+
AC_EXEEXT
AC_SUBST(EXEEXT)
@@ -2129,7 +2136,7 @@
LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr.debug"
# add `hlc' (--high-level-code, i.e. MLDS back-end) grades
-if test "$enable_inefficient_grades" = yes -a "$CC" = gcc ; then
+if test "$enable_inefficient_grades" = yes -a "$GCC" = yes ; then
LIBGRADES="$LIBGRADES hlc.gc hlc_nest.gc"
else
LIBGRADES="$LIBGRADES hlc.gc"
@@ -2329,7 +2336,6 @@
then
mercury_cv_asm_does_full_preprocessing="yes"
else
- AS="gcc -c -x assembler-with-cpp"
mercury_cv_asm_does_full_preprocessing="no"
fi
rm -f conftest*
@@ -2339,7 +2345,7 @@
])
AC_MSG_RESULT($mercury_cv_asm_does_full_preprocessing)
if test $mercury_cv_asm_does_full_preprocessing = "no"; then
- AS="gcc -c -x assembler-with-cpp"
+ AS="$GCC_PROG -c -x assembler-with-cpp"
fi
AC_SUBST(AS)
#-----------------------------------------------------------------------------#
@@ -2378,7 +2384,6 @@
AC_DEFINE(MR_CANNOT_USE_STRUCTURE_ASSIGNMENT)
fi
#-----------------------------------------------------------------------------#
-AC_PATH_PROG(GCC,gcc)
AC_MSG_CHECKING(whether Mercury supports shared libraries on this system)
# We ought to use $target here rather than $host - but we don't
# support cross-compilation at the moment anyhow.
@@ -2387,9 +2392,9 @@
# see Mmake.common.in for documentation on the meaning of these variables
LINK_SHARED_OBJ="$CC -shared"
LINK_SHARED_OBJ_SH="$CC -shared"
-if test "$GCC" != ""; then
- SHARED_LIBS='`gcc -print-libgcc-file-name` $(MATH_LIB) -lc'
- SHARED_LIBS_SH='`gcc -print-libgcc-file-name` $MATH_LIB -lc'
+if test "$GCC" = "yes"; then
+ SHARED_LIBS='`$CC -print-libgcc-file-name` $(MATH_LIB) -lc'
+ SHARED_LIBS_SH='`$CC -print-libgcc-file-name` $MATH_LIB -lc'
else
SHARED_LIBS='$(MATH_LIB) -lc'
SHARED_LIBS_SH='$MATH_LIB -lc'
@@ -2509,9 +2514,9 @@
;;
alpha*-dec-osf*)
AC_MSG_RESULT(yes)
- if test "$GCC" != ""; then
+ if test "$GCC_PROG" != ""; then
# use gcc to link shared objects
- LINK_SHARED_OBJ="gcc -shared \
+ LINK_SHARED_OBJ="$GCC_PROG -shared \
-Wl,-O3,-update_registry,\$(SO_LOCATIONS_DIR)so_locations"
LINK_SHARED_OBJ_SH="gcc -shared \
-Wl,-O3,-update_registry,\${SO_LOCATIONS_DIR}so_locations"
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list