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

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

 



Hello,

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
AC_LANG_PUSH/POP.  See
http://www.gnu.org/software/autoconf/manual/html_node/Language-Choice.html

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
true.)

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

Hope this helps,
	Stepan Kasal

-- 
fedora-devel-list mailing list
fedora-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-devel-list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux