Re: modification of CFLAGS

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

 



* Jason Curl wrote on Thu, May 20, 2010 at 09:03:53PM CEST:
> On 20/05/2010 20:45, Ralf Wildenhues wrote:
> >You can access $CFLAGS before AC_PROG_CC, for example save its value to
> >some other variable:
> >   LX_CFLAGS=${CFLAGS-NONE}
> Thought about this before I posted and it's viable. Are you sure
> there's no way to get this within my macro? This allows me to
> encapsulate all functionality in a separate file with only one line
> in the configure.ac.

You can probably stick that line above into an early-expanded diversion
such as INIT_PREPARE, but none of those are documented, so you'd be
treading in dark waters there.

A probably cleaner alternative would be to let your macro do all of
  LX_CFLAGS=${CFLAGS-NONE}
  AC_PROG_CC
  rest of your old macro

and document that.

FWIW, gnulib solves things like this by having two (sets of) macros:
one FOO_EARLY and one FOO_... macro.  That's not too bad, either.

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