]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-ldap.m4
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / config-scripts / cups-ldap.m4
1 dnl
2 dnl "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $"
3 dnl
4 dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS).
5 dnl
6 dnl Copyright 2007-2008 by Apple Inc.
7 dnl Copyright 2003-2006 by Easy Software Products, all rights reserved.
8 dnl
9 dnl These coded instructions, statements, and computer programs are the
10 dnl property of Apple Inc. and are protected by Federal copyright
11 dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 dnl which should have been included with this file. If this file is
13 dnl file is missing or damaged, see the license at "http://www.cups.org/".
14 dnl
15
16 AC_ARG_ENABLE(ldap, [ --enable-ldap turn on LDAP support, default=yes])
17 AC_ARG_WITH(ldap-libs, [ --with-ldap-libs set directory for LDAP library],
18 LDFLAGS="-L$withval $LDFLAGS"
19 DSOFLAGS="-L$withval $DSOFLAGS",)
20 AC_ARG_WITH(ldap-includes, [ --with-ldap-includes set directory for LDAP includes],
21 CFLAGS="-I$withval $CFLAGS"
22 CPPFLAGS="-I$withval $CPPFLAGS",)
23
24 LIBLDAP=""
25
26 if test x$enable_ldap != xno; then
27 AC_CHECK_HEADER(ldap.h, [
28 AC_CHECK_LIB(ldap, ldap_initialize,
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 ])
45 fi
46
47 AC_SUBST(LIBLDAP)
48
49
50 dnl
51 dnl End of "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $".
52 dnl