<AS_TR_SH>: Likewise. Also modify the example to be more convincing:
"if $undefined_var;" succeeds with my shell.
+ * lib/autoconf/general.m4 (AC_CANONICAL_BUILD, AC_CANONICAL_HOST,
+ AC_CANONICAL_TARGET): Define by AC_DEFUN, no need to use AC_DEFUN_ONCE;
+ but change the m4_divert_text to m4_divert_once.
+
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE):
# AC_CANONICAL_BUILD
# ------------------
-AC_DEFUN_ONCE([AC_CANONICAL_BUILD],
+AC_DEFUN([AC_CANONICAL_BUILD],
[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
AC_REQUIRE_AUX_FILE([config.sub])dnl
AC_REQUIRE_AUX_FILE([config.guess])dnl
-m4_divert_text([HELP_CANON],
+m4_divert_once([HELP_CANON],
[[
System types:
--build=BUILD configure for building on BUILD [guessed]]])dnl
# AC_CANONICAL_HOST
# -----------------
-AC_DEFUN_ONCE([AC_CANONICAL_HOST],
+AC_DEFUN([AC_CANONICAL_HOST],
[AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_divert_text([HELP_CANON],
+m4_divert_once([HELP_CANON],
[[ --host=HOST cross-compile to build programs to run on HOST [BUILD]]])dnl
AC_CACHE_CHECK([host system type], [ac_cv_host],
[if test "x$host_alias" = x; then
# AC_CANONICAL_TARGET
# -------------------
-AC_DEFUN_ONCE([AC_CANONICAL_TARGET],
+AC_DEFUN([AC_CANONICAL_TARGET],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_BEFORE([$0], [AC_ARG_PROGRAM])dnl
-m4_divert_text([HELP_CANON],
+m4_divert_once([HELP_CANON],
[[ --target=TARGET configure for building compilers for TARGET [HOST]]])dnl
AC_CACHE_CHECK([target system type], [ac_cv_target],
[if test "x$target_alias" = x; then