diff options
| author | Bruce Momjian | 2006-03-06 17:41:44 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2006-03-06 17:41:44 +0000 |
| commit | 357cc01e57a404577b32b0ffe8919c9aeb6a4382 (patch) | |
| tree | 44b12a6374609691f202881a5aa97187fbd78446 /configure.in | |
| parent | ebdc35822d4f1466d66845c13f43914bcc7e307f (diff) | |
This patch adds native LDAP auth, for those platforms that don't have
PAM (such as Win32, but also unixen without PAM). On Unix, uses
OpenLDAP. On win32, uses the builin WinLDAP library.
Magnus Hagander
Diffstat (limited to 'configure.in')
| -rw-r--r-- | configure.in | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 0eec99433d9..d4a11f2ba0e 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -dnl $PostgreSQL: pgsql/configure.in,v 1.454 2006/03/05 15:58:18 momjian Exp $ +dnl $PostgreSQL: pgsql/configure.in,v 1.455 2006/03/06 17:41:43 momjian Exp $ dnl dnl Developers, please strive to achieve this order: dnl @@ -445,6 +445,17 @@ AC_SUBST(with_pam) # +# LDAP +# +AC_MSG_CHECKING([whether to build with LDAP support]) +PGAC_ARG_BOOL(with, ldap, no, + [ --with-ldap build with LDAP support], + [AC_DEFINE([USE_LDAP], 1, [Define to 1 to build with LDAP support. (--with-ldap)])]) +AC_MSG_RESULT([$with_ldap]) +AC_SUBST(with_ldap) + + +# # Bonjour # AC_MSG_CHECKING([whether to build with Bonjour support]) @@ -669,6 +680,14 @@ if test "$with_pam" = yes ; then fi +if test "$with_ldap" = yes ; then + if test "$PORTNAME" != "win32"; then + AC_CHECK_LIB(ldap, ldap_bind, [], [AC_MSG_ERROR([library 'ldap' is required for LDAP])]) + else + AC_CHECK_LIB(wldap32, ldap_bind, [], [AC_MSG_ERROR([library 'wldap32' is required for LDAP])]) + fi +fi + ## ## Header files ## @@ -744,6 +763,19 @@ if test "$with_pam" = yes ; then [AC_MSG_ERROR([header file <security/pam_appl.h> or <pam/pam_appl.h> is required for PAM.])])]) fi +if test "$with_ldap" = yes ; then + if test "$PORTNAME" != "win32"; then + AC_CHECK_HEADERS(ldap.h, [], + [AC_MSG_ERROR([header file <ldap.h> is required for LDAP])]) + else + AC_CHECK_HEADERS(winldap.h, [], + [AC_MSG_ERROR([header file <winldap.h> is required for LDAP])], + [AC_INCLUDES_DEFAULT +#include <windows.h> + ]) + fi +fi + if test "$with_bonjour" = yes ; then AC_CHECK_HEADER(DNSServiceDiscovery/DNSServiceDiscovery.h, [], [AC_MSG_ERROR([header file <DNSServiceDiscovery/DNSServiceDiscovery.h> is required for Bonjour])]) fi |
