Hello Jan, * Fugitive wrote on Thu, Jun 12, 2008 at 06:42:24PM CEST: > > Simply overriding FFLAGS in Makefile.am generates warning from Automake but > it does the trick.
You can do that, in combination with 'AUTOMAKE_OPTIONS = -Wno-override', > QUESTION: Is there another way over override FFLAGS cleanly, possibly only > forcing optimization to none while retaining the other (if any) flags > specified in FFLAGS ? ... but typically it's cleaner to test in configure.ac whether FFLAGS was set, and only override it if it wasn't. To find out whether the user set it or the value was defaulted by AC_PROG_F77, do something like if test "${FFLAGS+set}" = set; then user_set_FFLAGS=true else user_set_FFLAGS=false fi AC_PROG_F77 if $user_set_FFLAGS; then ... (deal with user-set flags) else ... (deal with defaulted flags) fi In the '...' parts, you can either set FFLAGS, AM_FFLAGS, or other variables of your choice which you then refer to in Makefile.am settings. Be sure to AC_SUBST those variables (FFLAGS is already AC_SUBSTed by default, AM_FFLAGS isn't). Hope that helps. Cheers, Ralf