On 07/03/2012 21:01, Jon TURNEY wrote: > On 05/03/12 20:04, Jeremy Huddleston wrote: >> Crap, I wish I had tried this sooner. It doesn't look likw AS_ECHO is in >> autoconf-2.61 either:
Is there a reason why this wasn't picked up by your tinderbox? >> configure:4861: error: possibly undefined macro: AS_ECHO >> If this token and others are legitimate, please use m4_pattern_allow. >> See the Autoconf documentation. > > Yes, AS_ECHO seems to be introduced in autoconf 2.62 as well :-( > > Reading the section on 'echo' in [1], I'm inclined to say that since we know > that the cacheid neither starts with a hyphen nor contains backslashes, we can > just use echo here. > > I'm not able to write and test a patch right now. I shall do so as soon as I > can, unless someone beats me to it. Looking at this again, it seems I missed a trick when I originally wrote this change and it can be written without using echo at all. Have I mentioned recently how much I hate shell programming? :-) Attached is a patch for your consideration.
>From e25f680ef3eb00b1eb155e2be6b9c2ec1aaeaf20 Mon Sep 17 00:00:00 2001 From: Jon TURNEY <[email protected]> Date: Sat, 10 Mar 2012 15:04:28 +0000 Subject: [PATCH util/macros] Don't use AS_ECHO in XORG_TESTSET_CFLAG Further to commit 52ef6f6, since AS_ECHO isn't supported in autoconf 2.61 either, rewrite use of cache variable in XORG_TESTSET_CFLAG so 'echo' isn't needed at all. Signed-off-by: Jon TURNEY <[email protected]> --- xorg-macros.m4.in | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in index 4966df3..104f9e2 100644 --- a/xorg-macros.m4.in +++ b/xorg-macros.m4.in @@ -1514,15 +1514,15 @@ 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([xorg_cv_cc_flag_]flag[])` - AC_CACHE_VAL(AS_TR_SH($cacheid), + cacheid=AS_TR_SH([xorg_cv_cc_flag_]flag[]) + AC_CACHE_VAL($cacheid, [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], - [eval AS_TR_SH($cacheid)=yes], - [eval AS_TR_SH($cacheid)=no])]) + [eval $cacheid=yes], + [eval $cacheid=no])]) PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" - eval supported=$AS_TR_SH($cacheid) + eval supported=\$$cacheid AC_MSG_RESULT([$supported]) if test "$supported" = "yes" ; then $1="$$1 ]flag[" -- 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
