Kaydet (Commit) e3f607e7 authored tarafından Andres Gomez's avatar Andres Gomez Kaydeden (comit) David Tardon

build: new --disable-openssl flag

Most of the components included in LibreOffice
already support alternative TLS libraries (e.g.
NSS, GnuTLS).

Change-Id: If00c348046fdbc88156f3d89c25e874e7e9bd04c
Reviewed-on: https://gerrit.libreoffice.org/3328Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst fd6d4239
...@@ -1187,6 +1187,14 @@ endef ...@@ -1187,6 +1187,14 @@ endef
endif # SYSTEM_ICU endif # SYSTEM_ICU
ifeq ($(DISABLE_OPENSSL),YES)
gb_ExternalProject__use_openssl:=
gb_LinkTarget__use_openssl_headers:=
gb_LinkTarget__use_openssl:=
else # !DISABLE_OPENSSL
ifeq ($(SYSTEM_OPENSSL),YES) ifeq ($(SYSTEM_OPENSSL),YES)
gb_LinkTarget__use_openssl_headers:= gb_LinkTarget__use_openssl_headers:=
...@@ -1251,6 +1259,7 @@ endif ...@@ -1251,6 +1259,7 @@ endif
endef endef
endif # SYSTEM_OPENSSL endif # SYSTEM_OPENSSL
endif # DISABLE_OPENSSL
ifeq ($(SYSTEM_CDR),YES) ifeq ($(SYSTEM_CDR),YES)
......
...@@ -98,6 +98,7 @@ export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@ ...@@ -98,6 +98,7 @@ export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
export DISABLE_EXPORT=@DISABLE_EXPORT@ export DISABLE_EXPORT=@DISABLE_EXPORT@
export DISABLE_LINKOO=@DISABLE_LINKOO@ export DISABLE_LINKOO=@DISABLE_LINKOO@
export DISABLE_NEON=@DISABLE_NEON@ export DISABLE_NEON=@DISABLE_NEON@
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
export DISABLE_PYTHON=@DISABLE_PYTHON@ export DISABLE_PYTHON=@DISABLE_PYTHON@
export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@ export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
export DLLTOOL=@DLLTOOL@ export DLLTOOL=@DLLTOOL@
......
...@@ -1170,6 +1170,13 @@ AC_ARG_ENABLE(bogus-pkg-config, ...@@ -1170,6 +1170,13 @@ AC_ARG_ENABLE(bogus-pkg-config,
[MACOSX only: on MacOSX pkg-config can cause trouble. by default if one is found in the PATH, an error is issued. This flag turn that error into a warning.]), [MACOSX only: on MacOSX pkg-config can cause trouble. by default if one is found in the PATH, an error is issued. This flag turn that error into a warning.]),
) )
AC_ARG_ENABLE(openssl,
AS_HELP_STRING([--disable-openssl],
[Disable using libssl/libcrypto from OpenSSL. If disabled,
components will either use GNUTLS or NSS. Work in progress,
use only if you are hacking on it.]),
,enable_openssl=yes)
dnl =================================================================== dnl ===================================================================
dnl Optional Packages (--with/without-) dnl Optional Packages (--with/without-)
dnl =================================================================== dnl ===================================================================
...@@ -8110,6 +8117,10 @@ if test -n "$with_tls"; then ...@@ -8110,6 +8117,10 @@ if test -n "$with_tls"; then
AC_DEFINE(USE_TLS_OPENSSL) AC_DEFINE(USE_TLS_OPENSSL)
TLS=OPENSSL TLS=OPENSSL
if test "$enable_openssl" != "yes"; then
AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
fi
# warn that OpenSSL has been selected but not all TLS code has this option # warn that OpenSSL has been selected but not all TLS code has this option
AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS]) AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS])
add_warning "TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS" add_warning "TLS/SSL implementation to use is OpenSSL but some code may still be depending on NSS or GNUTLS"
...@@ -8126,8 +8137,13 @@ nss - Mozilla's Network Security Services (NSS) ...@@ -8126,8 +8137,13 @@ nss - Mozilla's Network Security Services (NSS)
;; ;;
esac esac
else else
AC_DEFINE(USE_TLS_OPENSSL) if test "$enable_openssl" = "yes"; then
TLS=OPENSSL AC_DEFINE(USE_TLS_OPENSSL)
TLS=OPENSSL
else
AC_DEFINE(USE_TLS_NSS)
TLS=NSS
fi
fi fi
AC_MSG_RESULT([$TLS]) AC_MSG_RESULT([$TLS])
AC_SUBST(TLS) AC_SUBST(TLS)
...@@ -8526,22 +8542,36 @@ fi ...@@ -8526,22 +8542,36 @@ fi
dnl =================================================================== dnl ===================================================================
dnl Check for system openssl dnl Check for system openssl
dnl =================================================================== dnl ===================================================================
if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ DISABLE_OPENSSL="NO"
"$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then AC_MSG_CHECKING([whether to disable OpenSSL usage])
# Mac OS builds should get out without extra stuff is the Mac porters' if test "$enable_openssl" = "yes"; then
# wish. And pkg-config is although Xcode ships a .pc for openssl AC_MSG_RESULT([no])
with_system_openssl=yes if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
SYSTEM_OPENSSL=YES "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
OPENSSL_CFLAGS= # Mac OS builds should get out without extra stuff is the Mac porters'
OPENSSL_LIBS="-lssl -lcrypto" # wish. And pkg-config is although Xcode ships a .pc for openssl
with_system_openssl=yes
SYSTEM_OPENSSL=YES
OPENSSL_CFLAGS=
OPENSSL_LIBS="-lssl -lcrypto"
else
libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
fi
if test "$with_system_openssl" = "yes"; then
libo_MINGW_CHECK_DLL([SSL], [libssl])
libo_MINGW_CHECK_DLL([CRYPTO], [libcrypto])
fi
else else
libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl]) AC_MSG_RESULT([yes])
fi DISABLE_OPENSSL=YES
if test "$with_system_openssl" = "yes"; then
libo_MINGW_CHECK_DLL([libssl]) # warn that although OpenSSL is disabled, system libraries may be depending on it
libo_MINGW_CHECK_DLL([libcrypto]) AC_MSG_WARN([OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies])
add_warning "OpenSSL has been disabled. No code compiled by LibO will make use of it but system librares may create indirect dependencies"
fi fi
AC_SUBST([DISABLE_OPENSSL])
dnl =================================================================== dnl ===================================================================
dnl Check for system redland dnl Check for system redland
dnl =================================================================== dnl ===================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment