<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 12-02-13 06:13 PM, Jeremy Huddleston wrote:
<blockquote
cite="mid:9923EA32-F213-48E5-BA61-67CB3EADBF92@freedesktop.org"
type="cite">
<pre wrap="">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
...
</pre>
</blockquote>
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.<br>
<br>
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.<br>
<blockquote><tt>dnl Some hackery here since AC_CACHE_VAL can't
handle a non-literal varname<br>
AC_MSG_CHECKING([if $CC supports ]flag[])<br>
cacheid=`<b><font color="#33cc00">AS_ECHO</font></b>([xorg_cv_cc_flag_]flag[])`<br>
AC_CACHE_VAL(AS_TR_SH($cacheid),<br>
[AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],<br>
[eval AS_TR_SH($cacheid)=yes],<br>
[eval AS_TR_SH($cacheid)=no])])<br>
<br>
CFLAGS="$xorg_testset_save_CFLAGS"<br>
<br>
eval supported=$AS_TR_SH($cacheid)<br>
AC_MSG_RESULT([$supported])<br>
if test "$supported" = "yes" ; then<br>
$1="$$1 ]flag["<br>
found="yes"<br>
fi<br>
fi<br>
])<br>
</tt></blockquote>
I have tried on a module and the out put is identical:<br>
<blockquote><tt>xorg_cv_cc_flag__Wall=yes<br>
xorg_cv_cc_flag__Wbad_function_cast=yes<br>
[...]<br>
</tt></blockquote>
I am not sure if there would be some cases where "non-literal
varname" would fail, as I doubt they would have contained a new line
character.<br>
<br>
<blockquote
cite="mid:9923EA32-F213-48E5-BA61-67CB3EADBF92@freedesktop.org"
type="cite">
<pre wrap="">
On Jan 22, 2012, at 5:16 AM, Jon TURNEY <a class="moz-txt-link-rfc2396E" href="mailto:jturney@kemper.freedesktop.org"><jturney@kemper.freedesktop.org></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">xorg-macros.m4.in | 34 +++++++++++++++++++++-------------
1 file changed, 21 insertions(+), 13 deletions(-)
New commits:
commit a1809fde56e45639556a44fd3c3ef9213204c5a9
Author: Jon TURNEY <a class="moz-txt-link-rfc2396E" href="mailto:jon.turney@dronecode.org.uk"><jon.turney@dronecode.org.uk></a>
Date: Mon Jan 2 19:42:10 2012 +0000
Cache the results of checking compiler flag support in XORG_TESTSET_CFLAG
Since checking all those warning flags takes an amount of time I find irritating,
here is an attempt at caching the results of checking compiler warning flag support
A couple of aspects which need definitely need review or testing:
* I've tried to get things right when not the first flag in the list of alternates is
supported, but this really needs testing with a compiler other than gcc
* The cache variable naming policy is a bit opaque me, so the names used may need corecting
* I've tried to be careful, but who knows what portability sins I have committed :-)
This change reduces the time to run the ./configure script produced from a configure.ac
containing just
AC_INIT([test], 1.0)
XORG_COMPILER_FLAGS
XORG_CWARNFLAGS
XORG_STRICT_OPTION
AC_OUTPUT()
from ~60s to ~20s on my cygwin machine, and from ~15s to ~9s on a linux VM running on the
same hardware
v2: AS_TR_SH transforms characters which are invalid in shell variable names, so we don't
have to use sed to transform spaces ourself
Signed-off-by: Jon TURNEY <a class="moz-txt-link-rfc2396E" href="mailto:jon.turney@dronecode.org.uk"><jon.turney@dronecode.org.uk></a>
Reviewed-by: Gaetan Nadon <a class="moz-txt-link-rfc2396E" href="mailto:memsize@videotron.ca"><memsize@videotron.ca></a>
_______________________________________________
xorg-commit mailing list
<a class="moz-txt-link-abbreviated" href="mailto:xorg-commit@lists.x.org">xorg-commit@lists.x.org</a>
<a class="moz-txt-link-freetext" href="http://lists.x.org/mailman/listinfo/xorg-commit">http://lists.x.org/mailman/listinfo/xorg-commit</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<br>
</body>
</html>