On Sat, Oct 13, 2001 at 11:24:57AM -0700, Paul Eggert wrote: > > From: [EMAIL PROTECTED] > > Date: Sat, 13 Oct 2001 10:22:31 -0700 > > > > 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.]) > > ]) > > OK, but why bother with that? Just run 'make'. If it fails, your > compiler doesn't support C99 declarations. I see little need to > discover that at 'configure'-time.
At least i can guess the "-std=gnu99" option if CC=gnu .. ? > Now, if your goal was to find a C compiler tht supported C99 > declarations, that would be another story. Yah, that's my goal. > Or if your goal was to define a macro that is nonzero if C99 > declarations are supported, Autoconf could do that too. But I don't > think a macro like that would be all that useful in practice: it'd > just make the code uglier. No, that's silly. i'm not going to litter my code with #ifdefs for old compilers. More realistically, i just want configure to suggest upgrading gcc if the installed gcc doesn't support C99. Something like that. -- Victory to the Divine Mother!! http://sahajayoga.org