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