Hi David, Sorry for the late reply. * David Thompson wrote on Thu, Nov 24, 2005 at 12:05:43AM CET: > Looking into this further. Here is the problem I'm seeing. (Autoconf > 2.5.9 on cygwin). > > The function is defined as: > > m4_define([_AC_PROG_CXX_EXIT_DECLARATION], > [for ac_declaration in \ > '' \ > 'extern "C" void std::exit (int) throw (); using std::exit;' \ *snip* > But it appears that the #include <stdlib.h> is not used when > ac_declaration is set to ''. I don't quite understand the syntax > > $ac_declaration > @%:@include <stdlib.h> `$ac_declaration' just expands into one of the declarations listed in the macro. `@%:@' is a quadrigraph (documented in Autoconf manual) and expands into `#'. > Here is my output from the configure run: as you can see the include > is listed for the second option just not the first. Why? Shouldn't > the first option for ac_declaration produce just the #include > <stdlib.h>? This was with MSVC, right? Does it help if you add a declaration like in the patch below (completely untested; you might have to tune it a bit)? Note for testing you need to either rebuild and reinstall autoconf from source, or remove the frozen file $prefix/share/autoconf/autoconf/autoconf.m4f to pick up the changes. Cheers, Ralf Index: lib/autoconf/c.m4 =================================================================== RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/c.m4,v retrieving revision 1.208 diff -u -r1.208 c.m4 --- lib/autoconf/c.m4 1 Nov 2005 07:26:52 -0000 1.208 +++ lib/autoconf/c.m4 5 Jan 2006 09:43:31 -0000 @@ -783,6 +783,7 @@ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ + 'extern "C" void exit (int) __declspec(noreturn);' \ 'void exit (int);' do _AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$ac_declaration _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf