]>
Commit | Line | Data |
---|---|---|
b423cd4c | 1 | dnl |
b19ccc9e | 2 | dnl "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $" |
b423cd4c | 3 | dnl |
4 | dnl LDAP configuration stuff for the Common UNIX Printing System (CUPS). | |
5 | dnl | |
bf3816c7 | 6 | dnl Copyright 2007-2009 by Apple Inc. |
b423cd4c | 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 | |
bc44d920 | 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/". | |
b423cd4c | 14 | dnl |
15 | ||
bf3816c7 | 16 | AC_ARG_ENABLE(ldap, [ --disable-ldap disable LDAP support]) |
749b1e90 | 17 | AC_ARG_WITH(ldap-libs, [ --with-ldap-libs set directory for LDAP library], |
b423cd4c | 18 | LDFLAGS="-L$withval $LDFLAGS" |
19 | DSOFLAGS="-L$withval $DSOFLAGS",) | |
749b1e90 | 20 | AC_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 | ||
24 | LIBLDAP="" | |
25 | ||
26 | if 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 | 45 | fi |
46 | ||
47 | AC_SUBST(LIBLDAP) | |
48 | ||
49 | ||
50 | dnl | |
b19ccc9e | 51 | dnl End of "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $". |
b423cd4c | 52 | dnl |