autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _AC_CHECK_HEADER_OLD


From: Eric Blake
Subject: Re: _AC_CHECK_HEADER_OLD
Date: Mon, 15 Jun 2009 20:00:29 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Ralf Wildenhues on 6/15/2009 2:46 PM:
> This rewrite causes new autoconf on gcc/gcc/configure.ac to hang.
> gcc/config/acx.m4 contains
> 
> AC_DEFUN([AC_PROG_CPP_WERROR],
> [AC_REQUIRE([AC_PROG_CPP])dnl
> m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD]))
> ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR

Ouch.  The AU_DEFUN'd version is now in terms of AC_CHECK_HEADER, yet the
gcc AC_CHECK_HEADER is in terms of _AC_CHECK_HEADER_OLD.  Hence the
infinite expansion loop, because gcc is changing AC_CHECK_HEADER behind
autoconf's back.  It feels like gcc would be the better place to fix this;
how about doing the following in gcc instead of the current code:

m4_copy([AC_CHECK_HEADER], [gcc_CHECK_HEADER_1])
m4_define([gcc_CHECK_HEADER_2],
[m4_if([$4], [], ]m4_dquote(m4_defn([_AC_CHECK_HEADER_OLD]))[,
 [gcc_CHECK_HEADER_1($@)])])

AC_DEFUN([AC_PROG_CPP_WERROR],
[AC_REQUIRE([AC_PROG_CPP])dnl
m4_define([AC_CHECK_HEADER], m4_defn([gcc_CHECK_HEADER_2]))
ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR


Or is this usage of _AC_CHECK_HEADER_OLD so pervasive in the wild that we
should make the AU_DEFUN forward to _AC_CHECK_HEADER_PREPROC instead of
the public AC_CHECK_HEADER, the way I originally proposed?

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko2/L0ACgkQ84KuGfSFAYDAnACgmKAOgo1YX/L34MHlsqQVb5/b
RhEAoIL1pNCJZI9JJ+jwfDV7dzDD1NBJ
=M0Mz
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]