[m-dev.] for review: new configure options
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Jan 18 22:06:39 AEDT 2001
Estimated hours taken: 1
configure.in:
Add new option `--with-cc=<program>'.
Add new option `--disable-aditi-back-end'.
Delete the long-obsolete AC_C_CROSS macro.
Mmake.common.in:
Get the setting of INCLUDE_ADITI_OUTPUT from the value of the
configure --enable/disable-aditi-back-end option.
Add some comments.
Workspace: /home/hg/fjh/gcc-cvs/gcc/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.241
diff -u -d -r1.241 configure.in
--- configure.in 2001/01/17 02:43:01 1.241
+++ configure.in 2001/01/18 10:57:23
@@ -120,6 +120,24 @@
rm -f conftest*
fi
#-----------------------------------------------------------------------------#
+# Let the user specify which C compiler to use.
+AC_ARG_WITH(cc,
+[ --with-cc=<program> Specify which C compiler to use.],
+mercury_cv_with_cc="$withval", mercury_cv_with_cc="")
+case "$mercury_cv_with_cc" in
+ yes) AC_MSG_ERROR(missing argument to --with-cc=... option)
+ exit 1
+ ;;
+ no) AC_MSG_ERROR(invalid option --without-cc)
+ exit 1
+ ;;
+ "")
+ ;;
+ *)
+ CC="$mercury_cv_with_cc"
+ ;;
+esac
+#-----------------------------------------------------------------------------#
#
# Find the GCC source code
# and determine whether or not to enable the GCC back-end interface.
@@ -184,6 +202,18 @@
AC_SUBST(ENABLE_GCC_BACK_END)
AC_SUBST(GCC_SRC_DIR)
#-----------------------------------------------------------------------------#
+#
+# Determine whether or not to enable the Aditi back-end.
+#
+AC_ARG_ENABLE(aditi-back-end,
+[ --disable-aditi-back-end
+ disable the Mercury compiler's Aditi back-end],
+enable_aditi_back_end="$enableval",enable_aditi_back_end=yes)
+AC_MSG_CHECKING(whether to enable the Aditi back-end)
+AC_MSG_RESULT($enable_aditi_back_end)
+ENABLE_ADITI_BACK_END=$enable_aditi_back_end
+AC_SUBST(ENABLE_ADITI_BACK_END)
+#-----------------------------------------------------------------------------#
MERCURY_MSG("looking for GNU Make...")
AC_PROGRAMS_CHECK(GNU_MAKE,gmake make)
if test "$GNU_MAKE" != ""; then
@@ -300,7 +330,6 @@
LIBS="-L/usr/local/lib $LIBS"
AC_PROG_CPP
-AC_C_CROSS
AC_RETSIGTYPE
#-----------------------------------------------------------------------------#
# Check for `-lm': some systems, e.g. MacOS X (Darwin), don't have it.
Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.49
diff -u -d -r1.49 Mmake.common.in
--- Mmake.common.in 2001/01/17 02:43:01 1.49
+++ Mmake.common.in 2001/01/18 10:38:03
@@ -157,16 +157,22 @@
# Do we want to include the support for compiling directly to assembler
# using the GCC back-end in the compiler?
# This requires that you have the source code for gcc in the
-# directory ../gcc.
+# directory specified by GCC_SRC_DIR (below).
+# This can be set using the `--enable-gcc-back-end' or `--disable-gcc-back-end'
+# options to configure; by default, configure will try to autoconfigure
+# it based on whether the gcc source is present.
ENABLE_GCC_BACK_END = @ENABLE_GCC_BACK_END@
# Specify the directory containing the GCC sources.
-# This should contain subdirectories `gcc', `libiberty', etc.,
+# This must be a relative path, not an absolute path.
+# The directory named should contain subdirectories `gcc', `libiberty', etc.,
# and the `gcc' subdirectory should contain files `gcc.c',
# `tree.c', `tree.h', etc.
GCC_SRC_DIR = @GCC_SRC_DIR@
# Do we want to include the support for Aditi compilation in the compiler?
+# This can be set using the `--enable-aditi-back-end' or
+# `--disable-aditi-back-end' options to configure.
# It is not practical to include the code to output Aditi-RL in the alias
# branch compiler - it currently takes more than an hour to compile
# compiler/rl_code.m, due to performance problems compiling large disjunctions
@@ -177,7 +183,7 @@
# `mmake depend' must be run in any compiler directories affected by
# the changed value (tools/bootcheck will do this automatically for
# the stage2 and stage3 directories).
-INCLUDE_ADITI_OUTPUT = yes
+INCLUDE_ADITI_OUTPUT = @ENABLE_ADITI_BACK_END@
#-----------------------------------------------------------------------------#
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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