autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC question


From: Ralf Wildenhues
Subject: Re: AC_PROG_CC question
Date: Mon, 9 Jun 2008 16:04:54 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

Hello Klaas,

* Klaas Vantournhout wrote on Mon, Jun 09, 2008 at 03:27:21PM CEST:
>
> When I am using two AC_PROG_CC macros in an if statement, then it fails
> to see that gcc is a gnu compiler. Also the rest of the configure script
> seems to fail tests, even if they compile correctly.

You got especially unlucky in hitting such a dark corner of Autoconf so
early.  ;-)

<http://www.gnu.org/software/autoconf/manual/html_node/Dependencies-Between-Macros.html>
explains the general issue which is at work here.  Add to that the fact
that AC_PROG_CC is a rather complicated macro.

So, while for the bulk of other macros, this

AC_INIT(test, 1.0)
AS_IF([test false = true],
      [AC_PROG_CC],
      [AC_PROG_CC])
AC_OUTPUT

would be a suitable workaround, it isn't for AC_PROG_CC, unfortunately.

The fix is not to call the AC_PROG_CC macro conditionally.

Hope that helps.

Cheers,
Ralf




reply via email to

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