Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion acinclude/ldap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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)
])
34 changes: 10 additions & 24 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1193,32 +1193,18 @@ SQUID_CHECK_LIB_WORKS(gss,[

SQUID_AUTO_LIB(ldap,[LDAP],[LIBLDAP])
SQUID_CHECK_LIB_WORKS(ldap,[
dnl On MinGW OpenLDAP is not available, so LDAP helpers can be linked
dnl only with Windows LDAP libraries using -lwldap32
AS_IF([test "$squid_host_os" = "mingw"],[
SQUID_STATE_SAVE(squid_ldap_state)
PKG_CHECK_MODULES([LIBLDAP],[ldap],[:],[:])
AS_IF([test "$squid_host_os" = "mingw" -a "x$LIBLDAP_LIBS" = "x"],[
dnl On MinGW OpenLDAP is not available, try Windows LDAP libraries
dnl TODO: use AC_CHECK_LIB
LIBLDAP_LIBS="-lwldap32"
],[
SQUID_STATE_SAVE(squid_ldap_state)
LIBS="$LIBLDAP_PATH $LIBPTHREADS $LIBS"
PKG_CHECK_MODULES([LIBLDAP],[ldap],[],[
AC_CHECK_LIB(lber, ber_init, [LIBLBER="-llber"])
AC_CHECK_LIB(ldap, ldap_init, [LIBLDAP_LIBS="-lldap $LIBLBER"])
dnl if no ldap lib found check for mozilla version
AS_IF([test "x$ac_cv_lib_ldap_ldap_init" != "xyes"],[
SQUID_STATE_SAVE(squid_ldap_mozilla)
LIBS="$LIBLDAP_PATH $LIBPTHREADS"
AC_CHECK_LIB(ldap60, ldap_init, [LIBLDAP_LIBS="-lldap60 $LIBLBER"])
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
AC_CHECK_LIB(prldap60, prldap_init, [LIBLDAP_LIBS="-lprldap60 $LIBLDAP_LIBS"])
LIBS="$LIBLDAP_PATH $LIBLDAP_LIBS $LIBPTHREADS"
AC_CHECK_LIB(ssldap60, ldapssl_init, [LIBLDAP_LIBS="-lssldap60 $LIBLDAP_LIBS"])
SQUID_STATE_ROLLBACK(squid_ldap_mozilla)
])
])
AC_CHECK_HEADERS(ldap.h lber.h)
AC_CHECK_HEADERS(mozldap/ldap.h)
SQUID_CHECK_LDAP_API
AC_CHECK_HEADERS(winldap.h)
])
AC_CHECK_HEADERS(ldap.h lber.h)
AC_CHECK_HEADERS(mozldap/ldap.h)
SQUID_CHECK_LDAP_API
SQUID_STATE_ROLLBACK(squid_ldap_state)
])

SQUID_AUTO_LIB(systemd,[systemd API for start-up notification],[LIBSYSTEMD])
Expand Down
2 changes: 1 addition & 1 deletion src/acl/external/LDAP_group/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="LDAP_group"])
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="LDAP_group"])
2 changes: 1 addition & 1 deletion src/acl/external/eDirectory_userip/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="eDirectory_userip"])
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="eDirectory_userip"])
2 changes: 1 addition & 1 deletion src/acl/external/kerberos_ldap_group/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
##

AS_IF([test "x$LIBMIT_KRB5_LIBS" != "x" -o "x$LIBHEIMDAL_KRB5_LIBS" != "x" -o "x$LIBGSS_LIBS" != "x"],[
BUILD_HELPER="kerberos_ldap_group"
SQUID_CHECK_SASL
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="kerberos_ldap_group"])
])
2 changes: 1 addition & 1 deletion src/auth/basic/LDAP/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="LDAP"])
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="LDAP"])
2 changes: 1 addition & 1 deletion src/auth/digest/LDAP/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="LDAP"])
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="LDAP"])
2 changes: 1 addition & 1 deletion src/auth/digest/eDirectory/required.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
## Please see the COPYING and CONTRIBUTORS files for details.
##

AC_CHECK_HEADERS([ldap.h winldap.h],[BUILD_HELPER="eDirectory"])
AS_IF([test "x$LIBLDAP_LIBS" != "x"],[BUILD_HELPER="eDirectory"])