]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - config-scripts/cups-ldap.m4
Merge changes from CUPS 1.4svn-r7961.
[thirdparty/cups.git] / config-scripts / cups-ldap.m4
index c78e175098bd314216fad1e91a6a42488572b0cc..742a4bcce335fe786127f6bb5a290374d708f5c1 100644 (file)
@@ -1,50 +1,52 @@
 dnl
-dnl "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $"
+dnl "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $"
 dnl
 dnl   LDAP configuration stuff for the Common UNIX Printing System (CUPS).
 dnl
+dnl   Copyright 2007-2008 by Apple Inc.
 dnl   Copyright 2003-2006 by Easy Software Products, all rights reserved.
 dnl
 dnl   These coded instructions, statements, and computer programs are the
-dnl   property of Easy Software Products and are protected by Federal
-dnl   copyright law.  Distribution and use rights are outlined in the file
-dnl   "LICENSE.txt" which should have been included with this file.  If this
-dnl   file is missing or damaged please contact Easy Software Products
-dnl   at:
-dnl
-dnl       Attn: CUPS Licensing Information
-dnl       Easy Software Products
-dnl       44141 Airport View Drive, Suite 204
-dnl       Hollywood, Maryland 20636 USA
-dnl
-dnl       Voice: (301) 373-9600
-dnl       EMail: cups-info@cups.org
-dnl         WWW: http://www.cups.org/
+dnl   property of Apple Inc. and are protected by Federal copyright
+dnl   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+dnl   which should have been included with this file.  If this file is
+dnl   file is missing or damaged, see the license at "http://www.cups.org/".
 dnl
 
 AC_ARG_ENABLE(ldap, [  --enable-ldap           turn on LDAP support, default=yes])
-AC_ARG_WITH(openldap-libs, [  --with-openldap-libs    set directory for OpenLDAP library],
+AC_ARG_WITH(ldap-libs, [  --with-ldap-libs        set directory for LDAP library],
     LDFLAGS="-L$withval $LDFLAGS"
     DSOFLAGS="-L$withval $DSOFLAGS",)
-AC_ARG_WITH(openldap-includes, [  --with-openldap-includes
-                          set directory for OpenLDAP includes],
+AC_ARG_WITH(ldap-includes, [  --with-ldap-includes    set directory for LDAP includes],
     CFLAGS="-I$withval $CFLAGS"
-    CXXFLAGS="-I$withval $CXXFLAGS"
     CPPFLAGS="-I$withval $CPPFLAGS",)
 
 LIBLDAP=""
 
 if test x$enable_ldap != xno; then
-    AC_CHECK_HEADER(ldap.h,
+    AC_CHECK_HEADER(ldap.h, [
        AC_CHECK_LIB(ldap, ldap_initialize,
-            AC_DEFINE(HAVE_LDAP)
-            AC_DEFINE(HAVE_OPENLDAP)
-           LIBLDAP="-lldap"))
+           AC_DEFINE(HAVE_LDAP)
+           AC_DEFINE(HAVE_OPENLDAP)
+           LIBLDAP="-lldap"
+           AC_CHECK_LIB(ldap, ldap_start_tls,
+               AC_DEFINE(HAVE_LDAP_SSL)),
+
+           AC_CHECK_LIB(ldap, ldap_init,
+               AC_DEFINE(HAVE_LDAP)
+               AC_DEFINE(HAVE_MOZILLA_LDAP)
+               LIBLDAP="-lldap"
+               AC_CHECK_HEADER(ldap_ssl.h, AC_DEFINE(HAVE_LDAP_SSL_H),,[#include <ldap.h>])
+               AC_CHECK_LIB(ldap, ldapssl_init,
+                   AC_DEFINE(HAVE_LDAP_SSL)))
+       )
+       AC_CHECK_LIB(ldap, ldap_set_rebind_proc, AC_DEFINE(HAVE_LDAP_REBIND_PROC))
+    ])
 fi
 
 AC_SUBST(LIBLDAP)
 
 
 dnl
-dnl End of "$Id: cups-ldap.m4 5564 2006-05-22 00:59:11Z mike $".
+dnl End of "$Id: cups-ldap.m4 7800 2008-07-25 21:01:34Z mike $".
 dnl