Kaydet (Commit) 6776c53b authored tarafından Andrew Udvare's avatar Andrew Udvare Kaydeden (comit) Markus Mohrhard

Make LDAP support optional

Change-Id: Ifbd3903494a81e7b155bf6468f6ca2c50b3370a4
Reviewed-on: https://gerrit.libreoffice.org/65958
Tested-by: Jenkins
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 47d3f4fc
......@@ -389,7 +389,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
hyphen \
icg \
$(if $(ENABLE_JAVA),jdbc) \
ldapbe2 \
$(if $(ENABLE_LDAP),ldapbe2) \
$(if $(filter WNT,$(OS)),WinUserInfoBe) \
localebe1 \
log \
......
......@@ -2900,7 +2900,7 @@ endef
endif # SYSTEM_HSQLDB
ifeq ($(ENABLE_LDAP),TRUE)
ifneq ($(SYSTEM_OPENLDAP),)
define gb_LinkTarget__use_openldap
......@@ -2929,6 +2929,7 @@ $(call gb_LinkTarget_add_libs,$(1), \
)
endef
endif
define gb_ExternalProject__use_openldap
$(call gb_ExternalProject_use_external_project,$(1),openldap)
......
......@@ -1519,6 +1519,11 @@ libo_FUZZ_ARG_ENABLE(formula-logger,
)
)
AC_ARG_ENABLE(ldap,
AS_HELP_STRING([--disable-ldap],
[Disable LDAP support.]),
,enable_ldap=yes)
dnl ===================================================================
dnl Optional Packages (--with/without-)
dnl ===================================================================
......@@ -9214,12 +9219,29 @@ else
fi
AC_SUBST(SYSTEM_ODBC_HEADERS)
dnl ===================================================================
dnl Enable LDAP support in Base
dnl ===================================================================
if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
AC_MSG_CHECKING([whether to enable LDAP support])
if test "$enable_ldap" != "yes"; then
AC_MSG_RESULT([no])
ENABLE_LDAP=""
enable_ldap=no
else
AC_MSG_RESULT([yes])
ENABLE_LDAP="TRUE"
AC_DEFINE(HAVE_FEATURE_LDAP)
fi
fi
AC_SUBST(ENABLE_LDAP)
dnl ===================================================================
dnl Check for system openldap
dnl ===================================================================
if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android"; then
if test "$_os" != "WINNT" -a "$_os" != "iOS" -a "$_os" != "Android" -a "$ENABLE_LDAP" != ""; then
AC_MSG_CHECKING([which openldap library to use])
if test "$with_system_openldap" = "yes"; then
AC_MSG_RESULT([external])
......
......@@ -47,7 +47,7 @@ $(eval $(call gb_Library_use_externals,postgresql-sdbc-impl,\
postgresql \
$(if $(filter-out MSC,$(COM)), \
openssl \
openldap \
$(if $(ENABLE_LDAP),openldap) \
nss3 \
plc4 \
ssl3 \
......
......@@ -16,7 +16,6 @@ $(eval $(call gb_Module_add_l10n_targets,extensions,\
ifneq ($(filter-out iOS ANDROID,$(OS)),)
$(eval $(call gb_Module_add_targets,extensions,\
Library_abp \
Library_ldapbe2 \
Library_log \
Library_scn \
$(if $(filter WNT,$(OS)), \
......@@ -28,6 +27,12 @@ $(eval $(call gb_Module_add_targets,extensions,\
))
endif
ifeq ($(ENABLE_LDAP),TRUE)
$(eval $(call gb_Module_add_targets,extensions,\
Library_ldapbe2 \
))
endif
ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
$(eval $(call gb_Module_add_targets,extensions,\
Library_bib \
......
......@@ -10,7 +10,7 @@
$(eval $(call gb_ExternalProject_ExternalProject,postgresql))
$(eval $(call gb_ExternalProject_use_externals,postgresql,\
openldap \
$(if $(ENABLE_LDAP),openldap) \
openssl \
zlib \
))
......@@ -64,9 +64,10 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) :
$(if $(DISABLE_OPENSSL),,--with-openssl \
$(if $(WITH_KRB5), --with-krb5) \
$(if $(WITH_GSSAPI),--with-gssapi)) \
$(if $(ENABLE_LDAP),,--with-ldap=no) \
CPPFLAGS="$(postgresql_CPPFLAGS)" \
LDFLAGS="$(postgresql_LDFLAGS)" \
EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \
$(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4") \
&& cd src/interfaces/libpq \
&& MAKEFLAGS= && $(MAKE) all-static-lib)
......
......@@ -293,7 +293,7 @@ $(eval $(call gb_Rdb_add_components,services,\
desktop/source/offacc/offacc \
$(if $(DISABLE_GUI),,desktop/source/splash/spl) \
extensions/source/abpilot/abp \
extensions/source/config/ldap/ldapbe2 \
$(if $(ENABLE_LDAP),extensions/source/config/ldap/ldapbe2) \
$(if $(filter WNT,$(OS)),\
extensions/source/config/WinUserInfo/WinUserInfoBe \
) \
......
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