We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
办法一: 直接指定依赖库所在目录 。例如(--with-openssl=/usr/openssl)
--with-openssl=/usr/openssl
办法二: 使用 pkg-config
pkg-config
办法三: 上述两种办法混用,大部分情况是(办法一)比(办法二)优先级高
为啥会混用,因为一部分库未提供 pkg-config 配置。 比如bzip2 ,iconv ,libgif 等
bzip2
iconv
libgif
例子:构建 curl
curl
package_name='zlib openssl libcares libbrotlicommon libbrotlidec libbrotlienc libzstd libnghttp2 libidn2' CPPFLAGS="$(pkg-config --cflags-only-I --static $package_name)" \ LDFLAGS="$(pkg-config --libs-only-L --static $package_name)" \ LIBS="$(pkg-config --libs-only-l --static $package_name)" \ ./configure --prefix=/usr/curl \ --enable-static \ --disable-shared \ --without-librtmp \ --disable-ldap \ --disable-rtsp \ --enable-http \ --enable-alt-svc \ --enable-hsts \ --enable-http-auth \ --enable-mime \ --enable-cookies \ --enable-doh \ --enable-threaded-resolver \ --enable-ipv6 \ --enable-proxy \ --enable-websockets \ --enable-get-easy-options \ --enable-file \ --enable-mqtt \ --enable-unix-sockets \ --enable-progress-meter \ --enable-optimize \ --with-zlib=/usr/zlib \ --with-openssl=/usr/openssl \ --enable-ares=/usr/cares \ --with-default-ssl-backend=openssl \ --with-libidn2 \ --with-nghttp2 \ --without-ngtcp2 \ --without-nghttp3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
办法一: 直接指定依赖库所在目录 。例如(
--with-openssl=/usr/openssl
)办法二: 使用
pkg-config
办法三: 上述两种办法混用,大部分情况是(办法一)比(办法二)优先级高
例子:构建
curl
The text was updated successfully, but these errors were encountered: