Andres Freund <andres@anarazel.de> writes:
> I rather regularly want to pass extra flags to configure without
> overwriting CFLAGS. There's two basic reasons:
> 1) ./configure CFLAGS=... essentially breaks --enable-debug and related
> options, overwrites -O2 as the default and such. That's imo pretty
> confusing.
> 2) I like to be able to pass -Werror or something to configure without
> breaking a bunch of configure tests that won't work with Werror.
I would be rather surprised if such a switch didn't affect the flags used
by configure itself, so your point (2) seems like it would require nasty
inconsistency.
Why don't you just edit Makefile.global after configure finishes?
Or use COPT or PROFILE?
regards, tom lane