| Index: ChangeLog | from Akim Demaille <[EMAIL PROTECTED]> | | * acheaders.m4 (AC_CHECK_HEADER, AC_CHECK_HEADERS): Support $4 = | INCLUDES. This is the next step. I'm applying it, because it needs to be tested but real people. Please, note that there is something *very* new happening here: we no longer check whether a single header (belonging to the default headers) exists, rather, if it can be included after the one before it. That's because of the 4th arg to AC_CHECK_HEADERS in _AC_INCLUDES_DEFAULT_REQUIREMENTS. The next step is to spread the use of the default includes in the other macros. This time, I won't apply, but I'll ask for comments first. Index: ChangeLog from Akim Demaille <[EMAIL PROTECTED]> * acgeneral.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Guard sys/types.h and sys/stat.h, and check for them. Index: NEWS =================================================================== RCS file: /cvs/autoconf/NEWS,v retrieving revision 1.153 diff -u -u -r1.153 NEWS --- NEWS 2001/06/13 07:51:09 1.153 +++ NEWS 2001/06/13 08:06:51 @@ -1,6 +1,7 @@ * Major changes in Autoconf 2.50a -*- outline -*- ** Default includes -Now include stdint.h. +- Now include stdint.h. +- sys/types.h and sys/stat.h are guarded. ** Bug fixes - Mostly in the test suite. @@ -8,6 +9,8 @@ - configure accepts --prefix='' again. - AC_CHECK_LIB works properly when its first argument is not a literal. +- HAVE_INTTYPES_H is defined only if not conflicting with previous + headers. ** Generic macros - AC_CHECK_HEADER and AC_CHECK_HEADERS support a fourth argument to Index: acgeneral.m4 =================================================================== RCS file: /cvs/autoconf/acgeneral.m4,v retrieving revision 1.732 diff -u -u -r1.732 acgeneral.m4 --- acgeneral.m4 2001/06/12 14:46:13 1.732 +++ acgeneral.m4 2001/06/13 08:06:52 @@ -2180,8 +2180,12 @@ dnl If ever you change this variable, please keep autoconf.texi in sync. ac_includes_default="\ #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #if STDC_HEADERS # include <stdlib.h> # include <stddef.h> @@ -2212,7 +2216,9 @@ #endif" ])dnl AC_REQUIRE([AC_HEADER_STDC])dnl -AC_CHECK_HEADERS(stdlib.h string.h memory.h strings.h inttypes.h stdint.h unistd.h) +AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h + inttypes.h stdint.h unistd.h], + [], [], $ac_includes_default) ]) Index: doc/autoconf.texi =================================================================== RCS file: /cvs/autoconf/doc/autoconf.texi,v retrieving revision 1.464 diff -u -u -r1.464 autoconf.texi --- doc/autoconf.texi 2001/06/13 07:51:09 1.464 +++ doc/autoconf.texi 2001/06/13 08:07:00 @@ -2778,8 +2778,12 @@ @example @group #include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif #if STDC_HEADERS # include <stdlib.h> # include <stddef.h> Index: tests/atspecific.m4 =================================================================== RCS file: /cvs/autoconf/tests/atspecific.m4,v retrieving revision 1.44 diff -u -u -r1.44 atspecific.m4 --- tests/atspecific.m4 2001/05/31 08:24:01 1.44 +++ tests/atspecific.m4 2001/06/13 08:07:00 @@ -98,7 +98,8 @@ # AT_CHECK_HEADER is a better name, but too close from AC_CHECK_HEADER. m4_define([AT_CHECK_DEFINES], [AT_CHECK([[fgrep '#' config.h | - egrep -v 'STDC_HEADERS|STDINT|STDLIB|INTTYPES|MEMORY|STRING|UNISTD']],, [$1])]) + egrep -v +'STDC_HEADERS|STD(INT|LIB)|INTTYPES|MEMORY|STRING|UNISTD|SYS_(TYPES|STAT)']],, + [$1])]) # AT_CHECK_AUTOUPDATE