auto-detect CXXFLAGS