[Libreoffice-commits] core.git: configure.ac

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Wed May 26 20:58:58 UTC 2021


 configure.ac |   78 +++++++++++++++++++++++++++++++----------------------------
 1 file changed, 42 insertions(+), 36 deletions(-)

New commits:
commit 1d895208e0dc03185b4ff6f5cad4e0a4833a74c3
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Thu May 20 15:49:28 2021 +0200
Commit:     Jan-Marek Glogowski <glogow at fbihome.de>
CommitDate: Wed May 26 22:53:26 2021 +0200

    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 at fbihome.de>

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
@@ -10282,55 +10286,57 @@ else
 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


More information about the Libreoffice-commits mailing list