libcurl在mac上编译
2016-08-05 14:42:07
分类: C/C++
首先,需要安装autoconf和automake工具
1)安装m4
http://ftp.gnu.org/gnu/m4/
tar -xzvf m4-1.4.17.tar.gz
cd m4-1.4.17
./configure --prefix=/usr/local
make
sudo make install
2)安装autoconf
http://ftp.gnu.org/gnu/autoconf/
tar -xzvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
3)安装automake
http://ftp.gnu.org/gnu/automake/
tar xzvf automake-1.15.tar.gz
cd automake-1.15
./configure --prefix=/usr/local
make
sudo make install
4)安装libtool
http://mirror.hust.edu.cn/gnu/libtool/
tar xzvf libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure --prefix=/usr/local
make
sudo make install
5)下载libcurl源码,运行libcurl初始化脚本
https://curl.haxx.se/download.html
cd curl
./buildconf
6)编译libcurl
./configure --prefix=./libcurl --without-ssl --disable-ldap --disable-ldaps --without-zlib CC=clang
make
sudo make install
1)安装m4
http://ftp.gnu.org/gnu/m4/
tar -xzvf m4-1.4.17.tar.gz
cd m4-1.4.17
./configure --prefix=/usr/local
make
sudo make install
2)安装autoconf
http://ftp.gnu.org/gnu/autoconf/
tar -xzvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/usr/local
make
sudo make install
3)安装automake
http://ftp.gnu.org/gnu/automake/
tar xzvf automake-1.15.tar.gz
cd automake-1.15
./configure --prefix=/usr/local
make
sudo make install
4)安装libtool
http://mirror.hust.edu.cn/gnu/libtool/
tar xzvf libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure --prefix=/usr/local
make
sudo make install
5)下载libcurl源码,运行libcurl初始化脚本
https://curl.haxx.se/download.html
cd curl
./buildconf
6)编译libcurl
./configure --prefix=./libcurl --without-ssl --disable-ldap --disable-ldaps --without-zlib CC=clang
make
sudo make install