> > A quick question, I would like to be able to change one compilation flag > > for one file. > > I have a few fortran files which don't work (but can be compiled) with > > the optimisation flag (-O). > > You can use per-target flags for this, if you have to. > (I say "if you have to", because in general it's easier to let the user > just do > ./configure FFLAGS=-O0 FCFLAGS=-O0 > and be done with it. Why? Your users will have compilers that do not > understand '-O0' even; so by hardcoding it, you will make it less fun > for them). Yeh, I really have to ! Otherwise, they will have a few very boring problems like "I can compile it but it crashes when I do xxx".
> If it is even important to you to have _only_ one file compiled with > this flag, say bar.f, while all the others do not get this flag, you > could make the compilation of bar.f special by putting it in a (not > installed) library. For example: > bin_PROGRAMS = foo > foo_SOURCES = foo.f > foo_LDADD = libdummy.a > noinst_LIBRARIES = libdummy.a > libdummy_a_SOURCES = bar.f > libdummy_a_FCFLAGS = -O0 I didn't think about that trick. It really helps. Thank you very much Sylvestre
