autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_DEFUN_ONCE semantics


From: Eric Blake
Subject: Re: AC_DEFUN_ONCE semantics
Date: Thu, 05 Feb 2009 06:19:49 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19) Gecko/20081209 Thunderbird/2.0.0.19 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 2/4/2009 6:04 AM:
>> These things (used to) work fine more often than not, and now you break
>> them silently.  And what's more important: there really are cases where
>> it is so much easier to invoke macros shell-conditionally.
> 
> In the case of macros that were already AC_DEFUN_ONCE, there is no
> semantic change.  But for macros which were previously AC_DEFUN, but which
> we convert to AC_DEFUN_ONCE, yes, this is a potential mine, which is why
> we should minimize which macros undergo the conversion unless we have good
> reason to believe that the macro will not be used conditionally.
> 
> Warning would defeat the purpose of using AC_DEFUN_ONCE to avoid the
> warning of multiple expansions.  We could, however, rewrite the
> problematic macros as AC_DEFUN with a self-redefinition that warns on
> subsequent expansions, and have that be the state of affairs for a release
> cycle prior to switching over to AC_DEFUN_ONCE.

We can still do this, if you think it would be helpful to warn users about
the potential for semantic change rather than making the change silent for
the course of one release.

> Highly agreed; I'll add a NEWS entry with all of the affected macros.

But for now, I'm applying this.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----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

iEYEARECAAYFAkmK53UACgkQ84KuGfSFAYDL1wCfetNJpUnIzfqVH0QVKzNxbYI4
cPYAoMxAQKPYRxkLSCTZY+WJRzFuvXJl
=zpYm
-----END PGP SIGNATURE-----
>From e8e30e268da0fbf2f53fcc366d3cef59bc47119c Mon Sep 17 00:00:00 2001
From: Eric Blake <address@hidden>
Date: Thu, 5 Feb 2009 06:12:24 -0700
Subject: [PATCH] Mention new AC_DEFUN_ONCE clients.

* NEWS: Mention recent semantic changes.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog |    6 ++++++
 NEWS      |   10 ++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 67b207c..c72253a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-05  Eric Blake  <address@hidden>
+
+       Mention new AC_DEFUN_ONCE clients.
+       * NEWS: Mention recent semantic changes.
+       Reported by Ralf Wildenhues.
+
 2009-02-03  Eric Blake  <address@hidden>
 
        Use AC_DEFUN_ONCE for some one-shot AC_PROG macros.
diff --git a/NEWS b/NEWS
index ba006cd..94b310e 100644
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,16 @@ GNU Autoconf NEWS - User visible changes.
    and subsequent invocations are a silent no-op.  This makes
    AC_DEFUN_ONCE an ideal macro for silencing AC_REQUIRE warnings.
 
+** The following macros are now defined with AC_DEFUN_ONCE.  This means
+   a subtle change in semantics; previously, an AC_DEFUN macro could
+   expand one of these macros multiple times or surround the macro
+   inside shell conditional text to bypass the effects of these
+   macros, but now the macro will expand exactly once, and prior to
+   the start of any enclosing AC_DEFUN macro:
+   AC_CANONICAL_BUILD  AC_CANONICAL_HOST  AC_CANONICAL_TARGET
+   AC_HEADER_ASSERT  AC_PROG_INSTALL  AC_PROG_MKDIR_P
+   AC_USE_SYSTEM_EXTENSIONS
+
 ** AC_LANG_ERLANG works once again (regression introduced in 2.61a).
 
 ** AC_HEADER_ASSERT is fixed so that './configure --enable-assert' no
-- 
1.6.0.4


reply via email to

[Prev in Thread] Current Thread [Next in Thread]