Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Fedora Development (http://www.linux-archive.org/fedora-development/)
-   -   autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro. (http://www.linux-archive.org/fedora-development/34034-autoconf-issue-using-stdc-gnu-0x-option-ac_check_header-macro.html)

Jochen Schmitt 01-10-2008 04:12 PM

autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I have a special question about the AC_HEADER macro in autoconf. I'm
trying to text for
the existence of the unordered_set header file in C++. Unfortunately,
I will got a message,
that I have to use the -std=gnu++0x if I want to include this header file.

So I want to ask, what I have to to, that autoconf will respect this
option in the
AC_HEADER macro.

Best Regards:
Jochen Schmitt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHhlIJT2AHK6txfgwRAoErAJ4oh0N9zPezot5ElIURio jNmsoVsQCgioJc
GuW69Vv7lk7448FL8OlRSjU=
=PPj/
-----END PGP SIGNATURE-----

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

Jochen Schmitt 01-10-2008 04:47 PM

autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

For you suggestion to using cmake, I'm not the upstream author.

As follow a snippet from the config.log file:

configure:9397: checking unordered_set usability
configure:9414: g++ -c -O2 -Wall conftest.cpp >&5
In file included from
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/unordered_set:40,
from conftest.cpp:107:
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/c++0x_warning.h:36:2:
error: #error This file requires compiler and library support for the
upcoming ISO C++ standard, C++0x. This support is currently
experimental, and must be enabled with the -std=c++0x or -std=gnu++0x
compiler options.
In file included from
/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../../include/c++/4.3.0/unordered_set:53,
from conftest.cpp:107:

Best Regards:

Jochen Schmitt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFHhlodT2AHK6txfgwRAmxPAKC4tGbJ83BgIDLEYnl6K+ kENyglNgCg6I10
TAJXUh9oey+c6oMnS671+r4=
=k0uj
-----END PGP SIGNATURE-----

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

Benjamin Kosnik 01-10-2008 05:16 PM

autoconf issue using -stdc=gnu++0x option in AC_CHECK_HEADER macro.
 
> I have a special question about the AC_HEADER macro in autoconf. I'm
> trying to text for
> the existence of the unordered_set header file in C++.

I wrote up autoconf macros for this here:
http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/backwards_compatibility.html

See "Support for C++TR1 dialect"

I'm waiting on feedback and then hope to merge these into the autoconf
macro repository.

> Unfortunately,
> I will got a message,
> that I have to use the -std=gnu++0x if I want to include this header
> file.

Yes, as <unordered_set> is a C++0x standard header.

If you'd like to use C++98, I suggest using TR1's <tr1/unordered_set>

best,
benjamin

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


All times are GMT. The time now is 01:15 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.