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: Thu, 3 Dec 2009 08:33:05 +1100

Ralf Wildenhues wrote:

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

Unfortunately this wont work as the code needs to be built by an autobuilder
on two different systems, one with a g++ that requires -std=gnu++0x and the
other which doesn't understand -std=gnu++0x. I'd prefer not to have to hack
a workaround for this into the autobuilder.

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

I've moved the test for <cstdint> to a place before -Werror is added.

> 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_')

Noted.

> or your usage thereof:
>     AC_ADD_CXXFLAGS([-std=gnu++0x])
> 
> 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?).

No. This was a macro I picked up from somewhere else. Looks like I'll
have to hack it a bit.

However, one I sort out the problems above, it still doesn't explain
why:

    AC_CHECK_HEADER([cstdint])

does result in a HAVE_CSTDINT getting added to the config.h file.

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




reply via email to

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