-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Bruno Haible on 1/23/2009 4:26 PM: > I find this m4_defun_once interesting too: it incorporates the workaround > that we previously used in gnulib. > > But before you jump to the conclusion that AC_DEFUN_IDEMPOTENT is not > needed any more, can you please tell: > - Can a macro defined with AC_DEFUN_ONCE be both required and invoked?
In autoconf 2.63, it can be invoked first and then required; this is okay unless the require was indirect within the body of a single defun (in which case, you had an out-of-order expansion). It warns if you require first and then invoke it. With the proposal for autoconf 2.64, it can be either invoked or required, in any order, without warning; it guarantees that the expansion only occurs once; and it will never suffer from out-of-order expansion (thanks to the embedded require under the hood). Plus, it should be easy to backport this behavior into gnulib. > - Is a warning issued when an AC_DEFUN_ONCEd macro is expanded twice? In autoconf 2.63, yes. But for autoconf 2.64, the second expansion is a silent no-op. In other words, we are making the macro more permissive than it used to be, while reducing the chance for out-of-order expansion. Compatibility-wise, accepting a condition that used to warn is never a problem. > - Is a warning issued when an AC_DEFUN_ONCEd macro is being required > after having already been expanded? In autoconf 2.63, no. This will not change for 2.64. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl6W44ACgkQ84KuGfSFAYCT1gCg09J1BfBtrSt2sTlz8zIR9ade 85QAnRuyHxc8sQpw9LS/ZGfl2tQAnjP5 =r7yi -----END PGP SIGNATURE-----