autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with check for functions with Sun CC


From: Steve M. Robbins
Subject: Re: Problem with check for functions with Sun CC
Date: Thu, 2 May 2002 14:38:37 -0400
User-agent: Mutt/1.3.28i

On Thu, May 02, 2002 at 07:41:03PM +0200, Martin Frydl wrote:
> Andreas Schwab wrote:
> > 
> > Martin Frydl <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]