diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-08 00:54:16 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-10-08 00:54:16 +0300 |
commit | 9c97ac525930863abd56a77db9b3cdcf63c4cdd6 (patch) | |
tree | 9529dbcca59ca7a97ed638afc888aaf841cb3255 /configure.ac | |
parent | 3f1639c2112f8242a542ca0a1b959f657d012cc9 (diff) | |
download | eclat-9c97ac525930863abd56a77db9b3cdcf63c4cdd6.tar.gz eclat-9c97ac525930863abd56a77db9b3cdcf63c4cdd6.tar.bz2 |
Implement LDAP backend.
* configure.ac: Check for openldap.
* lib/Makefile.am (maps) [COND_LDAP]: Add ldapmap.c
* lib/ldapmap.c: New file.
* lib/libeclat.h (eclat_map_drv_ldap): New extern.
* src/eclat.c (main) [WITH_LDAP]: Register eclat_map_drv_ldap.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index fbb53ea..4cdaa05 100644 --- a/configure.ac +++ b/configure.ac @@ -74,7 +74,7 @@ AC_ARG_WITH([gdbm], if test $status_gdbm != "no"; then AC_CHECK_HEADERS(gdbm.h) AC_CHECK_LIB(gdbm, gdbm_open, [dbmlib=-lgdbm], [dbmlib=]) - if test "$ac_cv_header_getopt_h" = yes && test -n "$dbmlib"; then + if test "$ac_cv_header_gdbm_h" = yes && test -n "$dbmlib"; then MAPLIBS="$MAPLIBS $dbmlib" status_gdbm=yes AC_DEFINE(WITH_GDBM,1,[Use GDB GDBM]) @@ -85,7 +85,32 @@ if test $status_gdbm != "no"; then fi fi AM_CONDITIONAL([COND_GDBM],[test $status_gdbm = yes]) - + +# LDAP +AC_ARG_WITH(ldap, + [AC_HELP_STRING([--with-ldap], + [use OpenLDAP])], + [case $withval in + yes|no) status_ldap=$withval;; + *) AC_MSG_ERROR(bad value ${withval} for --with-ldap) ;; + esac], + [status_ldap=auto]) + +if test $status_ldap != no; then + AC_CHECK_HEADERS(ldap.h) + AC_CHECK_LIB(ldap, ldap_bind,[ldaplib=-lldap],[ldaplib=]) + if test "$ac_cv_header_ldap_h" = yes && test -n "$ldaplib"; then + MAPLIBS="$MAPLIBS $ldaplib" + status_ldap=yes + AC_DEFINE(WITH_LDAP,1,[Use OpenLDAP]) + elif test $status_ldap = yes; then + AC_MSG_ERROR([required library libldap (or its headers) is not found]) + else + status_ldap=no + fi +fi +AM_CONDITIONAL([COND_LDAP],[test $status_ldap = yes]) + # Grecs subsystem GRECS_SETUP([grecs],[tests getopt git2chg]) |