aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
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])

Return to:

Send suggestions and report system problems to the System administrator.