git clone https://github.com/freeswitch/spandsp
# 切换到该提交,要不然编译freeswitch的时候会报错
git reset --hard 67d2455efe02e7ff0d897f3fd5636fed4d54549e
# 编译安装
./configure
make -j`nproc`
make install
# 安装完成后/usr/lib/pkgconfig/目录会多出spandsp库的pkg-config配置文件,该文件会指出spandsp库的路径和头文件的路径
# 重新加载动态库
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:${PKG_CONFIG_PATH}
ldconfig