Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Looking at configure.in, it looks pretty safe:
> if test "$ac_env_CXXFLAGS" != set; then
> if test "$GXX" = yes; then
> CXXFLAGS=-O2
> else
> case $template in
> osf) CXXFLAGS='-O4 -Olimit 2000' ;;
> unixware) CXXFLAGS='-O' ;;
> *) CXXFLAGS= ;;
> esac
> fi
> fi
> Because CXXFLAGS is already set for freebsd/alpha, it falls through,
I don't think so; the ac_env_ flag presumably indicates whether
configure inherited CXXFLAGS from its environment, not whether it
set it internally.
But even if setting CXXFLAGS in the template did override this code,
it would be a mistake, because the point of this code is to allow a
choice between g++-specific and vendor's-compiler-specific CXXFLAGS.
Perhaps we could do something like this:
# set defaults for most platformsGCC_CXXFLAGS="-O2"VENDOR_CXXFLAGS=
# now include template, which may override either of the above
# now select proper CXXFLAGSif test "$ac_env_CXXFLAGS" != set; then if test "$GXX" = yes; then
CXXFLAGS="$GCC_CXXFLAGS" else CXXFLAGS="$VENDOR_CXXFLAGS" fifi
This would allow us to push the special cases for osf and unixware out
into their template files, which would be a Good Thing.
regards, tom lane