Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
4db954f8
Commit
4db954f8
authored
17 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
Add custom check for LDAP libraries
parent
a171f60b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
acinclude.m4
+76
-0
76 additions, 0 deletions
acinclude.m4
configure.ac
+9
-11
9 additions, 11 deletions
configure.ac
with
85 additions
and
11 deletions
acinclude.m4
+
76
−
0
View file @
4db954f8
...
...
@@ -467,6 +467,82 @@ AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [
])
dnl CURL_CHECK_LIBS_LDAP
dnl -------------------------------------------------
dnl Check for libraries needed for LDAP support,
dnl and prepended to LIBS any needed libraries.
AC_DEFUN([CURL_CHECK_LIBS_LDAP], [
AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
#
AC_MSG_CHECKING([libraries for LDAP support])
#
curl_cv_save_LIBS=$LIBS
curl_cv_ldap_LIBS="unknown"
#
for x_nlibs in '' '-ldap' '-lber -ldap' '-ldap -lber'; do
if test -z "$x_nlibs"; then
LIBS="$curl_cv_save_LIBS"
else
LIBS="$x_nlibs $curl_cv_save_LIBS"
fi
AC_LINK_IFELSE([
AC_LANG_PROGRAM([
#undef inline
#ifdef HAVE_WINDOWS_H
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include <windows.h>
#else
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#endif
#ifndef LDAP_DEPRECATED
#define LDAP_DEPRECATED 1
#endif
#ifdef NEED_LBER_H
#include <lber.h>
#endif
#ifdef HAVE_LDAP_H
#include <ldap.h>
#endif"
],[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
int res = ldap_unbind(ldp);
ber_free(bep, 1);
])
],[
curl_cv_ldap_LIBS="$x_nlibs"
break
])
done
#
LIBS=$curl_cv_save_LIBS
#
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
AC_MSG_RESULT([cannot find libraries for LDAP support])
;;
X-)
AC_MSG_RESULT([no additional lib required])
;;
*)
if test -z "$curl_cv_save_LIBS"; then
LIBS="$curl_cv_ldap_LIBS"
else
LIBS="$curl_cv_ldap_LIBS $curl_cv_save_LIBS"
fi
AC_MSG_RESULT([$curl_cv_ldap_LIBS])
;;
esac
#
])
dnl CURL_CHECK_HEADER_MALLOC
dnl -------------------------------------------------
dnl Check for compilable and valid malloc.h header,
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
9
−
11
View file @
4db954f8
...
...
@@ -567,11 +567,15 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
else
dnl Try to find the right ldap library name for this system
AC_SEARCH_LIBS(ldap_init, [ldap],, [
AC_MSG_WARN([Cannot find LDAP library: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
dnl Try to find the right ldap libraries for this system
CURL_CHECK_LIBS_LDAP
case X-"$curl_cv_ldap_LIBS" in
X-unknown)
AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])
;;
esac
fi
fi
...
...
@@ -586,12 +590,6 @@ if test x$CURL_DISABLE_LDAP != x1 ; then
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
fi
else
dnl Try to find the right lber library name for this system
AC_SEARCH_LIBS(ber_free, [lber],, [
AC_MSG_WARN([Cannot find a library defining ber_free(): LDAP disabled])
AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
AC_SUBST(CURL_DISABLE_LDAP, [1])])
fi
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment