autoconf
[Top][All Lists]
Advanced

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

Re: autoconf vs <cstdint>


From: Erik de Castro Lopo
Subject: Re: autoconf vs <cstdint>
Date: Wed, 2 Dec 2009 14:44:11 +1100

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. Does that mean I need to add that to CPPFLAGS?

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/




reply via email to

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