autoconf
[Top][All Lists]
Advanced

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

Appending to config.log


From: Mark D. Roth
Subject: Appending to config.log
Date: Wed, 15 May 2002 17:16:48 -0500
User-agent: Mutt/1.2.5i

I'm writing a macro to test whether make supports a particular
feature.  To do this, I construct a sample Makefile and invoke make on
it.  If make returns a non-zero exit code, I know that the test
failed, but I'd also like to save the output to config.log so the user
can try to diagnose the problem.

I didn't see anything in the autoconf docs about this, so I assume
there's currently no supported way to do it.  If I missed something,
please point me in the right direction and disregard the rest of this
message. :)

To address this problem, I'd like to see the following two macros
added to autoconf:

  AC_LOG(TEXT)
  ------------
  Append TEXT to config.log.

  AC_RUN_COMMAND(COMMAND)
  -----------------------
  1. Run COMMAND, saving stderr to a file.
  2. Set a shell variable to the command's exit value so that macro
     caller can get it.
  2. If exit value is non-zero, append stderr output to config.log.
  3. Remove stderr output file.

Looking through the autoconf macro files, it looks like there's
already some stuff that's very similar to my proposed AC_RUN_COMMAND
macro, but it doesn't look like it's really intended to be a
general-purpose macro, and it's also not part of the published
interface.  I don't know whether it would be easier to modify the
existing internal macros or just start from scratch, but I guess it
doesn't matter as long as the result is the same. :)

Anyway, I'd appreciate any reactions that anyone has to any of this.
Thanks!

-- 
Mark D. Roth <address@hidden>
http://www.feep.net/~roth/



reply via email to

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