On Tue, Sep 03, 2013 at 08:52:54AM -0600, Eric Blake wrote: > On 09/02/2013 08:03 AM, Ross Lagerwall wrote: > > Hi, > > > > I have a question about checking headers. > > > > Suppose I have a simple program which includes unistd.h and nothing > > else. I could AC_CHECK_HEADERS([unistd.h]) but then it checks for the > > header twice because using AC_CHECK_HEADERS implies checking a whole > > bunch of headers: > > > > > Is there a way of checking for the AC_INCLUDES_DEFAULT headers without > > checking for anything else? > > Not particularly, but there IS a way to avoid AC_INCLUDES_DEFAULT in the > first place: > > AC_CHECK_HEADERS([unistd.h], , , [ ]) > > to force a non-empty fourth argument to bypass the default use of > AC_INCLUDES_DEFAULT. OK, thanks. > > > Secondly, AC_TYPE_UINT32_T gives different results depending on whether > > any headers have been checked before (eg. if I first check for dlfcn.h, > > stdint.h is automatically checked for, but otherwise it is not). > > This seems nonintuitive; is it supposed to be like this? > > 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 """ There seems to be some interaction with AC_CHECK_HEADERS being performed conditionally. > > > > > Lastly, AC_HEADER_STDC is declared obsolete yet it is required by > > _AC_INCLUDES_DEFAULT_REQUIREMENTS. Why is this? > > Commit f52459d has already tried to address that, and is just awaiting > the release of autoconf 2.70. Is there anything further we need to fix? > > git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=f52459d > Well the following removes the "checking for ANSI C header files... yes" line which seems to appear when AC_HEADER_STDC is called. Regards Ross Lagerwall 8<------------------------------ >From 5ef0afde59e1c3561df4462cfaa974706ffb8b76 Mon Sep 17 00:00:00 2001 From: Ross Lagerwall <rosslagerwall@xxxxxxxxx> Date: Tue, 3 Sep 2013 19:40:09 +0200 Subject: [PATCH] Remove call to the obsolete AC_HEADER_STDC --- lib/autoconf/headers.m4 | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4 index 7f5dbce..cc7e1c8 100644 --- a/lib/autoconf/headers.m4 +++ b/lib/autoconf/headers.m4 @@ -329,7 +329,6 @@ ac_includes_default="\ # include <unistd.h> #endif" ])dnl -AC_REQUIRE([AC_HEADER_STDC])dnl # On IRIX 5.3, sys/types and inttypes.h are conflicting. AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h], -- 1.8.4 _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx https://lists.gnu.org/mailman/listinfo/autoconf