[m-rev.] for review: configure.in improvements
Simon Taylor
stayl at cs.mu.OZ.AU
Wed Nov 6 22:41:51 AEDT 2002
Estimated hours taken: 1
Branches: main
configure.in:
Give proper error messages if options passed to configure
would require recompiling Mercury files and an installed
Mercury compiler is not available.
Regenerate dependencies if `--enable-gcc-backend' or
`--disable-aditi-backend' are specified.
Update the names of the shared libraries to remove
if the installation prefix might have changed.
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.336
diff -u -u -r1.336 configure.in
--- configure.in 4 Nov 2002 01:49:06 -0000 1.336
+++ configure.in 6 Nov 2002 07:14:48 -0000
@@ -40,6 +40,7 @@
exit
fi
#-----------------------------------------------------------------------------#
+remake_dependencies=false
AC_CONFIG_HEADER(runtime/mercury_conf.h)
AC_PREFIX_DEFAULT(/usr/local/mercury-`. ./VERSION; echo $VERSION`)
AC_CANONICAL_HOST
@@ -212,6 +213,18 @@
no)
;;
esac
+case $enable_gcc_back_end in
+ yes)
+ if test "$BOOTSTRAP_MC" = ""; then
+ AC_MSG_ERROR(--enable-gcc-back-end requires an already installed Mercury compiler.)
+ enable_gcc_back_end=no
+ else
+ # This will regenerate compiler/maybe_mlds_to_gcc.m.
+ remake_dependencies=true
+ fi
+ ;;
+esac
+
AC_MSG_RESULT($enable_gcc_back_end)
ENABLE_GCC_BACK_END=$enable_gcc_back_end
GCC_SRC_DIR=$gcc_src_dir
@@ -226,6 +239,18 @@
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)
+case $enable_aditi_back_end in
+ no)
+ if test "$BOOTSTRAP_MC" = ""; then
+ AC_MSG_WARN(--disable-aditi-back-end requires an already installed Mercury compiler.)
+ enable_aditi_back_end=yes
+ else
+ # This will regenerate compiler/rl_out.m and
+ # compiler/rl_file.m.
+ remake_dependencies=true
+ fi
+ ;;
+esac
AC_MSG_RESULT($enable_aditi_back_end)
ENABLE_ADITI_BACK_END=$enable_aditi_back_end
AC_SUBST(ENABLE_ADITI_BACK_END)
@@ -2042,7 +2067,7 @@
esac
# Choose whether to use $BOOTSTRAP_GRADE or $BEST_GRADE_FOR_COMPILER,
-# and if necessary remove the installed
+# and if necessary remove the previously built C files.
if test "$BEST_GRADE_FOR_COMPILER" != "$BOOTSTRAP_GRADE"; then
if test "$BOOTSTRAP_MC" = ""; then
@@ -3160,10 +3185,14 @@
# The --prefix is hard-coded in the scripts, which are regenerated every
# time you run configure, and also (unfortunately) in the .so files.
-# The following rm command is here to ensure that things will work correctly
+# The following rm commands are here to ensure that things will work correctly
# if you rerun configure with a new --prefix and then don't do a `make clean'
# before running `make'.
-rm -f runtime/libmer.so library/libmercury.so bytecode/libmbi.so
+rm -f runtime/libmer_rt.so library/libmer_std.so bytecode/libmbi.so
+rm -f trace/libmer_trace.so browser/libmer_browse.so
)
+case $remake_dependencies in true)
+ mmake depend ;;
+esac
#-----------------------------------------------------------------------------#
--------------------------------------------------------------------------
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