autoconf
[Top][All Lists]
Advanced

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

Re: Require after functionality?


From: Nick Bowler
Subject: Re: Require after functionality?
Date: Fri, 10 Jan 2014 11:25:11 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On 2014-01-07 13:01 -0500, Dale Visser wrote:
> I'm rephrasing an earlier question I asked that got no response. I hope I'm
> clearer here, and someone can answer.
> 
> I have a macro that I would like to guarantee is included and expanded
> whenever AC_PROG_CC is expanded. (I.e., I want it to turn it on by default
> for all users of the AC_PROG_CC macro.)
> 
> However, this other macro invokes AC_COMPILE_IF_ELSE, which ends up doing
> an AC_REQUIRE([AC_PROG_CC]). If I simply add this macro into AC_PROG_CC,
> autoconf then understandably refuses to deal with a recursive situation
> that has no stop condition.
> 
> Is there a way for me to have AC_PROG_CC indirectly require this other
> macro *after* AC_PROG_CC itself has been expanded?

I suspect AC_CONFIG_COMMANDS_PRE[1] will do the trick for you.  Instead of
adding a call to your macro, add a call to

  AC_CONFIG_COMMANDS_PRE([YOUR_MACRO])

This will arrange to have your macro expanded "later" near the end of the
configure run).

[1] 
https://gnu.org/software/autoconf/manual/autoconf.html#Configuration-Commands

Cheers,
  Nick



reply via email to

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