[XviD-devel] CFLAGS for automake/configure
Christoph Lampert
chl at math.uni-bonn.de
Mon Feb 24 23:24:59 CET 2003
On Mon, 24 Feb 2003, Edouard Gomez wrote:
> Christoph Lampert (chl at math.uni-bonn.de) wrote:
> > sorry for asking stupid ./configure related questions:
> > How can I add additional CFLAGS options at configure stage
> > (without editing plattform.inc afterwards)?
> > If I define CFLAGS to something noempty, default flags are not
> > set (which is okay for heavy testing), but I just wanted to add
> > "-march=athlon-xp" because CPU type is not autodetected.
>
> Ok it's not trivial but i thought about that case ;-) even if it's not
> evident for everyone:
>
> Run the configure script once with defaults then:
>
> CFLAGS="`make list-cflags | grep "CFLAGS=" | sed 's/CFLAGS=//'` -march=athlon-xp" ./configure
>
> Let's explain it a bit:
>
> I've put a rule for Makefile debugging that lists lot of things:
> # make info
>
> Part of this info rule is:
> # make list-cflags
>
> So we retrieve this only part of the info, and pipe it to get only the
> CFLAGS definition, then we remove the "CFLAGS=", add -march=xxx to the
> defiunition and finally we redefine CFLAGS with that new string.
>
> Simple, isn't it ?
Nah, it's not simple. But it's tricky, I like it ;-)
gruel
More information about the XviD-devel
mailing list