curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: How to build libcurl with OpenSSL without installing the latter?

From: Daniel Stenberg via curl-library <curl-library_at_lists.haxx.se>
Date: Tue, 9 Nov 2021 15:04:30 +0100 (CET)

On Mon, 8 Nov 2021, ellie via curl-library wrote:

> My apologies, but I didn't manage to follow on your remarks regarding
> cross-compilation or how that relates to my question, sadly. At the risk of
> repeating myself, but how do others solve this?

Normally, cross-compilation doesn't change how you use configure, apart from
the little extra details you provide that specifies the cross part of the
build.

> Also wouldn't it make more sense if there was an alternate
> --with-openssl-headers-for-static or something?

I really don't see why; curl uses the same set of headers no matter how you
link.

> I'm thinking alternatively, maybe at least --without-openssl-config-test
> would help to disable all those configure tests trying to tell me my
> install is wrong when I try to fake it.

Having configure checks fail to detect something optional is not a problem.
You can just let those checks fail.

> Then I could try minimal ./fake-install/include/openssl folder, do
> --with-openssl=./fake-install/ and ignore all the other subfolders, and see
> if that works. But surely this is not how I'm meant to do it?

If you want to use OpenSSL, why point it to a fake install and not a real
install?

> cd $(CURLPATH) && ./configure $(HOSTOPTION) --disable-shared
> --enable-static --enable-optimize --without-gnutls --without-mbedtls
> --without-wolfssl --without-mesalink --without-bearssl --without-rustl
> --without-nss --without-zlib --without-ca-path --with-ca-fallback
> --without-libpsl --without-libssh --without-libssh2 --without-wolfssh
> --without-librtmp --without-libidn2 --without-nghttp2 --without-ngtcp2
> --without-nghttp3 --without-quiche --without-hyper
> --with-openssl="`pwd`/fake-install-so-curl-is-quiet/" && make

You could basically just remove all the --without-* options from this command
line and it would still give the same end result.

-- 
  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2021-11-09