On Sat, 20 Nov 2010 16:51:48 +0100 Ralf Wildenhues <ralf.wildenh...@gmx.de> wrote: > > > Maybe there is a way to do this via autoconf? > > > > Yes, you can place: > > > > CFLAGS="" > > > > at the beginning of your configure.ac, after AM_INIT_AUTOMAKE but > > before AC_PROG_CC. > > > > This will prevent your configure from allowing user-specified CFLAGS > > overrides, but you will get what you want. > > : ${CFLAGS=} > > gets you both. >
That does work (${CFLAGS=-O2}, which is fine as a default). Also, if the user does specify flags, the -O2 default is not used, which makes it better than my hack. Thanks much! -- "The angel of history[...]is turned toward the past." (Walter Benjamin)