I have a simple Autotools C project (not C++), whose skeleton was created for me by Eclipse CDT (Juno).
CFLAGs (by inspection) seem to be -g -O2
.
I want all of the generated make files to also have -std=gnu99
appended to the CFLAGs, because I use for (int i = 0; i < MAX; i++)
and similar.
I can obviously hack the Makefile, but this gets overwritten on ./configure
.
Where is the correct place to add (or change) CFLAGs which are required by the code (as opposed to those CFLAGs which the user might want to change)?
P.S. I'd like to do this by editing a text file (such as Makefile.am
or configure.ac
), rather than clicking a box in Eclipse, if possible.