How to build libRmath.dylib on Mac

I am a Mac user. I am trying to install libRmath.dylib, the standalone Rmath library from R. I found that R does not compile libRmath by default. So I tried to compile the Rmath library from source. But I can only find .tar file for Windows/Unix on CRAN, and the command "./configure" gave me a bunch of "No" and "error"s.

checking whether C runtime needs -D__NO_MATH_INLINES... no
checking for xmkmf... no
checking whether linker supports dynamic lookup... yes
checking whether g++  supports C++98 features by default... yes
checking whether g++  supports C++11 features by default... no
checking whether g++  supports C++11 features with -std=gnu++11... yes
checking whether g++  supports C++14 features by default... no
checking whether g++  supports C++14 features with -std=gnu++14... no
checking whether g++  supports C++14 features with -std=gnu++1y... no
checking whether g++  supports C++14 features with -std=c++14... no
checking whether g++  supports C++14 features with -std=c++1y... no
configure: No compiler with C++14 support was found
checking whether   supports C++17 features by default... no
checking whether   supports C++17 features with -std=gnu++17... no
checking whether   supports C++17 features with -std=gnu++1z... no
checking whether   supports C++17 features with -std=c++17... no
checking whether   supports C++17 features with -std=c++1z... no
configure: No compiler with C++17 support was found
checking for off_t... yes
...
checking if bzip2 version >= 1.0.6... yes
checking whether bzip2 support suffices... yes
checking for lzma_version_number in -llzma... yes
checking lzma.h usability... no
checking lzma.h presence... no
checking for lzma.h... no
configure: error: "liblzma library and headers are required"

Is there any way to install libRmath.dylib on Mac? Thank you very much!