AS_ECHO_N in util-macros

Jeremy Huddleston jeremyhu at freedesktop.org
Mon Mar 5 12:04:36 PST 2012


Crap, I wish I had tried this sooner.  It doesn't look likw AS_ECHO is in autoconf-2.61 either:

configure:4861: error: possibly undefined macro: AS_ECHO
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

$ /usr/bin/autoconf --version
autoconf (GNU Autoconf) 2.61
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.


On Feb 14, 2012, at 16:40, Gaetan Nadon wrote:

> On 12-02-14 05:19 PM, Jon TURNEY wrote:
>> On 14/02/2012 16:29, Gaetan Nadon wrote:
>>> On 12-02-13 06:13 PM, Jeremy Huddleston wrote:
>>>> I just noticed this when using autoconf-2.61 ... does AS_ECHO_N require a newer version of autoconf?  Can we work around that requirement?
>>>> 
>>>> ...
>>>> configure:4924: error: possibly undefined macro: AS_ECHO_N
>>>>      If this token and others are legitimate, please use m4_pattern_allow.
>>>>      See the Autoconf documentation.
>>>> autoreconf: /usr/bin/autoconf failed with exit status: 1
>>>> ...
>>> The AS_ECHO_N macro was introduced in 2.62. This information is not
>>> written in the autoconf manual, so it is very difficult to catch.
>>> 
>>> I think we can use AS_ECHO as the string is not sent to stdout but
>>> stored in a variable. There is therefore no new line to suppress.
>> Yes, it seems I was excessively cautious in using AS_ECHO_N and AS_ECHO should
>> be fine, if backticks remove trailing newlines.
> I wasn't aware of that, but command substitution compresses whitespace
> if the string (in this case the argument to the AS_ECHO command) is not
> quoted.
> 
> On a Debian platform, AS_ECHO is implemented with printf %s\n.
>> 
>> Attached is a patch for review.
> 
> Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
> 



More information about the xorg-devel mailing list