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 <http://www.gnu.org/software/autoconf/manual/html_node/Dependencies-Between-Macros.html> 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? Cheers, Ralf
