On Thu, May 02, 2002 at 07:41:03PM +0200, Martin Frydl wrote: > Andreas Schwab wrote: > > > > Martin Frydl <[EMAIL PROTECTED]> writes: > > > > |> The compiler complains about extern "C". My question is whether this is > > |> autoconf bug or should I use ./configure CC=cc CXX=CC to really use C > > |> compiler for these tests. > > > > The latter. You cannot expect meaningfull results when compiling C code > > with a C++ compiler. C and C++ are quite different languages. > > But I will use the checked functions in C++ sources, so it should be > better to check them by C++ compiler.
Autoconf expects that "CC" is a C-compiler and "CXX" is a C++ compiler, and will get upset if you lie to it. ;-) If you want to check things using C++, then have a look at the AC_LANG macros, e.g. AC_LANG_PUSH(C++) ... test stuff ... AC_LANG_POP(C++) However, search the archives because there are several pitfalls when using C++. -S -- by Rocket to the Moon, by Airplane to the Rocket, by Taxi to the Airport, by Frontdoor to the Taxi, by throwing back the blanket and laying down the legs ... - They Might Be Giants