From 7712ec94433b46e5d23d5bf891e671c31d67e7b5 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 24 Sep 2022 11:52:35 +0000 Subject: [PATCH] Improve LDAP library detection (#1148) Add --with-ldap and pkg-config support to speed up Squid builds where LDAP is not to be used. This also adds support for custom LDAP library locations like other --with-foo options. 'pkg-config --libs ldap' finds both -lldap and -llber. Stop using different variables for them in Makefile.am. Extract LDAP API tests into simpler dedicated macros and stop polluting LIBS when running LDAP tests. --- acinclude/ldap.m4 | 1 - test-suite/buildtests/layer-02-maximus.opts | 1 + test-suite/buildtests/layer-04-noauth-everything.opts | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/acinclude/ldap.m4 b/acinclude/ldap.m4 index 0796c8f4ac2..8bf7daba3e3 100644 --- a/acinclude/ldap.m4 +++ b/acinclude/ldap.m4 @@ -99,5 +99,4 @@ AC_DEFUN([SQUID_CHECK_LDAP_API],[ AC_SEARCH_LIBS([ldap_start_tls_s],[$LIBLDAP_NAMES],[ AC_DEFINE(HAVE_LDAP_START_TLS_S,1,[Define to 1 if you have ldap_start_tls_s]) ]) - SQUID_STATE_ROLLBACK(squid_ldap_state) ]) diff --git a/test-suite/buildtests/layer-02-maximus.opts b/test-suite/buildtests/layer-02-maximus.opts index 0e68240c442..ff557fd2092 100644 --- a/test-suite/buildtests/layer-02-maximus.opts +++ b/test-suite/buildtests/layer-02-maximus.opts @@ -109,6 +109,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \ --with-gnu-ld \ --with-ipv6-split-stack \ --with-large-files \ + --with-ldap \ --with-pic \ --with-pthreads \ --enable-build-info=squid\ test\ build \ diff --git a/test-suite/buildtests/layer-04-noauth-everything.opts b/test-suite/buildtests/layer-04-noauth-everything.opts index 0370ff41250..b966fa011a4 100644 --- a/test-suite/buildtests/layer-04-noauth-everything.opts +++ b/test-suite/buildtests/layer-04-noauth-everything.opts @@ -111,6 +111,7 @@ DISTCHECK_CONFIGURE_FLAGS=" \ --with-gnu-ld \ --with-ipv6-split-stack \ --with-large-files \ + --with-ldap \ --with-pic \ --with-pthreads \ --enable-build-info=squid\ test\ build \