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. Attached is a patch for review.
>From 4fc8c02577e564a4bffe81c39ca1afbe42971487 Mon Sep 17 00:00:00 2001 From: Jon TURNEY <[email protected]> Date: Tue, 14 Feb 2012 21:59:38 +0000 Subject: [PATCH util/macros] Use AS_ECHO rather than AS_ECHO_N The AS_ECHO_N macro was only introduced in autoconf 2.62. Backticks remove trailing newlines, so we don't need to use echo -n Signed-off-by: Jon TURNEY <[email protected]> --- xorg-macros.m4.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 9e6acf5..8550ca0 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1495,7 +1495,7 @@ m4_foreach([flag], m4_cdr($@), [ dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname AC_MSG_CHECKING([if $CC supports ]flag[]) - cacheid=`AS_ECHO_N([xorg_cv_cc_flag_]flag[])` + cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])` AC_CACHE_VAL(AS_TR_SH($cacheid), [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], [eval AS_TR_SH($cacheid)=yes], -- 1.7.9
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
