[Top][All Lists]

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

Re: AC_PROG_CC does not work correctly inside conditionals (autoconf 2.6

From: Ralf Wildenhues
Subject: Re: AC_PROG_CC does not work correctly inside conditionals (autoconf 2.61)
Date: Sun, 11 Mar 2007 11:20:55 +0100
User-agent: Mutt/1.5.14 (2007-03-03)

Hello Andreas,

* Andreas Kabel wrote on Fri, Mar 09, 2007 at 11:46:38PM CET:
> if false; then      # FALSE
>         AC_PROG_CC
> else                # ELSE
>         AC_PROG_CC
> fi                  # ENDIF

Yes, this is a problem.  AC_PROG_CC does not work inside conditionals.
This holds for several other Autoconf macros as well, due to required
macros and the way macro dependencies are resolved (by textual expansion
right before the macro), see
for some more information.

Autoconf-2.61's AS_IF can help out in most situations (because it causes
prerequisite macros to be expanded outside the conditional).
Unfortunately that's not enough for AC_PROG_CC, or, more generally, the
first compiler macro that's called (AC_PROG_{CC,CXX,F77,FC,OBJC}).

But say, what's the reason you want to call this conditionally?
Your package may or may not use a compiler?


reply via email to

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