[Top][All Lists]

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

[sr #110350] AX_PROG_CC_FOR_BUILD broken with 2.69c

From: Benjamin Moody
Subject: [sr #110350] AX_PROG_CC_FOR_BUILD broken with 2.69c
Date: Mon, 16 Nov 2020 18:46:05 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #1, sr #110350 (project autoconf):

It's not entirely clear to me what the issue is - is maintaining compatibility
the sticking point, or is it that you want a better API to enable what

I also don't understand what Jannick's proposed solution would be, though my
M4 is not the best.

First of all, how important is it to use AC_DEFUN_ONCE for AC_PROG_CC? 
Autoconf 2.69 does cache the result of AC_PROG_CC, after all.  So maybe the
simplest thing would be to revert that change and keep things working as they
were in 2.69.

If optimizing AC_PROG_CC is necessary, how important is it to preserve
compatibility with the existing AX_PROC_CC_FOR_BUILD macro?  I don't think it
would be too much of a burden to tell people "when you upgrade to Autoconf
2.70, you will also need to get an updated version of
ax_prog_cc_for_build.m4".  Of course, that would rely on there _being_ an
updated ax_prog_cc_for_build.m4 - is there a proposed alternative that would
work in the presence of AC_DEFUN_ONCE'd AC_PROG_CC?

If it's essential both to optimize AC_PROG_CC to avoid multiple expansions,
_and_ to avoid breaking AX_PROC_CC_FOR_BUILD, how ugly is the implementation
allowed to be? :)  It seems to me that you could change AC_PROG_CC to
something like:

dnl  If the macro CC is locally defined (e.g. by AX_PROG_CC_FOR_BUILD,
dnl  which defines it as CC_FOR_BUILD), then perform the compiler
dnl  tests each time AC_PROG_CC is invoked.  If CC is undefined, then
dnl  we only want to include the tests once.


AC_ARG_VAR([CC],     [C compiler command])dnl
AC_ARG_VAR([CFLAGS], [C compiler flags])dnl

I'm sure this could be done much more elegantly, but it seems to work in a
simple test.


Reply to this item at:


  Message sent via Savannah

reply via email to

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