[Top][All Lists]

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

Re: autoconf 2.64 warning: AC_REQUIRE: `AC_PROG_CC' was expanded before

From: Carsten Heinrici
Subject: Re: autoconf 2.64 warning: AC_REQUIRE: `AC_PROG_CC' was expanded before it was required
Date: Sat, 16 Jan 2010 13:48:07 +0100

Again to the list:

> This scenario is described in the manual:

yes, I read this ... and tried to understand, but it is not too easy.

> Without seeing your, I can't tell you the exact fix, but it
> is likely to be a matter of using AC_REQUIRE in more places, or perhaps an
>  AC_DEFUN_ONCE instead of AC_DEFUN of your macro that is wrapping the call
> to AC_PROG_CC.

As far as I understood, it is caused by a direct expansion of
AC_PROG_CC within another macro FOO defined using AC_DEFUN, instead of
a) using AC_REQUIRE, or
b) m4_define(FOO). or
c) expanding AC_PROG_CC in the body of

Unfortunately, none of the options are satisfying:
a) does not support passing parameters to AC_PROG_CC
b) will not be supported by aclocal which requires AC_DEFUN and the
macro FOO is defined in another file
c) would require to change all, and there are many of them

The main problem is, that we want to support more compilers, named
differrently from the default list 'gcc cc' used by AC_PROG_CC.
Of course one option is to pass CC=x directly to configure.
But our idea is to extend the list by calling AC_PROG_CC([armcc tcc cl
c51 and so on]) in a system-wide macro used by all our configure
However, this requires to call AC_PROG_CC instead of using AC_REQUIRE
and it requires to use AC_DEFUN instead of m4_define.

The manual describes another solution, by changing the required macro,
but this would mean to change AC_PROG_CC.

It looks like, the solution to pass CC directly is the only real
solution, or do you have any other hints?


reply via email to

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