2 # Process this file with autoconf to produce a configure script.
4 AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
5 AM_INIT_AUTOMAKE(pdns-backend-ldap, 0.1)
6 AC_CONFIG_SRCDIR([src/powerldap.hh])
7 AC_CONFIG_HEADERS([config.h])
15 # Checks for libraries.
17 # Checks for header files.
18 AC_CHECK_HEADERS([inttypes.h stdlib.h sys/time.h])
20 # Checks for typedefs, structures, and compiler characteristics.
27 THREADFLAGS="-pthread"
29 # Checks for library functions.
30 AC_CHECK_FUNCS([strerror strtol strtoul])
35 [ --with-pdns PowerDNS sources base directory ],
36 [ PDNS_CFLAGS="-I$withval" ],
37 [ AC_MSG_ERROR([The PowerDNS sources dir is needed]) ]
41 # Checks for LDAP headers
42 AC_CHECK_HEADERS([ldap.h], , [AC_MSG_ERROR([ldap header (ldap.h) not found])])
43 AC_CHECK_HEADERS([lber.h], , [AC_MSG_ERROR([ldap header (lber.h) not found])])
46 [ldap_r], [ldap_set_option],
47 [AC_DEFINE([HAVE_LIBLDAP_R], 1, [Have -lldap_r]) LIBLDAP="ldap_r"],
49 [ldap], [ldap_set_option],
50 [AC_DEFINE([HAVE_LIBLDAP], 1, [Have -lldap]) LIBLDAP="ldap"],
51 [AC_MSG_ERROR([ldap library (libldap) not found])]
55 [$LIBLDAP], [ldap_initialize],
56 [AC_DEFINE([HAVE_LDAP_INITIALIZE], 1, [Define to 1 if you have ldap_initialize])]
59 [$LIBLDAP], [ldap_sasl_bind],
60 [AC_DEFINE([HAVE_LDAP_SASL_BIND], 1, [Define to 1 if you have ldap_sasl_bind])]
63 # Checks for kerberos headers
64 AC_CHECK_HEADERS([krb5.h], ,
65 [AC_MSG_ERROR([Kerberos header (krb5.h) not found])])
66 AC_CHECK_LIB([krb5], [krb5_init_context])
67 AC_CHECK_FUNCS([krb5_get_init_creds_opt_set_default_flags])
71 AC_CONFIG_FILES([Makefile])