On 09/23/2010 08:33 AM, Ralf Corsepius wrote:
Not only were they entirely silent, but most likely generated a broken
configure. If you don't use AC_LANG_SOURCE, then you don't get the
benefit of all the prior AC_DEFINEs being implicitly included before
the body of your test, which leads to documented cases of
mis-diagnosing whether a feature is present for a given build.
Actually, I don't need the AC_DEFINES in this particular case - Adding
them however, should not do much harm, either.

If you truly don't need all the earlier AC_DEFINES for this particular case, you could use:

AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED
#ifndef foo
choke me
#endif
])

as an alternative way to silence the warning; this is also mentioned in NEWS; but it requires more effort if you want to be back-compatible to earlier autoconf:

m4_ifndef([AC_LANG_DEFINES_PROVIDED],
[m4_define([AC_LANG_DEFINES_PROVIDED])])

Well, "really usable warnings" look a bit different than this warning.
They might be self-explanatory to you, but to me this warning was "Greek".

If you have any suggestions on how to improve this message:

configure.ac:6: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body

which told you the exact line number of the problem, as well as called out the macro name that was in question, and where the documentation for that macro name:

http://www.gnu.org/software/autoconf/manual/autoconf.html#index-AC_005fLANG_005fCONFTEST-1101

describes the issue in more details, then I'm all ears.  Patches welcome.

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Reply via email to