996
|
1 # Process this file with autoconf to produce a configure script.
|
|
2 # This is only used for independent module building.
|
|
3 AC_INIT([LDAP module], [1.0], [xemacs-beta@xemacs.org])
|
|
4 AC_PREREQ(2.53)
|
1111
|
5 AC_REVISION($Revision: 1.2 $)
|
996
|
6 AC_COPYRIGHT([Configuration script for the LDAP module.
|
|
7 Copyright (C) 2002 Jerry James.
|
|
8
|
|
9 This file is part of XEmacs.
|
|
10
|
|
11 XEmacs is free software; you can redistribute it and/or modify it
|
|
12 under the terms of the GNU General Public License as published by
|
|
13 the Free Software Foundation; either version 2, or (at your
|
|
14 option) any later version.
|
|
15
|
|
16 XEmacs is distributed in the hope that it will be useful, but
|
|
17 WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
19 General Public License for more details.
|
|
20
|
|
21 You should have received a copy of the GNU General Public License
|
|
22 along with XEmacs; see the file COPYING. If not, write to the Free
|
|
23 Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
|
24 02111-1307, USA.])
|
|
25
|
|
26 AC_CONFIG_SRCDIR([eldap.c])
|
|
27
|
1111
|
28 m4_include([../common/configure-pre.ac])
|
996
|
29
|
|
30 # Find the LDAP headers and libraries
|
|
31 have_ldap="yes"
|
|
32 AC_CHECK_HEADERS([ldap.h lber.h], , [have_ldap="no"])
|
|
33 AS_IF([test "$have_ldap" = "yes"],
|
|
34 [AC_CHECK_LIB([ldap], [ldap_search], , [have_ldap="no"; LIBS="$LIBS -llber"],
|
|
35 [-llber])
|
|
36 test "$have_ldap" = "no" && {
|
|
37 AC_CHECK_LIB([ldap], [ldap_open], [have_ldap="yes"], [LIBS="$LIBS -lkrb"],
|
|
38 [-lkrb]) }
|
|
39 test "$have_ldap" = "no" && {
|
|
40 AC_CHECK_LIB([ldap], [ldap_open], [have_ldap="yes"], [LIBS="$LIBS -ldes"],
|
|
41 [-ldes]) }],
|
|
42 [AS_ERROR([Cannot find the LDAP header file])])
|
|
43 AS_IF([test "$have_ldap" = "yes"],
|
|
44 [AC_CHECK_FUNCS([ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result])],
|
|
45 [AS_ERROR([Cannot link with the LDAP library])])
|
|
46 AC_SUBST(ldap_libs, "$LIBS")
|
|
47
|
1111
|
48 m4_include([../common/configure-post.ac])
|