Bob Friesenhahn <[EMAIL PROTECTED]> writes:
>
> Agreed. However, shouldn't Autoconf provide a means for the package
> maintainer to semi-intelligently set a CFLAGS default?
In gmp we establish a CFLAGS before AC_PROG_CC, but with care not to
overwrite a user setting (including an empty setting),
test_CFLAGS=${CFLAGS+set}
if test "$test_CFLAGS" != set; then
# mucho smart options defaulting
...
fi
AC_PROG_CC
> Unfortunately, the option flags vary across Unix compilers so once you
> go beyond simple '-g' and '-O', it becomes necessary to test if the
> compiler accepts a given option.
Yep, a test run on a sample main, anticipating more or less what
AC_PROG_CC will do.