On 04/26/2012 02:03 AM, Michael Olbrich wrote: >> > >> > While AC_INCLUDES_DEFAULT is in $2 this put me on the right track. >> > The problem ist that STDC_HEADERS is not defined. >> >
>> > >> > From what I can tell, the code needed to define STDC_HEADERS is generated >> > for the first AC_CHECK_HEADER. In this case for zlib.h: >> > http://git.gnome.org/browse/glib/tree/configure.ac#n466 >> > >> > However this is only executed for 'test "x$found_zlib" = "xno"', so >> > STDC_HEADERS is never defined. If I put an unconditional AC_CHECK_HEADER >> > before the zlib stuff, then STDC_HEADERS is defined and AC_CHECK_ALIGNOF >> > works as expected. > I've attached a minimalistic configure.ac that demonstrated the problem. > That should be easier than the one from glib. > > > AC_PREREQ([2.68]) > AC_INIT([foo],[1],[m.olbr...@pengutronix.de]) > AC_CONFIG_SRCDIR([configure.ac]) > > AC_PROG_CC > > if false; then > AC_CHECK_HEADER(stdint.h) Yep. That's indeed a bug in your configure.ac, and nothing that autoconf can do about it without your help. One thing that is possible to keep the actual header check conditional, but making all the prerequisites (such as the side effect of setting STDC_HEADERS) unconditional, would be to rewrite this as: AS_IF([false], [AC_CHECK_HEADER([stdint.h])]) to rely on the documented property of AS_IF of hoisting prerequisites outside the conditional. -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature