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

Re: autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.


On Thu, Jan 10, 2008 at 06:47:18PM +0100, Jochen Schmitt wrote:
> Kevin Kofler schrieb:
> > Add it to the CXXFLAGS, you'll need it there anyway when actually
> > building the program. I believe there's also a macro to check the
> > existence of the flag, which will add it to the CXXFLAGS
> > automatically if the test succeeds.
> >
> That was the first thing what I have tried to do after I have
> recognized this issue, but autoconf
> doesn't honor this settings when AC_CHECK_HEADER call the g++ compiler for
> compiling the test program.

Autoconf checks for features of a compiler.  To do this, it has to
know which programming language is the compiler supposed to compile.
This is why you have to specify the language using AC_LANG or

The default language is C, thus people using C exclusively need not
know about the language selection.  But as soon as you use a
different language, e.g. Erlang, Fortran, or C++, you have to keep
this in mind.

(Using CC=g++ says "my C compiler is named g++" which is not usually

And yes, Autoconf uses CXXFLAGS instead of CFLAGS when checking for
C++ features.

Hope this helps,
	Stepan Kasal

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