GMP 软件包包含一些数学库。这里有对任意精度数值计算很有用的函数。
![[Note]](../images/note.png) 
          
            如果你是为 32 位的 x86 系统编译,但是你的 CPU 可以运行 64 位代码
            而且 环境中你有指定的 CFLAGS,那么配置脚本会尝试配置为 64 位并导致失败。用下面的
            方式执行配置命令来避免这个问题:
          
ABI=32 ./configure ...
        准备编译 GMP:
./configure --prefix=/usr \
            --enable-cxx  \
            --docdir=/usr/share/doc/gmp-6.0.0a
        新配置选项的含义:
--enable-cxx
            这个参数启用 C++ 支持
--docdir=/usr/share/doc/gmp-6.0.0a
            这个变量指定保存文档的正确位置。
编译软件包并生成 HTML 文档:
make make html
![[Important]](../images/important.png) 
          该章节 GMP 的测试套件至关重要,任何情况下都不能跳过。
查看结果:
make check 2>&1 | tee gmp-check-log
确认测试套件中所有的 188 个测试都通过了。通过输入下面的命令检查结果:
awk '/tests passed/{total+=$2} ; END{print total}' gmp-check-log
        安装软件包和文档:
make install make install-html