Next to setting explicit CFLAGS also set CXXFLAGS.

As we compile everything using CXXFLAGS when its C++ we should also set
the specific CFLAGS in CXXFLAGS on some platforms.
Rebuild configure.