本文在Fedora17虚拟机环境下,无视频编译linphone3.5.2笔记,以备忘和供有需要之人参考。
源代码压缩包可以从此处获取:http://download.csdn.net/detail/chexlong/5054416
压缩包中包括:linphone-3.5.2.tar.gz,libogg-1.1.3.tar.gz,speex-1.2rc1.tar.gz,libosip2-3.3.0.tar.gz,libeXosip2-3.3.0.tar.gz,皆从开源社区获得。
若您想获取各个模块最新版本代码,Google解决之。另外,在https://www.linphone.org/官网上注册几个sip账号,即可用linphone编译出的客户端程序登录官网的sip服务器,方便测试。
下边是编译和安装步骤:
1 在Linux的/home/long/目录下新建目录linphone,其中建立sources、build、x86_target
[long@localhost linphone]$mkdir linphone
[long@localhost linphone]$ cd linphone
[long@localhost linphone]$ mkdir sources
[long@localhost linphone]$ mkdir build
[long@localhost linphone]$ mkdir x86_target
2 将压缩包中代码拷贝到sources目录中,解压
[long@localhost linphone]$ cd sources
[long@localhost linphone]$ tar xzvf linphone-3.5.2.tar.gz
[long@localhost linphone]$ tar xzvf libogg-1.1.3.tar.gz
[long@localhost linphone]$ tar xzvf speex-1.2rc1.tar.gz
[long@localhost linphone]$ tar xzvf libosip2-3.3.0.tar.gz
[long@localhost linphone]$ tar xzvf libeXosip2-3.3.0.tar.gz
3 在build目录中建立linphone,libogg,speex,libosip,libeXosip目录
[long@localhost linphone]$ cd ../build
[long@localhost linphone]$ mkdir linphone
[long@localhost linphone]$ mkdir libogg
[long@localhost linphone]$ mkdir speex
[long@localhost linphone]$ mkdir libosip
[long@localhost linphone]$ mkdir libeXosip
4 进入libogg目录,编译libogg
[long@localhost linphone]$ cd libogg
[long@localhost linphone]$ ../../sources/libogg-1.1.3/configure --prefix=/home/long/linphone/x86_target/
[long@localhost linphone]$ make
[long@localhost linphone]$ make install
5 进入speex目录,编译speex
[long@localhost linphone]$ cd ../speex
[long@localhost linphone]$ ../../sources/speex-1.2rc1/configure --prefix=/home/long/linphone/x86_target/ --with-ogg=/home/long/linphone/x86_target/
[long@localhost linphone]$ make
[long@localhost linphone]$ make install
6 进入libosip目录,编译osip
[long@localhost linphone]$ cd ../libosip
[long@localhost linphone]$ ../../sources/libosip2-3.3.0/configure --prefix=/home/long/linphone/x86_target/
[long@localhost linphone]$ make
[long@localhost linphone]$ make install
7 进入libeXosip目录,编译eXosip
[long@localhost linphone]$ cd ../libeXosip
[long@localhost linphone]$ ../../sources/libeXosip2-3.3.0/configure --prefix=/home/long/linphone/x86_target/
[long@localhost linphone]$ PKG_CONFIG_PATH=/home/long/linphone/x86_target/lib/pkgconfig
[long@localhost linphone]$ make
[long@localhost linphone]$ make install
8 进入linphone目录,编译linphone
[long@localhost linphone]$ cd ../linphone
[long@localhost linphone]$ ../../sources/linphone-3.5.2/configure --prefix=/home/long/linphone/x86_target/ --disable-video --enable-gtk_ui=no --with-osip=/home/long/linphone/x86_target/
[long@localhost linphone]$ PKG_CONFIG_PATH=/home/long/linphone/x86_target/lib/pkgconfig
[long@localhost linphone]$ make
[long@localhost linphone]$ make install
编译成功后,在x86_target\bin目录下,即生成linphonec等程序。打开运行,用在linphone官网上注册的sip账号,按照提示,配置和服务器,即可登录测试了。