[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL
From: |
Paul Eggert |
Subject: |
Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL |
Date: |
Mon, 13 Jan 2020 16:38:19 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 |
On 1/13/20 11:02 AM, Bruno Haible wrote:
I would suggest that
the particular 'case' and 'if'/'test' statements - or even the entire main body
of the configure.ac, from line 130 to line 5588 - gets wrapped in an AC_DEFUN
that gets invoked once.
Thanks for the diagnosis. I came up with a simpler patch to Emacs, and
installed it into Emacs master (attached).
This patch doesn't solve the general problem, just this particular case.
I doubt whether our collection of Emacs hackers can be induced to
remember that the Autoconf macros you mentioned cannot be executed
inside a shell condition, and I wouldn't be surprised if other configure
scripts run into similar problems. I don't have any specific suggestion
to work around this problem in Gnulib, though.
PS. I vaguely recall a long discussion many years ago when we added this
AC_REQUIRE-ish stuff to Autoconf. Although we did fix some major
glitches, we replacing them with other glitches that live on to this
day. For example, there's now this note in the Autoconf manual:
Many Autoconf macros use a compiler, and thus call
`AC_REQUIRE([AC_PROG_CC])' to ensure that the compiler has been
determined before the body of the outermost `AC_DEFUN' macro.
Although `AC_PROG_CC' is safe to directly expand multiple times, it
performs certain checks (such as the proper value of `EXEEXT') only
on the first invocation. Therefore, care must be used when
invoking this macro from within another macro rather than at the
top level (*note Expanded Before Required::).
all of which I had forgotten until I read your email today.
0001-Port-configure.ac-to-future-Gnulib.patch
Description: Text Data
- Messed up gl_COMPILER_PREPARE_CHECK_DECL, Mats Erik Andersson, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Mats Erik Andersson, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Paul Eggert, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Paul Eggert, 2020/01/10
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/13
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL,
Paul Eggert <=
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Mats Erik Andersson, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Mats Erik Andersson, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Paul Eggert, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Paul Eggert, 2020/01/18
- Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL, Bruno Haible, 2020/01/18