[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modification of CFLAGS
From: |
Ralf Wildenhues |
Subject: |
Re: modification of CFLAGS |
Date: |
Thu, 20 May 2010 21:13:00 +0200 |
User-agent: |
Mutt/1.5.20 (2009-10-28) |
* 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