+2010-01-01 Eric Blake <ebb9@byu.net>
+
+ headers: make check of system header explicit
+ * m4/netdb_h.m4 (gl_HEADER_NETDB): Don't exploit knowledge of
+ gl_CHECK_NEXT_HEADER internals, but call AC_CHECK_HEADERS_ONCE
+ ourselves.
+ * m4/search_h.m4 (gl_SEARCH_H): Likewise.
+ * m4/sys_select_h.m4 (gl_HEADER_SYS_SELECT): Likewise.
+ * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Likewise.
+ * m4/inttypes.m4 (gl_INTTYPES_H): Likewise, for gt_INTTYPES_PRI
+ internals.
+ * m4/wchar.m4 (gl_WCHAR_H): Skip followup test if header is
+ missing.
+ Suggested by Bruno Haible.
+
2010-01-01 Jim Meyering <meyering@redhat.com>
ChangeLog: tweak to eliminate unnecessary copyright line
-# inttypes.m4 serial 15
+# inttypes.m4 serial 16
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
AC_REQUIRE([gl_STDINT_H])
AC_REQUIRE([gt_INTTYPES_PRI])
+ AC_CHECK_HEADERS_ONCE([inttypes.h])
AC_CHECK_DECLS_ONCE([imaxabs])
AC_CHECK_DECLS_ONCE([imaxdiv])
AC_CHECK_DECLS_ONCE([strtoimax])
-# netdb_h.m4 serial 5
+# netdb_h.m4 serial 6
dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_HEADER_NETDB],
[
AC_REQUIRE([gl_NETDB_H_DEFAULTS])
+ AC_CHECK_HEADERS_ONCE([netdb.h])
gl_CHECK_NEXT_HEADERS([netdb.h])
if test $ac_cv_header_netdb_h = yes; then
AC_COMPILE_IFELSE(
-# search_h.m4 serial 3
+# search_h.m4 serial 4
dnl Copyright (C) 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_SEARCH_H],
[
AC_REQUIRE([gl_SEARCH_H_DEFAULTS])
+ AC_CHECK_HEADERS_ONCE([search.h])
gl_CHECK_NEXT_HEADERS([search.h])
if test $ac_cv_header_search_h = yes; then
HAVE_SEARCH_H=1
-# sys_select_h.m4 serial 9
+# sys_select_h.m4 serial 10
dnl Copyright (C) 2006-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
])
fi
])
+ AC_CHECK_HEADERS_ONCE([sys/select.h])
gl_CHECK_NEXT_HEADERS([sys/select.h])
if test $ac_cv_header_sys_select_h = yes; then
HAVE_SYS_SELECT_H=1
# Configure a replacement for <sys/time.h>.
+# serial 2
# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
[
AC_REQUIRE([AC_C_RESTRICT])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
gl_CHECK_NEXT_HEADERS([sys/time.h])
if test $ac_cv_header_sys_time_h = yes; then
dnl Written by Eric Blake.
-# wchar.m4 serial 28
+# wchar.m4 serial 29
AC_DEFUN([gl_WCHAR_H],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
- AC_CACHE_CHECK([whether <wchar.h> is standalone],
- [gl_cv_header_wchar_h_standalone],
- [AC_COMPILE_IFELSE([[#include <wchar.h>
-wchar_t w;]],
- [gl_cv_header_wchar_h_standalone=yes],
- [gl_cv_header_wchar_h_standalone=no])])
-
- AC_REQUIRE([gt_TYPE_WINT_T])
- if test $gt_cv_c_wint_t = yes; then
- HAVE_WINT_T=1
- else
- HAVE_WINT_T=0
- fi
- AC_SUBST([HAVE_WINT_T])
-
dnl Prepare for creating substitute <wchar.h>.
- dnl Do it always: WCHAR_H may be empty here but can be set later.
dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
dnl character support).
+ dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
AC_CHECK_HEADERS_ONCE([wchar.h])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
if test $ac_cv_header_wchar_h = yes; then
HAVE_WCHAR_H=1
+ AC_CACHE_CHECK([whether <wchar.h> is standalone],
+ [gl_cv_header_wchar_h_standalone],
+ [AC_COMPILE_IFELSE([[#include <wchar.h>
+wchar_t w;]],
+ [gl_cv_header_wchar_h_standalone=yes],
+ [gl_cv_header_wchar_h_standalone=no])])
else
HAVE_WCHAR_H=0
fi
AC_SUBST([HAVE_WCHAR_H])
- dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([wchar.h])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
])
dnl Check whether <wchar.h> is usable at all.