Try this -std=c++17 like -std=c++1z
+MM_AX_CXX_COMPILE_STDCXX_1z([noext], [mandatory])

I hope you succeed

- - - Updated - - -

If the error remains, go back to c++11

CXXFLAGS += "-std=c++11" with gcc4.9.4