On Fri, Sep 06, 2013 at 10:42:00PM -0400, Zack Weinberg wrote: > On Tue, Sep 3, 2013 at 1:42 PM, Ross Lagerwall <rosslagerwall@xxxxxxxxx> wrote: > >> Probably means that AC_TYPE_UINT32_T is missing a prereq on the standard > >> headers; would you mind posting a reproducible test case, and we can > >> work on fixing the bug? > > > > The following reproduces it: > > """ > > AC_INIT([test], [dev]) > > AC_PROG_CC > > > > if false; then > > AC_CHECK_HEADERS([pthread.h], [], [have_pthreads=no]) > > fi > > > > AC_TYPE_UINT16_T > > AC_OUTPUT > > """ > > It looks like AC_TYPE_INT<n>_T are correct. The problem is that if > the very first AC_CHECK_HEADER[S] in the file is inside a shell > conditional, _AC_INCLUDES_DEFAULT_REQUIREMENTS gets expanded inside > the conditional, and so only executes if the shell conditional is > true. This is (one of) the problems AS_IF addresses: > > AC_INIT([test], [dev]) > AC_PROG_CC > AS_IF([false], [AC_CHECK_HEADERS([pthread.h])]) > AC_TYPE_UINT16_T > AC_OUTPUT > > does the right thing (because the conditional is now visible on the M4 > expansion stack, so _AC_INCLUDES_DEFAULT_REQUIREMENTS gets placed just > before it instead of inside it). > > I don't think there's anything we can reasonably do in Autoconf to > make this less troublesome. > Thanks for the explanation. Noting down AS_IF for the future... -- Ross Lagerwall _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf