一、源码下载:
https://github.com/curl/curl/archive/refs/tags/curl-7_75_0.tar.gz
二、解压释放文件。 tar zxvf curl-7_75_0.tar.gz
三、查看没有configure文件。只有configure.ac文件,下面要生成configure文件
那么使用脚本buildconf
./buildconf
提示报错。*** Do not use buildconf. Instead, just use: autoreconf -fi 这行可以不用理会。只是提示。
1、【./buildconf: 第 4 行:exec: autoreconf: 未找到】 如果提示这个,需要安装autoconf库
yum install autoconf -y
2、提示报错【Can't exec "aclocal": 没有那个文件或目录 at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.】 需要安装automake
yum install automake
3、提示报错
*** Do not use buildconf. Instead, just use: autoreconf -fi
configure:7404: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure:7405: error: possibly undefined macro: AC_PROG_LIBTOOL
需要安装libtool
yum install libtool
4、我认为下面的提示应该是生成成功了。
[root@localhost curl-curl-7_75_0]# ./buildconf
*** Do not use buildconf. Instead, just use: autoreconf -fi
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
libtoolize: Remember to add `LT_INIT' to configure.ac.
configure.ac:120: installing './compile'
configure.ac:185: installing './config.guess'
configure.ac:185: installing './config.sub'
configure.ac:120: installing './install-sh'
configure.ac:125: installing './missing'
docs/examples/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
[root@localhost curl-curl-7_75_0]#
[root@localhost curl-curl-7_75_0]# ls
acinclude.m4 buildconf CMakeLists.txt configure depcomp install-sh m4 Makefile.in plan9 RELEASE-NOTES test-driver
aclocal.m4 buildconf.bat compile configure.ac docs lib MacOSX-Framework maketgz projects scripts tests
appveyor.yml CHANGES config.guess COPYING GIT-INFO libcurl.pc.in Makefile.am missing README SECURITY.md winbuild
autom4te.cache CMake config.sub curl-config.in include ltmain.sh Makefile.dist packages README.md src
四、configure 配置
[root@localhost curl-curl-7_75_0]# ./configure --prefix=/home/testAdd3rd/curl/output
./configure --prefix=/home/testAdd3rd/curl/output
make
make install
都是很正常的
[root@localhost output]# pwd
/home/testAdd3rd/curl/output
[root@localhost output]# ls ./lib
libcurl.a libcurl.la libcurl.so libcurl.so.4 libcurl.so.4.7.0 pkgconfig
[root@localhost output]# ls ./include/
curl
[root@localhost output]# ls ./include/curl/
curl.h curlver.h easy.h mprintf.h multi.h options.h stdcheaders.h system.h typecheck-gcc.h urlapi.h
[root@localhost output]#