autoconf
[Top][All Lists]
Advanced

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

Re: autoconf vs <cstdint>


From: Ralf Corsepius
Subject: Re: autoconf vs <cstdint>
Date: Wed, 02 Dec 2009 07:05:47 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090922 Fedora/3.0-3.9.b4.fc12 Thunderbird/3.0b4

On 12/02/2009 04:44 AM, Erik de Castro Lopo wrote:
Eric Blake wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Erik de Castro Lopo on 12/1/2009 8:12 PM:
     AC_LANG([C++])
     AC_ADD_CXXFLAGS([-std=gnu++0x])
     AC_CHECK_HEADER(cstdint)

With proper m4 quoting, that would be:

AC_CHECK_HEADER([cstdint])

     checking cstdint usability... yes
     checking cstdint presence... no
     configure: WARNING: cstdint: accepted by the compiler, rejected by the 
preprocessor!
     configure: WARNING: cstdint: proceeding with the compiler's result
     checking for cstdint... yes

Can we see the corresponding config.log?

Ah, that shed some light:

     configure:18130: checking if g++ accepts -std=gnu++0x
     configure:18147: g++ -o conftest -g -O2 -Wall -Wextra -Wsign-compare 
-Wno-ctor-dtor-privacy
         -Wno-non-virtual-dtor -Wformat -Werror -Wno-deprecated -std=gnu++0x   
conftest.cpp -lcups>&5
     configure:18147: $? = 0
     configure:18148: result: yes
     configure:18160: checking cstdint usability
     configure:18160: g++ -c -g -O2 -Wall -Wextra -Wsign-compare 
-Wno-ctor-dtor-privacy \
         -Wno-non-virtual-dtor -Wformat -Werror -Wno-deprecated -std=gnu++0x  
conftest.cpp>&5
     configure:18160: $? = 0
     configure:18160: result: yes
     configure:18160: checking cstdint presence
     configure:18160: g++ -E  conftest.cpp
     In file included from /usr/include/c++/4.4/cstdint:35,
                  from conftest.cpp:32:
     /usr/include/c++/4.4/c++0x_warning.h:31: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.
     configure:18160: $? = 1


The problem is that when checking for<cstdint>, -std=gnu++0x is not on the
command line.

Look again. AFAIS from your config.log, -std=gnu++0x is on the command line.

AFAICT, your problem is you using -Werror. By applying it the warning gcc issues becomes an error which causes the check in configure to break.

Ralf






reply via email to

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