configure.ac | 11 +++++------ external/curl/ExternalProject_curl.mk | 24 ++++++++++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-)
New commits: commit 2c0997900d35e54466d479c9c5437d447ba9b165 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Fri Oct 28 09:07:29 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Oct 28 15:52:10 2022 +0200 ofz: build-failure use with-tls result for curl otherwise with (default due to --disable-dynamic-loading) --disable-nss we get: configure: error: select TLS backend(s) or disable TLS with --without-ssl. Select from these: --with-amissl --with-bearssl --with-gnutls --with-mbedtls --with-nss --with-openssl (also works for BoringSSL and libressl) --with-rustls --with-schannel --with-secure-transport --with-wolfssl alternative we could --without-ssl entirely without nss Change-Id: Iea25b918c135664dffacfb74089d7c7c0818695e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/configure.ac b/configure.ac index df1d03a14488..8446105fceac 100644 --- a/configure.ac +++ b/configure.ac @@ -2163,12 +2163,11 @@ AC_ARG_WITH(package-format, AC_ARG_WITH(tls, AS_HELP_STRING([--with-tls], [Decides which TLS/SSL and cryptographic implementations to use for - LibreOffice's code. Notice that this doesn't apply for depending - libraries like "curl", for example. Default is to use NSS - although OpenSSL is also possible. Notice that selecting NSS restricts - the usage of OpenSSL in LO's code but selecting OpenSSL doesn't - restrict by now the usage of NSS in LO's code. Possible values: - openssl, nss. Example: --with-tls="nss"]), + LibreOffice's code. Default is to use NSS although OpenSSL is also + possible. Notice that selecting NSS restricts the usage of OpenSSL + in LO's code but selecting OpenSSL doesn't restrict by now the + usage of NSS in LO's code. Possible values: openssl, nss. + Example: --with-tls="nss"]), ,) AC_ARG_WITH(system-libs, diff --git a/external/curl/ExternalProject_curl.mk b/external/curl/ExternalProject_curl.mk index 32e14ed35403..087ea2c44b39 100644 --- a/external/curl/ExternalProject_curl.mk +++ b/external/curl/ExternalProject_curl.mk @@ -10,10 +10,21 @@ $(eval $(call gb_ExternalProject_ExternalProject,curl)) $(eval $(call gb_ExternalProject_use_externals,curl,\ - $(if $(ENABLE_NSS),nss3) \ zlib \ )) +ifeq ($(TLS),NSS) +$(eval $(call gb_ExternalProject_use_externals,curl,\ + nss3 \ +)) +else +ifeq ($(TLS),OPENSSL) +$(eval $(call gb_ExternalProject_use_externals,curl,\ + openssl \ +)) +endif +endif + $(eval $(call gb_ExternalProject_register_targets,curl,\ build \ )) @@ -36,15 +47,12 @@ curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss endif # use --with-secure-transport on macOS >10.5 and iOS to get a native UI for SSL certs for CMIS usage -# use --with-nss only on platforms other than macOS and iOS +# use --with-nss/--with-openssl only on platforms other than macOS and iOS $(call gb_ExternalProject_get_state_target,curl,build): $(call gb_Trace_StartRange,curl,EXTERNAL) $(call gb_ExternalProject_run,build,\ $(gb_RUN_CONFIGURE) ./configure \ - $(if $(filter iOS MACOSX,$(OS)),\ - --with-secure-transport,\ - $(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") --with-nss-deprecated,--without-nss)) \ - --without-openssl --without-gnutls --without-mbedtls \ + --without-nss --without-openssl --without-gnutls --without-mbedtls \ --enable-ftp --enable-http --enable-ipv6 \ --without-libidn2 --without-libpsl --without-librtmp \ --without-libssh2 --without-nghttp2 \ @@ -56,6 +64,10 @@ $(call gb_ExternalProject_get_state_target,curl,build): --disable-ldap --disable-ldaps --disable-manual --disable-pop3 \ --disable-rtsp --disable-smb --disable-smtp --disable-telnet \ --disable-tftp \ + $(if $(filter iOS MACOSX,$(OS)),\ + --with-secure-transport,\ + $(if $(filter NSS,$(TLS)),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out") --with-nss-deprecated)) \ + $(if $(filter OPENSSL,$(TLS)),--with-openssl$(if $(SYSTEM_OPENSSL),,="$(call gb_UnpackedTarball_get_dir,openssl)")) \ $(if $(filter LINUX,$(OS)),--without-ca-bundle --without-ca-path) \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \