1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
Index: configure.in
===================================================================
--- configure.in (révision 2495)
+++ configure.in (copie de travail)
@@ -177,36 +182,55 @@
AC_CHECK_FUNCS(getuid sigaction fsync fchmod fdwalk)
+dnl **************************************************
+dnl LDAP support.
+dnl **************************************************
LDAP_LIBS=
-AC_CHECK_HEADER(ldap.h, [
- AC_CHECK_LIB(ldap, ldap_init, AC_CHECK_LIB(lber, ber_free, [LDAP_LIBS="-lldap -llber"]))
+
+AC_ARG_WITH(openldap,
+ AC_HELP_STRING([--with-openldap],
+ [Enable LDAP backend @<:@default=auto@:>@]),
+ ,with_openldap=auto)
+
+if test x"$with_openldap" != xno; then
+ AC_CHECK_HEADER(ldap.h, [
+ AC_CHECK_LIB(ldap, ldap_init, AC_CHECK_LIB(lber, ber_free, [LDAP_LIBS="-lldap -llber"]))
])
-AC_SUBST(LDAP_LIBS)
-AM_CONDITIONAL(LDAP_SUPPORT, test -n "$LDAP_LIBS")
+ AC_SUBST(LDAP_LIBS)
-dnl **************************************************
-dnl LDAP support.
-dnl **************************************************
-if test "$os_win32" != yes; then
+ if test "$os_win32" != yes; then
+ SAVE_CFLAGS="$CFLAGS"
+ SAVE_LIBS="$LIBS"
+ LDAP_CFLAGS="-DLDAP_DEPRECATED"
+ CFLAGS="$CFLAGS $LDAP_CFLAGS"
+ LIBS="$LIBS $LDAP_LIBS"
+ AC_CHECK_FUNCS(ldap_ntlm_bind)
+ CFLAGS="$SAVE_CFLAGS"
+ LIBS="$SAVE_LIBS"
+
+ else # Win32
+ LDAP_CFLAGS="-DLDAP_DEPRECATED"
+ LDAP_LIBS="-lwldap32"
+ AC_SUBST(LDAP_CFLAGS)
+ AC_SUBST(LDAP_LIBS)
+ AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
+ msg_ldap="yes"
+ fi # Win32
+
+ if test -z "$LDAP_LIBS"; then
+ if test x"$with_openldap" = xyes; then
+ AC_MSG_ERROR([*** LDAP support explicitely requested but not found ***])
+ else
+ AC_MSG_WARN([*** LDAP support not found ***])
+ fi
+ fi
+
+else
+ AC_DEFINE(HAVE_LDAP,0,[Define if you have LDAP support])
+fi
-SAVE_CFLAGS="$CFLAGS"
-SAVE_LIBS="$LIBS"
-LDAP_CFLAGS="-DLDAP_DEPRECATED"
-CFLAGS="$CFLAGS $LDAP_CFLAGS"
-LIBS="$LIBS $LDAP_LIBS"
-AC_CHECK_FUNCS(ldap_ntlm_bind)
-CFLAGS="$SAVE_CFLAGS"
-LIBS="$SAVE_LIBS"
-
-else # Win32
-LDAP_CFLAGS="-DLDAP_DEPRECATED"
-LDAP_LIBS="-lwldap32"
-AC_SUBST(LDAP_CFLAGS)
-AC_SUBST(LDAP_LIBS)
-AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
-msg_ldap="yes"
-fi # Win32
+AM_CONDITIONAL(LDAP_SUPPORT, test -n "$LDAP_LIBS")
IT_PROG_INTLTOOL([0.35.0])
|