]> git.ipfire.org Git - thirdparty/pdns.git/blob - m4/pdns_check_ldap.m4
Update h2o to 2.2.6, fixing CVE-2019-9512, CVE-2019-9514 and CVE-2019-9515
[thirdparty/pdns.git] / m4 / pdns_check_ldap.m4
1 AC_DEFUN([PDNS_CHECK_LDAP],[
2 AC_CHECK_HEADERS([ldap.h],
3 [],
4 [AC_MSG_ERROR([ldap header (ldap.h) not found])]
5 )
6
7 AC_CHECK_HEADERS([lber.h],
8 [],
9 [AC_MSG_ERROR([ldap header (lber.h) not found])]
10 )
11
12 AC_CHECK_LIB([ldap_r], [ldap_set_option],
13 [
14 AC_DEFINE([HAVE_LIBLDAP_R], [1], [Have -lldap_r])
15 LIBLDAP="ldap_r"
16 LDAP_LIBS="-lldap_r -llber"
17 ],
18 [
19 AC_CHECK_LIB([ldap], [ldap_set_option],
20 [
21 AC_DEFINE([HAVE_LIBLDAP], 1, [Have -lldap])
22 LIBLDAP="ldap"
23 LDAP_LIBS="-lldap -llber"
24 ],
25 [AC_MSG_ERROR([ldap library (libldap) not found])]
26 )
27 ]
28 )
29
30 AC_CHECK_LIB([$LIBLDAP], [ldap_initialize],
31 [AC_DEFINE([HAVE_LDAP_INITIALIZE], 1, [Define to 1 if you have ldap_initialize])]
32 )
33
34 AC_CHECK_LIB([$LIBLDAP], [ldap_sasl_bind],
35 [AC_DEFINE([HAVE_LDAP_SASL_BIND], 1, [Define to 1 if you have ldap_sasl_bind])]
36 )
37
38 AC_ARG_VAR([LDAP_LIBS], [linker flags for openldap])
39
40 AC_CHECK_HEADERS([krb5.h],
41 [],
42 [AC_MSG_ERROR([Kerberos header (krb5.h) not found])]
43 )
44
45 AC_ARG_VAR([KRB5_LIBS], [linker flag to add Kerberos 5 libraries])
46
47 AC_CHECK_LIB([krb5], [krb5_init_context],
48 [
49 KRB5_LIBS="-lkrb5"
50 ]
51 )
52
53 AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_default_flags])
54 ])