Fix AC_CHECK_HEADER infloop for gcc.

* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn
about obsoletion, to avoid infinite loop in gcc.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
This commit is contained in:
Eric Blake 2009-06-17 06:26:48 -06:00
parent ba32f02aed
commit 01660aaecc
2 changed files with 24 additions and 11 deletions

View File

@ -1,3 +1,11 @@
2009-06-17 Eric Blake <ebb9@byu.net>
Fix AC_CHECK_HEADER infloop for gcc.
* lib/autoconf/headers.m4 (_AC_CHECK_HEADER_NEW)
(_AC_CHECK_HEADER_OLD): Give up on AU_DEFUN, and manually warn
about obsoletion, to avoid infinite loop in gcc.
Reported by Ralf Wildenhues.
2009-06-15 Eric Blake <ebb9@byu.net>
Add m4_copy_force, m4_rename_force.

View File

@ -194,14 +194,6 @@ AC_DEFUN([_AC_CHECK_HEADER_COMPILE],
AS_VAR_IF([ac_Header], [yes], [$2], [$3])
AS_VAR_POPDEF([ac_Header])])# _AC_CHECK_HEADER_COMPILE
# _AC_CHECK_HEADER_NEW(HEADER-FILE, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------
# Some packages used this macro, even though it is undocumented.
AU_DEFUN([_AC_CHECK_HEADER_NEW],
[AC_CHECK_HEADER([$1], [$2], [$3], [AC_INCLUDES_DEFAULT])])
# _AC_CHECK_HEADER_PREPROC_BODY
# -----------------------------
# Shell function body for _AC_CHECK_HEADER_PREPROC.
@ -234,10 +226,23 @@ AS_VAR_POPDEF([ac_Header])dnl
# _AC_CHECK_HEADER_OLD(HEADER-FILE, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
# _AC_CHECK_HEADER_NEW(HEADER-FILE, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
# ----------------------------------------------------
# Some packages used this macro, even though it is undocumented.
AU_DEFUN([_AC_CHECK_HEADER_OLD],
[AC_CHECK_HEADER([$1], [$2], [$3], [-])])
# Some packages used these undocumented macros. Even worse, gcc
# redefined AC_CHECK_HEADER in terms of _AC_CHECK_HEADER_OLD, so we
# can't do the simpler:
# AU_DEFUN([_AC_CHECK_HEADER_OLD],
# [AC_CHECK_HEADER([$1], [$2], [$3], [-])])
AC_DEFUN([_AC_CHECK_HEADER_OLD],
[AC_DIAGNOSE([obsolete], [The macro `$0' is obsolete.
You should use AC_CHECK_HEADER with a fourth argument.])]dnl
[_AC_CHECK_HEADER_PREPROC($@)])
AC_DEFUN([_AC_CHECK_HEADER_NEW],
[AC_DIAGNOSE([obsolete], [The macro `$0' is obsolete.
You should use AC_CHECK_HEADER with a fourth argument.])]dnl
[_AC_CHECK_HEADER_COMPILE($@)])
# _AH_CHECK_HEADER(HEADER-FILE)