On Sat, Oct 13, 2001 at 06:46:35PM +0200, Guido Draheim wrote: > [EMAIL PROTECTED] wrote: > > i'm using: > > > > for (gint xx=0; xx < 3; xx++) { .. } > > > > and i generally mix variable declarations and statements as i > > please instead of putting all the declarations near the open brace. > > > > In terms of an autoconf probe, what do you suggest? > > ouch, that's a autoconf-test that has not been written so far, even > more for this special case there were two interpretations (with xx > being seen as ifdeclared outside of for() or the symbols is only valid > within the for()) - of course it could be easily written (and would > go the macro-archive then) - somebody around here who has an example > ready?
The following test seems to work. It might be nice to guess the -std=gnu99 option if CC = gcc. Can you help me improve the style? Thanks .. AC_MSG_CHECKING([whether $CC accepts C99 declarations]) AC_TRY_COMPILE([],[ int x=0; x+=1; int y=0; for (int z=0; z < 2; z++); ],[ AC_MSG_RESULT(yes) ], [ AC_MSG_ERROR([ *** This package requires a C99 compiler.]) ]) -- Victory to the Divine Mother!! http://sahajayoga.org