summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2021-05-20 15:49:28 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2021-05-26 22:53:26 +0200
commit1d895208e0dc03185b4ff6f5cad4e0a4833a74c3 (patch)
tree31051f9e5ed1d630b659f513c2f44e1a2ca0cb6f
parentc22f23556d03e1ac0c8be7a79597c822b7e29fc9 (diff)
configure: internal OpenLDAP depends on NSS
So we need either NSS or a system OpenLDAP. Also add the $test_openldap flag. Change-Id: I134d1ed3a0a9654e264ccc66cdbe993a355620cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116109 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
-rw-r--r--configure.ac78
1 files changed, 42 insertions, 36 deletions
diff --git a/configure.ac b/configure.ac
index 2ec20850b023..4df7fd83d1c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -814,6 +814,7 @@ test_fontconfig=yes
test_cairo=no
test_gdb_index=no
test_split_debug=no
+test_openldap=yes
# Default values, as such probably valid just for Linux, set
# differently below just for Mac OSX, but at least better than
@@ -906,6 +907,7 @@ cygwin*|wsl*)
test_xrender=no
test_freetype=no
test_fontconfig=no
+ test_openldap=no
build_skia=yes
_os=WINNT
@@ -965,6 +967,7 @@ ios*) # iOS
test_freetype=no
test_fontconfig=no
test_dbus=no
+ test_openldap=no
if test -n "$LODE_HOME" ; then
mac_sanitize_path
AC_MSG_NOTICE([sanitized the PATH to $PATH])
@@ -1083,6 +1086,7 @@ linux-android*)
test_kf5=no
test_qt5=no
test_gtk3_kde5=no
+ test_openldap=no
test_randr=no
test_xrender=no
_os=Android
@@ -10283,54 +10287,56 @@ fi
AC_SUBST(SYSTEM_ODBC_HEADERS)
dnl ===================================================================
+dnl Check for system NSS
+dnl ===================================================================
+if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
+ libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
+ AC_DEFINE(HAVE_FEATURE_NSS)
+ ENABLE_NSS=TRUE
+ AC_DEFINE(ENABLE_NSS)
+elif test $_os != iOS ; then
+ with_tls=openssl
+fi
+AC_SUBST(ENABLE_NSS)
+
+dnl ===================================================================
dnl Enable LDAP support
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
+if test "$test_openldap" = yes; then
+ AC_MSG_CHECKING([whether to enable LDAP support])
+ if test "$enable_ldap" = yes -a \( "$ENABLE_NSS" = TRUE -o "$with_system_openldap" = yes \); then
AC_MSG_RESULT([yes])
- ENABLE_LDAP="TRUE"
+ ENABLE_LDAP=TRUE
+ else
+ if test "$enable_ldap" != "yes"; then
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([no (needs NSS or system openldap)])
+ fi
fi
-fi
-AC_SUBST(ENABLE_LDAP)
dnl ===================================================================
dnl Check for system openldap
dnl ===================================================================
-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])
- SYSTEM_OPENLDAP=TRUE
- AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
- AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
- AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
-else
- AC_MSG_RESULT([internal])
- SYSTEM_OPENLDAP=
- BUILD_TYPE="$BUILD_TYPE OPENLDAP"
-fi
+ if test "$ENABLE_LDAP" = TRUE; then
+ AC_MSG_CHECKING([which openldap library to use])
+ if test "$with_system_openldap" = yes; then
+ AC_MSG_RESULT([external])
+ SYSTEM_OPENLDAP=TRUE
+ AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
+ AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+ AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+ else
+ AC_MSG_RESULT([internal])
+ BUILD_TYPE="$BUILD_TYPE OPENLDAP"
+ fi
+ fi
fi
-AC_SUBST(SYSTEM_OPENLDAP)
-dnl ===================================================================
-dnl Check for system NSS
-dnl ===================================================================
-if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
- libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8])
- AC_DEFINE(HAVE_FEATURE_NSS)
- ENABLE_NSS="TRUE"
- AC_DEFINE(ENABLE_NSS)
-elif test $_os != iOS ; then
- with_tls=openssl
-fi
-AC_SUBST(ENABLE_NSS)
+AC_SUBST(ENABLE_LDAP)
+AC_SUBST(SYSTEM_OPENLDAP)
dnl ===================================================================
dnl Check for TLS/SSL and cryptographic implementation to use