Hi
I've been playing around with our configure and I'm having a problem
that maybe someone can help me with.
I'm adding a flag to XTRA_CFLAGS in our configure script and it seems to
somehow be creeping into AM_CXXFLAGS. The weird thing is that looking into
the generate Makefiled, it is not there. However, when I run "make -n", I
see it showing up in AM_CXXFLAGS.
Here's what I've been doing. I've been adding the following lines to
configure.ac:
XTRA_CFLAGS="$XTRA_CFLAGS -std=c11"
XTRA_CXXFLAGS="$XTRA_CXXFLAGS -std=c++11"
CFLAGS="$CFLAGS -std=c11"
CXXFLAGS="$CXXFLAGS -std=c++11"
After running configure, everything looks fine, the displayed resume
looks correct. However, once the build actually starts I get warnings
like:
GEN libinterp/octave-value/ov-flt-re-mat.df
cc1plus: warning: command line option ‘-std=c11’ is valid for
C/ObjC but not for C++
And indeed, running "make -n", I get g++ being called with -std=c11. For
example, the recipe for octave-value/ov-flt-re-mat.df
g++ -E -DHAVE_CONFIG_H -I. -I/home/carandraug/dev/octave \
-I. [....] \
-std=c11 -pthread -fopenmp [...] \
[...]
mv libinterp/octave-value/ov-flt-re-mat.df-t
libinterp/octave-value/ov-flt-re-mat.df
Anyone can explain me what I'm doing wrong?