[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autoconf 2.63b: wrong macro expansion order
From: |
Andreas Schwab |
Subject: |
Re: autoconf 2.63b: wrong macro expansion order |
Date: |
Sun, 05 Apr 2009 17:22:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
Eric Blake <address@hidden> writes:
> In one sense, it sounds like KDE was relying on the 2.63
> expand-before-require bug in order to insert text prior to the expansion
> of AC_PROG_CC, and now that 2.63b is properly hoisting the AC_REQUIRE call
> (albeit with duplicated text), that it is interfering with their exploit.
>From the POV of the macro writer the 2.63 behaviour does not look like a
bug. Basically the following two snippets:
AC_DEFUN([FOO],[AC_COMPILE_IFELSE([])])
foobar=
AC_PROG_CC
FOO
and
AC_DEFUN([FOO],[AC_COMPILE_IFELSE([])])
AC_DEFUN([BAR],[
foobar=
AC_PROG_CC
FOO])
BAR
are expected to be completely equivalent. In other words, you should be
able to replace an arbitrary block of text with a macro call and get
exactly the same behaviour.
If autoconf macros were implemented in terms of shell functions this
would probably be easy to achieve.
Andreas.
--
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."