1. 环境
在 Ubuntu 16.4.5 TLS 版本中编译和测试通过。
下载最新的源代码需要git,若没有安装git可以使用下面命令进行安装:
sudo apt-get install git -y
2. 编译及安装
2.1 下载源码
git clone https://github.com/cisco/libsrtp.git
2.2 进入源码目录
cd libsrtp
2.3 配置
配置命令如下:
./configure
执行结果,如下所示:
cgs@ubuntu:~/libsrtp$ ./configure
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for ar... ar
checking the archiver (ar) interface... ar
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking whether gcc accepts -Werror... yes
checking whether gcc accepts -fPIC... yes
checking whether gcc accepts -Wall... yes
checking whether gcc accepts -pedantic... yes
checking whether gcc accepts -Wstrict-prototypes... yes
checking whether gcc accepts -O4... yes
checking whether gcc accepts -fexpensive-optimizations... yes
checking whether gcc accepts -funroll-loops... yes
checking whether gcc accepts -Wno-language-extension-token... no
checking for ANSI C header files... (cached) yes
checking for unistd.h... (cached) yes
checking for byteswap.h...