From 5360f88393c91758ed0f29fa65a9b15716589aa1 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 17 Oct 2007 13:08:10 +0000 Subject: Default check for more libraries in CURL_CHECK_LIBS_LDAP, and allow parameter specification of libraries to check. --- acinclude.m4 | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index 0c34a8c8d..9aef55cb1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -484,16 +484,42 @@ dnl CURL_CHECK_LIBS_LDAP dnl ------------------------------------------------- dnl Check for libraries needed for LDAP support, dnl and prepended to LIBS any needed libraries. +dnl This macro can take an optional parameter with a +dnl white space separated list of libraries to check +dnl before the default ones. AC_DEFUN([CURL_CHECK_LIBS_LDAP], [ AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl # + u_libs="" + for x_lib in $1; do + case "$x_lib" in + -l*) + l_lib="$x_lib" + ;; + *) + l_lib="-l$x_lib" + ;; + esac + if test -z "$u_libs"; then + u_libs="$l_lib" + else + u_libs="$u_libs $l_lib" + fi + done + # AC_MSG_CHECKING([for LDAP libraries]) # curl_cv_save_LIBS=$LIBS curl_cv_ldap_LIBS="unknown" # - for x_nlibs in '' '-lldap' '-llber -lldap' '-lldap -llber'; do + for x_nlibs in "$u_libs" \ + '' \ + '-lldap' \ + '-llber -lldap' \ + '-lldap -llber' \ + '-lldapssl -lldapx -lldapsdk' \ + '-lldapsdk -lldapx -lldapssl' ; do if test -z "$x_nlibs"; then LIBS="$curl_cv_save_LIBS" else -- cgit v1.2.3