Hello, On Sat, Aug 20, 2005 at 01:04:44PM +0200, Harald Dunkel wrote: > Noah Misch wrote: > > > > If you currently call AC_CANONICAL_HOST from one of your own macros, replace > > those calls with `AC_REQUIRE([AC_CANONICAL_HOST])'. If you call it from the top > > level, defun a macro that makes that call and then call your macro. Like this: > > > > AC_DEFUN([some_name], [AC_REQUIRE([AC_CANONICAL_HOST])]) > > some_name > > > > Would it be possible to rename the existing AC_CANONICAL_HOST > into _AC_CANONICAL_HOST_STUB, and define a new > > AC_DEFUN([AC_CANONICAL_HOST], [AC_REQUIRE([_AC_CANONICAL_HOST_STUB])]) I don't think this would be the best solution, because of the known problems with AC_REQUIRE. But why is it necessery to use AC_DEFUN_ONCE? The code is inside a AC_CACHE_CHECK, so it doesn't matter much if it is expanded several times. Attached please find a patch. (Without a changelog entry, sorry.) OK to commit? Stepan
Index: lib/autoconf/general.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/general.m4,v retrieving revision 1.880 diff -u -r1.880 general.m4 --- lib/autoconf/general.m4 16 Aug 2005 09:11:06 -0000 1.880 +++ lib/autoconf/general.m4 22 Aug 2005 14:29:10 -0000 @@ -1677,11 +1677,11 @@ # 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 @@ -1704,9 +1704,9 @@ # 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 @@ -1722,10 +1722,10 @@ # 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
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf