[m-rev.] for review: configure.in: HAVE_ASM_LABELS; separate build dir
Peter Moulder
pmoulder at csse.monash.edu.au
Wed Feb 27 19:24:45 AEDT 2002
Two changes to configure.in:
- The configure.in changes necessary to allow building in a
different directory from the source directory.
configure.in isn't the only file that would need changing: the
(m)makefiles would also need changing to use proper VPATH
etc. settings. I haven't made those changes, as I don't know if
there's some reason why this hasn't already been done. (Is there
any problem with using VPATH etc. in Mmakefiles?)
In any case, I thought it worthwhile committing this change now,
as one part (the first hunk of the patch) is non-obvious; the
problem being that at the time that the variable is evaluated,
srcdir isn't yet defined. So instead I get the VERSION string at
the time that autoconf is run instead of when configure is run.
- Change $HAVE_ASM_LABELS test from 1 to yes. However, as far as I
can see from a simple grep, all the HAVE_ASM_LABELS stuff could be
removed.
pjm.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.299
diff -d -u -r1.299 configure.in
--- configure.in 18 Feb 2002 07:00:42 -0000 1.299
+++ configure.in 27 Feb 2002 08:03:14 -0000
@@ -41,12 +41,12 @@
fi
#-----------------------------------------------------------------------------#
AC_CONFIG_HEADER(runtime/mercury_conf.h)
-AC_PREFIX_DEFAULT(/usr/local/mercury-`. ./VERSION; echo $VERSION`)
+AC_PREFIX_DEFAULT(/usr/local/mercury-"esyscmd([grep '^VERSION=' VERSION|cut -d= -f2-|tr -d \\n])")
AC_CANONICAL_HOST
FULLARCH="$host"
AC_SUBST(FULLARCH)
AC_DEFINE_UNQUOTED(MR_FULLARCH, "$FULLARCH")
-. ./VERSION
+. "${srcdir}"/VERSION
AC_DEFINE_UNQUOTED(MR_VERSION, "$VERSION")
if test "$prefix" = "NONE"; then
PREFIX="$ac_default_prefix"
@@ -1608,7 +1608,7 @@
AC_DEFINE(MR_HAVE_GCC_LABELS)
fi
-if test $mercury_cv_gcc_labels = yes; then
+if test "$mercury_cv_gcc_labels" = yes; then
AC_MSG_CHECKING(whether we can use asm labels)
AC_CACHE_VAL(mercury_cv_asm_labels,
@@ -1636,7 +1636,9 @@
fi
HAVE_ASM_LABELS=$mercury_cv_asm_labels
AC_SUBST(HAVE_ASM_LABELS)
-if test $HAVE_ASM_LABELS = 1; then
+# [pjm]: The below used to test against 1 instead of yes; I'm guessing that that's a bug.
+# However, note that a grep -r HAVE_ASM_LABELS suggests that it isn't being used anyway.
+if test "$HAVE_ASM_LABELS" = yes; then
AC_DEFINE(MR_HAVE_ASM_LABELS)
fi
@@ -1648,6 +1650,7 @@
# We need to ensure that runtime/mercury_conf.h exists, since some of the
# programs we attempt to compile below indirectly include it.
test -f runtime/mercury_conf.h || {
+ test -d runtime || mkdir runtime
cat > runtime/mercury_conf.h <<EOF
#define MR_WORD_TYPE $MR_WORD_TYPE
EOF
--------------------------------------------------------------------------
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