AS_ECHO_N in util-macros

Gaetan Nadon memsize at videotron.ca
Tue Feb 14 16:40:23 PST 2012


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>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20120214/8a98b64f/attachment.htm>


More information about the xorg-devel mailing list