[XviD-devel] CFLAGS for automake/configure

Edouard Gomez ed.gomez at free.fr
Mon Feb 24 23:09:14 CET 2003


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 ?

-- 
Edouard Gomez-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://edu.bnhof.de/pipermail/xvid-devel/attachments/20030224/4bd19f46/attachment.bin


More information about the XviD-devel mailing list