autoconf
[Top][All Lists]
Advanced

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

Re: Aw: Re: Supressing output from AC_CHECK_DECL


From: Eric Blake
Subject: Re: Aw: Re: Supressing output from AC_CHECK_DECL
Date: Tue, 08 May 2007 18:15:41 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to william pursell on 5/8/2007 2:53 PM:
> Being fairly new to autoconf, I would like to get some
> feedback on my first thought for a solution.  In particular,
> I suspect that my approach is not good, but I'd love
> to hear opinions on why it is not advisable:
> 
> exec 6> /dev/null
> AC_CHECK_DECL(printf)
> exec 6>& 1

You have no idea if 6 is the fd that autoconf is currently using without
inspecting the undocumented internals of autoconf, so your code is very
fragile and likely to break if autoconf changes its implementation.
Writing your own test using AC_COMPILE_IFELSE is more robust, because it
sticks to documented interfaces.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGQRKs84KuGfSFAYARAkuhAJ9mmFl7ekNsVGv8AjmFR6I9QI7EOACgjVj7
ggiYfCuuQWfsjp633SZXGro=
=Tnpq
-----END PGP SIGNATURE-----




reply via email to

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