FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 01-10-2008, 04:38 PM
Kevin Kofler
 
Default autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.

Jochen Schmitt <Jochen <at> herr-schmitt.de> writes:
> So I want to ask, what I have to to, that autoconf will respect this
> option in the AC_HEADER macro.

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.

But why are you still using autoconf and not something less insane? ;-)
http://www.cmake.org/

Kevin Kofler

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 01-11-2008, 03:21 PM
Stepan Kasal
 
Default autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.

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@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 05:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org