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
a171f60b
Commit
a171f60b
authored
17 years ago
by
Yang Tse
Browse files
Options
Downloads
Patches
Plain Diff
Add custom checks for lber, ldap, ldapssl and ldap_ssl header files
parent
887e8f92
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
+218
-0
218 additions, 0 deletions
acinclude.m4
configure.ac
+4
-18
4 additions, 18 deletions
configure.ac
with
222 additions
and
18 deletions
acinclude.m4
+
218
−
0
View file @
a171f60b
...
...
@@ -249,6 +249,224 @@ AC_DEFUN([CURL_CHECK_HEADER_WINBER], [
])
dnl CURL_CHECK_HEADER_LBER
dnl -------------------------------------------------
dnl Check for compilable and valid lber.h header,
dnl and check if it is needed even with ldap.h
AC_DEFUN([CURL_CHECK_HEADER_LBER], [
AC_REQUIRE([CURL_CHECK_HEADER_WINDOWS])dnl
AC_CACHE_CHECK([for lber.h], [ac_cv_header_lber_h], [
AC_COMPILE_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
#include <lber.h>
],[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
ber_free(bep, 1);
])
],[
ac_cv_header_lber_h="yes"
],[
ac_cv_header_lber_h="no"
])
])
if test "$ac_cv_header_lber_h" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_LBER_H, 1,
[Define to 1 if you have the lber.h header file.])
#
AC_COMPILE_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
#include <ldap.h>
],[
BerValue *bvp = NULL;
BerElement *bep = ber_init(bvp);
ber_free(bep, 1);
])
],[
curl_cv_need_header_lber_h="no"
],[
curl_cv_need_header_lber_h="yes"
])
#
case "$curl_cv_need_header_lber_h" in
yes)
AC_DEFINE_UNQUOTED(NEED_LBER_H, 1,
[Define to 1 if you need the lber.h header file even with ldap.h])
;;
esac
fi
])
dnl CURL_CHECK_HEADER_LDAP
dnl -------------------------------------------------
dnl Check for compilable and valid ldap.h header
AC_DEFUN([CURL_CHECK_HEADER_LDAP], [
AC_REQUIRE([CURL_CHECK_HEADER_LBER])dnl
AC_CACHE_CHECK([for ldap.h], [ac_cv_header_ldap_h], [
AC_COMPILE_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
#include <ldap.h>
],[
LDAP *ldp = ldap_init("dummy", LDAP_PORT);
int res = ldap_unbind(ldp);
])
],[
ac_cv_header_ldap_h="yes"
],[
ac_cv_header_ldap_h="no"
])
])
case "$ac_cv_header_ldap_h" in
yes)
AC_DEFINE_UNQUOTED(HAVE_LDAP_H, 1,
[Define to 1 if you have the ldap.h header file.])
;;
esac
])
dnl CURL_CHECK_HEADER_LDAP_SSL
dnl -------------------------------------------------
dnl Check for compilable and valid ldap_ssl.h header
AC_DEFUN([CURL_CHECK_HEADER_LDAP_SSL], [
AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
AC_CACHE_CHECK([for ldap_ssl.h], [ac_cv_header_ldap_ssl_h], [
AC_COMPILE_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
#include <ldap_ssl.h>
],[
LDAP *ldp = ldapssl_init("dummy", LDAPS_PORT, 1);
])
],[
ac_cv_header_ldap_ssl_h="yes"
],[
ac_cv_header_ldap_ssl_h="no"
])
])
case "$ac_cv_header_ldap_ssl_h" in
yes)
AC_DEFINE_UNQUOTED(HAVE_LDAP_SSL_H, 1,
[Define to 1 if you have the ldap_ssl.h header file.])
;;
esac
])
dnl CURL_CHECK_HEADER_LDAPSSL
dnl -------------------------------------------------
dnl Check for compilable and valid ldapssl.h header
AC_DEFUN([CURL_CHECK_HEADER_LDAPSSL], [
AC_REQUIRE([CURL_CHECK_HEADER_LDAP])dnl
AC_CACHE_CHECK([for ldapssl.h], [ac_cv_header_ldapssl_h], [
AC_COMPILE_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
#include <ldapssl.h>
],[
char *cert_label = NULL;
LDAP *ldp = ldap_ssl_init("dummy", LDAPS_PORT, cert_label);
])
],[
ac_cv_header_ldapssl_h="yes"
],[
ac_cv_header_ldapssl_h="no"
])
])
case "$ac_cv_header_ldapssl_h" in
yes)
AC_DEFINE_UNQUOTED(HAVE_LDAPSSL_H, 1,
[Define to 1 if you have the ldapssl.h header file.])
;;
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
+
4
−
18
View file @
a171f60b
...
...
@@ -546,24 +546,10 @@ AC_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
if test x$CURL_DISABLE_LDAP != x1 ; then
AC_CHECK_HEADERS(lber.h)
AC_CHECK_HEADERS(ldap.h,
[],[],[
#if HAVE_LBER_H
#include <lber.h>
#endif
])
AC_CHECK_HEADERS(ldap_ssl.h,
[],[],[
#if HAVE_LBER_H
#include <lber.h>
#endif
#if HAVE_LDAP_H
#include <ldap.h>
#endif
])
CURL_CHECK_HEADER_LBER
CURL_CHECK_HEADER_LDAP
CURL_CHECK_HEADER_LDAPSSL
CURL_CHECK_HEADER_LDAP_SSL
if test -z "$LDAPLIBNAME" ; then
case $host in
...
...
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