[m-dev.] diff: fix uses of AC_ARG_ENABLE
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat May 22 12:32:56 AEST 1999
Estimated hours taken: 0.5
configure.in:
Fix a couple of bugs relating to the use of AC_ARG_ENABLE:
the action in the third argument of AC_ARG_ENABLE is invoked
even when the option passed on the command line is `--disable-foo',
and so configure.in needs to set the option to `$enableval'
which may be either "yes" or "no") rather than unconditionally
setting it to "yes".
Workspace: /home/mercury0/fjh/mercury-other
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.166
diff -u -r1.166 configure.in
--- configure.in 1999/05/22 02:16:42 1.166
+++ configure.in 1999/05/22 02:28:20
@@ -1517,9 +1517,9 @@
AC_ARG_ENABLE(all-grades,
[ --enable-all-grades install all the different versions of the library],
-enable_all_grades=yes,enable_all_grades=no)
+enable_all_grades="$enableval",enable_all_grades=no)
-if test $enable_all_grades = yes; then
+if test "$enable_all_grades" = yes; then
LIBGRADES="$ALL_LIBGRADES"
else
LIBGRADES="$BEST_GRADE"
@@ -1544,7 +1544,7 @@
# add `.tr' (--trailing) grades
LIBGRADES="$LIBGRADES $DEFAULT_GRADE.tr"
-if test $enable_all_grades = yes; then
+if test "$enable_all_grades" = yes; then
DEFAULT_GRADE_NOGC="`echo $DEFAULT_GRADE | sed 's/\.gc$//'`"
LIBGRADES="$LIBGRADES $DEFAULT_GRADE_NOGC.tr"
if test $mercury_cv_profiling = yes; then
@@ -1566,8 +1566,8 @@
#
AC_ARG_ENABLE(decl-debug,
[ --enable-decl-debug enable the declarative debugger],
-mercury_cv_enable_decl_debug=yes,mercury_cv_enable_decl_debug=no)
-if test $mercury_cv_enable_decl_debug = "yes"; then
+mercury_cv_enable_decl_debug="$enableval",mercury_cv_enable_decl_debug=no)
+if test "$mercury_cv_enable_decl_debug" = "yes"; then
AC_DEFINE(MR_USE_DECLARATIVE_DEBUGGER)
fi
#-----------------------------------------------------------------------------#
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- 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