[m-rev.] Add --with-default-grade to configure

Ralph Becket rafe at cs.mu.OZ.AU
Mon Oct 4 17:40:22 AEST 2004


Estimated hours taken: 0.2
Branches: main

configure.in:
	Added a new option, --with-default-grade to set the default grade
	used by the compiler to be built in this workspace.  This patch
	was suggested by Peter Moulder.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.401
diff -u -r1.401 configure.in
--- configure.in        11 Sep 2004 12:15:06 -0000      1.401
+++ configure.in        13 Sep 2004 00:28:31 -0000
@@ -2414,6 +2414,23 @@
 # enable conservative garbage collection by default.
 # We also allow users to override the default grade by setting
 # "DEFAULT_GRADE" in the environment before invoking configure.
+
+AC_ARG_WITH(default-grade,
+    AS_HELP_STRING([--with-default-grade=GRADE],
+                   [Have the built compiler default to using GRADE instead of the default asm_fast.gc]),
+    [case "$withval" in
+      # Handle `--with-default-grade' (no `=GRADE') and
+      # `--without-default-grade' flags.
+      yes|no)
+        AC_MSG_ERROR([Must supply a valid grade if using --with-default-grade.])
+        ;;
+      *)
+        # Perhaps do better checking on the supplied value here.
+        DEFAULT_GRADE="$withval"
+        export DEFAULT_GRADE
+        ;;
+     esac], [])
+
 if test "$DEFAULT_GRADE" = ""; then                                             
        DEFAULT_GRADE=$DEFAULT_BASE_GRADE.gc
 fi

--------------------------------------------------------------------------
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