[Top][All Lists]

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

Re: autoconf vs <cstdint>

From: Ralf Wildenhues
Subject: Re: autoconf vs <cstdint>
Date: Wed, 2 Dec 2009 07:42:57 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

* Ralf Corsepius wrote on Wed, Dec 02, 2009 at 07:05:47AM CET:
> On 12/02/2009 04:44 AM, Erik de Castro Lopo wrote:
> >     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: checking cstdint presence
> >     configure:18160: g++ -E  conftest.cpp

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

No, it is not, for the preprocessor test.

The easiest user workaround for this is to
  ./configure CXX="g++ -std=gnu++0x"

The bug is in the AC_ADD_CXXFLAGS macro (which, by the way, is not from
Autoconf so its name shouldn't start with 'AC_') or your usage thereof:

because the flag does not just influence the C++ compiler but also its
preprocessor.  As developer, you could use AC_PROG_CXXCPP and adjust
$CXXCPP to also contain -std=gnu++0x when it is deemed acceptable (I
suppose AC_ADD_CXXFLAGS has an optional IF-OK argument?).

Of course, -Werror is problematic in many cases, but here it's not the


reply via email to

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