Re: AC_PROG_CC question

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

 



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


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux