autoconf-archive-maintainers | |
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
C++ pre-processor flags not updated by ax_cxx_compile_stdcxx.m4
From: |
Kip Warner |
Subject: |
C++ pre-processor flags not updated by ax_cxx_compile_stdcxx.m4 |
Date: |
Thu, 10 Mar 2016 11:49:12 -0800 |
Hey list,
Today while adding...
AX_CXX_COMPILE_STDCXX_14([noext],[mandatory])
...
AC_CHECK_HEADERS([cfenv], [],
[AC_MSG_ERROR([missing some required standard C++ headers...])])
...to my configure.ac, I noticed a peculiar warning. The conftest.cpp
successfully compiled without warning, but the pre-processor test
raised one. Here is the log:
...
configure:9708: checking cfenv usability
configure:9708: g++ -c -g3 -std=c++14 -mfpmath=sse -msse -msse2
conftest.cpp >&5
configure:9708: $? = 0
configure:9708: result: yes
configure:9708: checking cfenv presence
configure:9708: g++ -E conftest.cpp
In file included from /usr/include/c++/5/cfenv:35:0,
from conftest.cpp:31:
/usr/include/c++/5/bits/c++0x_warning.h:32:2: error: #error This
file requires compiler and library support for the ISO C++ 2011
standard. This support is currently experimental, and must be
enabled with the -std=c++11 or -std=gnu++11 compiler options.
...
I did a bit of digging and it looks like ax_cxx_compile_stdcxx.m4
updates CXXFLAGS correctly, but doesn't touch CPPFLAGS. In most cases
this probably wouldn't have mattered, but for this header it does.
Should I simply add the following or do something else?
AX_CXX_COMPILE_STDCXX_14([noext],[mandatory])
CPPFLAGS="$CPPFLAGS -std=c++14"
Or should ax_cxx_compile_stdcxx.m4 be patched to update the CPPFLAGS?
--
Kip Warner -- Senior Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
signature.asc
Description: This is a digitally signed message part
- C++ pre-processor flags not updated by ax_cxx_compile_stdcxx.m4,
Kip Warner <=