]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-ldap.m4
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / config-scripts / cups-ldap.m4
CommitLineData
b423cd4c 1dnl
b19ccc9e 2dnl "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $"
b423cd4c 3dnl
4dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS).
5dnl
5bd77a73 6dnl Copyright 2007-2008 by Apple Inc.
b423cd4c 7dnl Copyright 2003-2006 by Easy Software Products, all rights reserved.
8dnl
9dnl These coded instructions, statements, and computer programs are the
bc44d920 10dnl property of Apple Inc. and are protected by Federal copyright
11dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12dnl which should have been included with this file. If this file is
13dnl file is missing or damaged, see the license at "http://www.cups.org/".
b423cd4c 14dnl
15
16AC_ARG_ENABLE(ldap, [ --enable-ldap turn on LDAP support, default=yes])
749b1e90 17AC_ARG_WITH(ldap-libs, [ --with-ldap-libs set directory for LDAP library],
b423cd4c 18 LDFLAGS="-L$withval $LDFLAGS"
19 DSOFLAGS="-L$withval $DSOFLAGS",)
749b1e90 20AC_ARG_WITH(ldap-includes, [ --with-ldap-includes set directory for LDAP includes],
b423cd4c 21 CFLAGS="-I$withval $CFLAGS"
b423cd4c 22 CPPFLAGS="-I$withval $CPPFLAGS",)
23
24LIBLDAP=""
25
26if test x$enable_ldap != xno; then
749b1e90 27 AC_CHECK_HEADER(ldap.h, [
f301802f 28 AC_CHECK_LIB(ldap, ldap_initialize,
749b1e90
MS
29 AC_DEFINE(HAVE_LDAP)
30 AC_DEFINE(HAVE_OPENLDAP)
31 LIBLDAP="-lldap"
32 AC_CHECK_LIB(ldap, ldap_start_tls,
33 AC_DEFINE(HAVE_LDAP_SSL)),
34
35 AC_CHECK_LIB(ldap, ldap_init,
36 AC_DEFINE(HAVE_LDAP)
37 AC_DEFINE(HAVE_MOZILLA_LDAP)
38 LIBLDAP="-lldap"
39 AC_CHECK_HEADER(ldap_ssl.h, AC_DEFINE(HAVE_LDAP_SSL_H),,[#include <ldap.h>])
40 AC_CHECK_LIB(ldap, ldapssl_init,
41 AC_DEFINE(HAVE_LDAP_SSL)))
42 )
43 AC_CHECK_LIB(ldap, ldap_set_rebind_proc, AC_DEFINE(HAVE_LDAP_REBIND_PROC))
44 ])
b423cd4c 45fi
46
47AC_SUBST(LIBLDAP)
48
49
50dnl
b19ccc9e 51dnl End of "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $".
b423cd4c 52dnl