autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Yet another shell function prerequisite!


From: Paolo Bonzini
Subject: [PATCH] Yet another shell function prerequisite!
Date: Mon, 13 Oct 2008 18:19:32 +0200
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

This is a little unfortunate, but I just noticed it and it is a bit
annoying.  With the shell functions patches I have things like this:

configure:3262: checking for ANSI C header files
configure:3385: result: yes
configure:874: checking for sys/types.h
configure:900: result: no
configure:874: checking for sys/stat.h
configure:900: result: no
configure:874: checking for stdlib.h
configure:900: result: no
configure:874: checking for string.h
configure:900: result: no
configure:874: checking for memory.h
configure:900: result: no
configure:874: checking for strings.h
configure:900: result: no
configure:874: checking for inttypes.h
configure:900: result: no
configure:874: checking for stdint.h
configure:900: result: no
configure:874: checking for unistd.h
configure:900: result: no
configure:3427: checking alignment of struct { char c; }
configure:3455: result: 1

Notice the repeated occurrences of 874 and 900, which are in the
ac_func_c_check_header function.  And this could even be worse, since
LINENO in function might even count lines from the beginning of the
function (and in general is unportable).  So my current solution is to
pass $LINENO as an additional argument, and have _AS_ECHO_LOG use
as_lineno if defined.

Everything related to AS_MESSAGE is undocumented so this one is too...

Any better ideas?  If no, ok?  If yes, now or later?

Paolo (now going through 11 shell function patches to add as_lineno...)


2008-10-13  Paolo Bonzini  <address@hidden>

        * lib/m4sugar/m4sh.m4 (_AS_ECHO_LOG): Use as_lineno
        if defined and not empty.

diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 9c09dc0..8f561c7 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -655,7 +655,7 @@ m4_define([_AS_ECHO],
 # Log the string to AS_MESSAGE_LOG_FD.
 m4_define([_AS_ECHO_LOG],
 [AS_REQUIRE([_AS_LINENO_PREPARE])dnl
-_AS_ECHO([$as_me:$LINENO: $1], [AS_MESSAGE_LOG_FD])])
+_AS_ECHO([$as_me:${as_lineno:-$LINENO}: $1], [AS_MESSAGE_LOG_FD])])


 # _AS_ECHO_N_PREPARE





reply via email to

[Prev in Thread] Current Thread [Next in Thread]