diff options
author | Yang Tse <yangsita@gmail.com> | 2007-10-17 13:08:10 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-10-17 13:08:10 +0000 |
commit | 5360f88393c91758ed0f29fa65a9b15716589aa1 (patch) | |
tree | d05454249c9e9f48b36703f982dde511bf5d9399 | |
parent | 949073d44884203dcf0285a7c9f4ab477e6a0da9 (diff) |
Default check for more libraries in CURL_CHECK_LIBS_LDAP,
and allow parameter specification of libraries to check.
-rw-r--r-- | acinclude.m4 | 28 |
1 files changed, 27 insertions, 1 deletions
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 |