>>>>> "Akim" == Akim Demaille <[EMAIL PROTECTED]> writes:

Akim> It is Ian who suggested twice that in these conditions, we
Akim> should get rid of HOST as an argument.

So the proposal below still does this, but it is open to discussion.

This is a real proposal this time, I think we have reached an
agreement.  Remains to check build != host, and the patch from Mo so
that cross compilers are searched for when --host is used.

        Akim

PS/ There is one thing which might be debatable: I used AC_DEFUN_ONCE
for AC_CANONICAL_BUILD etc. because I think it is right, and it avoids
duplicate --help documentation if for instance AC_A_TARGET is called,
and then AC_C_BUILD.  But I know Tom doesn't like AC_DEFUN_ONCE.


Index: ChangeLog
===================================================================
RCS file: /cvs/autoconf/ChangeLog,v
retrieving revision 1.562
diff -u -r1.562 ChangeLog
--- ChangeLog   2000/04/20 11:49:53     1.562
+++ ChangeLog   2000/04/26 10:35:39
@@ -1,3 +1,54 @@
+2000-04-26  Akim Demaille  <[EMAIL PROTECTED]>
+
+       Provide a macro to canonicalize a configuration name.
+       Suggested by Ralf Corsepius.
+
+       *  acgeneral.m4 (AC_CANONICALIZE): New macro.
+       (_AC_CANONICAL_THING): Use it.
+
+
+       Change the defaults for build, host, and target systems:
+       build  defaults to `config.guess`.
+       host   defaults to $build.
+       target defaults to $host.
+       Suggested by Mo DeJong, Pavel Roskin, Tom Tromey, Ian Lance
+       Taylor, and many others.
+
+       * acgeneral.m4 (_AC_INIT_PARSE_ARGS): Set `$build', `$host' and
+       `$target' to nothing instead of NONE.
+       (AC_CANONICAL_SYSTEM): AU_DEFUN'd as `AC_CANONICAL_TARGET'.
+       (_AC_CANONICAL_THING): Use an explicit m4_case to set the defaults
+       depending upon the THING.
+       Implement the default values.
+       (AC_CANONICAL_TARGET): Handle the `AC_ARG_PROGRAM' part
+       `AC_CANONICAL_SYSTEM' used to provide.
+       * doc/autoconf.texi: Adjust.
+
+
+       Because of the new defaults, because specifying HOST on the
+       command line of `configure' was not the same as passing it to
+       `--host', drop the support of HOST as an argument.
+       Suggested by Ian Lance Taylor.
+
+       * acgeneral.m4 (_AC_INIT_PARSE_ARGS, _AC_CANONICAL_THING): Remove
+       the support of `$nonopt'.
+       Die when used.
+
+
+       Documenting --build, --host and --target when configure does not
+       handle them causes confusion.
+       Suggested by Pavel Roskin.
+       Nevertheless configure must not die on such an `unsupported'
+       option: it does happen that people build an entire tree of
+       packages, some of them expecting `--host' etc. some others not.
+       Stressed by Tom Tromey and Ian Lance Taylor.
+
+       * acgeneral.m4 (HELP_CANON): New diversion.
+       (_AC_INIT_PARSE_ARGS): Don't document these options.
+       (AC_CANONICAL_BUILD, AC_CANONICAL_HOST, AC_CANONICAL_TARGET):
+       Document your associated option.
+
+
 2000-04-20  Dave Love  <[EMAIL PROTECTED]>
 
        * acspecific.m4 (AC_FUNC_MKTIME): Use AC_SUBST.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.437
diff -u -r1.437 acgeneral.m4
--- acgeneral.m4        2000/04/13 08:25:12     1.437
+++ acgeneral.m4        2000/04/26 10:41:21
@@ -77,6 +77,8 @@
 #   initialization code, option handling loop.
 # - HELP_BEGIN
 #   Handling `configure --help'.
+# - HELP_CANON
+#   Help msg for AC_CANONICAL_*
 # - HELP_ENABLE
 #   Help msg from AC_ARG_ENABLE.
 # - HELP_WITH
@@ -119,21 +121,25 @@
 define([_AC_DIVERT(NOTICE)],          1)
 define([_AC_DIVERT(DEFAULTS)],        2)
 define([_AC_DIVERT(INIT_PARSE_ARGS)], 3)
-define([_AC_DIVERT(HELP_BEGIN)],      4)
-define([_AC_DIVERT(HELP_ENABLE)],     5)
-define([_AC_DIVERT(HELP_WITH)],       6)
-define([_AC_DIVERT(HELP_VAR)],        7)
-define([_AC_DIVERT(HELP_END)],        8)
-define([_AC_DIVERT(VERSION_BEGIN)],   9)
-define([_AC_DIVERT(VERSION_END)],    10)
-define([_AC_DIVERT(INIT_PREPARE)],   11)
-
-define([_AC_DIVERT(NORMAL_4)],       20)
-define([_AC_DIVERT(NORMAL_3)],       21)
-define([_AC_DIVERT(NORMAL_2)],       22)
-define([_AC_DIVERT(NORMAL_1)],       23)
-define([_AC_DIVERT(NORMAL)],         24)
 
+define([_AC_DIVERT(HELP_BEGIN)],     10)
+define([_AC_DIVERT(HELP_CANON)],     11)
+define([_AC_DIVERT(HELP_ENABLE)],    12)
+define([_AC_DIVERT(HELP_WITH)],      13)
+define([_AC_DIVERT(HELP_VAR)],       14)
+define([_AC_DIVERT(HELP_END)],       15)
+
+define([_AC_DIVERT(VERSION_BEGIN)],  20)
+define([_AC_DIVERT(VERSION_END)],    21)
+
+define([_AC_DIVERT(INIT_PREPARE)],   30)
+
+define([_AC_DIVERT(NORMAL_4)],       50)
+define([_AC_DIVERT(NORMAL_3)],       51)
+define([_AC_DIVERT(NORMAL_2)],       52)
+define([_AC_DIVERT(NORMAL_1)],       53)
+define([_AC_DIVERT(NORMAL)],         54)
+
 define([_AC_DIVERT],
 [ifdef([_AC_DIVERT($1)],
        [indir([_AC_DIVERT($1)])],
@@ -290,7 +296,7 @@
 define(AC_REQUIRE,
 [AC_PROVIDE_IFELSE([$1],
                    [],
-                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])
+                   [AC_DIVERT(m4_eval(AC_DIVERT_DIVERSION - 1), [$1])])dnl
 ])
 
 
@@ -893,12 +899,11 @@
 ac_init_version=false
 # The variables have the same names as the options, with
 # dashes changed to underlines.
-build=NONE
+build=
 cache_file=/dev/null
 AC_SUBST(exec_prefix, NONE)dnl
-host=NONE
+host=
 no_create=
-nonopt=NONE
 no_recursion=
 AC_SUBST(prefix, NONE)dnl
 program_prefix=NONE
@@ -907,7 +912,7 @@
 silent=
 site=
 srcdir=
-target=NONE
+target=
 verbose=
 x_includes=NONE
 x_libraries=NONE
@@ -1214,13 +1219,7 @@
     export $ac_envvar ;;
 
   *)
-    if echo "$ac_option" | grep '[[^-a-zA-Z0-9.]]' >/dev/null 2>&1; then
-      AC_MSG_WARN(invalid host type: $ac_option)
-    fi
-    if test "x$nonopt" != xNONE; then
-      AC_MSG_ERROR(can only configure for one host and one target at a time)
-    fi
-    nonopt=$ac_option
+    AC_MSG_ERROR([you must use `--host' to specify the host type])
     ;;
 
   esac
@@ -1263,7 +1262,7 @@
                         [AC_PACKAGE_STRING],
                         [this package]) to adapt to many kinds of systems.
 
-Usage: $[0] [[OPTION]... [VAR=VALUE]... [HOST]]
+Usage: $[0] [[OPTION]]... [[VAR=VALUE]]...
 
 [To assign environment variables (e.g., CC, CFLAGS...), specify them as
 VAR=VALUE.
@@ -1278,7 +1277,7 @@
   -q, --quiet, --silent   do not print \`checking...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or ..]
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
 EOF
 
@@ -1311,26 +1310,28 @@
   --mandir=DIR           man documentation [PREFIX/man]
 EOF
 
-  cat <<\EOF
-
-Host type:
-  --host=HOST        configure for HOST [guessed]
-  --build=BUILD      configure for building on BUILD [BUILD=HOST]
-  --target=TARGET    configure for TARGET [TARGET=HOST]
-EOF
   cat <<\EOF]
 AC_DIVERT_POP()dnl
 dnl The order of the diversions here is
-dnl HELP_BEGIN, which may be prolongated by extra generic options
-dnl             such as with X or AC_ARG_PROGRAM.  Displayed only
-dnl             in long --help.
-dnl HELP_ENABLE, which starts with the trailer of the HELP_BEGIN
-dnl              section, then implements the header of the non
-dnl              generic options.
-dnl HELP_WITH,
-dnl HELP_VAR,
-dnl HELP_END, initialized below, in which we dump the trailer
-dnl           (handling of the recursion for instance).
+dnl - HELP_BEGIN
+dnl   which may be prolongated by extra generic options such as with X or
+dnl   AC_ARG_PROGRAM.  Displayed only in long --help.
+dnl
+dnl - HELP_CANON
+dnl   Support for cross compilation (--build, --host and --target).
+dnl   Display only in long --help.
+dnl
+dnl - HELP_ENABLE
+dnl   which starts with the trailer of the HELP_BEGIN, HELP_CANON section,
+dnl   then implements the header of the non generic options.
+dnl
+dnl - HELP_WITH
+dnl
+dnl - HELP_VAR
+dnl
+dnl - HELP_END
+dnl   initialized below, in which we dump the trailer (handling of the
+dnl   recursion for instance).
 AC_DIVERT_PUSH([HELP_ENABLE])dnl
 EOF
 fi
@@ -1692,9 +1693,9 @@
 
 
 
-## ----------------------------------- ##
-## Getting the canonical system type.  ##
-## ----------------------------------- ##
+## ------------------------- ##
+## Finding auxiliary files.  ##
+## ------------------------- ##
 
 
 # AC_CONFIG_AUX_DIR(DIR)
@@ -1747,102 +1748,114 @@
 ])# AC_CONFIG_AUX_DIRS
 
 
-# AC_CANONICAL_SYSTEM
-# -------------------
-# Canonicalize the host, target, and build system types.
-AC_DEFUN(AC_CANONICAL_SYSTEM,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_TARGET])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_BEFORE([$0], [AC_ARG_PROGRAM])
-# Do some error checking and defaulting for the host and target type.
+
+
+## ----------------------------------- ##
+## Getting the canonical system type.  ##
+## ----------------------------------- ##
+
 # The inputs are:
-#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#    configure --host=HOST --target=TARGET --build=BUILD
 #
 # The rules are:
-# 1. You are not allowed to specify --host, --target, and nonopt at the
-#    same time.
-# 2. Host defaults to nonopt.
-# 3. If nonopt is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target and build default to nonopt.
-# 5. If nonopt is not specified, then target and build default to host.
+# 1. Build defaults to the current host, as determined by config.guess.
+# 2. Host defaults to build.
+# 3. Target defaults to host.
 
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-case $host---$target---$nonopt in
-NONE---*---* | *---NONE---* | *---*---NONE) ;;
-*) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
-esac
 
-test "$host_alias" != "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-])# AC_CANONICAL_SYSTEM
+# AC_CANONICALIZE(THING)
+# ----------------------
+# Canonicalize the appropriate THING, generating the variables THING,
+# THING_{alias cpu vendor os}, and the associated cache entries.
+AC_DEFUN([AC_CANONICALIZE],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
+ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
+ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
+ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+AC_SUBST([$1],        [$ac_cv_$1])dnl
+AC_SUBST([$1_alias],  [$ac_cv_$1_alias])dnl
+AC_SUBST([$1_cpu],    [$ac_cv_$1_cpu])dnl
+AC_SUBST([$1_vendor], [$ac_cv_$1_vendor])dnl
+AC_SUBST([$1_os],     [$ac_cv_$1_os])dnl
+])# AC_CANONICALIZE
 
 
 # _AC_CANONICAL_THING(THING)
 # --------------------------
-# Worker routine for AC_CANONICAL_{HOST TARGET BUILD}.  THING is one of
-# `host', `target', or `build'.  Canonicalize the appropriate thing,
-# generating the variables THING, THING_{alias cpu vendor os}, and the
-# associated cache entries.  We also redo the cache entries if the user
-# specifies something different from ac_cv_$THING_alias on the command line.
-define(_AC_CANONICAL_THING,
-[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
-ifelse([$1], [host], , [AC_REQUIRE([AC_CANONICAL_HOST])])dnl
-AC_MSG_CHECKING([$1 system type])
-if test "x$ac_cv_$1" = "x" || (test "x$$1" != "xNONE" && test "x$$1" != 
"x$ac_cv_$1_alias"); then
-
-  # Make sure we can run config.sub.
-  if $ac_config_sub sun4 >/dev/null 2>&1; then :; else
-    AC_MSG_ERROR(cannot run $ac_config_sub)
-  fi
+# Worker routine for AC_CANONICAL_SYSTEM.  THING is one of `host',
+# `target', or `build'.  Canonicalize the appropriate thing.  We also
+# redo the cache entries if the user specifies something different
+# from ac_cv_$THING_alias on the command line.
+define([_AC_CANONICAL_THING],
+[AC_MSG_CHECKING([$1 system type])
+if test "x$ac_cv_$1" = "x" ||
+   (test "x$$1" != "x" && test "x$$1" != "x$ac_cv_$1_alias"); then
 
 dnl Set $1_alias.
   ac_cv_$1_alias=$$1
-  case "$ac_cv_$1_alias" in
-  NONE)
-    case $nonopt in
-    NONE)
-ifelse([$1], [host],[dnl
-      if ac_cv_$1_alias=`$ac_config_guess`; then :
-      else AC_MSG_ERROR(cannot guess $1 type; you must specify one)
-      fi ;;],[dnl
-      ac_cv_$1_alias=$host_alias ;;
-])dnl
-    *) ac_cv_$1_alias=$nonopt ;;
-    esac ;;
-  esac
-
-dnl Set the other $[1] vars.  Propagate the failures of config.sub.
-  ac_cv_$1=`$ac_config_sub $ac_cv_$1_alias` || exit 1
-  ac_cv_$1_cpu=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\1/'`
-  ac_cv_$1_vendor=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\2/'`
-  ac_cv_$1_os=`echo $ac_cv_$1 | sed 's/^\([[^-]]*\)-\([[^-]]*\)-\(.*\)$/\3/'`
+  test "x$ac_cv_$1_alias" = "x" &&
+    m4_case([$1],
+[build],
+  [{ ac_cv_build_alias=`$ac_config_guess` ||
+      AC_MSG_ERROR(
+           [cannot guess build (this machine) type; you must specify one]); }],
+[host],
+  [ac_cv_host_alias=$build_alias],
+[target],
+  [ac_cv_target_alias=$host_alias])
 else
   echo $ECHO_N "(cached) $ECHO_C" >&AC_FD_MSG
 fi
+AC_CANONICALIZE([$1])
+AC_MSG_RESULT($ac_cv_$1)[]dnl
+])# _AC_CANONICAL_THING
 
-AC_MSG_RESULT($ac_cv_$1)
 
-$1=$ac_cv_$1
-$1_alias=$ac_cv_$1_alias
-$1_cpu=$ac_cv_$1_cpu
-$1_vendor=$ac_cv_$1_vendor
-$1_os=$ac_cv_$1_os
-AC_SUBST($1)dnl
-AC_SUBST($1_alias)dnl
-AC_SUBST($1_cpu)dnl
-AC_SUBST($1_vendor)dnl
-AC_SUBST($1_os)dnl
-])# _AC_CANONICAL_THING
+# AC_CANONICAL_BUILD
+# ------------------
+AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
+[AC_DIVERT([HELP_CANON],
+[[
+Hosts type:
+  --build=BUILD     configure for building on BUILD [guessed]]])dnl
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  AC_MSG_ERROR([cannot run $ac_config_sub])
+
+_AC_CANONICAL_THING(build)[]dnl
+])# AC_CANONICAL_BUILD
+
+
+# AC_CANONICAL_HOST
+# -----------------
+AC_DEFUN_ONCE([AC_CANONICAL_HOST],
+[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+AC_DIVERT([HELP_CANON],
+[[  --host=HOST       configure for building programs running on HOST [BUILD]]])dnl
+_AC_CANONICAL_THING(host)[]dnl
+])# AC_CANONICAL_HOST
+
+
+# AC_CANONICAL_TARGET
+# -------------------
+AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
+AC_DIVERT([HELP_CANON],
+[[  --target=TARGET   configure for building compilers for TARGET [HOST]]])dnl
+_AC_CANONICAL_THING(target)[]dnl
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-[]dnl
+])# AC_CANONICAL_TARGET
+
 
-AC_DEFUN(AC_CANONICAL_HOST,   [_AC_CANONICAL_THING([host])])
-AC_DEFUN(AC_CANONICAL_TARGET, [_AC_CANONICAL_THING([target])])
-AC_DEFUN(AC_CANONICAL_BUILD,  [_AC_CANONICAL_THING([build])])
+AU_DEFUN(AC_CANONICAL_SYSTEM, [AC_CANONICAL_TARGET])
 
 
 # AC_VALIDATE_CACHED_SYSTEM_TUPLE([CMD])
Index: doc/autoconf.texi
===================================================================
RCS file: /cvs/autoconf/doc/autoconf.texi,v
retrieving revision 1.257
diff -u -r1.257 autoconf.texi
--- doc/autoconf.texi   2000/04/13 08:25:12     1.257
+++ doc/autoconf.texi   2000/04/26 11:01:59
@@ -2559,9 +2559,10 @@
 @defmac AC_CHECK_TOOL (@var{variable}, @var{prog-to-check-for}, 
@ovar{value-if-not-found}, @ovar{path})
 @maindex CHECK_TOOL
 Like @code{AC_CHECK_PROG}, but first looks for @var{prog-to-check-for}
-with a prefix of the host type as determined by @code{AC_CANONICAL_HOST},
-followed by a dash (@pxref{Canonicalizing}).  For example, if the user
-runs @samp{configure --host=i386-gnu}, then this call:
+with a prefix of the host type as determined by
+@code{AC_CANONICAL_HOST}, followed by a dash (@pxref{Canonicalizing}).
+For example, if the user runs @samp{configure --host=i386-gnu}, then
+this call:
 @example
 AC_CHECK_TOOL(RANLIB, ranlib, :)
 @end example
@@ -2588,9 +2589,9 @@
 @maindex PATH_TOOL
 Like @code{AC_PATH_PROG}, but first looks for @var{prog-to-check-for}
 with a prefix of the host type as determined by
-@code{AC_CANONICAL_HOST},
-followed by a dash (@pxref{Canonicalizing}).  For example, if the user
-runs @samp{configure --host=i386-gnu}, then this call:
+@code{AC_CANONICAL_HOST}, followed by a dash (@pxref{Canonicalizing}).
+For example, if the user runs @samp{configure --host=i386-gnu}, then
+this call:
 @example
 AC_PATH_TOOL(FILE, file, :, /usr/bin:$PATH)
 @end example
@@ -4386,6 +4387,8 @@
 nonportable.  If you combine @samp{&&} and @samp{||} in the same
 statement, keep in mind that they have equal precedence.
 
+
+@c FIXME: Hm, I'd say the `target' here should be `build'.
 To enable @code{configure} scripts to support cross-compilation, they
 shouldn't do anything that tests features of the host system instead of
 the target system.  But occasionally you may find it necessary to check
@@ -5671,17 +5674,15 @@
 produce code.
 @end table
 
-@noindent
-If the user gives @code{configure} a non-option argument, it is used as
-the default for the host, target, and build system types if the user
-does not specify them explicitly with options.  The target and build
-types default to the host type if it is given and they are not.  If you
-are cross-compiling, you still have to specify the names of the
+By default, the build is guessed (by @code{config,guess}), the host
+system is the build system, and the target is the build system.
+
+If you are cross-compiling, you still have to specify the names of the
 cross-tools you use, in particular the C compiler, on the
 @code{configure} command line, e.g.,
 
 @example
-CC=m68k-coff-gcc configure --target=m68k-coff
+./configure --target=m68k-coff CC=m68k-coff-gcc
 @end example
 
 @code{configure} recognizes short aliases for many system types; for
@@ -5704,22 +5705,29 @@
 @code{configure} ignores any @samp{--host}, @samp{--target}, and
 @samp{--build} options given to it.
 
-@defmac AC_CANONICAL_SYSTEM
-@maindex CANONICAL_SYSTEM
-Determine the system type and set output variables to the names of the
-canonical system types.  @xref{System Type Variables}, for details about
-the variables this macro sets.
+
+@defmac AC_CANONICAL_BUILD
+@maindex CANONICAL_BUILD
+Compute the @samp{build} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--build},
+the build system is guessed by running @code{config.guess}.
 @end defmac
 
 @defmac AC_CANONICAL_HOST
-@defmacx AC_CANONICAL_BUILD
-@defmacx AC_CANONICAL_TARGET
 @maindex CANONICAL_HOST
-@maindex CANONICAL_BUILD
+Compute the @samp{host} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--host}, the
+host system is the build system.
+@end defmac
+
+@defmac AC_CANONICAL_TARGET
 @maindex CANONICAL_TARGET
-Perform only the subset of @code{AC_CANONICAL_SYSTEM} relevant to the
-host or build or target type.  @code{AC_CANONICAL_HOST} is all that is
-needed for programs that are not part of a compiler tool chain.
+Compute the @samp{target} system type variables, see @ref{System Type
+Variables}.  Unless specified to @code{configure} via @samp{--target},
+the target system is the host system.
+
+This macro only makes sense for compilers, debuggers etc. which might
+run on a machine, but work on binaries from another machine.
 @end defmac
 
 @defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@var{cmd})
@@ -5732,10 +5740,9 @@
 @node System Type Variables, Using System Type, Canonicalizing, Manual Configuration
 @section System Type Variables
 
-After calling @code{AC_CANONICAL_SYSTEM}, the following output variables
-contain the system type information.  After @code{AC_CANONICAL_HOST},
-@code{AC_CANONICAL_BUILD}, or @code{AC_CANONICAL_TARGET}, only the
-@code{host}, @code{build}, or @code{target} variables below are set.
+After calling @code{AC_CANONICAL_BUILD}, the following @samp{build}
+output variables contain the build system type information, likewise for
+@code{AC_CANONICAL_HOST} and @code{AC_CANONICAL_TARGET}.
 
 @table @code
 @ovindex build
@@ -6050,10 +6057,10 @@
 
 If any of the options described below are given to @code{configure},
 program names are transformed accordingly.  Otherwise, if
-@code{AC_CANONICAL_SYSTEM} has been called and a @samp{--target} value
-is given that differs from the host type (specified with @samp{--host}
-or defaulted by @code{config.sub}), the target type followed by a dash
-is used as a prefix.  Otherwise, no program name transformation is done.
+@code{AC_CANONICAL_TARGET} has been called and a @samp{--target} value
+is given that differs from the host type (specified with @samp{--host}),
+the target type followed by a dash is used as a prefix.  Otherwise, no
+program name transformation is done.
 @end defmac
 
 @menu
@@ -7094,6 +7101,18 @@
 @defmac AC_C_CROSS
 @maindex C_CROSS
 This macro is obsolete; it does nothing.
+@end defmac
+
+@defmac AC_CANONICAL_SYSTEM
+@maindex CANONICAL_SYSTEM
+Determine the system type and set output variables to the names of the
+canonical system types.  @xref{System Type Variables}, for details about
+the variables this macro sets.
+
+The user is encouraged to explicitly use either
+@code{AC_CANONICAL_BUILD}, or @code{AC_CANONICAL_HOST}, or
+@code{AC_CANONICAL_TARGET}, depending on her needs.  Using
+@code{AC_CANONICAL_TARGET} is enough to run the three macros.
 @end defmac
 
 @defmac AC_CHAR_UNSIGNED
Index: doc/install.texi
===================================================================
RCS file: /cvs/autoconf/doc/install.texi,v
retrieving revision 1.22
diff -u -r1.22 install.texi
--- doc/install.texi    2000/04/05 07:42:07     1.22
+++ doc/install.texi    2000/04/26 11:02:00
@@ -194,22 +194,6 @@
 will cause the specified gcc to be used as the C compiler (unless it is
 overridden in the site shell script).
 
-Please, note that the former interface:
-
-@example
-CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-or
-
-@example
-env CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
-@end example
-
-@noindent
-should be avoided.
-
 
 @node Operation Controls
 @section Operation Controls
Index: tests/Makefile.am
===================================================================
RCS file: /cvs/autoconf/tests/Makefile.am,v
retrieving revision 1.20
diff -u -r1.20 Makefile.am
--- tests/Makefile.am   2000/03/27 12:26:33     1.20
+++ tests/Makefile.am   2000/04/26 11:02:00
@@ -47,6 +47,8 @@
 # and some are already tested elsewhere.  EGREP_EXCLUDE must filter out
 # the macros we don't want to test in syntax.m4.
 #
+# - AC_CANONICALIZE
+#   Needs an argument.
 # - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
 #   Performed in the semantics tests.
 # - AC_CONFIG
@@ -70,6 +72,7 @@
 # We use the fact that automake will replace all the `\\\n' with ` '.
 FILTER_MACROS = egrep -v -e \
 `echo '^AC_ARG_VAR$$\
+^AC_CANONICALIZE$$\
 ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$\
 ^AC_CONFIG\
 ^AC_INIT\

Reply via email to