Yes, I obviously don't want to replace CFLAGS or CPPFLAGS whole-sale,
there might actually be necessary options in there, and I certainly
don't want to pick those out and have to provide them manually.
I'm currently making changes to the configure script and Makefile that
should have the following effects:
- CFLAGS (and CPPFLAGS and LDFLAGS) are separated into CFLAGS_AUTO,
are necessary for the build and shouldn't be touched, and CFLAGS, which
be modified (and provide, for instance, "-O2 -fno-stack-protector" as
defaults). The results are stored in the config.mak.
- Having a CFLAGS in the environment at ./configure time will *append*
the contents of the environment variable to the default CFLAGS.
- Having a CFLAGS make variable will *replace* the value provided in
the config.mak, i.e. the one computed by configure.
If you're so inclined, you can test those changes in the latest git
for skarnet.org packages.