Michael> CFLAGS=$CFLAGS -std=c89
Michael> AC_SUBST(CFLAGS)
Michael> This in configure.ac is another option.
Michael> The only problem I see is that we probably support non-gcc compilers 
Michael> that dont support this flag. What will they do when they see it ?

CFLAGS is a user variable, setting it in configure.ac is GNU-ically
incorrect.  It is better to set AM_CFLAGS instead.  You can set this
in configure.ac just fine.  There's also a standard trick for
handling gcc-specific options:

    AM_CFLAGS=
    if test "$GCC" = yes; then
      AM_CFLAGS='-std=c89 -Wfoo -Wbar'
    fi
    AC_SUBST(AM_CFLAGS)

We set CFLAGS to -g in a specific case, that is sort of different
since it claims to work around bugs in the infamous gcc "2.96".  I'd
prefer we avoid this in general.

Mark> But I had hoped Autoconf would make it easy to
Mark> specify the wanted C dialect.

As far as I know, there's no pre-made macro for this.

Tom


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to