curl + openssl + ngtcp2 + nghttp3 编译
#!/bin/sh -e
git clone --depth 1 -b OpenSSL_1_1_1o+quic https://github.com/quictls/openssl
cd openssl
./config enable-tls1_3 --prefix=$PWD/build
make -j$(nproc)
make install_sw
cd ..
git clone https://github.com/ngtcp2/nghttp3
cd nghttp3
autoreconf -i
./configure --prefix=$PWD/build --enable-lib-only
make -j$(nproc) check
make install
cd ..
git clone https://github.com/ngtcp2/ngtcp2
cd ngtcp2
autoreconf -i
./configure PKG_CONFIG_PATH=$PWD/../openssl/build/lib/pkgconfig:$PWD/../nghttp3/build/lib/pkgconfig LDFLAGS="-Wl,-rpath,$PWD/../openssl/build/lib" --prefix=$PWD/build
make -j$(nproc) check
make install
cd ..
git clone https://github.com/curl/curl
cd curl
./buildconf
./configure --with-ssl=$PWD/../openssl/build/ --with-nghttp3=$PWD/../nghttp3/build/ --with-ngtcp2=$PWD/../ngtcp2/build/ --enable-alt-svc --prefix=$PWD/build
make -j$(nproc)
make install
测试
% ./curl --version
curl 7.84.0-DEV (x86_64-apple-darwin20.6.0) libcurl/7.84.0-DEV OpenSSL/1.1.1o zlib/1.2.11 brotli/1.0.9 libidn2/2.3.2 ngtcp2/0.6.0-DEV nghttp3/0.5.0-DEV librtmp/2.3
Release-Date: [unreleased]
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli HSTS HTTP3 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets
参考
github.com/curl/curl/b…
github.com/ngtcp2/ngtc…
blog.csdn.net/u014023993/…
qing.su/article/157…
zhuanlan.zhihu.com/p/444332157