autoconf
[Top][All Lists]
Advanced

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

Re: Supressing output from AC_CHECK_DECL


From: Ralf Wildenhues
Subject: Re: Supressing output from AC_CHECK_DECL
Date: Tue, 8 May 2007 15:57:03 +0200
User-agent: Mutt/1.5.15 (2007-04-29)

Hello Jason, all,

* address@hidden wrote on Tue, May 08, 2007 at 02:46:53PM CEST:
> 
> When I use AC_CHECK_DECL, how can I prevent it from outputting to the
> console for a specific message only? I don't want to supress all
> messages, only one specific message (and replace it with my own, more
> complex reusable macro).

Hmm.  Reimplementing AC_CHECK_DECL may be easier than trying to use it,
as Noah already indicated.  Especially, I think if you need to work
around the output, then it seems likely that you will also need to work
around caching as well: if you check for the same symbol more than once,
with different code snippets then it will skew your results.  (Which
begs the question whether your identical double checking of timeradd in
the macro you posted was intentional.)

> In the end, I've done:
> pushdef([AS_MESSAGE_FD], [/dev/null])
> popdef([AS_MESSAGE_FD])

First, be encouraged to use m4_pushdef rather than pushdef, etc.
But also this ends up generating code like
  echo "$message" >&/dev/null

which is not portable:

$ ksh -c 'echo >&/dev/null'
ksh: >&/dev/null : illegal file descriptor name

Hope that helps.

Cheers,
Ralf




reply via email to

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