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/3328 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
This commit is contained in:
committed by
David Tardon
parent
fd6d42395a
commit
e3f607e766
@@ -1187,6 +1187,14 @@ endef
|
||||
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)
|
||||
|
||||
gb_LinkTarget__use_openssl_headers:=
|
||||
@@ -1251,6 +1259,7 @@ endif
|
||||
endef
|
||||
|
||||
endif # SYSTEM_OPENSSL
|
||||
endif # DISABLE_OPENSSL
|
||||
|
||||
|
||||
ifeq ($(SYSTEM_CDR),YES)
|
||||
|
@@ -98,6 +98,7 @@ export DISABLE_DYNLOADING=@DISABLE_DYNLOADING@
|
||||
export DISABLE_EXPORT=@DISABLE_EXPORT@
|
||||
export DISABLE_LINKOO=@DISABLE_LINKOO@
|
||||
export DISABLE_NEON=@DISABLE_NEON@
|
||||
export DISABLE_OPENSSL=@DISABLE_OPENSSL@
|
||||
export DISABLE_PYTHON=@DISABLE_PYTHON@
|
||||
export DISABLE_SCRIPTING=@DISABLE_SCRIPTING@
|
||||
export DLLTOOL=@DLLTOOL@
|
||||
|
60
configure.ac
60
configure.ac
@@ -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.]),
|
||||
)
|
||||
|
||||
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 Optional Packages (--with/without-)
|
||||
dnl ===================================================================
|
||||
@@ -8110,6 +8117,10 @@ if test -n "$with_tls"; then
|
||||
AC_DEFINE(USE_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
|
||||
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"
|
||||
@@ -8126,8 +8137,13 @@ nss - Mozilla's Network Security Services (NSS)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_DEFINE(USE_TLS_OPENSSL)
|
||||
TLS=OPENSSL
|
||||
if test "$enable_openssl" = "yes"; then
|
||||
AC_DEFINE(USE_TLS_OPENSSL)
|
||||
TLS=OPENSSL
|
||||
else
|
||||
AC_DEFINE(USE_TLS_NSS)
|
||||
TLS=NSS
|
||||
fi
|
||||
fi
|
||||
AC_MSG_RESULT([$TLS])
|
||||
AC_SUBST(TLS)
|
||||
@@ -8526,22 +8542,36 @@ fi
|
||||
dnl ===================================================================
|
||||
dnl Check for system openssl
|
||||
dnl ===================================================================
|
||||
if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
|
||||
"$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
|
||||
# Mac OS builds should get out without extra stuff is the Mac porters'
|
||||
# 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"
|
||||
DISABLE_OPENSSL="NO"
|
||||
AC_MSG_CHECKING([whether to disable OpenSSL usage])
|
||||
if test "$enable_openssl" = "yes"; then
|
||||
AC_MSG_RESULT([no])
|
||||
if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \
|
||||
"$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then
|
||||
# Mac OS builds should get out without extra stuff is the Mac porters'
|
||||
# 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
|
||||
libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
|
||||
fi
|
||||
if test "$with_system_openssl" = "yes"; then
|
||||
libo_MINGW_CHECK_DLL([libssl])
|
||||
libo_MINGW_CHECK_DLL([libcrypto])
|
||||
AC_MSG_RESULT([yes])
|
||||
DISABLE_OPENSSL=YES
|
||||
|
||||
# warn that although OpenSSL is disabled, system libraries may be depending on it
|
||||
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
|
||||
|
||||
AC_SUBST([DISABLE_OPENSSL])
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Check for system redland
|
||||
dnl ===================================================================
|
||||
|
Reference in New Issue
Block a user