diff options
author | jkar8572 <jkar8572> | 2007-05-29 13:30:09 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2007-05-29 13:30:09 +0000 |
commit | 10ecc037ccbe0b234dc88d7bec8adfbb45fd2406 (patch) | |
tree | 2b9869a61c0d39ba4265d170495e0e273ee362cb /configure.in | |
parent | 77a79ea8a3669f6c51f9079d8cd350c8743f2ee5 (diff) |
Changed warnquota to allow use of URI, updated configure to detect whether ldap_initialize() is available (Jan Kara)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 5d60e4c..b4d4838 100644 --- a/configure.in +++ b/configure.in @@ -26,8 +26,20 @@ AC_ARG_ENABLE(ldapmail, [ --enable-ldapmail=[yes/no/try] Enable ldap mail , enable_ldapmail="no") if test "x$enable_ldapmail" != "xno"; then - LDAPLIBS="-L/usr/lib -lldap -llber -lssl -lresolv" - CFLAGS="$CFLAGS -DUSE_LDAP_MAIL_LOOKUP" + have_new_ldap="no" + have_old_ldap="no" + AC_CHECK_LIB(ldap, ldap_initialize, have_new_ldap="yes", AC_CHECK_LIB(ldap, ldap_init, have_old_ldap="yes")) + if test "x$have_new_ldap" = "xno" -a "x$have_old_ldap" = "xno"; then + LDAPLIBS="-L/usr/lib -lldap -llber -lssl -lresolv" + CFLAGS="$CFLAGS -DUSE_LDAP_MAIL_LOOKUP" + if test "x$have_new_ldap" = "xyes"; then + CFLAGS="$CFLAGS -DHAVE_LDAP_INITIALIZE" + fi + else + if test "x$enable_ldapmail" = "xyes"; then + AC_MSG_ERROR([LDAP support required but library not found.]); + fi + fi fi AC_SUBST(LDAPLIBS) |