[m-dev.] for review: clean up configure for use with MSVC
Peter Ross
peter.ross at miscrit.be
Sat Aug 26 02:53:46 AEST 2000
Hi,
===================================================================
Estimated hours taken: 1
configure.in:
Install as many hlc grades as possible.
When compiling with MSVC, use hlc.gc as the default grade.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.219
diff -u -r1.219 configure.in
--- configure.in 2000/08/23 22:50:36 1.219
+++ configure.in 2000/08/25 16:41:36
@@ -1652,11 +1652,7 @@
if test $mercury_cv_gcc_model_reg = yes; then
BEST_GRADE=reg
else
- if test $ac_microsoft = yes; then
- BEST_GRADE=hlc
- else
- BEST_GRADE=none
- fi
+ BEST_GRADE=none
fi
fi
@@ -1687,11 +1683,15 @@
rm -f library/*.c compiler/*.c browser/*.c profiler/*.c
fi
else
- MERCURY_MSG("using \`GRADE=$GRADE' to compile the compiler")
+ # If we are using the MS compiler we want to install all the
+ # none.* and hlc.* grades. The easiest way to do this is to
+ # pretend we want to use the none.gc grade and then override it
+ # later.
+ if test $ac_microsoft = no; then
+ MERCURY_MSG("using \`GRADE=$GRADE' to compile the compiler")
+ fi
fi
-AC_SUBST(GRADE)
-
if test "$DEFAULT_GRADE" = ""; then
DEFAULT_GRADE=$GRADE
# For Irix 5.x, shared libraries are incompatible
@@ -1703,8 +1703,6 @@
;;
esac
fi
-MERCURY_MSG("using \`DEFAULT_GRADE=$DEFAULT_GRADE' as the default grade for applications")
-AC_SUBST(DEFAULT_GRADE)
#
# Figure out which grades to use if --enable-all-grades is specified.
@@ -1768,14 +1766,28 @@
# add `.debug' (--debug) grades
LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr.debug"
-# add `hlc' (--high-level-code, i.e. MLDS back-end) grade
-LIBGRADES="$LIBGRADES hlc.gc"
+# add `hlc' (--high-level-code, i.e. MLDS back-end) grades
+LIBGRADES="$LIBGRADES hlc hlc.gc"
-# Not all grades compile with the MS compiler, only install those grades
-# which do.
+# add `.prof' (--profiling) grades, if time profiling is supported,
+# and a `.memprof' (--memory-profiling) grade.
+if test $mercury_cv_profiling = yes; then
+ LIBGRADES="$LIBGRADES hlc.gc.prof"
+fi
+LIBGRADES="$LIBGRADES hlc.gc.memprof"
+
+# If we are using the Microsoft compiler then use hlc.gc as the default
+# grade.
if test $ac_microsoft = yes; then
- LIBGRADES=none.gc
+ GRADE=hlc.gc
+ DEFAULT_GRADE=hlc.gc
+ MERCURY_MSG("\`GRADE=$GRADE' to compile the compiler")
fi
+AC_SUBST(GRADE)
+
+# Output default grade
+MERCURY_MSG("using \`DEFAULT_GRADE=$DEFAULT_GRADE' as the default grade for applications")
+AC_SUBST(DEFAULT_GRADE)
# remove GRADE from LIBGRADES
LIBGRADES=` echo " $LIBGRADES " | sed "s/ $GRADE / /" `
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list