Bob Friesenhahn wrote: > On Thu, 30 Jul 2009, Paolo Bonzini wrote: > >>> The terrible part about how this mechanism works is that it injects into >>> CXXFLAGS itself, which means that, without my configure script can't >>> override that via the setting of AM_CXXFLAGS. >> >> I cannot parse this sentence. Can you explain? > > He is saying that he is not able to override the C++ compiler > compilation flags by using only Automake. > > Most compilers evaluate arguments in left to right order, and will > override previously set arguments, but this is not assured. Actually, it's that I can't override these in a default build by any mechanism other than editing CXXFLAGS, which is listed as something that autoconf scripts are not to do. The "right" way to set some flags into a global CXXFLAGS is to use AM_CXXFLAGS ... but then the compile line winds up being: ${CXX} ${AM_CXXFLAGS} ${CXXFLAGS} So I'm left doing what I posted earlier and setting CXXFLAGS to "" if the user hasn't set it at ./configure time, since there is no other option to say "hey, um, thanks! but I don't really want you to add -g -O2 to my flags" I recognize that this is not the end of the world, but it's sort of frustrating to have flags injected that are not, in fact, required, and that I did not ask to have added, especially when it's done in such a way that doesn't give me an pleasant alternatives. Monty _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf